From patchwork Thu Aug 28 14:44:44 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 36235 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pa0-f69.google.com (mail-pa0-f69.google.com [209.85.220.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A6FD5202DD for ; Thu, 28 Aug 2014 14:45:06 +0000 (UTC) Received: by mail-pa0-f69.google.com with SMTP id kx10sf20091786pab.4 for ; Thu, 28 Aug 2014 07:45:03 -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=ZBZA6Tshq5302lZYeLcGNFBTsRv4Zz/2pulEBD+W2Lw=; b=TCFgxolFzcqlCpmoqBvcl+tOf7Jfqq69wjFsPoawVfIr+EmY/g6I38Vp7VzRUIHzxE Dy4HGkSKuUNBGeIvTdpqDQ8uc37R5H2huQwlNmq07vzZtZpNgvP6aIHyYG9YZl7AFRTA PI/P4wtaefJ00ueukUDPiv70Y5hFG7iQsU+4TSp18jpCNa/BHcieowbtpnDxxlX7USjO jAOrME+z0EJftECMR4cKvaw9B67eRPoBN/eCx/UyobcyJlHP0o/wYxCccoLNVRHlwdur jNYgYigzttWKXHCHzW3Mt67PH7qdBOvtQSUkeqiqKKM38xOZ7oEx70G6XJgxFdT0Yqfs lH7Q== X-Gm-Message-State: ALoCoQl3pICdowwJuaunYy0PvXaf9egHU6kgTPLyw+NTkPG8vY02sX6tfwnrFbLpEMDa+kAhuLHG X-Received: by 10.66.168.197 with SMTP id zy5mr2280187pab.7.1409237102257; Thu, 28 Aug 2014 07:45:02 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.23.69 with SMTP id 63ls634347qgo.59.gmail; Thu, 28 Aug 2014 07:45:02 -0700 (PDT) X-Received: by 10.52.165.129 with SMTP id yy1mr1124919vdb.57.1409237102059; Thu, 28 Aug 2014 07:45:02 -0700 (PDT) Received: from mail-vc0-f182.google.com (mail-vc0-f182.google.com [209.85.220.182]) by mx.google.com with ESMTPS id h8si3703147vdu.73.2014.08.28.07.45.02 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 28 Aug 2014 07:45:02 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.182 as permitted sender) client-ip=209.85.220.182; Received: by mail-vc0-f182.google.com with SMTP id im17so908683vcb.41 for ; Thu, 28 Aug 2014 07:45:02 -0700 (PDT) X-Received: by 10.220.77.65 with SMTP id f1mr1361093vck.48.1409237101997; Thu, 28 Aug 2014 07:45:01 -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 uj3csp248043vcb; Thu, 28 Aug 2014 07:45:01 -0700 (PDT) X-Received: by 10.140.104.162 with SMTP id a31mr6640467qgf.104.1409237101549; Thu, 28 Aug 2014 07:45:01 -0700 (PDT) Received: from mail-qg0-f48.google.com (mail-qg0-f48.google.com [209.85.192.48]) by mx.google.com with ESMTPS id k7si5903046qaf.51.2014.08.28.07.45.01 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 28 Aug 2014 07:45:01 -0700 (PDT) Received-SPF: pass (google.com: domain of lee.jones@linaro.org designates 209.85.192.48 as permitted sender) client-ip=209.85.192.48; Received: by mail-qg0-f48.google.com with SMTP id z107so826350qgd.21 for ; Thu, 28 Aug 2014 07:45:01 -0700 (PDT) X-Received: by 10.224.130.7 with SMTP id q7mr7442019qas.42.1409237101353; Thu, 28 Aug 2014 07:45:01 -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.44.59 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 28 Aug 2014 07:45:00 -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 2/4] mfd: 88pm860x-i2c: Fix variable length array Sparse warning Date: Thu, 28 Aug 2014 15:44:44 +0100 Message-Id: <1409237086-21421-2-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.182 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: , drivers/mfd/88pm860x-i2c.c:125:33: warning: Variable length array is used. Signed-off-by: Lee Jones --- drivers/mfd/88pm860x-i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mfd/88pm860x-i2c.c b/drivers/mfd/88pm860x-i2c.c index 7063cfd..84e3131 100644 --- a/drivers/mfd/88pm860x-i2c.c +++ b/drivers/mfd/88pm860x-i2c.c @@ -122,7 +122,7 @@ static int read_device(struct i2c_client *i2c, int reg, static int write_device(struct i2c_client *i2c, int reg, int bytes, void *src) { - unsigned char buf[bytes + 1]; + unsigned char buf[2]; struct i2c_adapter *adap = i2c->adapter; struct i2c_msg msg; int ret;