Skip to content

Commit 4b03870

Browse files
nickdesaulniersrichardweinberger
authored andcommitted
um: port_kern: fix -Wmissing-variable-declarations
I'm looking to enable -Wmissing-variable-declarations behind W=1. 0day bot spotted the following instance: arch/um/drivers/port_kern.c:147:14: warning: no previous extern declaration for non-static variable 'port_work' [-Wmissing-variable-declarations] DECLARE_WORK(port_work, port_work_proc); ^ arch/um/drivers/port_kern.c:147:1: note: declare 'static' if the variable is not intended to be used outside of this translation unit DECLARE_WORK(port_work, port_work_proc); ^ This symbol is not referenced by more than one translation unit, so give it static storage. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/llvm/202308081050.sZEw4cQ5-lkp@intel.com/ Signed-off-by: Nick Desaulniers <ndesaulniers@google.com> Signed-off-by: Richard Weinberger <richard@nod.at>
1 parent b10eee7 commit 4b03870

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/um/drivers/port_kern.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ static void port_work_proc(struct work_struct *unused)
144144
local_irq_restore(flags);
145145
}
146146

147-
DECLARE_WORK(port_work, port_work_proc);
147+
static DECLARE_WORK(port_work, port_work_proc);
148148

149149
static irqreturn_t port_interrupt(int irq, void *data)
150150
{

0 commit comments

Comments
 (0)