All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kishon Vijay Abraham I <kishon@ti.com>
To: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: <linux-kernel@vger.kernel.org>, Andrew Lunn <andrew@lunn.ch>,
	Gregory CLEMENT <gregory.clement@free-electrons.com>
Subject: Re: [PATCH 0/3] phy: remove needless usage of module header
Date: Mon, 4 Feb 2019 15:25:46 +0530	[thread overview]
Message-ID: <a22629dc-c8c0-207d-b9ba-2d72e40cbf80@ti.com> (raw)
In-Reply-To: <1544402090-30970-1-git-send-email-paul.gortmaker@windriver.com>



On 10/12/18 6:04 AM, Paul Gortmaker wrote:
> The most important thing to note here, is these clean-ups make no
> changes to the final generated run-time.  The 1st commit removes an
> unused function, otherwise the generated objects are also unchanged.
> 
> The work here represents a scan over the phy dir, looking for files
> that have nothing to do with a modular use case, but are using modular
> infrastructure regardless.
> 
> We are trying to make driver code consistent with the Makefiles/Kconfigs
> that control them.  This means not using modular functions/macros for
> drivers that can never be built as a module.  This has been done in quite
> a lot of other mainline subsystem dirs already.
> 
> Using modular infrastructure in non-modules might seem harmless, but some
> of the downfalls this leads to 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 drivers and spreads quickly.
> 
> As a data point for #3 above, an empty C file that just includes the
> module.h header generates over 750kB of CPP output.  Repeating the same
> experiment with init.h and the result is less than 12kB; with export.h
> it is only about 1/2kB; with both it still is less than 12kB.
> 
> Build tested on x86-64 and ARM-64.

merged, thanks!

-Kishon
> 
> Paul.
> ---
> 
> Cc: Andrew Lunn <andrew@lunn.ch>
> Cc: Gregory CLEMENT <gregory.clement@free-electrons.com>
> Cc: Kishon Vijay Abraham I <kishon@ti.com>
> 
> Paul Gortmaker (3):
>   phy: make phy-core explicitly non-modular
>   phy: make phy-mvebu-sata explicitly non-modular
>   phy: make phy-armada375-usb2 explicitly non-modular
> 
>  drivers/phy/marvell/phy-armada375-usb2.c |  8 +-------
>  drivers/phy/marvell/phy-mvebu-sata.c     |  9 ++-------
>  drivers/phy/phy-core.c                   | 12 +-----------
>  3 files changed, 4 insertions(+), 25 deletions(-)
> 

      parent reply	other threads:[~2019-02-04  9:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-10  0:34 [PATCH 0/3] phy: remove needless usage of module header Paul Gortmaker
2018-12-10  0:34 ` [PATCH 1/3] phy: make phy-core explicitly non-modular Paul Gortmaker
2018-12-10  0:34 ` [PATCH 2/3] phy: make phy-mvebu-sata " Paul Gortmaker
2018-12-10  0:34 ` [PATCH 3/3] phy: make phy-armada375-usb2 " Paul Gortmaker
2019-01-18 14:44   ` Gregory CLEMENT
2019-02-04  9:55 ` Kishon Vijay Abraham I [this message]

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=a22629dc-c8c0-207d-b9ba-2d72e40cbf80@ti.com \
    --to=kishon@ti.com \
    --cc=andrew@lunn.ch \
    --cc=gregory.clement@free-electrons.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paul.gortmaker@windriver.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.