Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit ab7ca2e

Browse files
nickdesaulniersrichardweinberger
authored andcommitted
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 <[email protected]> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Signed-off-by: Nick Desaulniers <[email protected]> Signed-off-by: Richard Weinberger <[email protected]>
1 parent 4b03870 commit ab7ca2e

File tree

4 files changed

+3
-3
lines changed

4 files changed

+3
-3
lines changed

arch/um/drivers/slirp_kern.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ struct slirp_init {
1515
struct arg_list_dummy_wrapper argw; /* XXX should be simpler... */
1616
};
1717

18-
void slirp_init(struct net_device *dev, void *data)
18+
static void slirp_init(struct net_device *dev, void *data)
1919
{
2020
struct uml_net_private *private;
2121
struct slirp_data *spri;

arch/um/drivers/xterm_kern.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#include <asm/irq.h>
1010
#include <irq_kern.h>
1111
#include <os.h>
12+
#include "xterm.h"
1213

1314
struct xterm_wait {
1415
struct completion ready;

arch/um/include/shared/irq_kern.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,4 +76,5 @@ static inline bool um_irq_timetravel_handler_used(void)
7676
}
7777

7878
void um_free_irq(int irq, void *dev_id);
79+
void free_irqs(void);
7980
#endif

arch/um/kernel/irq.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@
2323
#include <linux/time-internal.h>
2424

2525

26-
extern void free_irqs(void);
27-
2826
/* When epoll triggers we do not know why it did so
2927
* we can also have different IRQs for read and write.
3028
* This is why we keep a small irq_reg array for each fd -

0 commit comments

Comments
 (0)