Skip to content

drivers/pinctrl: remove truly orphaned module code

Paul Gortmaker linux-arm-kernel linux-gpio linux-mediatek linux-renesas-soc linux-samsung-soc lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest8 patches 16 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8drivers/pinctrl: sunxi/pinctrl-sunxi.c does not need module.hdrivers/pinctrl/sunxi/pinctrl-sunxi.c+1 -12 replies
2/8drivers/pinctrl: make mediatek/pinctrl-mt6397 driver explicitly non-modulardrivers/pinctrl/mediatek/pinctrl-mt6397.c+2 -82 replies
3/8drivers/pinctrl: make meson/pinctrl-meson.c explicitly non-modulardrivers/pinctrl/meson/pinctrl-meson.c+1 -71 reply
4/8drivers/pinctrl: make sh-pfc/core.c explicitly non-modulardrivers/pinctrl/sh-pfc/core.c+4 -143 replies
5/8drivers/pinctrl: make stm32/pinctrl-stm32f429.c explicitly non-modulardrivers/pinctrl/stm32/pinctrl-stm32f429.c+1 -82 replies
6/8drivers/pinctrl: make sunxi/pinctrl-sun[4-9]* explicitly non-modulardrivers/pinctrl/sunxi/pinctrl-sun4i-a10.c drivers/pinctrl/sunxi/pinctrl-sun5i-a10s.c drivers/pinctrl/sunxi/pinctrl-sun5i-a13.c +8 more+22 -811 reply
7/8drivers/pinctrl: make sunxi/pinctrl-sun9i-a80-r.c explicitly non-modulardrivers/pinctrl/sunxi/pinctrl-sun9i-a80-r.c+2 -72 replies
8/8drivers/pinctrl: clean up samsung modular vs. non-modular distinctionsdrivers/pinctrl/samsung/pinctrl-exynos.c drivers/pinctrl/samsung/pinctrl-exynos5440.c drivers/pinctrl/samsung/pinctrl-s3c24xx.c +2 more+6 -263 replies

Reviews trailers per patch

7 of 8 patches have a Reviewed-by or Acked-by.

PatchLaurent PinchartMaxime RipardMaxime CoquelinHongzhou YangGeert UytterhoevenSylwester Nawrocki
1/8A-b
2/8A-b
3/8
4/8A-b A-b
5/8A-b
6/8A-b
7/8A-b
8/8A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 6 reviewers.

Read the v1 thread

Cover letter [PATCH 0/8] drivers/pinctrl: remove truly orphaned module code

This series of commits is a part of a larger project to ensure people don't reference modular support functions in non-modular code. Overall there was roughly 5k lines of dead code in the kernel due to this. So far we've fixed several areas, like tty, x86, net, ... and we continue to work on other areas.

There are several reasons to not use module support for code that can never be built as a module, but the big ones are:

(1) it is easy to accidentally write unused module_exit and remove code
(2) it can be misleading when reading the source, thinking it can be modular when the Makefile and/or Kconfig prohibit it
(3) it requires the include of the module.h header file which in turn includes nearly everything else, thus adding to CPP overhead.
(4) it gets copied/replicated into other code and spreads like weeds.

This group represents roughly 1/2 of the pinctrl commits I've got under testing locally. The commonality within this group is that there should be zero runtime changes with this series, because none of the drivers here deployed a ".remove" field which in turn would cause me to add the ".suppress_bind_attrs = true," to the driver struct. Similarly there is no change in the initcall ordering either.

So hopefully with that in mind it eases review.

I'm happy to have this go in via the maintainer's tree and reduce the (large) number of patches I'm carrying locally.
---

