Linux Power Management development
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Adrian Hunter <adrian.hunter@intel.com>
Cc: Ulf Hansson <ulf.hansson@linaro.org>,
	Victor Shih <victor.shih@genesyslogic.com.tw>,
	linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org,
	Linux PM list <linux-pm@vger.kernel.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>
Subject: Re: [PATCH v2 1/6] mmc: sdhci: Use EXPORT_PM_FN_NS_GPL() for exporting PM functions
Date: Mon, 9 Dec 2024 18:36:31 +0200	[thread overview]
Message-ID: <Z1ccjxyxO0NMNbkm@smile.fi.intel.com> (raw)
In-Reply-To: <7b5fcb3e-e3e7-4d87-9a7b-5570e2e85a0e@intel.com>

On Mon, Dec 09, 2024 at 12:38:59PM +0200, Adrian Hunter wrote:
> On 1/11/24 12:11, Andy Shevchenko wrote:
> > Switch from ugly ifdeffery to using EXPORT_PM_FN_NS_GPL()
> > for exporting PM functions. This helps cleaning up the other
> > SDHCI drivers in the future.
> 
> It seems sdhci is the first code in the kernel to use
> EXPORT_PM_FN_NS_GPL() but it was not asked for ;-)
> 
> As such, can you fill in a little background.  I am not
> sure what it achieves.  Why have CONFIG_PM if not to
> #ifdef dependent code behind it?

It makes sure that the code elimination happens at compile time and
at the same time gives developer less uglified (by ifdeffery) code.
It means there is less risk to miss anything of that which make become
a compile-time warning of unused function, or even issues during linking
with modules, etc.

Should I update a commit message with that?

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2024-12-09 16:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20241101101441.3518612-1-andriy.shevchenko@linux.intel.com>
     [not found] ` <20241101101441.3518612-2-andriy.shevchenko@linux.intel.com>
2024-12-09 10:38   ` [PATCH v2 1/6] mmc: sdhci: Use EXPORT_PM_FN_NS_GPL() for exporting PM functions Adrian Hunter
2024-12-09 16:36     ` Andy Shevchenko [this message]
2024-12-09 17:11       ` Adrian Hunter
2025-01-16 15:14         ` Andy Shevchenko
2025-01-16 16:55           ` Richard Fitzgerald

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=Z1ccjxyxO0NMNbkm@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=adrian.hunter@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=ulf.hansson@linaro.org \
    --cc=victor.shih@genesyslogic.com.tw \
    /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