All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nathan Chancellor <nathan@kernel.org>
To: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Cc: linuxarm@huawei.com, mauro.chehab@huawei.com,
	Beatriz Martins de Carvalho <martinsdecarvalhobeatriz@gmail.com>,
	Deepak R Varma <drv@mailo.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Hans Verkuil <hverkuil-cisco@xs4all.nl>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Nick Desaulniers <ndesaulniers@google.com>,
	Sakari Ailus <sakari.ailus@linux.intel.com>,
	Tom Rix <trix@redhat.com>,
	Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>,
	linux-kernel@vger.kernel.org, linux-media@vger.kernel.org,
	linux-staging@lists.linux.dev, llvm@lists.linux.dev
Subject: Re: [PATCH 2/3] media: atomisp-gc2235: drop an unused var
Date: Fri, 12 Nov 2021 13:46:23 -0700	[thread overview]
Message-ID: <YY7Sn6yW9jRKHkWl@archlinux-ax161> (raw)
In-Reply-To: <81245e1273f2e0e96a520b9d00cd415f65d37b48.1636672052.git.mchehab+huawei@kernel.org>

On Thu, Nov 11, 2021 at 11:08:52PM +0000, Mauro Carvalho Chehab wrote:
> Fix this clang Werror with W=1:
> 
> drivers/staging/media/atomisp/i2c/atomisp-gc2235.c:573:6: error: variable 'ret' set but not used [-Werror,-Wunused-but-set-variable]
>         int ret = -1;
>             ^
> 
> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

Reviewed-by: Nathan Chancellor <nathan@kernel.org>

> ---
> 
> To mailbombing on a large number of people, only mailing lists were C/C on the cover.
> See [PATCH 0/3] at: https://lore.kernel.org/all/cover.1636672052.git.mchehab+huawei@kernel.org/
> 
>  drivers/staging/media/atomisp/i2c/atomisp-gc2235.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/staging/media/atomisp/i2c/atomisp-gc2235.c b/drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
> index 5e7085264189..0e6b2e6100d1 100644
> --- a/drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
> +++ b/drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
> @@ -570,14 +570,16 @@ static int power_ctrl(struct v4l2_subdev *sd, bool flag)
>  static int gpio_ctrl(struct v4l2_subdev *sd, bool flag)
>  {
>  	struct gc2235_device *dev = to_gc2235_sensor(sd);
> -	int ret = -1;
> +	int ret;
>  
>  	if (!dev || !dev->platform_data)
>  		return -ENODEV;
>  
> -	ret |= dev->platform_data->gpio1_ctrl(sd, !flag);
> +	ret = dev->platform_data->gpio1_ctrl(sd, !flag);
>  	usleep_range(60, 90);
> -	return dev->platform_data->gpio0_ctrl(sd, flag);
> +	ret |= dev->platform_data->gpio0_ctrl(sd, flag);
> +
> +	return ret;
>  }
>  
>  static int power_up(struct v4l2_subdev *sd)
> -- 
> 2.33.1
> 
> 

  reply	other threads:[~2021-11-12 20:46 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-11 23:08 [PATCH 0/3] Fix some W=1 clang Werror at staging/media Mauro Carvalho Chehab
2021-11-11 23:08 ` Mauro Carvalho Chehab
2021-11-11 23:08 ` [PATCH 1/3] media: ipu3: drop an unused variable Mauro Carvalho Chehab
2021-11-11 23:08   ` Mauro Carvalho Chehab
2021-11-12 20:43   ` Nathan Chancellor
2021-11-16 12:57   ` Sakari Ailus
2021-11-11 23:08 ` [PATCH 2/3] media: atomisp-gc2235: drop an unused var Mauro Carvalho Chehab
2021-11-11 23:08   ` Mauro Carvalho Chehab
2021-11-12 20:46   ` Nathan Chancellor [this message]
2021-11-15  9:28   ` Dan Carpenter
2021-11-15 17:55     ` Nick Desaulniers
2021-11-11 23:08 ` [PATCH 3/3] media: atomisp: handle errors at sh_css_create_isp_params() Mauro Carvalho Chehab
2021-11-11 23:08   ` Mauro Carvalho Chehab
2021-11-12 20:49   ` Nathan Chancellor
2021-11-15  9:50   ` Dan Carpenter

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=YY7Sn6yW9jRKHkWl@archlinux-ax161 \
    --to=nathan@kernel.org \
    --cc=drv@mailo.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=linuxarm@huawei.com \
    --cc=llvm@lists.linux.dev \
    --cc=martinsdecarvalhobeatriz@gmail.com \
    --cc=mauro.chehab@huawei.com \
    --cc=mchehab+huawei@kernel.org \
    --cc=mchehab@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=sakari.ailus@linux.intel.com \
    --cc=tomi.valkeinen@ideasonboard.com \
    --cc=trix@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.