Skip to content

cpuidle: avoid module usage in non-modular code

Paul Gortmaker linux-arm-kernel linux-pm linux-samsung-soc lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3drivers/cpuidle: make cpuidle-clps711x.c explicitly non-modulardrivers/cpuidle/cpuidle-clps711x.c+2 -60 replies
2/3drivers/cpuidle: make cpuidle-ux500.c explicitly non-modulardrivers/cpuidle/cpuidle-ux500.c+2 -30 replies
3/3drivers/cpuidle: make cpuidle-exynos.c explicitly non-modulardrivers/cpuidle/cpuidle-exynos.c+2 -30 replies

Reviews trailers per patch

None of the 3 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchDaniel Lezcano
SeriesA-b
1/3
2/3
3/3

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] cpuidle: 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, ... 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.

Fortunately for cpuidle, the changes are largely trivial and change zero runtime. All the changes here just remap the modular functions onto the non-modular ones that they would be remapped onto anyway.

Changes are against linux-next and compile tested on ARM allmodconfig. I've Cc'd ARM list because all of these are used on ARM, but I'm thinking these probably can go in via the PM tree.

Paul.
---

Cc Alexander Shiyan <[email protected]>
Cc Bartlomiej Zolnierkiewicz <[email protected]>
Cc Daniel Lezcano <[email protected]>
Cc Krzysztof Kozlowski <[email protected]>
Cc Kukjin Kim <[email protected]>
Cc "Rafael J. Wysocki" <[email protected]>
Cc linux-arm-kernel at lists.infradead.org
Cc linux-pm at vger.kernel.org
Cc linux-samsung-soc at vger.kernel.org

Paul Gortmaker (3):
drivers/cpuidle: make cpuidle-clps711x.c explicitly non-modular drivers/cpuidle: make cpuidle-ux500.c explicitly non-modular drivers/cpuidle: make cpuidle-exynos.c explicitly non-modular

 drivers/cpuidle/cpuidle-clps711x.c | 8 ++------
 drivers/cpuidle/cpuidle-exynos.c   | 5 ++---
 drivers/cpuidle/cpuidle-ux500.c    | 5 ++---
 3 files changed, 6 insertions(+), 12 deletions(-)
Signature · 1 line
2.6.1