Skip to content

Commit

Permalink
um: fix 3 instances of -Wmissing-prototypes
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
nickdesaulniers authored and richardweinberger committed Aug 26, 2023
1 parent 4b03870 commit ab7ca2e
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion arch/um/drivers/slirp_kern.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ struct slirp_init {
struct arg_list_dummy_wrapper argw; /* XXX should be simpler... */
};

void slirp_init(struct net_device *dev, void *data)
static void slirp_init(struct net_device *dev, void *data)
{
struct uml_net_private *private;
struct slirp_data *spri;
Expand Down
1 change: 1 addition & 0 deletions arch/um/drivers/xterm_kern.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <asm/irq.h>
#include <irq_kern.h>
#include <os.h>
#include "xterm.h"

struct xterm_wait {
struct completion ready;
Expand Down
1 change: 1 addition & 0 deletions arch/um/include/shared/irq_kern.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,5 @@ static inline bool um_irq_timetravel_handler_used(void)
}

void um_free_irq(int irq, void *dev_id);
void free_irqs(void);
#endif
2 changes: 0 additions & 2 deletions arch/um/kernel/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
#include <linux/time-internal.h>


extern void free_irqs(void);

/* When epoll triggers we do not know why it did so
* we can also have different IRQs for read and write.
* This is why we keep a small irq_reg array for each fd -
Expand Down

0 comments on commit ab7ca2e

Please sign in to comment.