From patchwork Thu Aug 28 14:44:46 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 36237 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pa0-f72.google.com (mail-pa0-f72.google.com [209.85.220.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9067D202DD for ; Thu, 28 Aug 2014 14:45:08 +0000 (UTC) Received: by mail-pa0-f72.google.com with SMTP id eu11sf19261586pac.3 for ; Thu, 28 Aug 2014 07:45:07 -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:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=CCehN7l/iYffeKEW36rj/LrEwxVgf9qHgsS/eciWHxU=; b=eaG9HLHvaOOUmxBR2xGe3vfE2yXl1G4OLtC57bpSl7k889Z4gcdvo5LHnaloLR2Abs KUWJ3WIdHBxsNpJGTy7on1CYJrp6Tr1hJN81K1NvzU3vUsrUBBvF+fU61X3n8h9nYZSK 6WItpfEeqv+F3TY9eUJQoonLgEdMY+7q5PDfvVkxY9TABb0FzRM37TNU5H9sYuidVtxw aGMAVhAdtf6TFjhnUYOCpHbd6Lbh7lGCPQfGVZTi058tK/lnabDyLT5oeBAtIYkufztn fATgduS2Gsxg1rNE431z+OsaUZO+kDkaRnUHULmwjcQCrWoqJ6TLIBn0KEQmcZ0aMyJY zyYA== X-Gm-Message-State: ALoCoQkwHbuwJNpAPTiL+LH8CcGVlmxCwTX3AcTFWlNCH/MGfoPxhYx9oSGUbAodJrsVJZx+ibE+ X-Received: by 10.70.130.135 with SMTP id oe7mr2313908pdb.9.1409237106455; Thu, 28 Aug 2014 07:45:06 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.91.132 with SMTP id z4ls580289qgd.99.gmail; Thu, 28 Aug 2014 07:45:06 -0700 (PDT) X-Received: by 10.220.112.143 with SMTP id w15mr1376562vcp.41.1409237106038; Thu, 28 Aug 2014 07:45:06 -0700 (PDT) Received: from mail-vc0-f181.google.com (mail-vc0-f181.google.com [209.85.220.181]) by mx.google.com with ESMTPS id hw5si3714420vdb.53.2014.08.28.07.45.06 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 28 Aug 2014 07:45:06 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.181 as permitted sender) client-ip=209.85.220.181; Received: by mail-vc0-f181.google.com with SMTP id ij19so913858vcb.40 for ; Thu, 28 Aug 2014 07:45:06 -0700 (PDT) X-Received: by 10.220.169.72 with SMTP id x8mr1361683vcy.45.1409237105956; Thu, 28 Aug 2014 07:45:05 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.221.45.67 with SMTP id uj3csp248055vcb; Thu, 28 Aug 2014 07:45:05 -0700 (PDT) X-Received: by 10.224.156.194 with SMTP id y2mr4306466qaw.15.1409237105440; Thu, 28 Aug 2014 07:45:05 -0700 (PDT) Received: from mail-qc0-f173.google.com (mail-qc0-f173.google.com [209.85.216.173]) by mx.google.com with ESMTPS id q49si5937630qgd.30.2014.08.28.07.45.05 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 28 Aug 2014 07:45:05 -0700 (PDT) Received-SPF: pass (google.com: domain of lee.jones@linaro.org designates 209.85.216.173 as permitted sender) client-ip=209.85.216.173; Received: by mail-qc0-f173.google.com with SMTP id w7so873258qcr.18 for ; Thu, 28 Aug 2014 07:45:05 -0700 (PDT) X-Received: by 10.224.223.199 with SMTP id il7mr7597563qab.10.1409237105149; Thu, 28 Aug 2014 07:45:05 -0700 (PDT) Received: from localhost.localdomain (host86-152-0-170.range86-152.btcentralplus.com. [86.152.0.170]) by mx.google.com with ESMTPSA id m45sm5802677qga.36.2014.08.28.07.45.03 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 28 Aug 2014 07:45:04 -0700 (PDT) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: linus.walleij@linaro.org, Lee Jones Subject: [PATCH 4/4] mfd: stmpe: Rid variable length array Sparse warnings Date: Thu, 28 Aug 2014 15:44:46 +0100 Message-Id: <1409237086-21421-4-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1409237086-21421-1-git-send-email-lee.jones@linaro.org> References: <1409237086-21421-1-git-send-email-lee.jones@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: lee.jones@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.181 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Numbers are generated by taking the largest currently used values. drivers/mfd/stmpe.c:252:17: warning: Variable length array is used. drivers/mfd/stmpe.c:857:16: warning: Variable length array is used. Signed-off-by: Lee Jones Acked-by: Linus Walleij --- drivers/mfd/stmpe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mfd/stmpe.c b/drivers/mfd/stmpe.c index 02a17c3..f9d46f0 100644 --- a/drivers/mfd/stmpe.c +++ b/drivers/mfd/stmpe.c @@ -249,7 +249,7 @@ int stmpe_set_altfunc(struct stmpe *stmpe, u32 pins, enum stmpe_block block) int af_bits = variant->af_bits; int numregs = DIV_ROUND_UP(stmpe->num_gpios * af_bits, 8); int mask = (1 << af_bits) - 1; - u8 regs[numregs]; + u8 regs[8]; int af, afperreg, ret; if (!variant->get_altfunc) @@ -854,7 +854,7 @@ static irqreturn_t stmpe_irq(int irq, void *data) struct stmpe_variant_info *variant = stmpe->variant; int num = DIV_ROUND_UP(variant->num_irqs, 8); u8 israddr; - u8 isr[num]; + u8 isr[3]; int ret; int i;