* [PATCH -next] media: av7110_v4l: Fix build error
@ 2020-09-09 13:38 YueHaibing
2021-06-01 9:16 ` Mauro Carvalho Chehab
0 siblings, 1 reply; 3+ messages in thread
From: YueHaibing @ 2020-09-09 13:38 UTC (permalink / raw)
To: mchehab; +Cc: linux-media, linux-kernel, YueHaibing
drivers/media/pci/ttpci/av7110_v4l.c: In function ‘vidioc_s_frequency’:
drivers/media/pci/ttpci/av7110_v4l.c:163:11: error: SSE register return with SSE disabled
if (freq < 16U * 168.25)
~~~~~^~~~~~~~~~~~~~
Get rid of float pointing math to fix this.
Fixes: 13c129066845 ("media: av7110_v4l: avoid a typecast")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
drivers/media/pci/ttpci/av7110_v4l.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/media/pci/ttpci/av7110_v4l.c b/drivers/media/pci/ttpci/av7110_v4l.c
index 6d9c908be713..ba745b161cba 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 < (16 * 16825) / 100)
config = 0xa0;
- else if (freq < 16U * 447.25)
+ else if (freq < (16 * 44725) / 100)
config = 0x90;
else
config = 0x30;
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH -next] media: av7110_v4l: Fix build error
2020-09-09 13:38 [PATCH -next] media: av7110_v4l: Fix build error YueHaibing
@ 2021-06-01 9:16 ` Mauro Carvalho Chehab
2021-06-01 9:19 ` Mauro Carvalho Chehab
0 siblings, 1 reply; 3+ messages in thread
From: Mauro Carvalho Chehab @ 2021-06-01 9:16 UTC (permalink / raw)
To: YueHaibing; +Cc: linux-media, linux-kernel
Em Wed, 9 Sep 2020 21:38:44 +0800
YueHaibing <yuehaibing@huawei.com> escreveu:
> drivers/media/pci/ttpci/av7110_v4l.c: In function ‘vidioc_s_frequency’:
> drivers/media/pci/ttpci/av7110_v4l.c:163:11: error: SSE register return with SSE disabled
> if (freq < 16U * 168.25)
> ~~~~~^~~~~~~~~~~~~~
> Get rid of float pointing math to fix this.
Out of curiosity: what compiler are you using? This sounds to be a compiler
issue, as compiler should be optimizing the code by doing the math evaluation
at compile time instead of doing it during runtime.
>
> Fixes: 13c129066845 ("media: av7110_v4l: avoid a typecast")
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
> drivers/media/pci/ttpci/av7110_v4l.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/media/pci/ttpci/av7110_v4l.c b/drivers/media/pci/ttpci/av7110_v4l.c
> index 6d9c908be713..ba745b161cba 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 < (16 * 16825) / 100)
> config = 0xa0;
> - else if (freq < 16U * 447.25)
> + else if (freq < (16 * 44725) / 100)
> config = 0x90;
> else
> config = 0x30;
Thanks,
Mauro
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH -next] media: av7110_v4l: Fix build error
2021-06-01 9:16 ` Mauro Carvalho Chehab
@ 2021-06-01 9:19 ` Mauro Carvalho Chehab
0 siblings, 0 replies; 3+ messages in thread
From: Mauro Carvalho Chehab @ 2021-06-01 9:19 UTC (permalink / raw)
To: YueHaibing; +Cc: linux-media, linux-kernel
Em Tue, 1 Jun 2021 11:16:17 +0200
Mauro Carvalho Chehab <mchehab@kernel.org> escreveu:
> Em Wed, 9 Sep 2020 21:38:44 +0800
> YueHaibing <yuehaibing@huawei.com> escreveu:
>
> > drivers/media/pci/ttpci/av7110_v4l.c: In function ‘vidioc_s_frequency’:
> > drivers/media/pci/ttpci/av7110_v4l.c:163:11: error: SSE register return with SSE disabled
> > if (freq < 16U * 168.25)
> > ~~~~~^~~~~~~~~~~~~~
> > Get rid of float pointing math to fix this.
>
> Out of curiosity: what compiler are you using? This sounds to be a compiler
> issue, as compiler should be optimizing the code by doing the math evaluation
> at compile time instead of doing it during runtime.
Nevermind. A similar patch was already applied upstream.
Please ignore this e-mail.
Thanks,
Mauro
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-06-01 9:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-09 13:38 [PATCH -next] media: av7110_v4l: Fix build error YueHaibing
2021-06-01 9:16 ` Mauro Carvalho Chehab
2021-06-01 9:19 ` Mauro Carvalho Chehab
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).