linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: lee.jones@linaro.org (Lee Jones)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/4] mfd: 88pm860x-i2c: Fix variable length array Sparse warning
Date: Thu, 28 Aug 2014 15:44:44 +0100	[thread overview]
Message-ID: <1409237086-21421-2-git-send-email-lee.jones@linaro.org> (raw)
In-Reply-To: <1409237086-21421-1-git-send-email-lee.jones@linaro.org>

drivers/mfd/88pm860x-i2c.c:125:33:
  warning: Variable length array is used.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 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;
-- 
1.9.1

  reply	other threads:[~2014-08-28 14:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-28 14:44 [PATCH 1/4] mfd: 88pm860x-i2c: Purge unused functions Lee Jones
2014-08-28 14:44 ` Lee Jones [this message]
2014-08-28 14:44 ` [PATCH 3/4] mfd: max8925-i2c: Fix variable length array Sparse warning Lee Jones
2014-08-28 14:44 ` [PATCH 4/4] mfd: stmpe: Rid variable length array Sparse warnings Lee Jones
2014-08-29 13:46   ` Linus Walleij

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1409237086-21421-2-git-send-email-lee.jones@linaro.org \
    --to=lee.jones@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).