From: Paul Gortmaker <paul.gortmaker@windriver.com>
To: linux-kernel@vger.kernel.org
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>,
Bryan Wu <cooloney@gmail.com>,
Linus Walleij <linus.walleij@linaro.org>,
Jacek Anaszewski <j.anaszewski@samsung.com>,
Richard Purdie <rpurdie@rpsys.net>,
linux-leds@vger.kernel.org
Subject: [PATCH 0/3] leds: avoid module usage in non-modular code
Date: Sun, 13 Dec 2015 16:45:48 -0500 [thread overview]
Message-ID: <1450043151-30820-1-git-send-email-paul.gortmaker@windriver.com> (raw)
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.
For the LED subsystem, there are just three commits. Two are basically
trivial remapping to the appropriate non-modular counterparts. The
third also has a change to block driver unbinding since that doesn't
make any sense and it allows us to delete the .remove code. We've
already made similar unbind changes like this in drivers/tty.
Patches created on linux-next and build tested for ARM allmodconfig.
Paul.
---
Cc: Bryan Wu <cooloney@gmail.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Jacek Anaszewski <j.anaszewski@samsung.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: linux-leds@vger.kernel.org
Paul Gortmaker (3):
drivers/leds: make trigger/ledtrig-cpu.c driver explicitly non-modular
drivers/leds: make trigger/ledtrig-ide-disk.c driver explicitly non-modular
drivers/leds: make leds-syscon.c explicitly non-modular
drivers/leds/leds-syscon.c | 18 +++---------------
drivers/leds/trigger/ledtrig-cpu.c | 26 +-------------------------
drivers/leds/trigger/ledtrig-ide-disk.c | 14 +-------------
3 files changed, 5 insertions(+), 53 deletions(-)
--
2.6.1
next reply other threads:[~2015-12-13 21:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-13 21:45 Paul Gortmaker [this message]
2015-12-13 21:45 ` [PATCH 1/3] drivers/leds: make trigger/ledtrig-cpu.c driver explicitly non-modular Paul Gortmaker
2015-12-15 13:28 ` Linus Walleij
2015-12-13 21:45 ` [PATCH 2/3] drivers/leds: make trigger/ledtrig-ide-disk.c " Paul Gortmaker
2015-12-13 21:45 ` [PATCH 3/3] drivers/leds: make leds-syscon.c " Paul Gortmaker
2015-12-14 9:21 ` [PATCH 0/3] leds: avoid module usage in non-modular code Jacek Anaszewski
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=1450043151-30820-1-git-send-email-paul.gortmaker@windriver.com \
--to=paul.gortmaker@windriver.com \
--cc=cooloney@gmail.com \
--cc=j.anaszewski@samsung.com \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=rpurdie@rpsys.net \
/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).