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


Groups > linux.kernel > #1512797

[PATCH 0/3] rtc: remove modular usage from non-modular code

From Paul Gortmaker <paul.gortmaker@windriver.com>
Newsgroups linux.kernel
Subject [PATCH 0/3] rtc: remove modular usage from non-modular code
Date 2016-10-31 20:00 +0100
Message-ID <sypYl-6cx-7@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


My ongoing audit looking for non-modular code that needlessly uses
modular macros (vs. built-in equivalents) and/or has dead code
relating to module unloading that can never be executed led to the
creation of these rtc related commits.

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.

Build tested on current linux-next (sparc32) to ensure no silly typos
or implicit include issues that would break compilation crept in.

---

Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: rtc-linux@googlegroups.com
Cc: sparclinux@vger.kernel.org

Paul Gortmaker (3):
  rtc: make rtc-lib explicitly non-modular
  rtc: sparc: make starfire explicitly non-modular
  rtc: sparc: make sun4v explicitly non-modular

 drivers/rtc/rtc-lib.c      |  4 +---
 drivers/rtc/rtc-starfire.c | 10 ++++------
 drivers/rtc/rtc-sun4v.c    | 10 ++++------
 3 files changed, 9 insertions(+), 15 deletions(-)

-- 
2.10.1

Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/3] rtc: remove modular usage from non-modular code Paul Gortmaker <paul.gortmaker@windriver.com> - 2016-10-31 20:00 +0100
  [PATCH 3/3] rtc: sparc: make sun4v explicitly non-modular Paul Gortmaker <paul.gortmaker@windriver.com> - 2016-10-31 20:00 +0100
  [PATCH 1/3] rtc: make rtc-lib explicitly non-modular Paul Gortmaker <paul.gortmaker@windriver.com> - 2016-10-31 20:00 +0100
  Re: [PATCH 0/3] rtc: remove modular usage from non-modular code Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2016-11-04 23:40 +0100

csiph-web