[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YY7Sn6yW9jRKHkWl@archlinux-ax161>
Date: Fri, 12 Nov 2021 13:46:23 -0700
From: Nathan Chancellor <nathan@...nel.org>
To: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>
Cc: linuxarm@...wei.com, mauro.chehab@...wei.com,
Beatriz Martins de Carvalho
<martinsdecarvalhobeatriz@...il.com>,
Deepak R Varma <drv@...lo.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Hans Verkuil <hverkuil-cisco@...all.nl>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Nick Desaulniers <ndesaulniers@...gle.com>,
Sakari Ailus <sakari.ailus@...ux.intel.com>,
Tom Rix <trix@...hat.com>,
Tomi Valkeinen <tomi.valkeinen@...asonboard.com>,
linux-kernel@...r.kernel.org, linux-media@...r.kernel.org,
linux-staging@...ts.linux.dev, llvm@...ts.linux.dev
Subject: Re: [PATCH 2/3] media: atomisp-gc2235: drop an unused var
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@...nel.org>
Reviewed-by: Nathan Chancellor <nathan@...nel.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
>
>
Powered by blists - more mailing lists