From patchwork Wed Oct 29 22:42:23 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Behan Webster X-Patchwork-Id: 39804 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f200.google.com (mail-lb0-f200.google.com [209.85.217.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 493AC24046 for ; Wed, 29 Oct 2014 22:43:16 +0000 (UTC) Received: by mail-lb0-f200.google.com with SMTP id f15sf2281943lbj.7 for ; Wed, 29 Oct 2014 15:43:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=GGYwgaBJbqCk3o3W0joUtBkaqy/dlQt4a03JIm58yy8=; b=EwjCMt9SqotqNuX3l/6w+y7Mkh1MGrqClvVV9C+IFMdgHa39D8tSp/HxcxTIzNOT80 sxBt6bqUCbtKB5WD6WMBN/FPr6AHGY2DhaO1FFAIrdJE1Iaeeo69WyVvPaOBaYnStobk 7CWjkqdHREyiUfqnBUo9rAL+mGnt2KyWPIoMyM741uBnRfqQ/zIeU07dtiqFHr4COrV4 AZokRt//EOB/cAxySahaNjGPTeapFYHw0j/ZNfeQvlq0+4d/yCS6s36iPBbqRZDbjGd+ nvx8+IkVTjY5buC6wHWZXah02p0qMamGAGcuI9HW2/ANsXFTbYSSqquFPDiuzD+v+BNG quug== X-Gm-Message-State: ALoCoQmowRamFNtfD1gRSfVjp09Rwil4JmhhsMDxQsrQKFwLwGwXZVHa9jQhZ5jQWZvUdJVtBAHO X-Received: by 10.112.26.82 with SMTP id j18mr6809lbg.16.1414622595094; Wed, 29 Oct 2014 15:43:15 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.153.11.132 with SMTP id ei4ls275594lad.109.gmail; Wed, 29 Oct 2014 15:43:14 -0700 (PDT) X-Received: by 10.152.26.226 with SMTP id o2mr7100310lag.50.1414622594832; Wed, 29 Oct 2014 15:43:14 -0700 (PDT) Received: from mail-la0-x22c.google.com (mail-la0-x22c.google.com. [2a00:1450:4010:c03::22c]) by mx.google.com with ESMTPS id bg6si9294191lbc.42.2014.10.29.15.43.14 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 29 Oct 2014 15:43:14 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c03::22c as permitted sender) client-ip=2a00:1450:4010:c03::22c; Received: by mail-la0-f44.google.com with SMTP id gf13so3450184lab.3 for ; Wed, 29 Oct 2014 15:43:14 -0700 (PDT) X-Received: by 10.112.130.41 with SMTP id ob9mr14286932lbb.74.1414622594756; Wed, 29 Oct 2014 15:43:14 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.84.229 with SMTP id c5csp744495lbz; Wed, 29 Oct 2014 15:43:13 -0700 (PDT) X-Received: by 10.70.2.226 with SMTP id 2mr13448270pdx.56.1414622592695; Wed, 29 Oct 2014 15:43:12 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a5si4959323pdi.224.2014.10.29.15.43.12 for ; Wed, 29 Oct 2014 15:43:12 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757767AbaJ2Wm5 (ORCPT + 26 others); Wed, 29 Oct 2014 18:42:57 -0400 Received: from mail-pa0-f51.google.com ([209.85.220.51]:47958 "EHLO mail-pa0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757673AbaJ2Wmr (ORCPT ); Wed, 29 Oct 2014 18:42:47 -0400 Received: by mail-pa0-f51.google.com with SMTP id kq14so4095394pab.38 for ; Wed, 29 Oct 2014 15:42:47 -0700 (PDT) X-Received: by 10.68.68.132 with SMTP id w4mr13045253pbt.93.1414622567180; Wed, 29 Oct 2014 15:42:47 -0700 (PDT) Received: from galdor.websterwood.com (50-206-118-3-static.hfc.comcastbusiness.net. [50.206.118.3]) by mx.google.com with ESMTPSA id lr4sm5274357pab.42.2014.10.29.15.42.44 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 29 Oct 2014 15:42:46 -0700 (PDT) From: Behan Webster To: andriy.shevchenko@linux.intel.com, aysemelikeyurtoglu@gmail.com, matthias.schoepe@studium.uni-erlangen.de, mdcasey@chabloom.com, peter.senna@gmail.com, rashika.kheria@gmail.com, standby24x7@gmail.com Cc: behanw@converseincode.com, akpm@linux-foundation.org, andreas.frembs@studium.uni-erlangen.de, devel@driverdev.osuosl.org, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, mahati.chamarthy@gmail.com, peter.p.waskiewicz.jr@intel.com, quozl@laptop.org, valentina.manea.m@gmail.com, Arnd Bergmann Subject: [PATCH 4/4] staging, rtl8192e, LLVMLinux: Make static local in inline function const Date: Wed, 29 Oct 2014 15:42:23 -0700 Message-Id: <1414622543-22969-5-git-send-email-behanw@converseincode.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1414622543-22969-1-git-send-email-behanw@converseincode.com> References: <1414622543-22969-1-git-send-email-behanw@converseincode.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Original-Sender: behanw@converseincode.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c03::22c as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=neutral (body hash did not verify) header.i=@ Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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 Suggested-by: Arnd Bergmann Cc: Arnd Bergmann --- 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;