public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: torvalds@linux-foundation.org, linux-kernel@vger.kernel.org
Subject: Re: [GIT PULL] Introduce builtin_platform_driver for non modules
Date: Tue, 30 Jun 2015 18:24:58 -0700	[thread overview]
Message-ID: <20150701012458.GA16721@kroah.com> (raw)
In-Reply-To: <20150701011908.GC8621@windriver.com>

On Tue, Jun 30, 2015 at 09:19:09PM -0400, Paul Gortmaker wrote:
> We see an increasing number of non-modular drivers using
> modular_driver() type register functions.  There are several
> downsides to letting this continue unchecked:
> 
> 1) The code can appear modular to a reader of the code, and they
>    won't know if the code really is modular without checking the
>    Makefile and Kconfig to see if compilation is governed by a
>    bool or tristate.
> 2) Coders of drivers may be tempted to code up an __exit function
>    that is never used, just in order to satisfy the required three
>    args of the modular registration function.
> 3) Non-modular code ends up including the <module.h> which increases
>    CPP overhead that they don't need.
> 4) It hinders us from performing better separation of the module
>    init code and the generic init code.
> 
> So here we introduce similar macros for builtin drivers.  Then we 
> convert builtin drivers (controlled by a bool Kconfig) by making the
> following type of mapping:
> 
>   module_platform_driver()       --->  builtin_platform_driver()
>   module_platform_driver_probe() --->  builtin_platform_driver_probe().
> 
> The set of drivers that are converted here are just the ones that
> showed up as relying on an implicit include of <module.h> during
> a pending header cleanup.  So we convert them here vs. adding
> an include of <module.h> to non-modular code to avoid compile fails.
> Additonal conversions can be done asynchronously at any time.
> 
> Once again, an unused module_exit function that is removed here appears
> in the diffstat as an outlier wrt. all the other changes.
> 
> Original posting:
>    "Introduce builtin_driver and use it for non-modular code"
>    https://lkml.kernel.org/r/1431287385-1526-1-git-send-email-paul.gortmaker@windriver.com
> 
> Thanks,
> Paul.
> ---
> 
> The following changes since commit 0f57d86787d8b1076ea8f9cbdddda2a46d534a27:
> 
>   Linux 4.1-rc8 (2015-06-14 15:51:10 -1000)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux.git tags/module-builtin_driver-v4.1-rc8
> 
> for you to fetch changes up to 77459a0feca4ae8757a905fd1791f039479e8e1e:
> 
>   drivers/clk: convert sunxi/clk-mod0.c to use builtin_platform_driver (2015-06-16 14:12:39 -0400)

Was this ever in linux-next?  I saw you post this once, don't recall any
real discussion about it.  Ideally some subsystem people would ack it...

thanks,

greg k-h

  reply	other threads:[~2015-07-01  1:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-01  1:19 [GIT PULL] Introduce builtin_platform_driver for non modules Paul Gortmaker
2015-07-01  1:24 ` Greg KH [this message]
2015-07-01  6:53   ` Stephen Rothwell
2015-07-01 15:29     ` Greg KH
2015-07-01 15:33   ` Paul Gortmaker
2015-07-01 15:39     ` Greg KH

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=20150701012458.GA16721@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paul.gortmaker@windriver.com \
    --cc=torvalds@linux-foundation.org \
    /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