linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hans Verkuil <hverkuil+cisco@kernel.org>
To: Michael Estner <michaelestner@web.de>, linux-media@vger.kernel.org
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>,
	Hans Verkuil <hverkuil@kernel.org>,
	Colin Ian King <colin.i.king@gmail.com>,
	"Dr. David Alan Gilbert" <linux@treblig.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH]: media: USB cx231xx: Remove unused var assignment
Date: Mon, 3 Nov 2025 12:27:08 +0100	[thread overview]
Message-ID: <adb2b4eb-b41e-4c1b-b1b3-05bd0ae93f45@kernel.org> (raw)
In-Reply-To: <20251021054217.16005-1-michaelestner@web.de>

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)


      reply	other threads:[~2025-11-03 11:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-21  5:42 [PATCH]: media: USB cx231xx: Remove unused var assignment Michael Estner
2025-11-03 11:27 ` Hans Verkuil [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=adb2b4eb-b41e-4c1b-b1b3-05bd0ae93f45@kernel.org \
    --to=hverkuil+cisco@kernel.org \
    --cc=colin.i.king@gmail.com \
    --cc=hverkuil@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux@treblig.org \
    --cc=mchehab@kernel.org \
    --cc=michaelestner@web.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).