linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] video/fbdev: avoid module usage in non-modular sparc code
@ 2016-02-22  3:13 Paul Gortmaker
  2016-02-22  3:13 ` [PATCH 1/3] drivers/video: make fbdev/sunxvr500.c explicitly non-modular Paul Gortmaker
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Paul Gortmaker @ 2016-02-22  3:13 UTC (permalink / raw)
  To: linux-kernel
  Cc: Paul Gortmaker, David S. Miller,
	Jean-Christophe Plagniol-Villard, Tomi Valkeinen, linux-fbdev,
	sparclinux

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

For the video fb subsystem, I have about 40 commits in my personal
testing queue, but rather than overwhelm maintainers with a large
patch series, I'm looking for subsets within that to keep the Cc on
the series and the 00/N boiler-plate to a sane amount.

To that end, the sparc specific fb drivers is a nice small subset
that can be used to test the waters in the video subsystem, to ensure
the overall goals here are OK with everyone maintaining fb code.

The disallow of unbind might seem like overkill, but for drivers that
had a ".remove" function, it is the only way we can block people from
abusing existing infrastructure in order to continue getting at that
otherwise dead function call that we want to remove.

We toss out a net amount of about 80 lines of dead code here in just
three commits; not groundbreaking, but a step in the right direction.

Build tested for sparc64, allmodconfig; but with CONFIG_FB=y as the
drivers here all depend on this specific value to get enabled.

Paul.
---

Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: linux-fbdev@vger.kernel.org
Cc: sparclinux@vger.kernel.org

Paul Gortmaker (3):
  drivers/video: make fbdev/sunxvr500.c explicitly non-modular
  drivers/video: make fbdev/sunxvr1000.c explicitly non-modular
  drivers/video: make fbdev/sunxvr2500.c explicitly non-modular

 drivers/video/fbdev/sunxvr1000.c | 42 +++++++---------------------------------
 drivers/video/fbdev/sunxvr2500.c | 39 +++++++------------------------------
 drivers/video/fbdev/sunxvr500.c  | 42 +++++++---------------------------------
 3 files changed, 21 insertions(+), 102 deletions(-)

-- 
2.6.1

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2016-02-29  8:51 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-22  3:13 [PATCH 0/3] video/fbdev: avoid module usage in non-modular sparc code Paul Gortmaker
2016-02-22  3:13 ` [PATCH 1/3] drivers/video: make fbdev/sunxvr500.c explicitly non-modular Paul Gortmaker
2016-02-22  3:13 ` [PATCH 2/3] drivers/video: make fbdev/sunxvr1000.c " Paul Gortmaker
2016-02-22  3:13 ` [PATCH 3/3] drivers/video: make fbdev/sunxvr2500.c " Paul Gortmaker
2016-02-26 10:58 ` [PATCH 0/3] video/fbdev: avoid module usage in non-modular sparc code Tomi Valkeinen
2016-02-26 13:58   ` Paul Gortmaker
2016-02-29  8:44     ` Tomi Valkeinen
2016-02-26 17:21   ` [PATCH 0/3] video/fbdev: avoid module usage in non-modular sparc code,Re: " David Miller
2016-02-29  8:51     ` Tomi Valkeinen

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