Skip to contentSkip to conversation

driver core: auxiliary bus: No need to get auxdev->dev again

PATCH In review Angus Chen 2 participants 3 messages Apr 18, 2023 – Apr 19, 2023

Subsystems (2)
lore
Share & tools
lore

Angus Chen

author
#0 lore raw

PATCH 1/1 driver core: auxiliary bus: No need to get auxdev->dev again

Use dev variable directly.
No functional change intended.

---
 drivers/base/auxiliary.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/base/auxiliary.c +1 -1
index 4d4c2c8d26c4..ca1d044ff738 100644
@@ -286,7 +286,7 @@ int auxiliary_device_init(struct auxiliary_device *auxdev)
 	}
 
 	dev->bus = &auxiliary_bus_type;
-	device_initialize(&auxdev->dev);
+	device_initialize(dev);
 	return 0;
 }
 EXPORT_SYMBOL_GPL(auxiliary_device_init);
Signature · 1 line
2.25.1
maintainer
#1 lore raw
Quoted 2 lines · Angus Chen

Use dev variable directly.
No functional change intended.

Not intended, but is it really intended? What does this line mean?

Quoted 11 lines
---
 drivers/base/auxiliary.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/base/auxiliary.c +0 -0
index 4d4c2c8d26c4..ca1d044ff738 100644

drivers/base/auxiliary.c int auxiliary_device_init(struct auxiliary_device *auxdev) · line 289

Quoted 5 lines
drivers/base/auxiliary.c +1 -1
@@ -286,7 +286,7 @@ int auxiliary_device_init(struct auxiliary_device *auxdev)
 	}
 
 	dev->bus = &auxiliary_bus_type;
-	device_initialize(&auxdev->dev);
+	device_initialize(dev);

While an interesting change, is it needed? Why make it?

thanks,

greg k-h

author
#2 lore raw
Quoted 28 lines

-----Original Message-----
From: Greg KH <[email protected]>
Sent: Tuesday, April 18, 2023 8:32 PM
To: Angus Chen <[email protected]>
Cc: [email protected]; [email protected]
Subject: Re: [PATCH] driver core: auxiliary bus: No need to get auxdev->dev again

Quoted 2 lines · Angus Chen

Use dev variable directly.
No functional change intended.

Not intended, but is it really intended? What does this line mean?

drivers/base/auxiliary.c int auxiliary_device_init(struct auxiliary_device

Quoted 11 lines
---
 drivers/base/auxiliary.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/base/auxiliary.c +0 -0
index 4d4c2c8d26c4..ca1d044ff738 100644
@@ -286,7 +286,7 @@ int auxiliary_device_init(struct auxiliary_device

*auxdev)

Quoted 7 lines

drivers/base/auxiliary.c int auxiliary_device_init(struct auxiliary_device *auxdev) · line 289

Quoted 5 lines
drivers/base/auxiliary.c +1 -1
 	}
 
 	dev->bus = &auxiliary_bus_type;
-	device_initialize(&auxdev->dev);
+	device_initialize(dev);

While an interesting change, is it needed? Why make it?

I mean it just a clean up.beacuse
struct device *dev = &auxdev->dev;
thanks.

Quoted 4 lines

thanks,

greg k-h