public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] devres: rename the first parameter of devm_add_action_or_reset()
@ 2023-09-07 11:03 Masahiro Yamada
  2023-09-07 14:07 ` Andy Shevchenko
  0 siblings, 1 reply; 3+ messages in thread
From: Masahiro Yamada @ 2023-09-07 11:03 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-kernel, Rafael J . Wysocki, Andy Shevchenko,
	Masahiro Yamada

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.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---

 include/linux/device.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/device.h b/include/linux/device.h
index 56d93a1ffb7b..1fa0e9cb5e01 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -403,8 +403,8 @@ static inline int __devm_add_action_or_reset(struct device *dev, void (*action)(
 
 	return ret;
 }
-#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)
 
 /**
  * devm_alloc_percpu - Resource-managed alloc_percpu
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] devres: rename the first parameter of devm_add_action_or_reset()
  2023-09-07 11:03 [PATCH] devres: rename the first parameter of devm_add_action_or_reset() Masahiro Yamada
@ 2023-09-07 14:07 ` Andy Shevchenko
  2023-09-08 13:58   ` Masahiro Yamada
  0 siblings, 1 reply; 3+ messages in thread
From: Andy Shevchenko @ 2023-09-07 14:07 UTC (permalink / raw)
  To: Masahiro Yamada; +Cc: Greg Kroah-Hartman, linux-kernel, Rafael J . Wysocki

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



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] devres: rename the first parameter of devm_add_action_or_reset()
  2023-09-07 14:07 ` Andy Shevchenko
@ 2023-09-08 13:58   ` Masahiro Yamada
  0 siblings, 0 replies; 3+ messages in thread
From: Masahiro Yamada @ 2023-09-08 13:58 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: Greg Kroah-Hartman, linux-kernel, Rafael J . Wysocki

On Thu, Sep 7, 2023 at 11:24 PM Andy Shevchenko <andy@kernel.org> 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-09-08 13:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-07 11:03 [PATCH] devres: rename the first parameter of devm_add_action_or_reset() Masahiro Yamada
2023-09-07 14:07 ` Andy Shevchenko
2023-09-08 13:58   ` Masahiro Yamada

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox