Skip to contentSkip to conversation

gpio: nomadik: remove dead DB8540 code from <gpio/gpio-nomadik.h>

PATCH Applied Ethan Nelson-Moore 3 participants 4 messages Jun 10 – Jun 11 GPIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gpio: nomadik: remove dead DB8540 code from <gpio/gpio-nomadik.h>

DB8540 support was removed in commit b6d09f780761 ("pinctrl: nomadik:
Drop U8540/9540 support"), but a couple small pieces of related code remained in <gpio/gpio-nomadik.h>. Remove them.

Discovered while searching for CONFIG_* symbols referenced in code but not defined in any Kconfig file.

---
 include/linux/gpio/gpio-nomadik.h | 16 ----------------
 1 file changed, 16 deletions(-)
include/linux/gpio/gpio-nomadik.h +0 -16
index 8061b9826361..44c47645649c 100644
@@ -32,9 +32,6 @@ struct fwnode_handle;
 #define NMK_GPIO_RWIMSC	0x50
 #define NMK_GPIO_FWIMSC	0x54
 #define NMK_GPIO_WKS	0x58
-/* These appear in DB8540 and later ASICs */
-#define NMK_GPIO_EDGELEVEL 0x5C
-#define NMK_GPIO_LEVEL	0x60
 
 /* Pull up/down values */
 enum nmk_gpio_pull {
@@ -236,19 +233,6 @@ nmk_pinctrl_db8500_init(const struct nmk_pinctrl_soc_data **soc)
 
 #endif
 
-#ifdef CONFIG_PINCTRL_DB8540
-
-void nmk_pinctrl_db8540_init(const struct nmk_pinctrl_soc_data **soc);
-
-#else
-
-static inline void
-nmk_pinctrl_db8540_init(const struct nmk_pinctrl_soc_data **soc)
-{
-}
-
-#endif
-
 struct platform_device;
 
 #ifdef CONFIG_DEBUG_FS
Signature · 1 line
2.43.0
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Ethan Nelson-Moore

DB8540 support was removed in commit b6d09f780761 ("pinctrl: nomadik:
Drop U8540/9540 support"), but a couple small pieces of related code remained in <gpio/gpio-nomadik.h>. Remove them.

Discovered while searching for CONFIG_* symbols referenced in code but not defined in any Kconfig file.

Good catch!

Yours,
Linus Walleij

#2 lore raw

Hi, Linus,

Quoted 1 line · Linus Walleij

Good catch!

Thanks! It looks like there might be a lot more related dead code; try running:
grep -Ri '[AD]B[89]540'

Ethan

#3 lore raw
In reply to Ethan Nelson-Moore
Quoted 8 lines · Ethan Nelson-Moore

DB8540 support was removed in commit b6d09f780761 ("pinctrl: nomadik:
Drop U8540/9540 support"), but a couple small pieces of related code remained in <gpio/gpio-nomadik.h>. Remove them.

Discovered while searching for CONFIG_* symbols referenced in code but not defined in any Kconfig file.

[...]

Applied, thanks!

[1/1] gpio: nomadik: remove dead DB8540 code from <gpio/gpio-nomadik.h>

      https://git.kernel.org/brgl/c/f953585dafd71ecb0897f9def9c0a3702afc1bf8

Best regards,

Signature · 1 line
Bartosz Golaszewski <[email protected]>