Message ID | 1409237086-21421-3-git-send-email-lee.jones@linaro.org |
---|---|
State | Accepted |
Commit | 87bd1c925040d97927c6f6b7fe41a487c7d976ef |
Headers | show
Return-Path: <patchwork-forward+bncBDA7X7F2WUEBB4EA7WPQKGQEAR556SY@linaro.org> X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pa0-f70.google.com (mail-pa0-f70.google.com [209.85.220.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id CA26A202DD for <linaro@patches.linaro.org>; Thu, 28 Aug 2014 14:45:07 +0000 (UTC) Received: by mail-pa0-f70.google.com with SMTP id lf10sf19291409pab.9 for <linaro@patches.linaro.org>; Thu, 28 Aug 2014 07:45:04 -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=2Fn6sg+l+zbYv+N/GSgRhQFjgpJUXFC7Yp4ilb/4PHg=; b=m2WnE7qp5JxOCatFWjmRX4a22aycexLHhYW+NNtjh9kbnEb75EF88j4SDryleEgsrw W6Tn7u3XT/s2aa8iHuirbXzYzdnMenjd0KNGMU1pfkVWnSSFWkT+QoFb5PETUrG3NVRu 3oQl8BP3Lwreo01kCM6c4nCzaKX4T4gmrCSDv71yqYTZ507xzDg6vil4LIc1Dx7Y7L6L YwZpWErx7lHniHryIzvYVX4gDst4D7+ab7ch7fqJ/v8lB4aGFwgR9ORnobxFQBYTKIoN uhi8eWs5KBfW4QJqug2+Q81RjhuFzL2vln+Ngb0/atvG4KPYmdso5AHcKbzku9f6K9qs ez7Q== X-Gm-Message-State: ALoCoQmFL4Cyxf5jhDQ10OcWEoQY2ysUr3mv+eCOo6AT+LrhafdVUtHaeH6v0fOmE7ihyGKrpYU4 X-Received: by 10.70.96.197 with SMTP id du5mr2320845pdb.3.1409237104113; Thu, 28 Aug 2014 07:45:04 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.95.182 with SMTP id i51ls603279qge.20.gmail; Thu, 28 Aug 2014 07:45:03 -0700 (PDT) X-Received: by 10.220.74.195 with SMTP id v3mr3622499vcj.23.1409237103967; Thu, 28 Aug 2014 07:45:03 -0700 (PDT) Received: from mail-vc0-f170.google.com (mail-vc0-f170.google.com [209.85.220.170]) by mx.google.com with ESMTPS id xd4si3706995vdb.66.2014.08.28.07.45.03 for <patchwork-forward@linaro.org> (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 28 Aug 2014 07:45:03 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.170 as permitted sender) client-ip=209.85.220.170; Received: by mail-vc0-f170.google.com with SMTP id la4so939859vcb.29 for <patchwork-forward@linaro.org>; Thu, 28 Aug 2014 07:45:03 -0700 (PDT) X-Received: by 10.221.5.137 with SMTP id og9mr3755744vcb.18.1409237103864; Thu, 28 Aug 2014 07:45:03 -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 uj3csp248049vcb; Thu, 28 Aug 2014 07:45:03 -0700 (PDT) X-Received: by 10.140.88.41 with SMTP id s38mr6626060qgd.73.1409237103429; Thu, 28 Aug 2014 07:45:03 -0700 (PDT) Received: from mail-qc0-f182.google.com (mail-qc0-f182.google.com [209.85.216.182]) by mx.google.com with ESMTPS id r3si5921503qac.40.2014.08.28.07.45.03 for <patches@linaro.org> (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 28 Aug 2014 07:45:03 -0700 (PDT) Received-SPF: pass (google.com: domain of lee.jones@linaro.org designates 209.85.216.182 as permitted sender) client-ip=209.85.216.182; Received: by mail-qc0-f182.google.com with SMTP id m20so887401qcx.27 for <patches@linaro.org>; Thu, 28 Aug 2014 07:45:03 -0700 (PDT) X-Received: by 10.224.55.19 with SMTP id s19mr6975412qag.55.1409237103170; Thu, 28 Aug 2014 07:45:03 -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.01 for <multiple recipients> (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 28 Aug 2014 07:45:02 -0700 (PDT) From: Lee Jones <lee.jones@linaro.org> To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: linus.walleij@linaro.org, Lee Jones <lee.jones@linaro.org> Subject: [PATCH 3/4] mfd: max8925-i2c: Fix variable length array Sparse warning Date: Thu, 28 Aug 2014 15:44:45 +0100 Message-Id: <1409237086-21421-3-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.170 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: <patchwork-forward.linaro.org> X-Google-Group-Id: 836684582541 List-Post: <http://groups.google.com/a/linaro.org/group/patchwork-forward/post>, <mailto:patchwork-forward@linaro.org> List-Help: <http://support.google.com/a/linaro.org/bin/topic.py?topic=25838>, <mailto:patchwork-forward+help@linaro.org> List-Archive: <http://groups.google.com/a/linaro.org/group/patchwork-forward/> List-Unsubscribe: <mailto:googlegroups-manage+836684582541+unsubscribe@googlegroups.com>, <http://groups.google.com/a/linaro.org/group/patchwork-forward/subscribe> |
diff --git a/drivers/mfd/max8925-i2c.c b/drivers/mfd/max8925-i2c.c index ecbe78e..c880c89 100644 --- a/drivers/mfd/max8925-i2c.c +++ b/drivers/mfd/max8925-i2c.c @@ -37,7 +37,7 @@ static inline int max8925_read_device(struct i2c_client *i2c, static inline int max8925_write_device(struct i2c_client *i2c, int reg, int bytes, void *src) { - unsigned char buf[bytes + 1]; + unsigned char buf[9]; int ret; buf[0] = (unsigned char)reg;
The largest byte size in use currently is 8. Fix array size to 9. drivers/mfd/max8925-i2c.c:40:33: warning: Variable length array is used Signed-off-by: Lee Jones <lee.jones@linaro.org> --- drivers/mfd/max8925-i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)