Skip to content

mfd: trivial demodularization of non-modular drivers.

Paul Gortmaker linux-omap lkml 2 versions – Applied

Status from this message: Applied, thanks.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest6 patches 8 repliesApplied
  2. v16 patches 19 repliesApplied

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/6mfd: altera-a10sr: make it explicitly non-modulardrivers/mfd/altera-a10sr.c+6 -81 reply
2/6mfd: as3722: convert MFD_AS3722 from bool to tristatedrivers/mfd/Kconfig+1 -11 reply
3/6mfd: intel_msic: Make it explicitly non-modulardrivers/mfd/intel_msic.c+2 -71 reply
4/6mfd: smsc-ece1099: Make it explicitly non-modulardrivers/mfd/smsc-ece1099.c+2 -91 reply
5/6mfd: sun6i-prcm: Make it explicitly non-modulardrivers/mfd/sun6i-prcm.c+2 -62 replies
6/6mfd: twl-core: Make it explicitly non-modulardrivers/mfd/twl-core.c+1 -82 replies

Reviews trailers per patch

3 of 6 patches have a Reviewed-by or Acked-by.

PatchMika WesterbergMaxime RipardBoris BrezillonTony Lindgren
1/6
2/6
3/6A-b
4/6
5/6A-b A-b
6/6A-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 4 reviewers.

Read the v2 thread

Cover letter [PATCH v2 0/6] mfd: trivial demodularization of non-modular drivers.

I grouped this little series of mfd commits together because of the common theme of their relatively trivial use of modular infrastructure in these non-modular drivers.

What that means is there are no orphaned __exit functions to remove; no unused ".remove" functions linked into the driver struct to be deleted -- so in the end we have binary equivalence between the pre-patched code and the post-patched code. Easy to review and low risk.

More specifically - the only thing we are doing here is mapping the initcall that binds in the driver from the module variant to the built-in variant ; something that CPP would do for us anyway -- and then throwing away any MODULE_ tags which are no-ops in non-modular builds (while preserving any author/desc. info they had in comments). And in doing that, we can toss the include of module.h in favour of init.h (asssuming it wasn't included already).

One exception is patch #2; it converts a driver from bool to tristate, as was asked per the v1 review[1]. This has been build tested, but I don't have the specific hardware for run time testing.

For anyone new to the underlying goal of this cleanup, we are trying to make driver code consistent with the Makefiles/Kconfigs that control them.

This means not using modular functions/macros for drivers that can never be built as a module. Some of the other downfalls this leads to 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 drivers and spreads like weeds.

Build tested on linux-next for arm, arm64 and x86-64 to ensure no typos or similar issues crept in.

[1] https://lkml.kernel.org/r/[email protected]

Paul.
---

[v1 --> v2: make one driver tristate, add some Ackd-by tags.]

Cc Boris BREZILLON <[email protected]>
Cc Florian Lobmaier <[email protected]>
Cc Laxman Dewangan <[email protected]>
Cc Lee Jones <[email protected]>
Cc Maxime Ripard <[email protected]>
Cc Mika Westerberg <[email protected]>
Cc Samuel Ortiz <[email protected]>
Cc Sourav Poddar <[email protected]>
Cc Thor Thayer <[email protected]>
Cc Tony Lindgren <[email protected]>

Paul Gortmaker (6):
mfd: altera-a10sr: make it explicitly non-modular
mfd: as3722: convert MFD_AS3722 from bool to tristate
mfd: intel_msic: Make it explicitly non-modular
mfd: smsc-ece1099: Make it explicitly non-modular
mfd: sun6i-prcm: Make it explicitly non-modular
mfd: twl-core: Make it explicitly non-modular

 drivers/mfd/Kconfig        |  2 +-
 drivers/mfd/altera-a10sr.c | 14 ++++++--------
 drivers/mfd/intel_msic.c   |  9 ++-------
 drivers/mfd/smsc-ece1099.c | 11 ++---------
 drivers/mfd/sun6i-prcm.c   |  8 ++------
 drivers/mfd/twl-core.c     |  9 +--------
 6 files changed, 14 insertions(+), 39 deletions(-)
Signature · 1 line
2.8.4