* [PATCH] gpio: samsung: Remove remaining check for CONFIG_S5P_GPIO_DRVSTR [not found] ` <201409041803.46098.arnd@arndb.de> @ 2014-09-18 8:57 ` Paul Bolle 2014-09-18 19:34 ` Tomasz Figa 2014-09-23 15:42 ` Linus Walleij 0 siblings, 2 replies; 3+ messages in thread From: Paul Bolle @ 2014-09-18 8:57 UTC (permalink / raw) To: Linus Walleij, Alexandre Courbot Cc: Arnd Bergmann, Tomasz Figa, linux-gpio, linux-kernel On Thu, 2014-09-04 at 18:03 +0200, Arnd Bergmann wrote: > On Thursday 04 September 2014, Paul Bolle wrote: > > That check for CONFIG_S5P_GPIO_DRVSTR is still present in v3.17-rc3 and > > next-20140903. Should I submit the trivial patch to remove it (and the > > dead code it hides)? > > Yes, I think this one is an obvious candidate for removal. Still there in v3.17-rc5 and next-20140918. So I submit yet another trivial cleanup. Done on top of next-20140918. Only tested by grepping the tree. Please note that, obviously, nothing uses s5p_gpio_get_drvstr() or s5p_gpio_set_drvstr(). Paul Bolle -------->8-------- From: Paul Bolle <pebolle@tiscali.nl> Commit d78c16ccde96 ("ARM: SAMSUNG: Remove remaining legacy code") removed the Kconfig symbol S5P_GPIO_DRVSTR. It didn't remove one check for the related macro. Remove that check and the dead code it hides. Signed-off-by: Paul Bolle <pebolle@tiscali.nl> --- drivers/gpio/gpio-samsung.c | 50 --------------------------------------------- 1 file changed, 50 deletions(-) diff --git a/drivers/gpio/gpio-samsung.c b/drivers/gpio/gpio-samsung.c index 3810da47043f..7c288ba4dc87 100644 --- a/drivers/gpio/gpio-samsung.c +++ b/drivers/gpio/gpio-samsung.c @@ -1309,56 +1309,6 @@ samsung_gpio_pull_t s3c_gpio_getpull(unsigned int pin) } EXPORT_SYMBOL(s3c_gpio_getpull); -#ifdef CONFIG_S5P_GPIO_DRVSTR -s5p_gpio_drvstr_t s5p_gpio_get_drvstr(unsigned int pin) -{ - struct samsung_gpio_chip *chip = samsung_gpiolib_getchip(pin); - unsigned int off; - void __iomem *reg; - int shift; - u32 drvstr; - - if (!chip) - return -EINVAL; - - off = pin - chip->chip.base; - shift = off * 2; - reg = chip->base + 0x0C; - - drvstr = __raw_readl(reg); - drvstr = drvstr >> shift; - drvstr &= 0x3; - - return (__force s5p_gpio_drvstr_t)drvstr; -} -EXPORT_SYMBOL(s5p_gpio_get_drvstr); - -int s5p_gpio_set_drvstr(unsigned int pin, s5p_gpio_drvstr_t drvstr) -{ - struct samsung_gpio_chip *chip = samsung_gpiolib_getchip(pin); - unsigned int off; - void __iomem *reg; - int shift; - u32 tmp; - - if (!chip) - return -EINVAL; - - off = pin - chip->chip.base; - shift = off * 2; - reg = chip->base + 0x0C; - - tmp = __raw_readl(reg); - tmp &= ~(0x3 << shift); - tmp |= drvstr << shift; - - __raw_writel(tmp, reg); - - return 0; -} -EXPORT_SYMBOL(s5p_gpio_set_drvstr); -#endif /* CONFIG_S5P_GPIO_DRVSTR */ - #ifdef CONFIG_PLAT_S3C24XX unsigned int s3c2410_modify_misccr(unsigned int clear, unsigned int change) { -- 1.9.3 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] gpio: samsung: Remove remaining check for CONFIG_S5P_GPIO_DRVSTR 2014-09-18 8:57 ` [PATCH] gpio: samsung: Remove remaining check for CONFIG_S5P_GPIO_DRVSTR Paul Bolle @ 2014-09-18 19:34 ` Tomasz Figa 2014-09-23 15:42 ` Linus Walleij 1 sibling, 0 replies; 3+ messages in thread From: Tomasz Figa @ 2014-09-18 19:34 UTC (permalink / raw) To: Paul Bolle, Linus Walleij, Alexandre Courbot Cc: Arnd Bergmann, linux-gpio, linux-kernel Paul, On 18.09.2014 10:57, Paul Bolle wrote: > On Thu, 2014-09-04 at 18:03 +0200, Arnd Bergmann wrote: >> On Thursday 04 September 2014, Paul Bolle wrote: >>> That check for CONFIG_S5P_GPIO_DRVSTR is still present in v3.17-rc3 and >>> next-20140903. Should I submit the trivial patch to remove it (and the >>> dead code it hides)? >> >> Yes, I think this one is an obvious candidate for removal. > > Still there in v3.17-rc5 and next-20140918. So I submit yet another > trivial cleanup. > > Done on top of next-20140918. Only tested by grepping the tree. Please > note that, obviously, nothing uses s5p_gpio_get_drvstr() or > s5p_gpio_set_drvstr(). > > > Paul Bolle > -------->8-------- > From: Paul Bolle <pebolle@tiscali.nl> > > Commit d78c16ccde96 ("ARM: SAMSUNG: Remove remaining legacy code") > removed the Kconfig symbol S5P_GPIO_DRVSTR. It didn't remove one check > for the related macro. Remove that check and the dead code it hides. > > Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Thanks for the patch. Reviewed-by: Tomasz Figa <tomasz.figa@gmail.com> Best regards, Tomasz ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] gpio: samsung: Remove remaining check for CONFIG_S5P_GPIO_DRVSTR 2014-09-18 8:57 ` [PATCH] gpio: samsung: Remove remaining check for CONFIG_S5P_GPIO_DRVSTR Paul Bolle 2014-09-18 19:34 ` Tomasz Figa @ 2014-09-23 15:42 ` Linus Walleij 1 sibling, 0 replies; 3+ messages in thread From: Linus Walleij @ 2014-09-23 15:42 UTC (permalink / raw) To: Paul Bolle Cc: Alexandre Courbot, Arnd Bergmann, Tomasz Figa, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org On Thu, Sep 18, 2014 at 10:57 AM, Paul Bolle <pebolle@tiscali.nl> wrote: > From: Paul Bolle <pebolle@tiscali.nl> > > Commit d78c16ccde96 ("ARM: SAMSUNG: Remove remaining legacy code") > removed the Kconfig symbol S5P_GPIO_DRVSTR. It didn't remove one check > for the related macro. Remove that check and the dead code it hides. > > Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Patch applied with Tomasz Review tag. Yours, Linus Walleij ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-09-23 15:42 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <1404496099-26708-1-git-send-email-t.figa@samsung.com> [not found] ` <53C67783.4090407@samsung.com> [not found] ` <1409825317.5546.94.camel@x220> [not found] ` <201409041803.46098.arnd@arndb.de> 2014-09-18 8:57 ` [PATCH] gpio: samsung: Remove remaining check for CONFIG_S5P_GPIO_DRVSTR Paul Bolle 2014-09-18 19:34 ` Tomasz Figa 2014-09-23 15:42 ` Linus Walleij
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).