driver core: driver.h: remove extern from function prototypes
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 24 Mar 2023 12:27:08 +0000 (13:27 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 24 Mar 2023 14:35:42 +0000 (15:35 +0100)
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.

Acked-by: Rafael J. Wysocki <rafael@kernel.org>
Link: https://lore.kernel.org/r/20230324122711.2664537-3-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/linux/device/driver.h

index 0f22a6f..c244267 100644 (file)
@@ -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));