summaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8192e/rtllib_softmac.c
diff options
context:
space:
mode:
authorBehan Webster2014-10-29 23:42:23 +0100
committerGreg Kroah-Hartman2014-10-30 00:33:05 +0100
commit16fc54ee26912d3f2450bc4832b19c943dbdff17 (patch)
treeda444c8340fc914531c0e535791a4db99e4988bd /drivers/staging/rtl8192e/rtllib_softmac.c
parentstaging, rtl8192e, LLVMLinux: Remove unused prototype (diff)
downloadkernel-qcow2-linux-16fc54ee26912d3f2450bc4832b19c943dbdff17.tar.gz
kernel-qcow2-linux-16fc54ee26912d3f2450bc4832b19c943dbdff17.tar.xz
kernel-qcow2-linux-16fc54ee26912d3f2450bc4832b19c943dbdff17.zip
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>
Diffstat (limited to 'drivers/staging/rtl8192e/rtllib_softmac.c')
-rw-r--r--drivers/staging/rtl8192e/rtllib_softmac.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c
index 089a058ad2ed..e970db474470 100644
--- a/drivers/staging/rtl8192e/rtllib_softmac.c
+++ b/drivers/staging/rtl8192e/rtllib_softmac.c
@@ -1311,7 +1311,7 @@ inline struct sk_buff *rtllib_association_req(struct rtllib_network *beacon,
}
if (beacon->bCkipSupported) {
- static u8 AironetIeOui[] = {0x00, 0x01, 0x66};
+ static const u8 AironetIeOui[] = {0x00, 0x01, 0x66};
u8 CcxAironetBuf[30];
struct octet_string osCcxAironetIE;
@@ -1331,10 +1331,11 @@ inline struct sk_buff *rtllib_association_req(struct rtllib_network *beacon,
}
if (beacon->bCcxRmEnable) {
- static u8 CcxRmCapBuf[] = {0x00, 0x40, 0x96, 0x01, 0x01, 0x00};
+ static const u8 CcxRmCapBuf[] = {0x00, 0x40, 0x96, 0x01, 0x01,
+ 0x00};
struct octet_string osCcxRmCap;
- osCcxRmCap.Octet = CcxRmCapBuf;
+ osCcxRmCap.Octet = (u8 *) CcxRmCapBuf;
osCcxRmCap.Length = sizeof(CcxRmCapBuf);
tag = skb_put(skb, ccxrm_ie_len);
*tag++ = MFIE_TYPE_GENERIC;