* [PATCH] i2c: jz4780: drop superfluous init
@ 2016-06-05 9:41 Wolfram Sang
2016-06-07 6:47 ` Axel Lin
2016-06-09 20:31 ` Wolfram Sang
0 siblings, 2 replies; 3+ messages in thread
From: Wolfram Sang @ 2016-06-05 9:41 UTC (permalink / raw)
To: linux-i2c
Cc: Zubair Lutfullah Kakakhel, Axel Lin, Wolfram Sang,
David Binderman
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] i2c: jz4780: drop superfluous init
2016-06-05 9:41 [PATCH] i2c: jz4780: drop superfluous init Wolfram Sang
@ 2016-06-07 6:47 ` Axel Lin
2016-06-09 20:31 ` Wolfram Sang
1 sibling, 0 replies; 3+ messages in thread
From: Axel Lin @ 2016-06-07 6:47 UTC (permalink / raw)
To: Wolfram Sang; +Cc: linux-i2c, Zubair Lutfullah Kakakhel, David Binderman
2016-06-05 17:41 GMT+08:00 Wolfram Sang <wsa@the-dreams.de>:
> 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>
Reviewed-by: Axel Lin <axel.lin@ingics.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] i2c: jz4780: drop superfluous init
2016-06-05 9:41 [PATCH] i2c: jz4780: drop superfluous init Wolfram Sang
2016-06-07 6:47 ` Axel Lin
@ 2016-06-09 20:31 ` Wolfram Sang
1 sibling, 0 replies; 3+ messages in thread
From: Wolfram Sang @ 2016-06-09 20:31 UTC (permalink / raw)
To: linux-i2c; +Cc: Zubair Lutfullah Kakakhel, Axel Lin, David Binderman
[-- Attachment #1: Type: text/plain, Size: 398 bytes --]
On Sun, Jun 05, 2016 at 11:41:42AM +0200, Wolfram Sang wrote:
> 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>
Applied to for-next, thanks!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-06-09 20:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-05 9:41 [PATCH] i2c: jz4780: drop superfluous init Wolfram Sang
2016-06-07 6:47 ` Axel Lin
2016-06-09 20:31 ` Wolfram Sang
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).