Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1344123

Re: [PATCH 0/3] video/fbdev: avoid module usage in non-modular sparc code

From Tomi Valkeinen <tomi.valkeinen@ti.com>
Newsgroups linux.kernel
Subject Re: [PATCH 0/3] video/fbdev: avoid module usage in non-modular sparc code
Date 2016-02-26 12:00 +0100
Message-ID <r6ohS-1Wt-63@gated-at.bofh.it> (permalink)
References <r4Pcu-7KX-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On 22/02/16 05:13, Paul Gortmaker wrote:
> 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.

I think all the "normal" drivers should be compilable as modules. If
they can't, it should be fixed. However, we have lots of old drivers for
which it may be difficult to get anyone to fix them or test them.

Then again, with that kind of drivers it may be better to just let them
be, if there's no big reason to start cleaning them up. In other words,
if the driver is old and not actively developed/maintained, compiles
fine, presumably works fine, doesn't obstruct any other development,
then why touch it at all...

While doing this, did you just go forward removing the module support,
or did you check if it would be trivial to make the driver build as a
module? I wouldn't be surprised if in some cases all that would need to
be done is change the Kconfig's bool to tristate.

 Tomi

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Re: [PATCH 0/3] video/fbdev: avoid module usage in non-modular sparc  code Tomi Valkeinen <tomi.valkeinen@ti.com> - 2016-02-26 12:00 +0100
  Re: [PATCH 0/3] video/fbdev: avoid module usage in non-modular sparc  code Paul Gortmaker <paul.gortmaker@windriver.com> - 2016-02-26 15:00 +0100
    Re: [PATCH 0/3] video/fbdev: avoid module usage in non-modular sparc  code Tomi Valkeinen <tomi.valkeinen@ti.com> - 2016-02-29 09:50 +0100
  Re: [PATCH 0/3] video/fbdev: avoid module usage in non-modular  sparc  code,Re: [PATCH 0/3] video/fbdev: avoid module usage in non-modular sparc  code David Miller <davem@davemloft.net> - 2016-02-26 18:30 +0100
    Re: [PATCH 0/3] video/fbdev: avoid module usage in non-modular sparc  code,Re: [PATCH 0/3] video/fbdev: avoid module usage in non-modular sparc  code Tomi Valkeinen <tomi.valkeinen@ti.com> - 2016-02-29 10:00 +0100

csiph-web