From: Paul Gortmaker <paul.gortmaker@windriver.com>
To: <linux-kernel@vger.kernel.org>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>,
Alexandre Courbot <gnurou@gmail.com>,
Alison Chaiken <alison_chaiken@mentor.com>,
Brian Norris <computersforpeace@gmail.com>,
Florian Fainelli <f.fainelli@gmail.com>,
Geert Uytterhoeven <geert+renesas@glider.be>,
Gregory Fong <gregory.0xf0@gmail.com>,
Jon Hunter <jonathanh@nvidia.com>,
Kevin Hilman <khilman@linaro.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
Shawn Guo <shawn.guo@linaro.org>,
Simon Horman <horms+renesas@verge.net.au>,
Stephen Warren <swarren@wwwdotorg.org>,
Thierry Reding <thierry.reding@gmail.com>,
Wolfram Sang <wsa@the-dreams.de>,
<linux-arm-kernel@lists.infradead.org>,
<linux-tegra@vger.kernel.org>
Subject: [PATCH v2 0/4] bus: remove unused modular code from non-modular drivers
Date: Sun, 3 Jul 2016 13:30:36 -0400 [thread overview]
Message-ID: <20160703173040.23612-1-paul.gortmaker@windriver.com> (raw)
The drivers/bus doesn't have a strict maintainer entry, but since
all the changes here are for ARM platforms, I'm Cc'ing arm-kernel
and hoping it makes sense to vector these few changes through the
arm-soc tree.
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 four commits.
Two are of the trivial kind, where we substitute in the non-modular
versions that CPP would have put in place anyway, resulting in no
actual changes, even at the binary output level.
Another is of the kind where there was a ".remove" function
registered into the driver struct. Being non-modular, these
functions will never be called via a normal module_exit path.
However, since it was possible (but largely pointless, and without
a real use case) to unbind these drivers via sysfs, we explicitly
disallow the unbind as part of the removal of the ".remove" itself.
Finally one is a conversion of a bool to a tristate; not something
I'd do myself by default, but in this case we had a desire from
the original author to have it that way.
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 for arm and arm64 on linux-next to ensure no silly typos
that would break compilation crept in.
---
[v2: drop arm-ccn patch; it is being made tristate elsewhere, convert
simple-pm to tristate, add new patch for new tegra-aconnect driver.]
[v1: https://lkml.kernel.org/r/1459113058-14340-1-git-send-email-paul.gortmaker@windriver.com ]
Cc: Alexandre Courbot <gnurou@gmail.com>
Cc: Alison Chaiken <alison_chaiken@mentor.com>
Cc: Brian Norris <computersforpeace@gmail.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Gregory Fong <gregory.0xf0@gmail.com>
Cc: Jon Hunter <jonathanh@nvidia.com>
Cc: Kevin Hilman <khilman@linaro.org>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Shawn Guo <shawn.guo@linaro.org>
Cc: Simon Horman <horms+renesas@verge.net.au>
Cc: Stephen Warren <swarren@wwwdotorg.org>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Wolfram Sang <wsa@the-dreams.de>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-tegra@vger.kernel.org
Paul Gortmaker (4):
bus: brcmstb_gisb: make it explicitly non-modular
bus: imx-weim: make it explicitly non-modular
bus: tegra-aconnect: make it explicitly non-modular
bus: simple-pm-bus: convert bool SIMPLE_PM_BUS to tristate
drivers/bus/Kconfig | 2 +-
drivers/bus/brcmstb_gisb.c | 4 +---
drivers/bus/imx-weim.c | 9 ++-------
drivers/bus/tegra-aconnect.c | 22 +++++-----------------
4 files changed, 9 insertions(+), 28 deletions(-)
--
2.8.4
next reply other threads:[~2016-07-03 17:33 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-03 17:30 Paul Gortmaker [this message]
2016-07-03 17:30 ` [PATCH 1/4] bus: brcmstb_gisb: make it explicitly non-modular Paul Gortmaker
2016-07-14 22:34 ` Florian Fainelli
2016-07-03 17:30 ` [PATCH 2/4] bus: imx-weim: " Paul Gortmaker
2016-07-03 17:30 ` [PATCH 3/4] bus: tegra-aconnect: " Paul Gortmaker
2016-07-04 9:17 ` Jon Hunter
2016-07-04 13:41 ` Paul Gortmaker
2016-07-04 13:47 ` Jon Hunter
2016-07-03 17:30 ` [PATCH 4/4] bus: simple-pm-bus: convert bool SIMPLE_PM_BUS to tristate Paul Gortmaker
2016-07-04 14:18 ` Geert Uytterhoeven
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160703173040.23612-1-paul.gortmaker@windriver.com \
--to=paul.gortmaker@windriver.com \
--cc=alison_chaiken@mentor.com \
--cc=computersforpeace@gmail.com \
--cc=f.fainelli@gmail.com \
--cc=geert+renesas@glider.be \
--cc=gnurou@gmail.com \
--cc=gregory.0xf0@gmail.com \
--cc=horms+renesas@verge.net.au \
--cc=jonathanh@nvidia.com \
--cc=khilman@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=shawn.guo@linaro.org \
--cc=swarren@wwwdotorg.org \
--cc=thierry.reding@gmail.com \
--cc=wsa@the-dreams.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).