All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Arnd Bergmann <arnd@arndb.de>
Cc: linux-iio@vger.kernel.org, Paul Cercueil <paul@crapouillou.net>,
	"Rafael J . Wysocki" <rafael@kernel.org>,
	Gwendal Grignou <gwendal@chromium.org>,
	Jonathan Cameron <Jonathan.Cameron@huawei.com>
Subject: Re: [PATCH v2 01/51] iio:accel:da311: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() etc
Date: Mon, 3 Jan 2022 15:24:44 +0000	[thread overview]
Message-ID: <20220103152444.0e22e971@jic23-huawei> (raw)
In-Reply-To: <CAK8P3a20AatvTxHEXfTpMWD8RJtLbJiTLbhiKJgQrn+KXYG8zw@mail.gmail.com>

On Sun, 2 Jan 2022 09:15:06 -0500
Arnd Bergmann <arnd@arndb.de> wrote:

> On Sun, Jan 2, 2022 at 7:55 AM Jonathan Cameron <jic23@kernel.org> wrote:
> >
> > -static SIMPLE_DEV_PM_OPS(da311_pm_ops, da311_suspend, da311_resume);
> > +DEFINE_SIMPLE_DEV_PM_OPS(da311_pm_ops, da311_suspend, da311_resume);
> >  

Hi Arnd,

> 
> Does the new DEFINE_SIMPLE_DEV_PM_OPS imply 'static'? 

It does.

> I see that you remove
> the specifier in all the patches, which would not work otherwise, but
> I wonder what that
> means for drivers that actually define the pm-ops globally on purpose
> and can't do
> that any more after the conversion.

That came up in discussion of the patch series introducing this macro
https://lore.kernel.org/linux-pm/20211216110936.6ccd07d3@jic23-huawei/

Most of the cases that don't define it as static
also export the symbol for use by other modules so the approach of letting
the compiler detect it as dead code won't always work.

Exceptions from a bit of grepping are
net/ethernet/broadcom/bnx2x/
scsi/esas2r/esas2r_init.c
  not sure on reasoning behind the file splits in these drivers
  but definitely looks like it we could just merge a few files
  and let this be static + the compiler remove it neatly.

vs 17 cases where the symbol is exported and more cleverness will
be needed.

Jonathan

> 
>       Arnd


  reply	other threads:[~2022-01-03 15:19 UTC|newest]

