* [PATCH]: media: USB cx231xx: Remove unused var assignment
@ 2025-10-21 5:42 Michael Estner
2025-11-03 11:27 ` Hans Verkuil
0 siblings, 1 reply; 2+ messages in thread
From: Michael Estner @ 2025-10-21 5:42 UTC (permalink / raw)
To: linux-media
Cc: Michael Estner, Mauro Carvalho Chehab, Hans Verkuil,
Colin Ian King, Dr. David Alan Gilbert, linux-kernel
* Remove unused variable assignments.
The status variable has multiple assignments which are overwritten
before used once. With this patch this unnecessary variable assignments
get removed.
* I got the issues out of the report from:
https://scan7.scan.coverity.com/#/project-view/55309/11354
The exact findings are:
* Issue=1226885
* Issue=1226861
* Issue=1226879
* Issue=1226878
* Issue=1226866
Signed-off-by: Michael Estner <michaelestner@web.de>
---
drivers/media/usb/cx231xx/cx231xx-avcore.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/drivers/media/usb/cx231xx/cx231xx-avcore.c b/drivers/media/usb/cx231xx/cx231xx-avcore.c
index 1cfec76b72f3..d268d988123e 100644
--- a/drivers/media/usb/cx231xx/cx231xx-avcore.c
+++ b/drivers/media/usb/cx231xx/cx231xx-avcore.c
@@ -760,7 +760,6 @@ int cx231xx_set_decoder_video_input(struct cx231xx *dev,
status = vid_blk_write_word(dev, AFE_CTRL, value);
- status = cx231xx_afe_set_mode(dev, AFE_MODE_BASEBAND);
break;
case CX231XX_VMUX_TELEVISION:
case CX231XX_VMUX_CABLE:
@@ -910,8 +909,6 @@ int cx231xx_set_decoder_video_input(struct cx231xx *dev,
if (dev->tuner_type == TUNER_NXP_TDA18271) {
status = vid_blk_read_word(dev, PIN_CTRL,
&value);
- status = vid_blk_write_word(dev, PIN_CTRL,
- (value & 0xFFFFFFEF));
}
break;
@@ -1092,7 +1089,6 @@ int cx231xx_set_audio_input(struct cx231xx *dev, u8 input)
ainput = AUDIO_INPUT_TUNER_TV;
break;
case CX231XX_AMUX_LINE_IN:
- status = cx231xx_i2s_blk_set_audio_input(dev, input);
ainput = AUDIO_INPUT_LINE;
break;
default:
@@ -1865,8 +1861,6 @@ int cx231xx_dif_set_standard(struct cx231xx *dev, u32 standard)
0x1befbf06);
status = vid_blk_write_word(dev, DIF_SRC_GAIN_CONTROL,
0x000035e8);
- status = vid_blk_write_word(dev, DIF_SOFT_RST_CTRL_REVB,
- 0x00000000);
/* Save the Spec Inversion value */
dif_misc_ctrl_value &= FLD_DIF_SPEC_INV;
dif_misc_ctrl_value |= 0x3A0A3F10;
@@ -2702,8 +2696,6 @@ int cx231xx_set_gpio_value(struct cx231xx *dev, int pin_number, int pin_value)
/* It was in input mode */
value = dev->gpio_dir | (1 << pin_number);
dev->gpio_dir = value;
- status = cx231xx_set_gpio_bit(dev, dev->gpio_dir,
- dev->gpio_val);
}
if (pin_value == 0)
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH]: media: USB cx231xx: Remove unused var assignment
2025-10-21 5:42 [PATCH]: media: USB cx231xx: Remove unused var assignment Michael Estner
@ 2025-11-03 11:27 ` Hans Verkuil
0 siblings, 0 replies; 2+ messages in thread
From: Hans Verkuil @ 2025-11-03 11:27 UTC (permalink / raw)
To: Michael Estner, linux-media
Cc: Mauro Carvalho Chehab, Hans Verkuil, Colin Ian King,
Dr. David Alan Gilbert, linux-kernel
On 21/10/2025 07:42, Michael Estner wrote:
> * Remove unused variable assignments.
> The status variable has multiple assignments which are overwritten
> before used once. With this patch this unnecessary variable assignments
> get removed.
>
> * I got the issues out of the report from:
> https://scan7.scan.coverity.com/#/project-view/55309/11354
> The exact findings are:
> * Issue=1226885
> * Issue=1226861
> * Issue=1226879
> * Issue=1226878
> * Issue=1226866
>
> Signed-off-by: Michael Estner <michaelestner@web.de>
> ---
> drivers/media/usb/cx231xx/cx231xx-avcore.c | 8 --------
> 1 file changed, 8 deletions(-)
>
> diff --git a/drivers/media/usb/cx231xx/cx231xx-avcore.c b/drivers/media/usb/cx231xx/cx231xx-avcore.c
> index 1cfec76b72f3..d268d988123e 100644
> --- a/drivers/media/usb/cx231xx/cx231xx-avcore.c
> +++ b/drivers/media/usb/cx231xx/cx231xx-avcore.c
> @@ -760,7 +760,6 @@ int cx231xx_set_decoder_video_input(struct cx231xx *dev,
>
> status = vid_blk_write_word(dev, AFE_CTRL, value);
>
> - status = cx231xx_afe_set_mode(dev, AFE_MODE_BASEBAND);
Is this AI generated or something? This patch obviously breaks the driver.
Nacked-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Regards,
Hans
> break;
> case CX231XX_VMUX_TELEVISION:
> case CX231XX_VMUX_CABLE:
> @@ -910,8 +909,6 @@ int cx231xx_set_decoder_video_input(struct cx231xx *dev,
> if (dev->tuner_type == TUNER_NXP_TDA18271) {
> status = vid_blk_read_word(dev, PIN_CTRL,
> &value);
> - status = vid_blk_write_word(dev, PIN_CTRL,
> - (value & 0xFFFFFFEF));
> }
>
> break;
> @@ -1092,7 +1089,6 @@ int cx231xx_set_audio_input(struct cx231xx *dev, u8 input)
> ainput = AUDIO_INPUT_TUNER_TV;
> break;
> case CX231XX_AMUX_LINE_IN:
> - status = cx231xx_i2s_blk_set_audio_input(dev, input);
> ainput = AUDIO_INPUT_LINE;
> break;
> default:
> @@ -1865,8 +1861,6 @@ int cx231xx_dif_set_standard(struct cx231xx *dev, u32 standard)
> 0x1befbf06);
> status = vid_blk_write_word(dev, DIF_SRC_GAIN_CONTROL,
> 0x000035e8);
> - status = vid_blk_write_word(dev, DIF_SOFT_RST_CTRL_REVB,
> - 0x00000000);
> /* Save the Spec Inversion value */
> dif_misc_ctrl_value &= FLD_DIF_SPEC_INV;
> dif_misc_ctrl_value |= 0x3A0A3F10;
> @@ -2702,8 +2696,6 @@ int cx231xx_set_gpio_value(struct cx231xx *dev, int pin_number, int pin_value)
> /* It was in input mode */
> value = dev->gpio_dir | (1 << pin_number);
> dev->gpio_dir = value;
> - status = cx231xx_set_gpio_bit(dev, dev->gpio_dir,
> - dev->gpio_val);
> }
>
> if (pin_value == 0)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-11-03 11:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-21 5:42 [PATCH]: media: USB cx231xx: Remove unused var assignment Michael Estner
2025-11-03 11:27 ` Hans Verkuil
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).