Re: [PATCH 00/49] iio: Tree wide switch from CONFIG_PM* to __maybe_unused etc.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Nov 23, 2021 at 09:09:30PM +0000, Jonathan Cameron wrote:
> From: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>
> 
> Note this series includes many drivers that are quite old and I'm not
> sure have active maintainers.  Hence if anyone has time to look at some
> of these beyond their own drivers and sanity check them it would be much
> appreciated!
> 
> Two motivations behind this set.
> 1 - General code reduction and improvement in readability in these drivers.
> 2 - Reduce change I'll have to ask people to change how they do this in
>     future patches.
> 
> Mostly this is just a case of letting the compiler work out it can remove
> the PM related functions rather than using #ifdefs in the code to do so.
> 
> The __maybe_unused markings make it clear we are intentionally building
> functions that the compiler can see are unused and remove in some build
> configurations.
> 
> The new pm_ptr() macro is rather convenient to got futher than many of
> the drivers were and when CONFIG_PM is not define ensure that the
> struct dev_pm_ops can also be removed.  Note there is a subtlty in that
> we only remove that whe CONFIG_PM is not defined whereas a few of these
> drivers were using CONFIG_PM_SLEEP which is a tighter condition (will
> remove the structure in more configurations).  I think that's a small
> price to pay for the convenience this macro brings.
> 
> I did this set as one patch per driver, as personally I prefer that
> option for all but the most trivial patches because it makes backports
> that cross with this series simpler and also avoid the complex
> tag giving we get for sets touching code from many authors.
> 
> All comments welcome.

Nice cleanup! Assuming that you add the missing pm_ptr() to patch 2
(iio:accel:da280) you can add this to the series:

Reviewed-by: Brian Masney <bmasney@xxxxxxxxxx>




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux