]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
usb: gadget: configfs: Make check_user_usb_string() static
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sat, 10 Aug 2024 20:52:17 +0000 (22:52 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 13 Aug 2024 08:38:19 +0000 (10:38 +0200)
"linux/usb/gadget_configfs.h" is only included in
"drivers/usb/gadget/configfs.c", so there is no need to declare a function
in the header file. it is only used in this .c file.

It's better to have it static.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/958cb49dca1bff4254a3492c018efbf3b01918b4.1723323107.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/configfs.c
include/linux/usb/gadget_configfs.h

index 0e7c1e947c0a0e4d84797c319168ebe45fd98c54..e0bf2b2bfc01dbdeadf46aaa6772247da3dca3f7 100644 (file)
@@ -12,7 +12,7 @@
 #include "u_f.h"
 #include "u_os_desc.h"
 
-int check_user_usb_string(const char *name,
+static int check_user_usb_string(const char *name,
                struct usb_gadget_strings *stringtab_dev)
 {
        u16 num;
index d61aebd68128bfa51af81c16181e438319637eab..6a552dd4dec94f628fb9e06a49ea873a1feaeb24 100644 (file)
@@ -4,9 +4,6 @@
 
 #include <linux/configfs.h>
 
-int check_user_usb_string(const char *name,
-               struct usb_gadget_strings *stringtab_dev);
-
 #define GS_STRINGS_W(__struct, __name) \
 static ssize_t __struct##_##__name##_store(struct config_item *item, \
                const char *page, size_t len)           \