Skip to content

soc: avoid module usage in non-modular code

Paul Gortmaker linux-arm-kernel linux-tegra linuxppc-dev lkml 1 version Applied

Status from this message: Applied to for-4.12/soc, thanks.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 3 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/3soc: sunxi: make sunxi_sram explicitly non-modulardrivers/soc/sunxi/sunxi_sram.c+2 -71 reply
2/3soc: tegra: make fuse-tegra explicitly non-modulardrivers/soc/tegra/fuse/fuse-tegra.c+2 -21 reply
3/3soc: fsl: make guts driver explicitly non-modulardrivers/soc/fsl/guts.c+2 -151 reply

Reviews trailers per patch

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

PatchMaxime RipardScott Wood
1/3A-b
2/3
3/3A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/3] soc: avoid module usage in non-modular 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, gpio ... 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 code up 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.

Two of the changes are essentially source only -- the resuting module will be binary equivalent. Only the FSL driver has unused code in addition to the use of modular macros that get converted.

Note the FSL SOC driver just appeared in linux-next and so this series won't apply on Linus' master branch. These commits were applied to linux-next and build tested there.

Paul.
---

Cc Alexandre Courbot <[email protected]>
Cc Arnd Bergmann <[email protected]>
Cc Maxime Ripard <[email protected]>
Cc Scott Wood <[email protected]>
Cc Stephen Warren <[email protected]>
Cc Thierry Reding <[email protected]>
Cc Ulf Hansson <[email protected]>
Cc Yangbo Lu <[email protected]>
Cc linux-arm-kernel at lists.infradead.org
Cc linuxppc-dev at lists.ozlabs.org
Cc linux-tegra at vger.kernel.org

Paul Gortmaker (3):
soc: sunxi: make sunxi_sram explicitly non-modular
soc: tegra: make fuse-tegra explicitly non-modular
soc: fsl: make guts driver explicitly non-modular

 drivers/soc/fsl/guts.c              | 17 ++---------------
 drivers/soc/sunxi/sunxi_sram.c      |  9 ++-------
 drivers/soc/tegra/fuse/fuse-tegra.c |  4 ++--
 3 files changed, 6 insertions(+), 24 deletions(-)
Signature · 1 line
2.10.1