lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Wed, 29 Oct 2014 15:42:23 -0700 From: Behan Webster <behanw@...verseincode.com> To: andriy.shevchenko@...ux.intel.com, aysemelikeyurtoglu@...il.com, matthias.schoepe@...dium.uni-erlangen.de, mdcasey@...bloom.com, peter.senna@...il.com, rashika.kheria@...il.com, standby24x7@...il.com Cc: behanw@...verseincode.com, akpm@...ux-foundation.org, andreas.frembs@...dium.uni-erlangen.de, devel@...verdev.osuosl.org, gregkh@...uxfoundation.org, linux-kernel@...r.kernel.org, mahati.chamarthy@...il.com, peter.p.waskiewicz.jr@...el.com, quozl@...top.org, valentina.manea.m@...il.com, Arnd Bergmann <arnd@...db.de> Subject: [PATCH 4/4] 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@...verseincode.com> Suggested-by: Arnd Bergmann <arnd@...db.de> Cc: Arnd Bergmann <arnd@...db.de> --- drivers/staging/rtl8192e/rtllib_softmac.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c index 089a058..e970db4 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; -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists