summaryrefslogtreecommitdiff
path: root/arch/um/drivers
diff options
context:
space:
mode:
authorNick Desaulniers <ndesaulniers@google.com>2023-08-08 20:31:45 +0300
committerRichard Weinberger <richard@nod.at>2023-08-26 23:44:37 +0300
commit4b038701e3dd02091e1086bdd89e31e16ceb8e04 (patch)
treee7bc29918e2235e0f5c68c55dd04cbaa33cbc936 /arch/um/drivers
parentb10eee784c767975d345540e5569bdad31b9aec3 (diff)
downloadlinux-4b038701e3dd02091e1086bdd89e31e16ceb8e04.tar.xz
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>
Diffstat (limited to 'arch/um/drivers')
-rw-r--r--arch/um/drivers/port_kern.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/um/drivers/port_kern.c b/arch/um/drivers/port_kern.c
index efa8b7304090..c52b3ff3c092 100644
--- a/arch/um/drivers/port_kern.c
+++ b/arch/um/drivers/port_kern.c
@@ -144,7 +144,7 @@ static void port_work_proc(struct work_struct *unused)
local_irq_restore(flags);
}
-DECLARE_WORK(port_work, port_work_proc);
+static DECLARE_WORK(port_work, port_work_proc);
static irqreturn_t port_interrupt(int irq, void *data)
{