Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1431198 > unrolled thread

[PATCH v2 0/5] PM / devfreq: make module code usage consistent.

Started byPaul Gortmaker <paul.gortmaker@windriver.com>
First post2016-06-25 20:50 +0200
Last post2016-06-25 20:50 +0200
Articles 3 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH v2 0/5] PM / devfreq: make module code usage consistent. Paul Gortmaker <paul.gortmaker@windriver.com> - 2016-06-25 20:50 +0200
    [PATCH 5/5] PM / devfreq: make event/exynos-ppmu DEVFREQ_EVENT_EXYNOS_PPMU tristate Paul Gortmaker <paul.gortmaker@windriver.com> - 2016-06-25 20:50 +0200
    [PATCH 4/5] PM / devfreq: make event/exynos-nocp DEVFREQ_EVENT_EXYNOS_NOCP tristate Paul Gortmaker <paul.gortmaker@windriver.com> - 2016-06-25 20:50 +0200

#1431198 — [PATCH v2 0/5] PM / devfreq: make module code usage consistent.

FromPaul Gortmaker <paul.gortmaker@windriver.com>
Date2016-06-25 20:50 +0200
Subject[PATCH v2 0/5] PM / devfreq: make module code usage consistent.
Message-ID<rO0Ot-ww-3@gated-at.bofh.it>
For anyone new to the underlying goal of this cleanup, we are trying to
not use module support for code that can never be built as a module since:

 (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.

We have already merged lots of these for mainline to date, so there
is really nothing new to see here, in terms of the type of change.

That said, devfreq changes seen here cover the following categories:

  -just replacement of modular macros with their non-modular
   equivalents that CPP would have inserted anyway

  -the removal of including module.h ; replaced with init.h
   and export.h as required based on whether the file used it.

  -the removal of the unused __exit functions that would never
   be called.

  -the conversion of 3 bool Kconfig to tristate to reflect the
   module author's intended or re-evaluated choice. (new in v2).

There are no initcall level changes here; everything stays at the level
of initcall it was previously; simply by the fact that it was not
using modular versions to begin with.

Build tested for arm and arm64 allmodconfig (for which all the drivers
touched here get coverage) on the linux-next tree from Fri. to ensure
no silly typos crept in.

The three drivers converted from bool to trisate are done as per
Chanwoo's request.  I have confirmed they build and modpost to a
.ko file but I don't have the hardware to test module loading
and/or any other runtime behaviour.

Paul.
---

[v2: convert patch #3,4,5 from demodule cleanup to one line conversion
     from bool to tristate; confirm =m after "allmodconfig"; retest.]

[v1: https://lkml.kernel.org/r/20160621051501.18396-1-paul.gortmaker@windriver.com ]

Cc: Chanwoo Choi <cw00.choi@samsung.com>
Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Cc: Kukjin Kim <kgene@kernel.org>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: MyungJoo Ham <myungjoo.ham@samsung.com>
Cc: linux-pm@vger.kernel.org
Cc: linux-samsung-soc@vger.kernel.org

Paul Gortmaker (5):
  PM / devfreq: make devfreq explicitly non-modular
  PM / devfreq: make devfreq-event explicitly non-modular
  PM / devfreq: make exynos-bus ARM_EXYNOS_BUS_DEVFREQ tristate
  PM / devfreq: make event/exynos-nocp DEVFREQ_EVENT_EXYNOS_NOCP
    tristate
  PM / devfreq: make event/exynos-ppmu DEVFREQ_EVENT_EXYNOS_PPMU
    tristate

 drivers/devfreq/Kconfig         |  2 +-
 drivers/devfreq/devfreq-event.c | 12 +-----------
 drivers/devfreq/devfreq.c       | 13 +------------
 drivers/devfreq/event/Kconfig   |  4 ++--
 4 files changed, 5 insertions(+), 26 deletions(-)

-- 
2.8.4

[toc] | [next] | [standalone]


#1431199 — [PATCH 5/5] PM / devfreq: make event/exynos-ppmu DEVFREQ_EVENT_EXYNOS_PPMU tristate

FromPaul Gortmaker <paul.gortmaker@windriver.com>
Date2016-06-25 20:50 +0200
Subject[PATCH 5/5] PM / devfreq: make event/exynos-ppmu DEVFREQ_EVENT_EXYNOS_PPMU tristate
Message-ID<rO0Ou-ww-11@gated-at.bofh.it>
In reply to#1431198
The Kconfig currently controlling compilation of this code is:

config DEVFREQ_EVENT_EXYNOS_PPMU
  bool "EXYNOS PPMU (Platform Performance Monitoring Unit) DEVFREQ event Driver"

...meaning that it currently is not being built as a module by anyone.

Rather than rip out the existing modular code, Chanwoo indicated
that he'd rather see the driver offered as tristate.

I don't have the hardware for runtime validation, so this change
is only validated for compile and modpost.

Cc: MyungJoo Ham <myungjoo.ham@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Kukjin Kim <kgene@kernel.org>
Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Cc: Chanwoo Choi <cw00.choi@samsung.com>
Cc: linux-pm@vger.kernel.org
Cc: linux-samsung-soc@vger.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 drivers/devfreq/event/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/devfreq/event/Kconfig b/drivers/devfreq/event/Kconfig
index 96ea29d1ede5..eb6f74a2b6b9 100644
--- a/drivers/devfreq/event/Kconfig
+++ b/drivers/devfreq/event/Kconfig
@@ -22,7 +22,7 @@ config DEVFREQ_EVENT_EXYNOS_NOCP
 	  (Network on Chip) Probe counters to measure the bandwidth of AXI bus.
 
 config DEVFREQ_EVENT_EXYNOS_PPMU
-	bool "EXYNOS PPMU (Platform Performance Monitoring Unit) DEVFREQ event Driver"
+	tristate "EXYNOS PPMU (Platform Performance Monitoring Unit) DEVFREQ event Driver"
 	depends on ARCH_EXYNOS
 	select PM_OPP
 	help
-- 
2.8.4

[toc] | [prev] | [next] | [standalone]


#1431200 — [PATCH 4/5] PM / devfreq: make event/exynos-nocp DEVFREQ_EVENT_EXYNOS_NOCP tristate

FromPaul Gortmaker <paul.gortmaker@windriver.com>
Date2016-06-25 20:50 +0200
Subject[PATCH 4/5] PM / devfreq: make event/exynos-nocp DEVFREQ_EVENT_EXYNOS_NOCP tristate
Message-ID<rO0Ou-ww-15@gated-at.bofh.it>
In reply to#1431198
The Kconfig currently controlling compilation of this code is:

event/Kconfig:config DEVFREQ_EVENT_EXYNOS_NOCP
event/Kconfig:  bool "EXYNOS NoC (Network On Chip) Probe DEVFREQ event Driver"

...meaning that it currently is not being built as a module by anyone.

Rather than rip out the existing modular code, Chanwoo indicated
that he'd rather see the driver offered as tristate.

I don't have the hardware for runtime validation, so this change
is only validated for compile and modpost.

Cc: Chanwoo Choi <cw00.choi@samsung.com>
Cc: MyungJoo Ham <myungjoo.ham@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Kukjin Kim <kgene@kernel.org>
Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Cc: linux-pm@vger.kernel.org
Cc: linux-samsung-soc@vger.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 drivers/devfreq/event/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/devfreq/event/Kconfig b/drivers/devfreq/event/Kconfig
index 1e8b4f469f38..96ea29d1ede5 100644
--- a/drivers/devfreq/event/Kconfig
+++ b/drivers/devfreq/event/Kconfig
@@ -14,7 +14,7 @@ menuconfig PM_DEVFREQ_EVENT
 if PM_DEVFREQ_EVENT
 
 config DEVFREQ_EVENT_EXYNOS_NOCP
-	bool "EXYNOS NoC (Network On Chip) Probe DEVFREQ event Driver"
+	tristate "EXYNOS NoC (Network On Chip) Probe DEVFREQ event Driver"
 	depends on ARCH_EXYNOS
 	select PM_OPP
 	help
-- 
2.8.4

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web