* [PATCH] media: stv0288: use explicitly signed char
@ 2022-10-24 16:27 Jason A. Donenfeld
2022-11-02 2:47 ` Jason A. Donenfeld
0 siblings, 1 reply; 3+ messages in thread
From: Jason A. Donenfeld @ 2022-10-24 16:27 UTC (permalink / raw)
To: linux-kernel; +Cc: Jason A. Donenfeld, Mauro Carvalho Chehab, linux-media
With char becoming unsigned by default, and with `char` alone being
ambiguous and based on architecture, signed chars need to be marked
explicitly as such. Use `s8` and `u8` types here, since that's what
surrounding code does. This fixes:
drivers/media/dvb-frontends/stv0288.c:471 stv0288_set_frontend() warn: assigning (-9) to unsigned variable 'tm'
drivers/media/dvb-frontends/stv0288.c:471 stv0288_set_frontend() warn: we never enter this loop
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: linux-media@vger.kernel.org
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
---
drivers/media/dvb-frontends/stv0288.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/media/dvb-frontends/stv0288.c b/drivers/media/dvb-frontends/stv0288.c
index 3d54a0ec86af..3ae1f3a2f142 100644
--- a/drivers/media/dvb-frontends/stv0288.c
+++ b/drivers/media/dvb-frontends/stv0288.c
@@ -440,9 +440,8 @@ static int stv0288_set_frontend(struct dvb_frontend *fe)
struct stv0288_state *state = fe->demodulator_priv;
struct dtv_frontend_properties *c = &fe->dtv_property_cache;
- char tm;
- unsigned char tda[3];
- u8 reg, time_out = 0;
+ u8 tda[3], reg, time_out = 0;
+ s8 tm;
dprintk("%s : FE_SET_FRONTEND\n", __func__);
--
2.38.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] media: stv0288: use explicitly signed char
2022-10-24 16:27 [PATCH] media: stv0288: use explicitly signed char Jason A. Donenfeld
@ 2022-11-02 2:47 ` Jason A. Donenfeld
2022-11-11 2:50 ` Jason A. Donenfeld
0 siblings, 1 reply; 3+ messages in thread
From: Jason A. Donenfeld @ 2022-11-02 2:47 UTC (permalink / raw)
To: Mauro Carvalho Chehab; +Cc: linux-media, linux-kernel
Hi Mauro,
On Mon, Oct 24, 2022 at 6:28 PM Jason A. Donenfeld <Jason@zx2c4.com> wrote:
>
> With char becoming unsigned by default, and with `char` alone being
> ambiguous and based on architecture, signed chars need to be marked
> explicitly as such. Use `s8` and `u8` types here, since that's what
> surrounding code does. This fixes:
>
> drivers/media/dvb-frontends/stv0288.c:471 stv0288_set_frontend() warn: assigning (-9) to unsigned variable 'tm'
> drivers/media/dvb-frontends/stv0288.c:471 stv0288_set_frontend() warn: we never enter this loop
>
> Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
> Cc: linux-media@vger.kernel.org
> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Was wondering whether you planned on taking this into your tree as a
6.1 fix for Linus for rc4?
Thanks,
Jason
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] media: stv0288: use explicitly signed char
2022-11-02 2:47 ` Jason A. Donenfeld
@ 2022-11-11 2:50 ` Jason A. Donenfeld
0 siblings, 0 replies; 3+ messages in thread
From: Jason A. Donenfeld @ 2022-11-11 2:50 UTC (permalink / raw)
To: Mauro Carvalho Chehab; +Cc: linux-media, linux-kernel
Hi Mauro,
On Wed, Nov 2, 2022 at 3:47 AM Jason A. Donenfeld <Jason@zx2c4.com> wrote:
>
> Hi Mauro,
>
> On Mon, Oct 24, 2022 at 6:28 PM Jason A. Donenfeld <Jason@zx2c4.com> wrote:
> >
> > With char becoming unsigned by default, and with `char` alone being
> > ambiguous and based on architecture, signed chars need to be marked
> > explicitly as such. Use `s8` and `u8` types here, since that's what
> > surrounding code does. This fixes:
> >
> > drivers/media/dvb-frontends/stv0288.c:471 stv0288_set_frontend() warn: assigning (-9) to unsigned variable 'tm'
> > drivers/media/dvb-frontends/stv0288.c:471 stv0288_set_frontend() warn: we never enter this loop
> >
> > Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
> > Cc: linux-media@vger.kernel.org
> > Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
>
> Was wondering whether you planned on taking this into your tree as a
> 6.1 fix for Linus for rc4?
Thought I should follow up with you about this again.
Thanks,
Jason
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-11-11 2:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-24 16:27 [PATCH] media: stv0288: use explicitly signed char Jason A. Donenfeld
2022-11-02 2:47 ` Jason A. Donenfeld
2022-11-11 2:50 ` Jason A. Donenfeld
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®