devres: rename the first parameter of devm_add_action_or_reset()
Quoted 8 lines · Masahiro Yamada
Fix a possible mistake in commit
410e7088e971("devres: Pass unique name of the resource todevm_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 fordr_release_tin the devres context.Rename it to 'dev'. No functional change intended.
...
include/linux/device.h static inline int __devm_add_action_or_reset(struct device *dev, void (*action)( · line 407
Quoted 4 lines
include/linux/device.h +2
-2-#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?
Signature · 2 lines
With Best Regards, Andy Shevchenko
PATCH 1/1 devres: rename the first parameter of devm_add_action_or_reset()
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.
---
include/linux/device.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
include/linux/device.h +2 -2
@@ -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
Signature · 1 line
2.39.2
Quoted 11 lines · Andy Shevchenko
Quoted 8 lines · Masahiro Yamada
Fix a possible mistake in commit
410e7088e971("devres: Pass unique name of the resource todevm_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 fordr_release_tin the devres context.Rename it to 'dev'. No functional change intended.
Quoted 8 lines
...
include/linux/device.h static inline int __devm_add_action_or_reset(struct device *dev, void (*action)( · line 407
Quoted 4 lines
include/linux/device.h +2
-2-#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.
Quoted 5 lines
--
With Best Regards,
Andy Shevchenko
Signature · 2 lines
Best Regards Masahiro Yamada