Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

um: fix 3 instances of -Wmissing-prototypes

Fixes the following build errors observed from W=1 builds:
arch/um/drivers/xterm_kern.c:35:5: warning: no previous prototype for
function 'xterm_fd' [-Wmissing-prototypes]
35 | int xterm_fd(int socket, int *pid_out)
| ^
arch/um/drivers/xterm_kern.c:35:1: note: declare 'static' if the
function is not intended to be used outside of this translation unit
35 | int xterm_fd(int socket, int *pid_out)
| ^
| static
arch/um/drivers/chan_kern.c:183:6: warning: no previous prototype for
function 'free_irqs' [-Wmissing-prototypes]
183 | void free_irqs(void)
| ^
arch/um/drivers/chan_kern.c:183:1: note: declare 'static' if the
function is not intended to be used outside of this translation unit
183 | void free_irqs(void)
| ^
| static
arch/um/drivers/slirp_kern.c:18:6: warning: no previous prototype for
function 'slirp_init' [-Wmissing-prototypes]
18 | void slirp_init(struct net_device *dev, void *data)
| ^
arch/um/drivers/slirp_kern.c:18:1: note: declare 'static' if the
function is not intended to be used outside of this translation unit
18 | void slirp_init(struct net_device *dev, void *data)
| ^
| static

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202308081050.sZEw4cQ5-lkp@intel.com/
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Richard Weinberger <richard@nod.at>

authored by

Nick Desaulniers and committed by
Richard Weinberger
ab7ca2eb 4b038701

+3 -3
+1 -1
arch/um/drivers/slirp_kern.c
··· 15 15 struct arg_list_dummy_wrapper argw; /* XXX should be simpler... */ 16 16 }; 17 17 18 - void slirp_init(struct net_device *dev, void *data) 18 + static void slirp_init(struct net_device *dev, void *data) 19 19 { 20 20 struct uml_net_private *private; 21 21 struct slirp_data *spri;
+1
arch/um/drivers/xterm_kern.c
··· 9 9 #include <asm/irq.h> 10 10 #include <irq_kern.h> 11 11 #include <os.h> 12 + #include "xterm.h" 12 13 13 14 struct xterm_wait { 14 15 struct completion ready;
+1
arch/um/include/shared/irq_kern.h
··· 76 76 } 77 77 78 78 void um_free_irq(int irq, void *dev_id); 79 + void free_irqs(void); 79 80 #endif
-2
arch/um/kernel/irq.c
··· 23 23 #include <linux/time-internal.h> 24 24 25 25 26 - extern void free_irqs(void); 27 - 28 26 /* When epoll triggers we do not know why it did so 29 27 * we can also have different IRQs for read and write. 30 28 * This is why we keep a small irq_reg array for each fd -