[PATCH 3/6] driver core: driver.h: remove extern from function prototypes

From: Greg Kroah-Hartman
Date: Fri Mar 24 2023 - 08:27:36 EST


The kernel coding style does not require 'extern' in function prototypes
in .h files, so remove them from include/linux/device/driver.h as they
are not needed.

Cc: "Rafael J. Wysocki" <rafael@xxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
include/linux/device/driver.h | 26 +++++++++++---------------
1 file changed, 11 insertions(+), 15 deletions(-)

diff --git a/include/linux/device/driver.h b/include/linux/device/driver.h
index 0f22a6f46f8c..c244267a6744 100644
--- a/include/linux/device/driver.h
+++ b/include/linux/device/driver.h
@@ -122,13 +122,12 @@ struct device_driver {
};


-extern int __must_check driver_register(struct device_driver *drv);
-extern void driver_unregister(struct device_driver *drv);
+int __must_check driver_register(struct device_driver *drv);
+void driver_unregister(struct device_driver *drv);

-extern struct device_driver *driver_find(const char *name,
- const struct bus_type *bus);
-extern int driver_probe_done(void);
-extern void wait_for_device_probe(void);
+struct device_driver *driver_find(const char *name, const struct bus_type *bus);
+int driver_probe_done(void);
+void wait_for_device_probe(void);
void __init wait_for_init_devices_probe(void);

/* sysfs interface for exporting driver attributes */
@@ -147,18 +146,15 @@ struct driver_attribute {
#define DRIVER_ATTR_WO(_name) \
struct driver_attribute driver_attr_##_name = __ATTR_WO(_name)

-extern int __must_check driver_create_file(struct device_driver *driver,
- const struct driver_attribute *attr);
-extern void driver_remove_file(struct device_driver *driver,
- const struct driver_attribute *attr);
+int __must_check driver_create_file(struct device_driver *driver,
+ const struct driver_attribute *attr);
+void driver_remove_file(struct device_driver *driver,
+ const struct driver_attribute *attr);

int driver_set_override(struct device *dev, const char **override,
const char *s, size_t len);
-extern int __must_check driver_for_each_device(struct device_driver *drv,
- struct device *start,
- void *data,
- int (*fn)(struct device *dev,
- void *));
+int __must_check driver_for_each_device(struct device_driver *drv, struct device *start,
+ void *data, int (*fn)(struct device *dev, void *));
struct device *driver_find_device(struct device_driver *drv,
struct device *start, const void *data,
int (*match)(struct device *dev, const void *data));
--
2.40.0