]> git.karo-electronics.de Git - linux-beck.git/commit
staging, rtl8192e, LLVMLinux: Make static local in inline function const
authorBehan Webster <behanw@converseincode.com>
Wed, 29 Oct 2014 22:42:23 +0000 (15:42 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Oct 2014 23:33:05 +0000 (16:33 -0700)
commit16fc54ee26912d3f2450bc4832b19c943dbdff17
treeda444c8340fc914531c0e535791a4db99e4988bd
parentd82f0029e03d8512ac523ac2e4caa5cecb989570
staging, rtl8192e, LLVMLinux: Make static local in inline function const

rtllib_association_req is a (large) inline function which defines 2 constant
static arrays which aren't labelled as const. As a result clang complains with:

non-constant static local variable in inline function may be different in
different files
[-Wstatic-local-in-inline]
  static u8       AironetIeOui[] = {0x00, 0x01, 0x66};
  ^
The solution is making them "static const".

However doing so requires dropping const when being used with struct
octet_string. However the value is used in a const fashion thereafter, so no
harm done.

Signed-off-by: Behan Webster <behanw@converseincode.com>
Suggested-by: Arnd Bergmann <arnd@arndb.de>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8192e/rtllib_softmac.c