Cc Antoine Tenart <[email protected]>
Cc Beniamino Galvani <[email protected]>
Cc Boris Brezillon <[email protected]>
Cc Carlo Caione <[email protected]>
Cc Chen-Yu Tsai <[email protected]>
Cc Geert Uytterhoeven <[email protected]>
Cc Hans de Goede <[email protected]>
Cc Hongzhou Yang <[email protected]>
Cc Laurent Pinchart <[email protected]>
Cc Linus Walleij <[email protected]>
Cc Masahiro Yamada <[email protected]>
Cc Matthias Brugger <[email protected]>
Cc Maxime Coquelin <[email protected]>
Cc Maxime Ripard <[email protected]>
Cc Patrice Chotard <[email protected]>
Cc Thomas Abraham <[email protected]>
Cc Tomasz Figa <[email protected]>
Cc Vishnu Patekar <[email protected]>
Cc linux-arm-kernel at lists.infradead.org
Cc linux-gpio at vger.kernel.org
Cc linux-mediatek at lists.infradead.org
Cc linux-renesas-soc at vger.kernel.org
Cc linux-samsung-soc at vger.kernel.org

Paul Gortmaker (8):
drivers/pinctrl: sunxi/pinctrl-sunxi.c does not need module.h drivers/pinctrl: make mediatek/pinctrl-mt6397 driver explicitly non-modular drivers/pinctrl: make meson/pinctrl-meson.c explicitly non-modular drivers/pinctrl: make sh-pfc/core.c explicitly non-modular drivers/pinctrl: make stm32/pinctrl-stm32f429.c explicitly non-modular drivers/pinctrl: make sunxi/pinctrl-sun[4-9]* explicitly non-modular drivers/pinctrl: make sunxi/pinctrl-sun9i-a80-r.c explicitly non-modular drivers/pinctrl: clean up samsung modular vs. non-modular distinctions

 drivers/pinctrl/mediatek/pinctrl-mt6397.c    | 10 ++--------
 drivers/pinctrl/meson/pinctrl-meson.c        |  8 +-------
 drivers/pinctrl/samsung/pinctrl-exynos.c     |  1 -
 drivers/pinctrl/samsung/pinctrl-exynos5440.c | 15 +++------------
 drivers/pinctrl/samsung/pinctrl-s3c24xx.c    |  2 +-
 drivers/pinctrl/samsung/pinctrl-s3c64xx.c    |  2 +-
 drivers/pinctrl/samsung/pinctrl-samsung.c    | 12 +-----------
 drivers/pinctrl/sh-pfc/core.c                | 18 ++++--------------
 drivers/pinctrl/stm32/pinctrl-stm32f429.c    |  9 +--------
 drivers/pinctrl/sunxi/pinctrl-sun4i-a10.c    |  9 ++-------
 drivers/pinctrl/sunxi/pinctrl-sun5i-a10s.c   |  9 ++-------
 drivers/pinctrl/sunxi/pinctrl-sun5i-a13.c    |  9 ++-------
 drivers/pinctrl/sunxi/pinctrl-sun6i-a31-r.c  | 10 ++--------
 drivers/pinctrl/sunxi/pinctrl-sun6i-a31.c    |  9 ++-------
 drivers/pinctrl/sunxi/pinctrl-sun6i-a31s.c   |  9 ++-------
 drivers/pinctrl/sunxi/pinctrl-sun7i-a20.c    |  9 ++-------
 drivers/pinctrl/sunxi/pinctrl-sun8i-a23-r.c  | 11 ++---------
 drivers/pinctrl/sunxi/pinctrl-sun8i-a23.c    | 10 ++--------
 drivers/pinctrl/sunxi/pinctrl-sun8i-a33.c    |  9 ++-------
 drivers/pinctrl/sunxi/pinctrl-sun9i-a80-r.c  |  9 ++-------
 drivers/pinctrl/sunxi/pinctrl-sun9i-a80.c    |  9 ++-------
 drivers/pinctrl/sunxi/pinctrl-sunxi.c        |  2 +-
 22 files changed, 39 insertions(+), 152 deletions(-)
Signature · 1 line
2.6.1