Re: [PATCH 5.10.y-cip 14/23] PM: core: Add new *_PM_OPS macros, deprecate old ones

Pavel Machek
2023-05-23T13:19:50Z

[-- Attachment #1: Type: text/plain, Size: 1547 bytes --]

Hi!

> > > The callbacks that are only useful with CONFIG_PM_SLEEP is enabled,
> > > are now also wrapped with a new pm_sleep_ptr() macro, which is
> > > inspired from pm_ptr(). This is needed for drivers that use different
> > > callbacks for sleep and runtime PM, to handle the case where CONFIG_PM
> > > is set and CONFIG_PM_SLEEP is not.
> > >
> > > This commit also deprecates the following macros:
> > >
> > > SIMPLE_DEV_PM_OPS()
> > > UNIVERSAL_DEV_PM_OPS()
> > >
> > > And introduces the following macros:
> > >
> > > DEFINE_SIMPLE_DEV_PM_OPS()
> > > DEFINE_UNIVERSAL_DEV_PM_OPS()
> >
> > Changing interfaces / deprecating macros is not good thing to do in -cip
> > kernel. How sure are we this will not cause build failures or build
> > warnings in unrelated piece of code?
>
> Please see the commit [1] carefully,
>
> Deprecated is just a comment and it is just single header file change and
> There is no existing macros changed.

I'll need to look at the commit more carefuly.

However previous patch redefines pm_ptr macro, which may have
implications elsewhere. And indeed

commit 5ef11c56b2332613cacd5e7ac17cfb1a073b66ab
r8169: Avoid misuse of pm_ptr() macro

is example of such effect, and we'd need to pick it up.

I believe it would be less intrusive to make i2c driver work w/o core
changes.

Thanks and best regards,
Pavel
--
DENX Software Engineering GmbH, Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]