From: Mauro Carvalho Chehab Date: Fri, 11 Sep 2020 07:27:35 +0000 (+0200) Subject: media: av7110: don't do float point math X-Git-Tag: v5.10.7~1469^2~241 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5e8db34966222c34d7e98767a2d54b6bb3aa248d;p=platform%2Fkernel%2Flinux-rpi.git media: av7110: don't do float point math It sounds that earlier versions of GCC have troubles when doing const math at compile time, if no typecast is used: on i386: ERROR: modpost: "__floatunsidf" [drivers/media/pci/ttpci/dvb-ttpci.ko] undefined! ERROR: modpost: "__ltdf2" [drivers/media/pci/ttpci/dvb-ttpci.ko] undefined! The warning was generated on gcc (SUSE Linux) 7.5.0. Gcc 9.2 compiles it fine. As an added bonus, it also fixes this objtool warning: drivers/media/pci/ttpci/av7110_v4l.c:163:11: error: SSE register return with SSE disabled Reported-by: Randy Dunlap Acked-by: Randy Dunlap Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/pci/ttpci/av7110_v4l.c b/drivers/media/pci/ttpci/av7110_v4l.c index 6d9c908..c89f536 100644 --- a/drivers/media/pci/ttpci/av7110_v4l.c +++ b/drivers/media/pci/ttpci/av7110_v4l.c @@ -160,9 +160,9 @@ static int ves1820_set_tv_freq(struct saa7146_dev *dev, u32 freq) buf[1] = div & 0xff; buf[2] = 0x8e; - if (freq < 16U * 168.25) + if (freq < 16U * 16825 / 100) config = 0xa0; - else if (freq < 16U * 447.25) + else if (freq < 16U * 44725 / 100) config = 0x90; else config = 0x30;