On Wed Aug 27 20:39:09 2025 +0800, Qianfeng Rong wrote:
> Change the 'ret' variable from u8/u32 to int to store zero or negative
> error codes returned by other functions.
>
> Storing the negative error codes in unsigned type, doesn't cause an issue
> at runtime but it's ugly as pants.
>
> No effect on runtime.
>
> Signed-off-by: Qianfeng Rong <[email protected]>
> Signed-off-by: Hans Verkuil <[email protected]>
Patch committed.
Thanks,
Hans Verkuil
drivers/media/dvb-frontends/cxd2841er.c | 3 ++-
drivers/media/dvb-frontends/lgdt330x.c | 4 ++--
2 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/drivers/media/dvb-frontends/cxd2841er.c
b/drivers/media/dvb-frontends/cxd2841er.c
index 415f1f91cc30..8fcb4417ba22 100644
--- a/drivers/media/dvb-frontends/cxd2841er.c
+++ b/drivers/media/dvb-frontends/cxd2841er.c
@@ -1936,7 +1936,8 @@ static void cxd2841er_read_ber(struct dvb_frontend *fe)
{
struct dtv_frontend_properties *p = &fe->dtv_property_cache;
struct cxd2841er_priv *priv = fe->demodulator_priv;
- u32 ret, bit_error = 0, bit_count = 0;
+ u32 bit_error = 0, bit_count = 0;
+ int ret;
dev_dbg(&priv->i2c->dev, "%s()\n", __func__);
switch (p->delivery_system) {
diff --git a/drivers/media/dvb-frontends/lgdt330x.c
b/drivers/media/dvb-frontends/lgdt330x.c
index cab442a350a5..8c34a5b850bc 100644
--- a/drivers/media/dvb-frontends/lgdt330x.c
+++ b/drivers/media/dvb-frontends/lgdt330x.c
@@ -124,7 +124,6 @@ static int i2c_read_demod_bytes(struct lgdt330x_state
*state,
/* Software reset */
static int lgdt3302_sw_reset(struct lgdt330x_state *state)
{
- u8 ret;
u8 reset[] = {
IRQ_MASK,
/*
@@ -133,6 +132,7 @@ static int lgdt3302_sw_reset(struct lgdt330x_state *state)
*/
0x00
};
+ int ret;
ret = i2c_write_demod_bytes(state,
reset, sizeof(reset));
@@ -147,11 +147,11 @@ static int lgdt3302_sw_reset(struct lgdt330x_state *state)
static int lgdt3303_sw_reset(struct lgdt330x_state *state)
{
- u8 ret;
u8 reset[] = {
0x02,
0x00 /* bit 0 is active low software reset */
};
+ int ret;
ret = i2c_write_demod_bytes(state,
reset, sizeof(reset));
_______________________________________________
linuxtv-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]