Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Paul Gortmaker <paul.gortmaker@windriver.com>
To: <linux-mips@linux-mips.org>
Cc: "Paul Gortmaker" <paul.gortmaker@windriver.com>,
	"Aurelien Jarno" <aurelien@aurel32.net>,
	"Hauke Mehrtens" <hauke@hauke-m.de>,
	"John Crispin" <john@phrozen.org>,
	"Rafał Miłecki" <zajec5@gmail.com>,
	"Ralf Baechle" <ralf@linux-mips.org>
Subject: [PATCH 0/4] mips: demodularize non-modular drivers.
Date: Mon, 15 Aug 2016 16:30:51 -0400	[thread overview]
Message-ID: <20160815203055.20541-1-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 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.

This represents the drivers actually using modular functions; there are
also drivers/files that include module.h but don't use any of the macros
or functions within it.  Those MIPS instances will be handled separately.

Paul.

---

Cc: Aurelien Jarno <aurelien@aurel32.net>
Cc: Hauke Mehrtens <hauke@hauke-m.de>
Cc: John Crispin <john@phrozen.org>
Cc: "Rafał Miłecki" <zajec5@gmail.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org

Paul Gortmaker (4):
  mips: bcm47xx: make serial explicitly non-modular
  mips: ralink: make timer explicitly non-modular
  mips: lantiq: make vmmc explicitly non-modular
  mips: lantiq: make xrx200_phy_fw explicitly non-modular

 arch/mips/bcm47xx/serial.c            | 11 ++++-------
 arch/mips/lantiq/xway/vmmc.c          |  6 ++----
 arch/mips/lantiq/xway/xrx200_phy_fw.c | 12 ++++--------
 arch/mips/ralink/timer.c              | 28 +++++++---------------------
 4 files changed, 17 insertions(+), 40 deletions(-)

-- 
2.8.4

WARNING: multiple messages have this Message-ID (diff)
From: Paul Gortmaker <paul.gortmaker@windriver.com>
To: linux-mips@linux-mips.org
Cc: "Paul Gortmaker" <paul.gortmaker@windriver.com>,
	"Aurelien Jarno" <aurelien@aurel32.net>,
	"Hauke Mehrtens" <hauke@hauke-m.de>,
	"John Crispin" <john@phrozen.org>,
	"Rafał Miłecki" <zajec5@gmail.com>,
	"Ralf Baechle" <ralf@linux-mips.org>
Subject: [PATCH 0/4] mips: demodularize non-modular drivers.
Date: Mon, 15 Aug 2016 16:30:51 -0400	[thread overview]
Message-ID: <20160815203055.20541-1-paul.gortmaker@windriver.com> (raw)
Message-ID: <20160815203051.b-P8xUnUS9UnI3Wk2NVllC6xGm4BUO7Xa1fOwiu3Lw8@z> (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 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.

This represents the drivers actually using modular functions; there are
also drivers/files that include module.h but don't use any of the macros
or functions within it.  Those MIPS instances will be handled separately.

Paul.

---

Cc: Aurelien Jarno <aurelien@aurel32.net>
Cc: Hauke Mehrtens <hauke@hauke-m.de>
Cc: John Crispin <john@phrozen.org>
Cc: "Rafał Miłecki" <zajec5@gmail.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org

Paul Gortmaker (4):
  mips: bcm47xx: make serial explicitly non-modular
  mips: ralink: make timer explicitly non-modular
  mips: lantiq: make vmmc explicitly non-modular
  mips: lantiq: make xrx200_phy_fw explicitly non-modular

 arch/mips/bcm47xx/serial.c            | 11 ++++-------
 arch/mips/lantiq/xway/vmmc.c          |  6 ++----
 arch/mips/lantiq/xway/xrx200_phy_fw.c | 12 ++++--------
 arch/mips/ralink/timer.c              | 28 +++++++---------------------
 4 files changed, 17 insertions(+), 40 deletions(-)

-- 
2.8.4

             reply	other threads:[~2016-08-15 20:32 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-15 20:30 Paul Gortmaker [this message]
2016-08-15 20:30 ` [PATCH 0/4] mips: demodularize non-modular drivers Paul Gortmaker
2016-08-15 20:30 ` [PATCH 1/4] mips: bcm47xx: make serial explicitly non-modular Paul Gortmaker
2016-08-15 20:30   ` Paul Gortmaker
2016-08-15 20:30 ` [PATCH 2/4] mips: ralink: make timer " Paul Gortmaker
2016-08-15 20:30   ` Paul Gortmaker
2016-08-15 20:30 ` [PATCH 3/4] mips: lantiq: make vmmc " Paul Gortmaker
2016-08-15 20:30   ` Paul Gortmaker
2016-08-15 20:30 ` [PATCH 4/4] mips: lantiq: make xrx200_phy_fw " Paul Gortmaker
2016-08-15 20:30   ` Paul Gortmaker

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=20160815203055.20541-1-paul.gortmaker@windriver.com \
    --to=paul.gortmaker@windriver.com \
    --cc=aurelien@aurel32.net \
    --cc=hauke@hauke-m.de \
    --cc=john@phrozen.org \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.org \
    --cc=zajec5@gmail.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