From: Wolfram Sang <wsa@the-dreams.de>
To: linux-i2c@vger.kernel.org
Cc: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>,
Axel Lin <axel.lin@ingics.com>, Wolfram Sang <wsa@the-dreams.de>,
David Binderman <dcb314@hotmail.com>
Subject: [PATCH] i2c: jz4780: drop superfluous init
Date: Sun, 5 Jun 2016 11:41:42 +0200 [thread overview]
Message-ID: <1465119702-4417-1-git-send-email-wsa@the-dreams.de> (raw)
David reported that the length for memset was incorrect (element sizes
were not taken into account). Then I saw that we are clearing kzalloced
memory, so we can simply drop this code.
Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
---
Only compile tested, due to no HW.
drivers/i2c/busses/i2c-jz4780.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/i2c/busses/i2c-jz4780.c b/drivers/i2c/busses/i2c-jz4780.c
index ba14a863b451f9..cd9872594fe2a0 100644
--- a/drivers/i2c/busses/i2c-jz4780.c
+++ b/drivers/i2c/busses/i2c-jz4780.c
@@ -791,10 +791,6 @@ static int jz4780_i2c_probe(struct platform_device *pdev)
jz4780_i2c_writew(i2c, JZ4780_I2C_INTM, 0x0);
- i2c->cmd = 0;
- memset(i2c->cmd_buf, 0, BUFSIZE);
- memset(i2c->data_buf, 0, BUFSIZE);
-
i2c->irq = platform_get_irq(pdev, 0);
ret = devm_request_irq(&pdev->dev, i2c->irq, jz4780_i2c_irq, 0,
dev_name(&pdev->dev), i2c);
--
2.8.1
next reply other threads:[~2016-06-05 9:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-05 9:41 Wolfram Sang [this message]
2016-06-07 6:47 ` [PATCH] i2c: jz4780: drop superfluous init Axel Lin
2016-06-09 20:31 ` Wolfram Sang
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=1465119702-4417-1-git-send-email-wsa@the-dreams.de \
--to=wsa@the-dreams.de \
--cc=Zubair.Kakakhel@imgtec.com \
--cc=axel.lin@ingics.com \
--cc=dcb314@hotmail.com \
--cc=linux-i2c@vger.kernel.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).