All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laxman Dewangan <ldewangan@nvidia.com>
To: Geert Uytterhoeven <geert+renesas@glider.be>,
	Linus Walleij <linus.walleij@linaro.org>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: linux-gpio@vger.kernel.org, linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH] pinctrl: sh-pfc: Kill unused variable in sh_pfc_remove()
Date: Tue, 26 Apr 2016 16:30:44 +0530	[thread overview]
Message-ID: <571F4A5C.7090608@nvidia.com> (raw)
In-Reply-To: <1461666626-24805-1-git-send-email-geert+renesas@glider.be>


On Tuesday 26 April 2016 04:00 PM, Geert Uytterhoeven wrote:
> If CONFIG_PINCTRL_SH_PFC_GPIO=n:
>
>      drivers/pinctrl/sh-pfc/core.c: In function 'sh_pfc_remove':
>      drivers/pinctrl/sh-pfc/core.c:649:17: warning: unused variable 'pfc' [-Wunused-variable]
>
> Fixes: 67ec8d7b48463904 ("pinctrl: ish-pfc: Use devm_pinctrl_register() for pinctrl registration")
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> I won't queue this up in sh-pfc-for-v4.7, as the offending commit is not in
> that branch.
>

Ideally, you dont need the call of sh_pfc_unregister_gpiochip() if you 
use the devm_gpiochip_add_data() which is already available on all 
subsystem.

int sh_pfc_unregister_gpiochip(struct sh_pfc *pfc)
{
         gpiochip_remove(&pfc->gpio->gpio_chip);
#ifdef CONFIG_SUPERH
         gpiochip_remove(&pfc->func->gpio_chip);
#endif
         return 0;
}

So you can get rid of this calls and lines.


-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information.  Any unauthorized review, use, disclosure or distribution
is prohibited.  If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------

WARNING: multiple messages have this Message-ID (diff)
From: Laxman Dewangan <ldewangan@nvidia.com>
To: Geert Uytterhoeven <geert+renesas@glider.be>,
	Linus Walleij <linus.walleij@linaro.org>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: <linux-gpio@vger.kernel.org>, <linux-renesas-soc@vger.kernel.org>
Subject: Re: [PATCH] pinctrl: sh-pfc: Kill unused variable in sh_pfc_remove()
Date: Tue, 26 Apr 2016 16:30:44 +0530	[thread overview]
Message-ID: <571F4A5C.7090608@nvidia.com> (raw)
In-Reply-To: <1461666626-24805-1-git-send-email-geert+renesas@glider.be>


On Tuesday 26 April 2016 04:00 PM, Geert Uytterhoeven wrote:
> If CONFIG_PINCTRL_SH_PFC_GPIO=n:
>
>      drivers/pinctrl/sh-pfc/core.c: In function 'sh_pfc_remove':
>      drivers/pinctrl/sh-pfc/core.c:649:17: warning: unused variable 'pfc' [-Wunused-variable]
>
> Fixes: 67ec8d7b48463904 ("pinctrl: ish-pfc: Use devm_pinctrl_register() for pinctrl registration")
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> I won't queue this up in sh-pfc-for-v4.7, as the offending commit is not in
> that branch.
>

Ideally, you dont need the call of sh_pfc_unregister_gpiochip() if you 
use the devm_gpiochip_add_data() which is already available on all 
subsystem.

int sh_pfc_unregister_gpiochip(struct sh_pfc *pfc)
{
         gpiochip_remove(&pfc->gpio->gpio_chip);
#ifdef CONFIG_SUPERH
         gpiochip_remove(&pfc->func->gpio_chip);
#endif
         return 0;
}

So you can get rid of this calls and lines.


-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information.  Any unauthorized review, use, disclosure or distribution
is prohibited.  If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------

  reply	other threads:[~2016-04-26 11:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-26 10:30 [PATCH] pinctrl: sh-pfc: Kill unused variable in sh_pfc_remove() Geert Uytterhoeven
2016-04-26 11:00 ` Laxman Dewangan [this message]
2016-04-26 11:00   ` Laxman Dewangan
2016-04-29  9:09 ` Linus Walleij

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=571F4A5C.7090608@nvidia.com \
    --to=ldewangan@nvidia.com \
    --cc=geert+renesas@glider.be \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-renesas-soc@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 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.