Skip to contentSkip to conversation

driver core: Remove unused platform_notify, platform_notify_remove

PATCH In review Bjorn Helgaas 3 participants 3 messages Mar 25, 2024 – Mar 26, 2024 Driver core

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 driver core: Remove unused platform_notify, platform_notify_remove

From: Bjorn Helgaas <[email protected]>

The "platform_notify" and "platform_notify_remove" hooks have been unused since 00ba9357d189 ("ARM: ixp4xx: Drop custom DMA coherency and bouncing").

Remove "platform_notify" and "platform_notify_remove". No functional change intended.

Cc Heikki Krogerus <[email protected]>
Cc Andy Shevchenko <[email protected]>
Cc Linus Walleij <[email protected]>
---
 drivers/base/core.c    |  8 --------
 include/linux/device.h | 11 -----------
 2 files changed, 19 deletions(-)
drivers/base/core.c +0 -8
index b93f3c5716ae..78dfa74ee18b 100644
@@ -2331,8 +2331,6 @@ static void fw_devlink_link_device(struct device *dev)
 
 /* Device links support end. */
 
-int (*platform_notify)(struct device *dev) = NULL;
-int (*platform_notify_remove)(struct device *dev) = NULL;
 static struct kobject *dev_kobj;
 
 /* /sys/dev/char */
@@ -2380,16 +2378,10 @@ static void device_platform_notify(struct device *dev)
 	acpi_device_notify(dev);
 
 	software_node_notify(dev);
-
-	if (platform_notify)
-		platform_notify(dev);
 }
 
 static void device_platform_notify_remove(struct device *dev)
 {
-	if (platform_notify_remove)
-		platform_notify_remove(dev);
-
 	software_node_notify_remove(dev);
 
 	acpi_device_notify_remove(dev);
include/linux/device.h +0 -11
index 97c4b046c09d..c515ba5756e4 100644
@@ -1206,17 +1206,6 @@ int __must_check devm_device_add_groups(struct device *dev,
 int __must_check devm_device_add_group(struct device *dev,
 				       const struct attribute_group *grp);
 
-/*
- * Platform "fixup" functions - allow the platform to have their say
- * about devices and actions that the general device layer doesn't
- * know about.
- */
-/* Notify platform of device discovery */
-extern int (*platform_notify)(struct device *dev);
-
-extern int (*platform_notify_remove)(struct device *dev);
-
-
 /*
  * get_device - atomically increment the reference count for the device.
  *
Signature · 1 line
2.34.1
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 6 lines · Bjorn Helgaas

From: Bjorn Helgaas <[email protected]>

The "platform_notify" and "platform_notify_remove" hooks have been unused since 00ba9357d189 ("ARM: ixp4xx: Drop custom DMA coherency and bouncing").

Quoted 7 lines

Remove "platform_notify" and "platform_notify_remove". No functional change intended.

Cc Heikki Krogerus <[email protected]>
Cc Andy Shevchenko <[email protected]>
Cc Linus Walleij <[email protected]>
Quoted 60 lines
---
 drivers/base/core.c    |  8 --------
 include/linux/device.h | 11 -----------
 2 files changed, 19 deletions(-)
drivers/base/core.c +0 -8
index b93f3c5716ae..78dfa74ee18b 100644
@@ -2331,8 +2331,6 @@ static void fw_devlink_link_device(struct device *dev)
 
 /* Device links support end. */
 
-int (*platform_notify)(struct device *dev) = NULL;
-int (*platform_notify_remove)(struct device *dev) = NULL;
 static struct kobject *dev_kobj;
 
 /* /sys/dev/char */
@@ -2380,16 +2378,10 @@ static void device_platform_notify(struct device *dev)
        acpi_device_notify(dev);
 
        software_node_notify(dev);
-
-       if (platform_notify)
-               platform_notify(dev);
 }
 
 static void device_platform_notify_remove(struct device *dev)
 {
-       if (platform_notify_remove)
-               platform_notify_remove(dev);
-
        software_node_notify_remove(dev);
 
        acpi_device_notify_remove(dev);
include/linux/device.h +0 -12
index 97c4b046c09d..c515ba5756e4 100644
@@ -1206,17 +1206,6 @@ int __must_check devm_device_add_groups(struct device *dev,
 int __must_check devm_device_add_group(struct device *dev,
                                       const struct attribute_group *grp);
 
-/*
- * Platform "fixup" functions - allow the platform to have their say
- * about devices and actions that the general device layer doesn't
- * know about.
- */
-/* Notify platform of device discovery */
-extern int (*platform_notify)(struct device *dev);
-
-extern int (*platform_notify_remove)(struct device *dev);
-
-
 /*
  * get_device - atomically increment the reference count for the device.
  *
--

2.34.1

Reviewed-by on v1 1/1
#2 lore raw
In reply to Bjorn Helgaas
Quoted 7 lines · Bjorn Helgaas

From: Bjorn Helgaas <[email protected]>

The "platform_notify" and "platform_notify_remove" hooks have been unused since 00ba9357d189 ("ARM: ixp4xx: Drop custom DMA coherency and bouncing").

Remove "platform_notify" and "platform_notify_remove". No functional change intended.

Less this invasive callbacks, better to maintain, thank you for the contribution!

Quoted 5 lines
Cc Heikki Krogerus <[email protected]>
Cc Andy Shevchenko <[email protected]>
Cc Linus Walleij <[email protected]>

Btw, can we start moving Cc list out of the commit messages?

Quoted 1 line

---

You can simply put Cc here, and it will have the same effect (and being archived on lore.kernel.org) while making commit messages less polluted.

Signature · 2 lines
With Best Regards,
Andy Shevchenko