Skip to contentSkip to conversation

driver:core: no need to set a default value for want_async

PATCH In review 李哲 2 participants 2 messages Jul 11, 2024 Driver core

lore
Share & tools
lore

李哲

author
#0 lore raw

PATCH 1/1 driver:core: no need to set a default value for want_async

The default value of this member variable is false, which is only set to true when asynchronous loading is required, and does not need to be set to false during synchronization

---
 drivers/base/dd.c | 1 -
 1 file changed, 1 deletion(-)
drivers/base/dd.c +0 -1
index d047919d1f5e..47351d98f6e1 100644
@@ -1014,7 +1014,6 @@ static int __device_attach(struct device *dev, bool allow_async)
 		struct device_attach_data data = {
 			.dev = dev,
 			.check_async = allow_async,
-			.want_async = false,
 		};
 
 		if (dev->parent)
Signature · 1 line
2.17.1
maintainer
#1 lore raw
Quoted 14 lines · 李哲

The default value of this member variable is false, which is only set to true when asynchronous loading is required, and does not need to be set to false during synchronization

---
 drivers/base/dd.c | 1 -
 1 file changed, 1 deletion(-)
drivers/base/dd.c +0 -0
index d047919d1f5e..47351d98f6e1 100644

drivers/base/dd.c static int __device_attach(struct device *dev, bool allow_async) · line 1017

Quoted 4 lines
drivers/base/dd.c +0 -1
@@ -1014,7 +1014,6 @@ static int __device_attach(struct device *dev, bool allow_async)
 		struct device_attach_data data = {
 			.dev = dev,
 			.check_async = allow_async,
-			.want_async = false,

This is good to keep as-is for documentation alone, it doesn't actually change anything and makes it obvious.

thanks,

greg k-h