From: Paul Gortmaker <paul.gortmaker@windriver.com>
To: <linux-kernel@vger.kernel.org>
Cc: "Paul Gortmaker" <paul.gortmaker@windriver.com>,
"Baruch Siach" <baruch@tkos.co.il>,
"Heikki Krogerus" <heikki.krogerus@linux.intel.com>,
"Jean-Christophe Plagniol-Villard" <plagnioj@jcrosoft.com>,
"Jeff Wu" <Jeff.Wu@amd.com>,
"Joachim Eastwood" <manabian@gmail.com>,
"Ken Xue" <Ken.Xue@amd.com>,
"Laxman Dewangan" <ldewangan@nvidia.com>,
"Linus Walleij" <linus.walleij@linaro.org>,
"Ludovic Desroches" <ludovic.desroches@atmel.com>,
"Michal Simek" <michal.simek@xilinx.com>,
"Mika Westerberg" <mika.westerberg@linux.intel.com>,
"Sören Brinkmann" <soren.brinkmann@xilinx.com>,
linux-gpio@vger.kernel.org
Subject: [PATCH 0/9] pinctrl: make non-modular drivers really non modular
Date: Mon, 6 Jun 2016 22:42:59 -0400 [thread overview]
Message-ID: <1465267388-17884-1-git-send-email-paul.gortmaker@windriver.com> (raw)
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.
Similar to what was done for GPIO, I'd divided up the the audit of
modular usage in non-modular pinctrl drivers into reasonable batch
sizes to hopefully ease review.
This batch deals with individual standalone drivers that are nearly
all in the top level directory.
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
as required based on whether the file already had it.
-the removal of any/all unused/orphaned __exit functions
that would never be called/exercised.
-the removal of any ".remove" functions that were hooked into
the driver struct. This ".remove" function would of
course not be called from the __exit function since that was
never run. However in theory, someone could have triggered it
via sysfs unbind, even though there isn't a sensible use case
for doing so. So to cover that possibility, we've also disabled
sysfs unbind in these drivers.
There are no initcall level changes here; everything was at the level
of device_initcall and remains so, by using the builtin equivalents.
Build tested for several different key arch on the Monday linux-next
tree to ensure no silly typos crept in.
Paul.
---
Cc: Baruch Siach <baruch@tkos.co.il>
Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
Cc: Jeff Wu <Jeff.Wu@amd.com>
Cc: Joachim Eastwood <manabian@gmail.com>
Cc: Ken Xue <Ken.Xue@amd.com>
Cc: Laxman Dewangan <ldewangan@nvidia.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Ludovic Desroches <ludovic.desroches@atmel.com>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: "Sören Brinkmann" <soren.brinkmann@xilinx.com>
Cc: linux-gpio@vger.kernel.org
Paul Gortmaker (9):
pinctrl: as3722: make it explicitly non-modular
pinctrl: baytrail: make it explicitly non-modular
pinctrl: at91: make it explicitly non-modular
pinctrl: lpc18xx: make it explicitly non-modular
pinctrl: amd: make it explicitly non-modular
pinctrl: palmas: make it explicitly non-modular
pinctrl: zynq: make it explicitly non-modular
pinctrl: digicolor: make it explicitly non-modular
pinctrl: at91-pio4: make it explicitly non-modular
drivers/pinctrl/intel/pinctrl-baytrail.c | 25 ++++---------------------
drivers/pinctrl/pinctrl-amd.c | 23 +++--------------------
drivers/pinctrl/pinctrl-as3722.c | 20 +++-----------------
drivers/pinctrl/pinctrl-at91-pio4.c | 22 +++-------------------
drivers/pinctrl/pinctrl-at91.c | 11 -----------
drivers/pinctrl/pinctrl-digicolor.c | 16 +++-------------
drivers/pinctrl/pinctrl-lpc18xx.c | 20 +++-----------------
drivers/pinctrl/pinctrl-palmas.c | 10 ++--------
drivers/pinctrl/pinctrl-zynq.c | 13 +------------
9 files changed, 22 insertions(+), 138 deletions(-)
--
2.8.0
next reply other threads:[~2016-06-07 2:43 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-07 2:42 Paul Gortmaker [this message]
2016-06-07 2:43 ` [PATCH 1/9] pinctrl: as3722: make it explicitly non-modular Paul Gortmaker
2016-06-07 6:36 ` Laxman Dewangan
2016-06-07 2:43 ` [PATCH 2/9] pinctrl: baytrail: " Paul Gortmaker
2016-06-09 14:10 ` Mika Westerberg
2016-06-13 6:26 ` Linus Walleij
2016-06-07 2:43 ` [PATCH 3/9] pinctrl: at91: " Paul Gortmaker
2016-06-13 6:27 ` Linus Walleij
2016-06-07 2:43 ` [PATCH 4/9] pinctrl: lpc18xx: " Paul Gortmaker
2016-06-13 6:28 ` Linus Walleij
2016-06-07 2:43 ` [PATCH 5/9] pinctrl: amd: " Paul Gortmaker
2016-06-13 6:29 ` Linus Walleij
2016-06-07 2:43 ` [PATCH 6/9] pinctrl: palmas: " Paul Gortmaker
2016-06-07 6:36 ` Laxman Dewangan
2016-06-07 2:43 ` [PATCH 7/9] pinctrl: zynq: " Paul Gortmaker
2016-06-07 2:54 ` Sören Brinkmann
2016-06-07 7:15 ` Michal Simek
2016-06-07 2:43 ` [PATCH 8/9] pinctrl: digicolor: " Paul Gortmaker
2016-06-07 6:13 ` Baruch Siach
2016-06-13 6:34 ` Linus Walleij
2016-06-13 6:33 ` Linus Walleij
2016-06-07 2:43 ` [PATCH 9/9] pinctrl: at91-pio4: " Paul Gortmaker
2016-06-08 6:27 ` Ludovic Desroches
2016-06-13 6:39 ` Linus Walleij
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=1465267388-17884-1-git-send-email-paul.gortmaker@windriver.com \
--to=paul.gortmaker@windriver.com \
--cc=Jeff.Wu@amd.com \
--cc=Ken.Xue@amd.com \
--cc=baruch@tkos.co.il \
--cc=heikki.krogerus@linux.intel.com \
--cc=ldewangan@nvidia.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ludovic.desroches@atmel.com \
--cc=manabian@gmail.com \
--cc=michal.simek@xilinx.com \
--cc=mika.westerberg@linux.intel.com \
--cc=plagnioj@jcrosoft.com \
--cc=soren.brinkmann@xilinx.com \
/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).