Skip to content

sh: fix up modular use in non-modular code

Paul Gortmaker linux-sh lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4sh: make time.c explicitly non-modulararch/sh/kernel/time.c+1 -20 replies
2/4sh: make mm/asids-debugfs explicitly non-modulararch/sh/mm/asids-debugfs.c+1 -40 replies
3/4sh: make board-secureedge5410 explicitly non-modulararch/sh/boards/board-secureedge5410.c+1 -20 replies
4/4sh: make heartbeat driver explicitly non-modulararch/sh/drivers/heartbeat.c+3 -290 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4] sh: fix up modular use in non-modular code

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

This means not using modular functions/macros for code 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.

Three of the four commits here are completely trivial with zero runtime impact whatsoever. The fourth has a deletion of a ".remove" function and as we've done elsewhere, we block the sysfs ability to reach in and manually execute that function, since there isn't a sane use case for which doing that makes sense.

Build tested on today's linux-next ; full build fails on duplicate syms from OF generic board, but that is a known and reported issue elsewhere; it has nothing to do with the changes here.

Paul
--

Cc Paul Gortmaker <[email protected]>
Cc Rich Felker <[email protected]>
Cc Yoshinori Sato <[email protected]>

Paul Gortmaker (4):
sh: make time.c explicitly non-modular
sh: make mm/asids-debugfs explicitly non-modular
sh: make board-secureedge5410 explicitly non-modular
sh: make heartbeat driver explicitly non-modular

 arch/sh/boards/board-secureedge5410.c |  3 +--
 arch/sh/drivers/heartbeat.c           | 32 +++-----------------------------
 arch/sh/kernel/time.c                 |  3 +--
 arch/sh/mm/asids-debugfs.c            |  5 +----
 4 files changed, 6 insertions(+), 37 deletions(-)
Signature · 1 line
2.8.0