All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 19/87] i2c: busses: Remove call to memset after dmam_alloc_coherent
@ 2019-06-27 17:36 ` Fuqian Huang
  0 siblings, 0 replies; 3+ messages in thread
From: Fuqian Huang @ 2019-06-27 17:36 UTC (permalink / raw)
  Cc: Fuqian Huang, Seth Heasley, Neil Horman, Wolfram Sang,
	Jarkko Nikula, linux-i2c, linux-kernel

In commit af7ddd8a627c
("Merge tag 'dma-mapping-4.21' of git://git.infradead.org/users/hch/dma-mapping"),
dmam_alloc_coherent has already zeroed the memory.
So memset is not needed.

Signed-off-by: Fuqian Huang <huangfq.daxian@gmail.com>
---
 drivers/i2c/busses/i2c-ismt.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/i2c/busses/i2c-ismt.c b/drivers/i2c/busses/i2c-ismt.c
index 02d23edb2fb1..2f95e25a10f7 100644
--- a/drivers/i2c/busses/i2c-ismt.c
+++ b/drivers/i2c/busses/i2c-ismt.c
@@ -781,8 +781,6 @@ static int ismt_dev_init(struct ismt_priv *priv)
 	if (!priv->hw)
 		return -ENOMEM;
 
-	memset(priv->hw, 0, (ISMT_DESC_ENTRIES * sizeof(struct ismt_desc)));
-
 	priv->head = 0;
 	init_completion(&priv->cmp);
 
-- 
2.11.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 19/87] i2c: busses: Remove call to memset after dmam_alloc_coherent
@ 2019-06-27 17:36 ` Fuqian Huang
  0 siblings, 0 replies; 3+ messages in thread
From: Fuqian Huang @ 2019-06-27 17:36 UTC (permalink / raw)
  Cc: Fuqian Huang, Seth Heasley, Neil Horman, Wolfram Sang,
	Jarkko Nikula, linux-i2c, linux-kernel

In commit af7ddd8a627c
("Merge tag 'dma-mapping-4.21' of git://git.infradead.org/users/hch/dma-mapping"),
dmam_alloc_coherent has already zeroed the memory.
So memset is not needed.

Signed-off-by: Fuqian Huang <huangfq.daxian@gmail.com>
---
 drivers/i2c/busses/i2c-ismt.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/i2c/busses/i2c-ismt.c b/drivers/i2c/busses/i2c-ismt.c
index 02d23edb2fb1..2f95e25a10f7 100644
--- a/drivers/i2c/busses/i2c-ismt.c
+++ b/drivers/i2c/busses/i2c-ismt.c
@@ -781,8 +781,6 @@ static int ismt_dev_init(struct ismt_priv *priv)
 	if (!priv->hw)
 		return -ENOMEM;
 
-	memset(priv->hw, 0, (ISMT_DESC_ENTRIES * sizeof(struct ismt_desc)));
-
 	priv->head = 0;
 	init_completion(&priv->cmp);
 
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 19/87] i2c: busses: Remove call to memset after dmam_alloc_coherent
  2019-06-27 17:36 ` Fuqian Huang
  (?)
@ 2019-06-28 16:13 ` Neil Horman
  -1 siblings, 0 replies; 3+ messages in thread
From: Neil Horman @ 2019-06-28 16:13 UTC (permalink / raw)
  To: Fuqian Huang
  Cc: Seth Heasley, Wolfram Sang, Jarkko Nikula, linux-i2c, linux-kernel

On Fri, Jun 28, 2019 at 01:36:51AM +0800, Fuqian Huang wrote:
> In commit af7ddd8a627c
> ("Merge tag 'dma-mapping-4.21' of git://git.infradead.org/users/hch/dma-mapping"),
> dmam_alloc_coherent has already zeroed the memory.
> So memset is not needed.
> 
> Signed-off-by: Fuqian Huang <huangfq.daxian@gmail.com>
> ---
>  drivers/i2c/busses/i2c-ismt.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/i2c/busses/i2c-ismt.c b/drivers/i2c/busses/i2c-ismt.c
> index 02d23edb2fb1..2f95e25a10f7 100644
> --- a/drivers/i2c/busses/i2c-ismt.c
> +++ b/drivers/i2c/busses/i2c-ismt.c
> @@ -781,8 +781,6 @@ static int ismt_dev_init(struct ismt_priv *priv)
>  	if (!priv->hw)
>  		return -ENOMEM;
>  
> -	memset(priv->hw, 0, (ISMT_DESC_ENTRIES * sizeof(struct ismt_desc)));
> -
>  	priv->head = 0;
>  	init_completion(&priv->cmp);
>  
> -- 
> 2.11.0
> 
> 
Acked-by: Neil Horman <nhorman@tuxdriver.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-06-28 16:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-27 17:36 [PATCH 19/87] i2c: busses: Remove call to memset after dmam_alloc_coherent Fuqian Huang
2019-06-27 17:36 ` Fuqian Huang
2019-06-28 16:13 ` Neil Horman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.