[1/6] driver core: device.h: remove extern from function prototypes

Message ID 20230324122711.2664537-1-gregkh@linuxfoundation.org
State New
Headers
Series [1/6] driver core: device.h: remove extern from function prototypes |

Commit Message

Greg KH March 24, 2023, 12:27 p.m. UTC
  The kernel coding style does not require 'extern' in function prototypes
in .h files, so remove them from include/linux/device.h as they are not
needed.

Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 include/linux/device.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
  

Comments

Rafael J. Wysocki March 24, 2023, 1:35 p.m. UTC | #1
On Fri, Mar 24, 2023 at 1:27 PM Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
>
> The kernel coding style does not require 'extern' in function prototypes
> in .h files, so remove them from include/linux/device.h as they are not
> needed.
>
> Cc: "Rafael J. Wysocki" <rafael@kernel.org>
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Acked-by: Rafael J. Wysocki <rafael@kernel.org>

for this one and the rest of the series.

> ---
>  include/linux/device.h | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/include/linux/device.h b/include/linux/device.h
> index 3b23772d3bbb..472dd24d4823 100644
> --- a/include/linux/device.h
> +++ b/include/linux/device.h
> @@ -1088,8 +1088,7 @@ void device_link_remove(void *consumer, struct device *supplier);
>  void device_links_supplier_sync_state_pause(void);
>  void device_links_supplier_sync_state_resume(void);
>
> -extern __printf(3, 4)
> -int dev_err_probe(const struct device *dev, int err, const char *fmt, ...);
> +__printf(3, 4) int dev_err_probe(const struct device *dev, int err, const char *fmt, ...);
>
>  /* Create alias, so I can be autoloaded. */
>  #define MODULE_ALIAS_CHARDEV(major,minor) \
> --
> 2.40.0
>
  
Greg KH March 24, 2023, 1:41 p.m. UTC | #2
On Fri, Mar 24, 2023 at 02:35:12PM +0100, Rafael J. Wysocki wrote:
> On Fri, Mar 24, 2023 at 1:27 PM Greg Kroah-Hartman
> <gregkh@linuxfoundation.org> wrote:
> >
> > The kernel coding style does not require 'extern' in function prototypes
> > in .h files, so remove them from include/linux/device.h as they are not
> > needed.
> >
> > Cc: "Rafael J. Wysocki" <rafael@kernel.org>
> > Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> 
> Acked-by: Rafael J. Wysocki <rafael@kernel.org>
> 
> for this one and the rest of the series.

Thanks for the review!

greg k-h
  

Patch

diff --git a/include/linux/device.h b/include/linux/device.h
index 3b23772d3bbb..472dd24d4823 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -1088,8 +1088,7 @@  void device_link_remove(void *consumer, struct device *supplier);
 void device_links_supplier_sync_state_pause(void);
 void device_links_supplier_sync_state_resume(void);
 
-extern __printf(3, 4)
-int dev_err_probe(const struct device *dev, int err, const char *fmt, ...);
+__printf(3, 4) int dev_err_probe(const struct device *dev, int err, const char *fmt, ...);
 
 /* Create alias, so I can be autoloaded. */
 #define MODULE_ALIAS_CHARDEV(major,minor) \