Re: [PATCH] pinctrl: sh-pfc: Kill unused variable in sh_pfc_remove()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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@xxxxxxxxx>
---
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.
-----------------------------------------------------------------------------------



[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux