All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Simek <michal.simek@amd.com>
To: Ashok Reddy Soma <ashok.reddy.soma@amd.com>, <u-boot@lists.denx.de>
Cc: <peng.fan@nxp.com>, <jh80.chung@samsung.com>,
	Algapally Santosh Sagar <santoshsagar.algapally@amd.com>
Subject: Re: [PATCH 2/4] gpio: zynqmp: Remove unused variable ret
Date: Fri, 6 Jan 2023 13:42:10 +0100	[thread overview]
Message-ID: <95c3e8d3-b4e5-c6e5-dc28-18bf711d0cd5@amd.com> (raw)
In-Reply-To: <20230106120035.2183-3-ashok.reddy.soma@amd.com>



On 1/6/23 13:00, Ashok Reddy Soma wrote:
> From: Algapally Santosh Sagar <santoshsagar.algapally@amd.com>
> 
> There is a unused variable ret, due to which we are getting sparse warning
> as below.
> warning: variable 'ret' set but not used [-Wunused-but-set-variable].
> 
> Remove variable ret.
> 
> Signed-off-by: Algapally Santosh Sagar <santoshsagar.algapally@amd.com>
> Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@amd.com>
> ---
> 
>   drivers/gpio/zynqmp_gpio_modepin.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/gpio/zynqmp_gpio_modepin.c b/drivers/gpio/zynqmp_gpio_modepin.c
> index 078fd83395..52eda9ceb4 100644
> --- a/drivers/gpio/zynqmp_gpio_modepin.c
> +++ b/drivers/gpio/zynqmp_gpio_modepin.c
> @@ -45,9 +45,8 @@ static int modepin_gpio_set_value(struct udevice *dev, unsigned int offset,
>   {
>   	u32 ret_payload[PAYLOAD_ARG_CNT];
>   	u32 out_val = 0;
> -	int ret;
>   
> -	ret = get_gpio_modepin(ret_payload);
> +	get_gpio_modepin(ret_payload);

:-) what about return error if get_gpio_modepin fails?

M

>   	if (value)
>   		out_val = OUTVAL(offset) | ret_payload[1];
>   	else

  reply	other threads:[~2023-01-06 12:42 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-06 12:00 [PATCH 0/4] Fix sparse warnings Ashok Reddy Soma
2023-01-06 12:00 ` [PATCH 1/4] xilinx: common: Add missing prototype for board_get_usable_ram_top Ashok Reddy Soma
2023-01-06 12:44   ` Michal Simek
2023-01-06 12:00 ` [PATCH 2/4] gpio: zynqmp: Remove unused variable ret Ashok Reddy Soma
2023-01-06 12:42   ` Michal Simek [this message]
2023-01-06 12:00 ` [PATCH 3/4] xilinx: versal: Add missing prototype Ashok Reddy Soma
2023-01-06 12:38   ` Michal Simek
2023-01-06 12:00 ` [PATCH 4/4] drivers: mmc: Change datatype to fix a warning Ashok Reddy Soma
2023-01-06 12:41   ` Michal Simek
2023-01-06 12:45 ` [PATCH 0/4] Fix sparse warnings Michal Simek

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=95c3e8d3-b4e5-c6e5-dc28-18bf711d0cd5@amd.com \
    --to=michal.simek@amd.com \
    --cc=ashok.reddy.soma@amd.com \
    --cc=jh80.chung@samsung.com \
    --cc=peng.fan@nxp.com \
    --cc=santoshsagar.algapally@amd.com \
    --cc=u-boot@lists.denx.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 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.