Thread overview: 65+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-02 12:55 [PATCH v2 00/51] iio: Tree wide switch from CONFIG_PM* to pm_[sleep]_ptr etc Jonathan Cameron
2022-01-02 12:55 ` [PATCH v2 01/51] iio:accel:da311: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() etc Jonathan Cameron
2022-01-02 14:15   ` Arnd Bergmann
2022-01-03 15:24     ` Jonathan Cameron [this message]
2022-01-03 17:58       ` Arnd Bergmann
2022-01-04 14:16         ` Jonathan Cameron
2022-01-04 14:24           ` Rafael J. Wysocki
2022-01-04 15:08           ` Paul Cercueil
2022-01-04 18:06             ` Arnd Bergmann
2022-01-02 12:55 ` [PATCH v2 02/51] iio:accel:da280: " Jonathan Cameron
2022-01-02 12:55 ` [PATCH v2 03/51] iio:accel:dmard06: " Jonathan Cameron
2022-01-02 12:55 ` [PATCH v2 04/51] iio:accel:dmard10: Switch from CONFIG_PM " Jonathan Cameron
2022-01-02 12:55 ` [PATCH v2 05/51] iio:accel:mc3230: Switch from CONFIG_PM_SLEEP " Jonathan Cameron
2022-01-02 12:55 ` [PATCH v2 06/51] iio:accel:mma7660: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() Jonathan Cameron
2022-01-02 12:55 ` [PATCH v2 07/51] iio:accel:mma9551: Switch from CONFIG_PM guards to pm_ptr() etc Jonathan Cameron
2022-01-02 12:55 ` [PATCH v2 08/51] iio:accel:mma9553: " Jonathan Cameron
2022-01-02 12:55 ` [PATCH v2 09/51] iio:accel:stk8ba50: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() etc Jonathan Cameron
2022-01-02 12:55 ` [PATCH v2 10/51] iio:accel:kxsd9: Switch from CONFIG_PM guards to pm_ptr() etc Jonathan Cameron
2022-01-30 19:08   ` Jonathan Cameron
2022-01-02 12:55 ` [PATCH v2 11/51] iio:adc:ab8500: " Jonathan Cameron
2022-01-02 12:55 ` [PATCH v2 12/51] iio:adc:at91-adc: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() etc Jonathan Cameron
2022-01-02 12:55 ` [PATCH v2 13/51] iio:adc:exynos_adc: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() Jonathan Cameron
2022-01-02 12:55 ` [PATCH v2 14/51] iio:adc:palmas_gpadc: " Jonathan Cameron
2022-01-02 12:55 ` [PATCH v2 15/51] iio:adc:stm32:Switch from CONFIG_PM guards to pm_ptr() Jonathan Cameron
2022-01-02 12:55 ` [PATCH v2 16/51] iio:adc:rcar: Switch from CONFIG_PM guards to pm_ptr() etc Jonathan Cameron
2022-01-02 12:55 ` [PATCH v2 17/51] iio:adc:rockchip: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() etc Jonathan Cameron
2022-01-02 12:55 ` [PATCH v2 18/51] iio:adc:twl6030: " Jonathan Cameron
2022-01-02 12:55 ` [PATCH v2 19/51] iio:adc:vf610: " Jonathan Cameron
2022-01-02 12:55 ` [PATCH v2 20/51] iio:common:ssp: " Jonathan Cameron
2022-01-02 12:55 ` [PATCH v2 21/51] iio:dac:vf610: " Jonathan Cameron
2022-01-02 12:55 ` [PATCH v2 22/51] iio:light:apds9300: " Jonathan Cameron
2022-01-02 12:55 ` [PATCH v2 23/51] iio:light:bh1780: Switch from CONFIG_PM guards to pm_ptr() etc Jonathan Cameron
2022-01-02 12:55 ` [PATCH v2 24/51] iio:light:cm3232: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() etc Jonathan Cameron
2022-01-02 12:55 ` [PATCH v2 25/51] iio:light:isl29018: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() Jonathan Cameron
2022-01-02 12:55 ` [PATCH v2 26/51] iio:light:isl29125: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() etc Jonathan Cameron
2022-01-02 12:55 ` [PATCH v2 27/51] iio:light:jsa1212: " Jonathan Cameron
2022-01-02 12:55 ` [PATCH v2 28/51] iio:light:ltr501: " Jonathan Cameron
2022-01-02 12:55 ` [PATCH v2 29/51] iio:light:stk3310: " Jonathan Cameron
2022-01-02 12:55 ` [PATCH v2 30/51] iio:light:tcs3414: " Jonathan Cameron
2022-01-02 12:55 ` [PATCH v2 31/51] iio:light:tcs3472: " Jonathan Cameron
2022-01-02 12:55 ` [PATCH v2 32/51] iio:light:tsl2563: " Jonathan Cameron
2022-01-02 12:55 ` [PATCH v2 33/51] iio:light:tsl4531: " Jonathan Cameron
2022-01-02 12:56 ` [PATCH v2 34/51] iio:light:us5182: Switch from CONFIG_PM guards to pm_ptr() etc Jonathan Cameron
2022-01-30 19:12   ` Jonathan Cameron
2022-01-02 12:56 ` [PATCH v2 35/51] iio:magn:ak8975: " Jonathan Cameron
2022-01-02 12:56 ` [PATCH v2 36/51] iio:magn:mag3110: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() etc Jonathan Cameron
2022-01-02 12:56 ` [PATCH v2 37/51] iio:magn:mmc35240: " Jonathan Cameron
2022-01-02 12:56 ` [PATCH v2 38/51] iio:pressure:mpl3115: " Jonathan Cameron
2022-01-02 12:56 ` [PATCH v2 39/51] iio:proximity:as3935: " Jonathan Cameron
2022-01-04  6:41   ` Gwendal Grignou
2022-01-02 12:56 ` [PATCH v2 40/51] iio:proximity:pulsedlight: Switch from CONFIG_PM guards to pm_ptr() etc Jonathan Cameron
2022-01-02 12:56 ` [PATCH v2 41/51] iio:proximity:rfd77492: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() etc Jonathan Cameron
2022-01-02 12:56 ` [PATCH v2 42/51] iio:proximity:sx9500: " Jonathan Cameron
2022-01-03 18:58   ` Gwendal Grignou
2022-01-02 12:56 ` [PATCH v2 43/51] iio:temperature:tmp006: " Jonathan Cameron
2022-01-02 12:56 ` [PATCH v2 44/51] iio:temperature:tmp007: " Jonathan Cameron
2022-01-03  6:03   ` Manivannan Sadhasivam
2022-01-02 12:56 ` [PATCH v2 45/51] iio:chemical:atlas: Switch from CONFIG_PM guards to pm_ptr() etc Jonathan Cameron
2022-01-02 12:56 ` [PATCH v2 46/51] iio:accel:stk8312: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() etc Jonathan Cameron
2022-01-02 12:56 ` [PATCH v2 47/51] iio:accel:bma180: " Jonathan Cameron
2022-01-02 12:56 ` [PATCH v2 48/51] iio:dac:m62332: " Jonathan Cameron
2022-01-05 10:52   ` Jonathan Cameron
2022-01-02 12:56 ` [PATCH v2 49/51] iio:imu:kmx61: Switch from CONFIG_PM* guards to pm_ptr() etc Jonathan Cameron
2022-01-02 12:56 ` [PATCH v2 50/51] iio:light:rpr0521: Switch from CONFIG_PM " Jonathan Cameron
2022-01-02 12:56 ` [PATCH v2 51/51] iio:temperature:mlx90614: Switch from CONFIG_PM* " Jonathan Cameron

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=20220103152444.0e22e971@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=arnd@arndb.de \
    --cc=gwendal@chromium.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=paul@crapouillou.net \
    --cc=rafael@kernel.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 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.