From: Varka Bhadram <varkabhadram@gmail.com>
To: Varka Bhadram <varkabhadram@gmail.com>, linux-gpio@vger.kernel.org
Cc: linus.walleij@linaro.org, gnurou@gmail.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drivers/gpio/gpio-sch311x: check return value of gpiochip_remove()
Date: Fri, 04 Jul 2014 12:15:56 +0530 [thread overview]
Message-ID: <53B64DA4.3070400@gmail.com> (raw)
In-Reply-To: <1404455851-9996-1-git-send-email-varkab@cdac.in>
Hi,
Please drop this patch which generating an another warning.
I will send v2 for this.
Thanks.
On 07/04/2014 12:07 PM, Varka Bhadram wrote:
> This patch eliminates the following warning
>
> drivers/gpio/gpio-sch311x.c: In function ‘sch311x_gpio_probe’:
> drivers/gpio/gpio-sch311x.c:286:18: warning: ignoring return value of ‘gpiochip_remove’, declared with attribute warn_unused_result
>
> Signed-off-by: Varka Bhadram <varkab@cdac.in>
> ---
> drivers/gpio/gpio-sch311x.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpio/gpio-sch311x.c b/drivers/gpio/gpio-sch311x.c
> index f942b80..8a4ab8f 100644
> --- a/drivers/gpio/gpio-sch311x.c
> +++ b/drivers/gpio/gpio-sch311x.c
> @@ -232,7 +232,7 @@ static int sch311x_gpio_probe(struct platform_device *pdev)
> struct sch311x_pdev_data *pdata = pdev->dev.platform_data;
> struct sch311x_gpio_priv *priv;
> struct sch311x_gpio_block *block;
> - int err, i;
> + int err, i, ret;
>
> /* we can register all GPIO data registers at once */
> if (!request_region(pdata->runtime_reg + GP1, 6, DRV_NAME)) {
> @@ -283,7 +283,11 @@ exit_err:
> release_region(pdata->runtime_reg + GP1, 6);
> /* release already registered chips */
> for (--i; i >= 0; i--)
> - gpiochip_remove(&priv->blocks[i].chip);
> + ret = gpiochip_remove(&priv->blocks[i].chip);
> +
> + WARN(ret, "%s(): gpiochip_remove() failed, ret=%d\n",
> + __func__, ret);
> +
> return err;
> }
>
--
Cheers,
Varka Bhadram.
prev parent reply other threads:[~2014-07-04 6:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-04 6:37 [PATCH] drivers/gpio/gpio-sch311x: check return value of gpiochip_remove() Varka Bhadram
2014-07-04 6:45 ` Varka Bhadram [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=53B64DA4.3070400@gmail.com \
--to=varkabhadram@gmail.com \
--cc=gnurou@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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).