Commit b10eee78 authored by Nick Desaulniers's avatar Nick Desaulniers Committed by Richard Weinberger

uml: audio: fix -Wmissing-variable-declarations

I'm looking to enable -Wmissing-variable-declarations behind W=1. 0day
bot spotted the following instance:

  arch/um/drivers/hostaudio_kern.c:316:3: warning: no previous extern
  declaration for non-static variable 'module_data'
  [-Wmissing-variable-declarations]
  } module_data;
    ^
  arch/um/drivers/hostaudio_kern.c:313:1: note: declare 'static' if the
  variable is not intended to be used outside of this translation unit
  struct {
  ^

This symbol is not referenced by more than one translation unit, so give
it static storage.
Reported-by: default avatarkernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/llvm/202308081050.sZEw4cQ5-lkp@intel.com/Signed-off-by: default avatarNick Desaulniers <ndesaulniers@google.com>
Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
parent e30955d0
......@@ -310,7 +310,7 @@ static const struct file_operations hostmixer_fops = {
.release = hostmixer_release,
};
struct {
static struct {
int dev_audio;
int dev_mixer;
} module_data;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment