Skip to contentSkip to conversation

driver core: clean up open-coded NUMA_NO_NODE in device_initialize()

PATCH In review Julian Wiedmann 2 participants 2 messages Aug 24, 2021 Driver core

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 driver core: clean up open-coded NUMA_NO_NODE in device_initialize()

Use the right macro to get rid of a magic number.

---
 drivers/base/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/base/core.c +1 -1
index f6360490a4a3..fa1043d74e36 100644
@@ -2835,7 +2835,7 @@ void device_initialize(struct device *dev)
 	spin_lock_init(&dev->devres_lock);
 	INIT_LIST_HEAD(&dev->devres_head);
 	device_pm_init(dev);
-	set_dev_node(dev, -1);
+	set_dev_node(dev, NUMA_NO_NODE);
 #ifdef CONFIG_GENERIC_MSI_IRQ
 	INIT_LIST_HEAD(&dev->msi_list);
 #endif
Signature · 1 line
2.25.1
#1 lore raw
Quoted 1 line · Julian Wiedmann

Use the right macro to get rid of a magic number.

That is a very vague changelog comment. You can do better :)

thanks,

greg k-h