2023-09-07 16:25:54

by Andy Shevchenko

[permalink] [raw]
Subject: Re: [PATCH] devres: rename the first parameter of devm_add_action_or_reset()

On Thu, Sep 07, 2023 at 08:03:05PM +0900, Masahiro Yamada wrote:
> Fix a possible mistake in commit 410e7088e971 ("devres: Pass unique name
> of the resource to devm_add_action_or_reset()").
>
> The first parameter of devm_add_action_or_reset() is the associated
> device. The name 'release' is confusing because it is often used for
> dr_release_t in the devres context.
>
> Rename it to 'dev'. No functional change intended.

...

> -#define devm_add_action_or_reset(release, action, data) \
> - __devm_add_action_or_reset(release, action, data, #action)
> +#define devm_add_action_or_reset(dev, action, data) \
> + __devm_add_action_or_reset(dev, action, data, #action)

What about devm_add_action() and Co?

--
With Best Regards,
Andy Shevchenko



2023-09-08 14:56:43

by Masahiro Yamada

[permalink] [raw]
Subject: Re: [PATCH] devres: rename the first parameter of devm_add_action_or_reset()

On Thu, Sep 7, 2023 at 11:24 PM Andy Shevchenko <[email protected]> wrote:
>
> On Thu, Sep 07, 2023 at 08:03:05PM +0900, Masahiro Yamada wrote:
> > Fix a possible mistake in commit 410e7088e971 ("devres: Pass unique name
> > of the resource to devm_add_action_or_reset()").
> >
> > The first parameter of devm_add_action_or_reset() is the associated
> > device. The name 'release' is confusing because it is often used for
> > dr_release_t in the devres context.
> >
> > Rename it to 'dev'. No functional change intended.
>
> ...
>
> > -#define devm_add_action_or_reset(release, action, data) \
> > - __devm_add_action_or_reset(release, action, data, #action)
> > +#define devm_add_action_or_reset(dev, action, data) \
> > + __devm_add_action_or_reset(dev, action, data, #action)
>
> What about devm_add_action() and Co?


I will fix devm_add_action too.


Thanks.




> --
> With Best Regards,
> Andy Shevchenko
>
>


--
Best Regards
Masahiro Yamada