All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/14] drop double zeroing
@ 2020-09-20 11:26 ` Julia Lawall
  0 siblings, 0 replies; 64+ messages in thread
From: Julia Lawall @ 2020-09-20 11:26 UTC (permalink / raw)
  To: linux-spi
  Cc: kernel-janitors, rds-devel, linux-rdma, Yossi Leybovich, netdev,
	linux-serial, linux-kernel, linux-scsi, target-devel,
	Dan Williams, dmaengine, linux-block, linux-nfs, linux-wireless,
	linux-media, linux-pci

sg_init_table zeroes its first argument, so the allocation of that argument
doesn't have to.

---

 block/bsg-lib.c                                  |    2 +-
 drivers/dma/sh/rcar-dmac.c                       |    2 +-
 drivers/dma/sh/shdma-base.c                      |    2 +-
 drivers/infiniband/hw/efa/efa_verbs.c            |    2 +-
 drivers/media/common/saa7146/saa7146_core.c      |    2 +-
 drivers/misc/mic/scif/scif_nodeqp.c              |    2 +-
 drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c |    2 +-
 drivers/net/wireless/intel/iwlwifi/fw/dbg.c      |    2 +-
 drivers/pci/p2pdma.c                             |    2 +-
 drivers/spi/spi-topcliff-pch.c                   |    4 ++--
 drivers/target/target_core_rd.c                  |    2 +-
 drivers/tty/serial/pch_uart.c                    |    2 +-
 net/rds/rdma.c                                   |    2 +-
 net/sunrpc/xprtrdma/frwr_ops.c                   |    2 +-
 14 files changed, 15 insertions(+), 15 deletions(-)

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

* [PATCH 00/14] drop double zeroing
@ 2020-09-20 11:26 ` Julia Lawall
  0 siblings, 0 replies; 64+ messages in thread
From: Julia Lawall @ 2020-09-20 11:26 UTC (permalink / raw)
  To: linux-spi
  Cc: kernel-janitors, rds-devel, linux-rdma, Yossi Leybovich, netdev,
	linux-serial, linux-kernel, linux-scsi, target-devel,
	Dan Williams, dmaengine, linux-block, linux-nfs, linux-wireless,
	linux-media, linux-pci

sg_init_table zeroes its first argument, so the allocation of that argument
doesn't have to.

---

 block/bsg-lib.c                                  |    2 +-
 drivers/dma/sh/rcar-dmac.c                       |    2 +-
 drivers/dma/sh/shdma-base.c                      |    2 +-
 drivers/infiniband/hw/efa/efa_verbs.c            |    2 +-
 drivers/media/common/saa7146/saa7146_core.c      |    2 +-
 drivers/misc/mic/scif/scif_nodeqp.c              |    2 +-
 drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c |    2 +-
 drivers/net/wireless/intel/iwlwifi/fw/dbg.c      |    2 +-
 drivers/pci/p2pdma.c                             |    2 +-
 drivers/spi/spi-topcliff-pch.c                   |    4 ++--
 drivers/target/target_core_rd.c                  |    2 +-
 drivers/tty/serial/pch_uart.c                    |    2 +-
 net/rds/rdma.c                                   |    2 +-
 net/sunrpc/xprtrdma/frwr_ops.c                   |    2 +-
 14 files changed, 15 insertions(+), 15 deletions(-)

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

* [PATCH 01/14] pch_uart: drop double zeroing
  2020-09-20 11:26 ` Julia Lawall
@ 2020-09-20 11:26   ` Julia Lawall
  -1 siblings, 0 replies; 64+ messages in thread
From: Julia Lawall @ 2020-09-20 11:26 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: kernel-janitors, Jiri Slaby, linux-serial, linux-kernel

sg_init_table zeroes its first argument, so the allocation of that argument
doesn't have to.

the semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression x,n,flags;
@@

x = 
- kcalloc
+ kmalloc_array
  (n,sizeof(struct scatterlist),flags)
...
sg_init_table(x,n)
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

---
 drivers/tty/serial/pch_uart.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -u -p a/drivers/tty/serial/pch_uart.c b/drivers/tty/serial/pch_uart.c
--- a/drivers/tty/serial/pch_uart.c
+++ b/drivers/tty/serial/pch_uart.c
@@ -981,7 +981,7 @@ static unsigned int dma_handle_tx(struct
 
 	priv->tx_dma_use = 1;
 
-	priv->sg_tx_p = kcalloc(num, sizeof(struct scatterlist), GFP_ATOMIC);
+	priv->sg_tx_p = kmalloc_array(num, sizeof(struct scatterlist), GFP_ATOMIC);
 	if (!priv->sg_tx_p) {
 		dev_err(priv->port.dev, "%s:kzalloc Failed\n", __func__);
 		return 0;


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

* [PATCH 01/14] pch_uart: drop double zeroing
@ 2020-09-20 11:26   ` Julia Lawall
  0 siblings, 0 replies; 64+ messages in thread
From: Julia Lawall @ 2020-09-20 11:26 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: kernel-janitors, Jiri Slaby, linux-serial, linux-kernel

sg_init_table zeroes its first argument, so the allocation of that argument
doesn't have to.

the semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression x,n,flags;
@@

x = 
- kcalloc
+ kmalloc_array
  (n,sizeof(struct scatterlist),flags)
...
sg_init_table(x,n)
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

---
 drivers/tty/serial/pch_uart.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -u -p a/drivers/tty/serial/pch_uart.c b/drivers/tty/serial/pch_uart.c
--- a/drivers/tty/serial/pch_uart.c
+++ b/drivers/tty/serial/pch_uart.c
@@ -981,7 +981,7 @@ static unsigned int dma_handle_tx(struct
 
 	priv->tx_dma_use = 1;
 
-	priv->sg_tx_p = kcalloc(num, sizeof(struct scatterlist), GFP_ATOMIC);
+	priv->sg_tx_p = kmalloc_array(num, sizeof(struct scatterlist), GFP_ATOMIC);
 	if (!priv->sg_tx_p) {
 		dev_err(priv->port.dev, "%s:kzalloc Failed\n", __func__);
 		return 0;

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

* [PATCH 02/14] target/rd: drop double zeroing
  2020-09-20 11:26 ` Julia Lawall
@ 2020-09-20 11:26   ` Julia Lawall
  -1 siblings, 0 replies; 64+ messages in thread
From: Julia Lawall @ 2020-09-20 11:26 UTC (permalink / raw)
  To: Martin K. Petersen
  Cc: kernel-janitors, linux-scsi, target-devel, linux-kernel

sg_init_table zeroes its first argument, so the allocation of that argument
doesn't have to.

the semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression x,n,flags;
@@

x = 
- kcalloc
+ kmalloc_array
  (n,sizeof(*x),flags)
...
sg_init_table(x,n)
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

---
 drivers/target/target_core_rd.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -u -p a/drivers/target/target_core_rd.c b/drivers/target/target_core_rd.c
--- a/drivers/target/target_core_rd.c
+++ b/drivers/target/target_core_rd.c
@@ -131,7 +131,7 @@ static int rd_allocate_sgl_table(struct
 		if (sg_per_table < total_sg_needed)
 			chain_entry = 1;
 
-		sg = kcalloc(sg_per_table + chain_entry, sizeof(*sg),
+		sg = kmalloc_array(sg_per_table + chain_entry, sizeof(*sg),
 				GFP_KERNEL);
 		if (!sg)
 			return -ENOMEM;


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

* [PATCH 02/14] target/rd: drop double zeroing
@ 2020-09-20 11:26   ` Julia Lawall
  0 siblings, 0 replies; 64+ messages in thread
From: Julia Lawall @ 2020-09-20 11:26 UTC (permalink / raw)
  To: Martin K. Petersen
  Cc: kernel-janitors, linux-scsi, target-devel, linux-kernel

sg_init_table zeroes its first argument, so the allocation of that argument
doesn't have to.

the semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression x,n,flags;
@@

x = 
- kcalloc
+ kmalloc_array
  (n,sizeof(*x),flags)
...
sg_init_table(x,n)
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

---
 drivers/target/target_core_rd.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -u -p a/drivers/target/target_core_rd.c b/drivers/target/target_core_rd.c
--- a/drivers/target/target_core_rd.c
+++ b/drivers/target/target_core_rd.c
@@ -131,7 +131,7 @@ static int rd_allocate_sgl_table(struct
 		if (sg_per_table < total_sg_needed)
 			chain_entry = 1;
 
-		sg = kcalloc(sg_per_table + chain_entry, sizeof(*sg),
+		sg = kmalloc_array(sg_per_table + chain_entry, sizeof(*sg),
 				GFP_KERNEL);
 		if (!sg)
 			return -ENOMEM;

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

* [PATCH 03/14] dpaa2-eth: drop double zeroing
  2020-09-20 11:26 ` Julia Lawall
@ 2020-09-20 11:26   ` Julia Lawall
  -1 siblings, 0 replies; 64+ messages in thread
From: Julia Lawall @ 2020-09-20 11:26 UTC (permalink / raw)
  To: Ioana Ciornei
  Cc: kernel-janitors, Ioana Radulescu, David S. Miller,
	Jakub Kicinski, netdev, linux-kernel

sg_init_table zeroes its first argument, so the allocation of that argument
doesn't have to.

the semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression x,n,flags;
@@

x = 
- kcalloc
+ kmalloc_array
  (n,sizeof(struct scatterlist),flags)
...
sg_init_table(x,n)
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

---
 drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -u -p a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
--- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
+++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
@@ -607,7 +607,7 @@ static int dpaa2_eth_build_sg_fd(struct
 	if (unlikely(PAGE_SIZE / sizeof(struct scatterlist) < nr_frags + 1))
 		return -EINVAL;
 
-	scl = kcalloc(nr_frags + 1, sizeof(struct scatterlist), GFP_ATOMIC);
+	scl = kmalloc_array(nr_frags + 1, sizeof(struct scatterlist), GFP_ATOMIC);
 	if (unlikely(!scl))
 		return -ENOMEM;
 


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

* [PATCH 03/14] dpaa2-eth: drop double zeroing
@ 2020-09-20 11:26   ` Julia Lawall
  0 siblings, 0 replies; 64+ messages in thread
From: Julia Lawall @ 2020-09-20 11:26 UTC (permalink / raw)
  To: Ioana Ciornei
  Cc: kernel-janitors, Ioana Radulescu, David S. Miller,
	Jakub Kicinski, netdev, linux-kernel

sg_init_table zeroes its first argument, so the allocation of that argument
doesn't have to.

the semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression x,n,flags;
@@

x = 
- kcalloc
+ kmalloc_array
  (n,sizeof(struct scatterlist),flags)
...
sg_init_table(x,n)
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

---
 drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -u -p a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
--- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
+++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
@@ -607,7 +607,7 @@ static int dpaa2_eth_build_sg_fd(struct
 	if (unlikely(PAGE_SIZE / sizeof(struct scatterlist) < nr_frags + 1))
 		return -EINVAL;
 
-	scl = kcalloc(nr_frags + 1, sizeof(struct scatterlist), GFP_ATOMIC);
+	scl = kmalloc_array(nr_frags + 1, sizeof(struct scatterlist), GFP_ATOMIC);
 	if (unlikely(!scl))
 		return -ENOMEM;
 

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

* [PATCH 04/14] dmaengine: sh: drop double zeroing
  2020-09-20 11:26 ` Julia Lawall
@ 2020-09-20 11:26   ` Julia Lawall
  -1 siblings, 0 replies; 64+ messages in thread
From: Julia Lawall @ 2020-09-20 11:26 UTC (permalink / raw)
  To: Dan Williams; +Cc: kernel-janitors, Vinod Koul, dmaengine, linux-kernel

sg_init_table zeroes its first argument, so the allocation of that argument
doesn't have to.

the semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression x,n,flags;
@@

x = 
- kcalloc
+ kmalloc_array
  (n,sizeof(*x),flags)
...
sg_init_table(x,n)
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

---
 drivers/dma/sh/shdma-base.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -u -p a/drivers/dma/sh/shdma-base.c b/drivers/dma/sh/shdma-base.c
--- a/drivers/dma/sh/shdma-base.c
+++ b/drivers/dma/sh/shdma-base.c
@@ -728,7 +728,7 @@ static struct dma_async_tx_descriptor *s
 	 * Allocate the sg list dynamically as it would consumer too much stack
 	 * space.
 	 */
-	sgl = kcalloc(sg_len, sizeof(*sgl), GFP_KERNEL);
+	sgl = kmalloc_array(sg_len, sizeof(*sgl), GFP_KERNEL);
 	if (!sgl)
 		return NULL;
 


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

* [PATCH 04/14] dmaengine: sh: drop double zeroing
@ 2020-09-20 11:26   ` Julia Lawall
  0 siblings, 0 replies; 64+ messages in thread
From: Julia Lawall @ 2020-09-20 11:26 UTC (permalink / raw)
  To: Dan Williams; +Cc: kernel-janitors, Vinod Koul, dmaengine, linux-kernel

sg_init_table zeroes its first argument, so the allocation of that argument
doesn't have to.

the semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression x,n,flags;
@@

x = 
- kcalloc
+ kmalloc_array
  (n,sizeof(*x),flags)
...
sg_init_table(x,n)
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

---
 drivers/dma/sh/shdma-base.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -u -p a/drivers/dma/sh/shdma-base.c b/drivers/dma/sh/shdma-base.c
--- a/drivers/dma/sh/shdma-base.c
+++ b/drivers/dma/sh/shdma-base.c
@@ -728,7 +728,7 @@ static struct dma_async_tx_descriptor *s
 	 * Allocate the sg list dynamically as it would consumer too much stack
 	 * space.
 	 */
-	sgl = kcalloc(sg_len, sizeof(*sgl), GFP_KERNEL);
+	sgl = kmalloc_array(sg_len, sizeof(*sgl), GFP_KERNEL);
 	if (!sgl)
 		return NULL;
 

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

* [PATCH 05/14] RDMA/efa: drop double zeroing
  2020-09-20 11:26 ` Julia Lawall
@ 2020-09-20 11:26   ` Julia Lawall
  -1 siblings, 0 replies; 64+ messages in thread
From: Julia Lawall @ 2020-09-20 11:26 UTC (permalink / raw)
  To: Gal Pressman
  Cc: kernel-janitors, Yossi Leybovich, Doug Ledford, Jason Gunthorpe,
	linux-rdma, linux-kernel

sg_init_table zeroes its first argument, so the allocation of that argument
doesn't have to.

the semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression x,n,flags;
@@

x = 
- kcalloc
+ kmalloc_array
  (n,sizeof(*x),flags)
...
sg_init_table(x,n)
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

---
 drivers/infiniband/hw/efa/efa_verbs.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -u -p a/drivers/infiniband/hw/efa/efa_verbs.c b/drivers/infiniband/hw/efa/efa_verbs.c
--- a/drivers/infiniband/hw/efa/efa_verbs.c
+++ b/drivers/infiniband/hw/efa/efa_verbs.c
@@ -1157,7 +1157,7 @@ static struct scatterlist *efa_vmalloc_b
 	struct page *pg;
 	int i;
 
-	sglist = kcalloc(page_cnt, sizeof(*sglist), GFP_KERNEL);
+	sglist = kmalloc_array(page_cnt, sizeof(*sglist), GFP_KERNEL);
 	if (!sglist)
 		return NULL;
 	sg_init_table(sglist, page_cnt);


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

* [PATCH 05/14] RDMA/efa: drop double zeroing
@ 2020-09-20 11:26   ` Julia Lawall
  0 siblings, 0 replies; 64+ messages in thread
From: Julia Lawall @ 2020-09-20 11:26 UTC (permalink / raw)
  To: Gal Pressman
  Cc: kernel-janitors, Yossi Leybovich, Doug Ledford, Jason Gunthorpe,
	linux-rdma, linux-kernel

sg_init_table zeroes its first argument, so the allocation of that argument
doesn't have to.

the semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression x,n,flags;
@@

x = 
- kcalloc
+ kmalloc_array
  (n,sizeof(*x),flags)
...
sg_init_table(x,n)
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

---
 drivers/infiniband/hw/efa/efa_verbs.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -u -p a/drivers/infiniband/hw/efa/efa_verbs.c b/drivers/infiniband/hw/efa/efa_verbs.c
--- a/drivers/infiniband/hw/efa/efa_verbs.c
+++ b/drivers/infiniband/hw/efa/efa_verbs.c
@@ -1157,7 +1157,7 @@ static struct scatterlist *efa_vmalloc_b
 	struct page *pg;
 	int i;
 
-	sglist = kcalloc(page_cnt, sizeof(*sglist), GFP_KERNEL);
+	sglist = kmalloc_array(page_cnt, sizeof(*sglist), GFP_KERNEL);
 	if (!sglist)
 		return NULL;
 	sg_init_table(sglist, page_cnt);

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

* [PATCH 06/14] block: drop double zeroing
  2020-09-20 11:26 ` Julia Lawall
@ 2020-09-20 11:26   ` Julia Lawall
  -1 siblings, 0 replies; 64+ messages in thread
From: Julia Lawall @ 2020-09-20 11:26 UTC (permalink / raw)
  To: Jens Axboe; +Cc: kernel-janitors, linux-block, linux-kernel

sg_init_table zeroes its first argument, so the allocation of that argument
doesn't have to.

the semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression x;
@@

x =
- kzalloc
+ kmalloc
 (...)
...
sg_init_table(x,...)
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

---
 block/bsg-lib.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -u -p a/block/bsg-lib.c b/block/bsg-lib.c
--- a/block/bsg-lib.c
+++ b/block/bsg-lib.c
@@ -207,7 +207,7 @@ static int bsg_map_buffer(struct bsg_buf
 
 	BUG_ON(!req->nr_phys_segments);
 
-	buf->sg_list = kzalloc(sz, GFP_KERNEL);
+	buf->sg_list = kmalloc(sz, GFP_KERNEL);
 	if (!buf->sg_list)
 		return -ENOMEM;
 	sg_init_table(buf->sg_list, req->nr_phys_segments);


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

* [PATCH 06/14] block: drop double zeroing
@ 2020-09-20 11:26   ` Julia Lawall
  0 siblings, 0 replies; 64+ messages in thread
From: Julia Lawall @ 2020-09-20 11:26 UTC (permalink / raw)
  To: Jens Axboe; +Cc: kernel-janitors, linux-block, linux-kernel

sg_init_table zeroes its first argument, so the allocation of that argument
doesn't have to.

the semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression x;
@@

x - kzalloc
+ kmalloc
 (...)
...
sg_init_table(x,...)
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

---
 block/bsg-lib.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -u -p a/block/bsg-lib.c b/block/bsg-lib.c
--- a/block/bsg-lib.c
+++ b/block/bsg-lib.c
@@ -207,7 +207,7 @@ static int bsg_map_buffer(struct bsg_buf
 
 	BUG_ON(!req->nr_phys_segments);
 
-	buf->sg_list = kzalloc(sz, GFP_KERNEL);
+	buf->sg_list = kmalloc(sz, GFP_KERNEL);
 	if (!buf->sg_list)
 		return -ENOMEM;
 	sg_init_table(buf->sg_list, req->nr_phys_segments);

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

* [PATCH 07/14] RDS: drop double zeroing
  2020-09-20 11:26 ` Julia Lawall
@ 2020-09-20 11:26   ` Julia Lawall
  -1 siblings, 0 replies; 64+ messages in thread
From: Julia Lawall @ 2020-09-20 11:26 UTC (permalink / raw)
  To: Santosh Shilimkar
  Cc: kernel-janitors, David S. Miller, Jakub Kicinski, netdev,
	linux-rdma, rds-devel, linux-kernel

sg_init_table zeroes its first argument, so the allocation of that argument
doesn't have to.

the semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression x,n,flags;
@@

x = 
- kcalloc
+ kmalloc_array
  (n,sizeof(*x),flags)
...
sg_init_table(x,n)
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

---
 net/rds/rdma.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -u -p a/net/rds/rdma.c b/net/rds/rdma.c
--- a/net/rds/rdma.c
+++ b/net/rds/rdma.c
@@ -269,7 +269,7 @@ static int __rds_rdma_map(struct rds_soc
 		goto out;
 	} else {
 		nents = ret;
-		sg = kcalloc(nents, sizeof(*sg), GFP_KERNEL);
+		sg = kmalloc_array(nents, sizeof(*sg), GFP_KERNEL);
 		if (!sg) {
 			ret = -ENOMEM;
 			goto out;


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

* [PATCH 07/14] RDS: drop double zeroing
@ 2020-09-20 11:26   ` Julia Lawall
  0 siblings, 0 replies; 64+ messages in thread
From: Julia Lawall @ 2020-09-20 11:26 UTC (permalink / raw)
  To: Santosh Shilimkar
  Cc: kernel-janitors, David S. Miller, Jakub Kicinski, netdev,
	linux-rdma, rds-devel, linux-kernel

sg_init_table zeroes its first argument, so the allocation of that argument
doesn't have to.

the semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression x,n,flags;
@@

x = 
- kcalloc
+ kmalloc_array
  (n,sizeof(*x),flags)
...
sg_init_table(x,n)
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

---
 net/rds/rdma.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -u -p a/net/rds/rdma.c b/net/rds/rdma.c
--- a/net/rds/rdma.c
+++ b/net/rds/rdma.c
@@ -269,7 +269,7 @@ static int __rds_rdma_map(struct rds_soc
 		goto out;
 	} else {
 		nents = ret;
-		sg = kcalloc(nents, sizeof(*sg), GFP_KERNEL);
+		sg = kmalloc_array(nents, sizeof(*sg), GFP_KERNEL);
 		if (!sg) {
 			ret = -ENOMEM;
 			goto out;

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

* [PATCH 08/14] xprtrdma: drop double zeroing
  2020-09-20 11:26 ` Julia Lawall
@ 2020-09-20 11:26   ` Julia Lawall
  -1 siblings, 0 replies; 64+ messages in thread
From: Julia Lawall @ 2020-09-20 11:26 UTC (permalink / raw)
  To: J. Bruce Fields
  Cc: kernel-janitors, Chuck Lever, Trond Myklebust, Anna Schumaker,
	David S. Miller, Jakub Kicinski, linux-nfs, netdev, linux-kernel

sg_init_table zeroes its first argument, so the allocation of that argument
doesn't have to.

the semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression x,n,flags;
@@

x = 
- kcalloc
+ kmalloc_array
  (n,sizeof(*x),flags)
...
sg_init_table(x,n)
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

---
 net/sunrpc/xprtrdma/frwr_ops.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -u -p a/net/sunrpc/xprtrdma/frwr_ops.c b/net/sunrpc/xprtrdma/frwr_ops.c
--- a/net/sunrpc/xprtrdma/frwr_ops.c
+++ b/net/sunrpc/xprtrdma/frwr_ops.c
@@ -124,7 +124,7 @@ int frwr_mr_init(struct rpcrdma_xprt *r_
 	if (IS_ERR(frmr))
 		goto out_mr_err;
 
-	sg = kcalloc(depth, sizeof(*sg), GFP_NOFS);
+	sg = kmalloc_array(depth, sizeof(*sg), GFP_NOFS);
 	if (!sg)
 		goto out_list_err;
 


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

* [PATCH 08/14] xprtrdma: drop double zeroing
@ 2020-09-20 11:26   ` Julia Lawall
  0 siblings, 0 replies; 64+ messages in thread
From: Julia Lawall @ 2020-09-20 11:26 UTC (permalink / raw)
  To: J. Bruce Fields
  Cc: kernel-janitors, Chuck Lever, Trond Myklebust, Anna Schumaker,
	David S. Miller, Jakub Kicinski, linux-nfs, netdev, linux-kernel

sg_init_table zeroes its first argument, so the allocation of that argument
doesn't have to.

the semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression x,n,flags;
@@

x = 
- kcalloc
+ kmalloc_array
  (n,sizeof(*x),flags)
...
sg_init_table(x,n)
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

---
 net/sunrpc/xprtrdma/frwr_ops.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -u -p a/net/sunrpc/xprtrdma/frwr_ops.c b/net/sunrpc/xprtrdma/frwr_ops.c
--- a/net/sunrpc/xprtrdma/frwr_ops.c
+++ b/net/sunrpc/xprtrdma/frwr_ops.c
@@ -124,7 +124,7 @@ int frwr_mr_init(struct rpcrdma_xprt *r_
 	if (IS_ERR(frmr))
 		goto out_mr_err;
 
-	sg = kcalloc(depth, sizeof(*sg), GFP_NOFS);
+	sg = kmalloc_array(depth, sizeof(*sg), GFP_NOFS);
 	if (!sg)
 		goto out_list_err;
 

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

* [PATCH 09/14] dmaengine: rcar-dmac: drop double zeroing
  2020-09-20 11:26 ` Julia Lawall
@ 2020-09-20 11:26   ` Julia Lawall
  -1 siblings, 0 replies; 64+ messages in thread
From: Julia Lawall @ 2020-09-20 11:26 UTC (permalink / raw)
  To: Vinod Koul; +Cc: kernel-janitors, Dan Williams, dmaengine, linux-kernel

sg_init_table zeroes its first argument, so the allocation of that argument
doesn't have to.

the semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression x,n,flags;
@@

x = 
- kcalloc
+ kmalloc_array
  (n,sizeof(*x),flags)
...
sg_init_table(x,n)
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

---
 drivers/dma/sh/rcar-dmac.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -u -p a/drivers/dma/sh/rcar-dmac.c b/drivers/dma/sh/rcar-dmac.c
--- a/drivers/dma/sh/rcar-dmac.c
+++ b/drivers/dma/sh/rcar-dmac.c
@@ -1227,7 +1227,7 @@ rcar_dmac_prep_dma_cyclic(struct dma_cha
 	 * Allocate the sg list dynamically as it would consume too much stack
 	 * space.
 	 */
-	sgl = kcalloc(sg_len, sizeof(*sgl), GFP_NOWAIT);
+	sgl = kmalloc_array(sg_len, sizeof(*sgl), GFP_NOWAIT);
 	if (!sgl)
 		return NULL;
 


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

* [PATCH 09/14] dmaengine: rcar-dmac: drop double zeroing
@ 2020-09-20 11:26   ` Julia Lawall
  0 siblings, 0 replies; 64+ messages in thread
From: Julia Lawall @ 2020-09-20 11:26 UTC (permalink / raw)
  To: Vinod Koul; +Cc: kernel-janitors, Dan Williams, dmaengine, linux-kernel

sg_init_table zeroes its first argument, so the allocation of that argument
doesn't have to.

the semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression x,n,flags;
@@

x = 
- kcalloc
+ kmalloc_array
  (n,sizeof(*x),flags)
...
sg_init_table(x,n)
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

---
 drivers/dma/sh/rcar-dmac.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -u -p a/drivers/dma/sh/rcar-dmac.c b/drivers/dma/sh/rcar-dmac.c
--- a/drivers/dma/sh/rcar-dmac.c
+++ b/drivers/dma/sh/rcar-dmac.c
@@ -1227,7 +1227,7 @@ rcar_dmac_prep_dma_cyclic(struct dma_cha
 	 * Allocate the sg list dynamically as it would consume too much stack
 	 * space.
 	 */
-	sgl = kcalloc(sg_len, sizeof(*sgl), GFP_NOWAIT);
+	sgl = kmalloc_array(sg_len, sizeof(*sgl), GFP_NOWAIT);
 	if (!sgl)
 		return NULL;
 

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

* [PATCH 10/14] iwlwifi: dbg_ini: drop double zeroing
  2020-09-20 11:26 ` Julia Lawall
@ 2020-09-20 11:26   ` Julia Lawall
  -1 siblings, 0 replies; 64+ messages in thread
From: Julia Lawall @ 2020-09-20 11:26 UTC (permalink / raw)
  To: Johannes Berg
  Cc: kernel-janitors, Emmanuel Grumbach, Luca Coelho,
	Intel Linux Wireless, Kalle Valo, David S. Miller,
	Jakub Kicinski, linux-wireless, netdev, linux-kernel

sg_init_table zeroes its first argument, so the allocation of that argument
doesn't have to.

the semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression x,n,flags;
@@

x = 
- kcalloc
+ kmalloc_array
  (n,sizeof(*x),flags)
...
sg_init_table(x,n)
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

---
 drivers/net/wireless/intel/iwlwifi/fw/dbg.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -u -p a/drivers/net/wireless/intel/iwlwifi/fw/dbg.c b/drivers/net/wireless/intel/iwlwifi/fw/dbg.c
--- a/drivers/net/wireless/intel/iwlwifi/fw/dbg.c
+++ b/drivers/net/wireless/intel/iwlwifi/fw/dbg.c
@@ -631,7 +631,7 @@ static struct scatterlist *alloc_sgtable
 	struct scatterlist *table;
 
 	nents = DIV_ROUND_UP(size, PAGE_SIZE);
-	table = kcalloc(nents, sizeof(*table), GFP_KERNEL);
+	table = kmalloc_array(nents, sizeof(*table), GFP_KERNEL);
 	if (!table)
 		return NULL;
 	sg_init_table(table, nents);


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

* [PATCH 10/14] iwlwifi: dbg_ini: drop double zeroing
@ 2020-09-20 11:26   ` Julia Lawall
  0 siblings, 0 replies; 64+ messages in thread
From: Julia Lawall @ 2020-09-20 11:26 UTC (permalink / raw)
  To: Johannes Berg
  Cc: kernel-janitors, Emmanuel Grumbach, Luca Coelho,
	Intel Linux Wireless, Kalle Valo, David S. Miller,
	Jakub Kicinski, linux-wireless, netdev, linux-kernel

sg_init_table zeroes its first argument, so the allocation of that argument
doesn't have to.

the semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression x,n,flags;
@@

x = 
- kcalloc
+ kmalloc_array
  (n,sizeof(*x),flags)
...
sg_init_table(x,n)
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

---
 drivers/net/wireless/intel/iwlwifi/fw/dbg.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -u -p a/drivers/net/wireless/intel/iwlwifi/fw/dbg.c b/drivers/net/wireless/intel/iwlwifi/fw/dbg.c
--- a/drivers/net/wireless/intel/iwlwifi/fw/dbg.c
+++ b/drivers/net/wireless/intel/iwlwifi/fw/dbg.c
@@ -631,7 +631,7 @@ static struct scatterlist *alloc_sgtable
 	struct scatterlist *table;
 
 	nents = DIV_ROUND_UP(size, PAGE_SIZE);
-	table = kcalloc(nents, sizeof(*table), GFP_KERNEL);
+	table = kmalloc_array(nents, sizeof(*table), GFP_KERNEL);
 	if (!table)
 		return NULL;
 	sg_init_table(table, nents);

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

* [PATCH 11/14] spi/topcliff-pch: drop double zeroing
  2020-09-20 11:26 ` Julia Lawall
@ 2020-09-20 11:26   ` Julia Lawall
  -1 siblings, 0 replies; 64+ messages in thread
From: Julia Lawall @ 2020-09-20 11:26 UTC (permalink / raw)
  To: Mark Brown; +Cc: kernel-janitors, linux-spi, linux-kernel

sg_init_table zeroes its first argument, so the allocation of that argument
doesn't have to.

the semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression x,n,flags;
@@

x = 
- kcalloc
+ kmalloc_array
  (n,sizeof(*x),flags)
...
sg_init_table(x,n)
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

---
 drivers/spi/spi-topcliff-pch.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff -u -p a/drivers/spi/spi-topcliff-pch.c b/drivers/spi/spi-topcliff-pch.c
--- a/drivers/spi/spi-topcliff-pch.c
+++ b/drivers/spi/spi-topcliff-pch.c
@@ -1002,7 +1002,7 @@ static void pch_spi_handle_dma(struct pc
 	spin_unlock_irqrestore(&data->lock, flags);
 
 	/* RX */
-	dma->sg_rx_p = kcalloc(num, sizeof(*dma->sg_rx_p), GFP_ATOMIC);
+	dma->sg_rx_p = kmalloc_array(num, sizeof(*dma->sg_rx_p), GFP_ATOMIC);
 	if (!dma->sg_rx_p)
 		return;
 
@@ -1065,7 +1065,7 @@ static void pch_spi_handle_dma(struct pc
 		head = 0;
 	}
 
-	dma->sg_tx_p = kcalloc(num, sizeof(*dma->sg_tx_p), GFP_ATOMIC);
+	dma->sg_tx_p = kmalloc_array(num, sizeof(*dma->sg_tx_p), GFP_ATOMIC);
 	if (!dma->sg_tx_p)
 		return;
 


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

* [PATCH 11/14] spi/topcliff-pch: drop double zeroing
@ 2020-09-20 11:26   ` Julia Lawall
  0 siblings, 0 replies; 64+ messages in thread
From: Julia Lawall @ 2020-09-20 11:26 UTC (permalink / raw)
  To: Mark Brown; +Cc: kernel-janitors, linux-spi, linux-kernel

sg_init_table zeroes its first argument, so the allocation of that argument
doesn't have to.

the semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression x,n,flags;
@@

x = 
- kcalloc
+ kmalloc_array
  (n,sizeof(*x),flags)
...
sg_init_table(x,n)
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

---
 drivers/spi/spi-topcliff-pch.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff -u -p a/drivers/spi/spi-topcliff-pch.c b/drivers/spi/spi-topcliff-pch.c
--- a/drivers/spi/spi-topcliff-pch.c
+++ b/drivers/spi/spi-topcliff-pch.c
@@ -1002,7 +1002,7 @@ static void pch_spi_handle_dma(struct pc
 	spin_unlock_irqrestore(&data->lock, flags);
 
 	/* RX */
-	dma->sg_rx_p = kcalloc(num, sizeof(*dma->sg_rx_p), GFP_ATOMIC);
+	dma->sg_rx_p = kmalloc_array(num, sizeof(*dma->sg_rx_p), GFP_ATOMIC);
 	if (!dma->sg_rx_p)
 		return;
 
@@ -1065,7 +1065,7 @@ static void pch_spi_handle_dma(struct pc
 		head = 0;
 	}
 
-	dma->sg_tx_p = kcalloc(num, sizeof(*dma->sg_tx_p), GFP_ATOMIC);
+	dma->sg_tx_p = kmalloc_array(num, sizeof(*dma->sg_tx_p), GFP_ATOMIC);
 	if (!dma->sg_tx_p)
 		return;
 

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

* [PATCH 12/14] [media] saa7146: drop double zeroing
  2020-09-20 11:26 ` Julia Lawall
@ 2020-09-20 11:26   ` Julia Lawall
  -1 siblings, 0 replies; 64+ messages in thread
From: Julia Lawall @ 2020-09-20 11:26 UTC (permalink / raw)
  To: Hans Verkuil
  Cc: kernel-janitors, Mauro Carvalho Chehab, linux-media, linux-kernel

sg_init_table zeroes its first argument, so the allocation of that argument
doesn't have to.

the semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression x,n,flags;
@@

x = 
- kcalloc
+ kmalloc_array
  (n,sizeof(struct scatterlist),flags)
...
sg_init_table(x,n)
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

---
 drivers/media/common/saa7146/saa7146_core.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -u -p a/drivers/media/common/saa7146/saa7146_core.c b/drivers/media/common/saa7146/saa7146_core.c
--- a/drivers/media/common/saa7146/saa7146_core.c
+++ b/drivers/media/common/saa7146/saa7146_core.c
@@ -140,7 +140,7 @@ static struct scatterlist* vmalloc_to_sg
 	struct page *pg;
 	int i;
 
-	sglist = kcalloc(nr_pages, sizeof(struct scatterlist), GFP_KERNEL);
+	sglist = kmalloc_array(nr_pages, sizeof(struct scatterlist), GFP_KERNEL);
 	if (NULL == sglist)
 		return NULL;
 	sg_init_table(sglist, nr_pages);


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

* [PATCH 12/14] [media] saa7146: drop double zeroing
@ 2020-09-20 11:26   ` Julia Lawall
  0 siblings, 0 replies; 64+ messages in thread
From: Julia Lawall @ 2020-09-20 11:26 UTC (permalink / raw)
  To: Hans Verkuil
  Cc: kernel-janitors, Mauro Carvalho Chehab, linux-media, linux-kernel

sg_init_table zeroes its first argument, so the allocation of that argument
doesn't have to.

the semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression x,n,flags;
@@

x = 
- kcalloc
+ kmalloc_array
  (n,sizeof(struct scatterlist),flags)
...
sg_init_table(x,n)
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

---
 drivers/media/common/saa7146/saa7146_core.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -u -p a/drivers/media/common/saa7146/saa7146_core.c b/drivers/media/common/saa7146/saa7146_core.c
--- a/drivers/media/common/saa7146/saa7146_core.c
+++ b/drivers/media/common/saa7146/saa7146_core.c
@@ -140,7 +140,7 @@ static struct scatterlist* vmalloc_to_sg
 	struct page *pg;
 	int i;
 
-	sglist = kcalloc(nr_pages, sizeof(struct scatterlist), GFP_KERNEL);
+	sglist = kmalloc_array(nr_pages, sizeof(struct scatterlist), GFP_KERNEL);
 	if (NULL = sglist)
 		return NULL;
 	sg_init_table(sglist, nr_pages);

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

* [PATCH 13/14] misc: mic: drop double zeroing
  2020-09-20 11:26 ` Julia Lawall
@ 2020-09-20 11:26   ` Julia Lawall
  -1 siblings, 0 replies; 64+ messages in thread
From: Julia Lawall @ 2020-09-20 11:26 UTC (permalink / raw)
  To: Sudeep Dutt
  Cc: kernel-janitors, Ashutosh Dixit, Arnd Bergmann,
	Greg Kroah-Hartman, linux-kernel

sg_init_table zeroes its first argument, so the allocation of that argument
doesn't have to.

the semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression x,n,flags;
@@

x = 
- kcalloc
+ kmalloc_array
  (n,sizeof(struct scatterlist),flags)
...
sg_init_table(x,n)
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

---
 drivers/misc/mic/scif/scif_nodeqp.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -u -p a/drivers/misc/mic/scif/scif_nodeqp.c b/drivers/misc/mic/scif/scif_nodeqp.c
--- a/drivers/misc/mic/scif/scif_nodeqp.c
+++ b/drivers/misc/mic/scif/scif_nodeqp.c
@@ -363,7 +363,7 @@ scif_p2p_setsg(phys_addr_t pa, int page_
 	struct page *page;
 	int i;
 
-	sg = kcalloc(page_cnt, sizeof(struct scatterlist), GFP_KERNEL);
+	sg = kmalloc_array(page_cnt, sizeof(struct scatterlist), GFP_KERNEL);
 	if (!sg)
 		return NULL;
 	sg_init_table(sg, page_cnt);


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

* [PATCH 13/14] misc: mic: drop double zeroing
@ 2020-09-20 11:26   ` Julia Lawall
  0 siblings, 0 replies; 64+ messages in thread
From: Julia Lawall @ 2020-09-20 11:26 UTC (permalink / raw)
  To: Sudeep Dutt
  Cc: kernel-janitors, Ashutosh Dixit, Arnd Bergmann,
	Greg Kroah-Hartman, linux-kernel

sg_init_table zeroes its first argument, so the allocation of that argument
doesn't have to.

the semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression x,n,flags;
@@

x = 
- kcalloc
+ kmalloc_array
  (n,sizeof(struct scatterlist),flags)
...
sg_init_table(x,n)
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

---
 drivers/misc/mic/scif/scif_nodeqp.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -u -p a/drivers/misc/mic/scif/scif_nodeqp.c b/drivers/misc/mic/scif/scif_nodeqp.c
--- a/drivers/misc/mic/scif/scif_nodeqp.c
+++ b/drivers/misc/mic/scif/scif_nodeqp.c
@@ -363,7 +363,7 @@ scif_p2p_setsg(phys_addr_t pa, int page_
 	struct page *page;
 	int i;
 
-	sg = kcalloc(page_cnt, sizeof(struct scatterlist), GFP_KERNEL);
+	sg = kmalloc_array(page_cnt, sizeof(struct scatterlist), GFP_KERNEL);
 	if (!sg)
 		return NULL;
 	sg_init_table(sg, page_cnt);

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

* [PATCH 14/14] PCI/P2PDMA: drop double zeroing
  2020-09-20 11:26 ` Julia Lawall
@ 2020-09-20 11:26   ` Julia Lawall
  -1 siblings, 0 replies; 64+ messages in thread
From: Julia Lawall @ 2020-09-20 11:26 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: kernel-janitors, linux-pci, linux-kernel

sg_init_table zeroes its first argument, so the allocation of that argument
doesn't have to.

the semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression x;
@@

x =
- kzalloc
+ kmalloc
 (...)
...
sg_init_table(x,...)
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

---
 drivers/pci/p2pdma.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -u -p a/drivers/pci/p2pdma.c b/drivers/pci/p2pdma.c
--- a/drivers/pci/p2pdma.c
+++ b/drivers/pci/p2pdma.c
@@ -762,7 +762,7 @@ struct scatterlist *pci_p2pmem_alloc_sgl
 	struct scatterlist *sg;
 	void *addr;
 
-	sg = kzalloc(sizeof(*sg), GFP_KERNEL);
+	sg = kmalloc(sizeof(*sg), GFP_KERNEL);
 	if (!sg)
 		return NULL;
 


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

* [PATCH 14/14] PCI/P2PDMA: drop double zeroing
@ 2020-09-20 11:26   ` Julia Lawall
  0 siblings, 0 replies; 64+ messages in thread
From: Julia Lawall @ 2020-09-20 11:26 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: kernel-janitors, linux-pci, linux-kernel

sg_init_table zeroes its first argument, so the allocation of that argument
doesn't have to.

the semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression x;
@@

x - kzalloc
+ kmalloc
 (...)
...
sg_init_table(x,...)
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

---
 drivers/pci/p2pdma.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -u -p a/drivers/pci/p2pdma.c b/drivers/pci/p2pdma.c
--- a/drivers/pci/p2pdma.c
+++ b/drivers/pci/p2pdma.c
@@ -762,7 +762,7 @@ struct scatterlist *pci_p2pmem_alloc_sgl
 	struct scatterlist *sg;
 	void *addr;
 
-	sg = kzalloc(sizeof(*sg), GFP_KERNEL);
+	sg = kmalloc(sizeof(*sg), GFP_KERNEL);
 	if (!sg)
 		return NULL;
 

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

* Re: [PATCH 01/14] pch_uart: drop double zeroing
  2020-09-20 11:26   ` Julia Lawall
@ 2020-09-20 12:14     ` Greg Kroah-Hartman
  -1 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2020-09-20 12:14 UTC (permalink / raw)
  To: Julia Lawall; +Cc: kernel-janitors, Jiri Slaby, linux-serial, linux-kernel

On Sun, Sep 20, 2020 at 01:26:13PM +0200, Julia Lawall wrote:
> sg_init_table zeroes its first argument, so the allocation of that argument
> doesn't have to.
> 
> the semantic patch that makes this change is as follows:
> (http://coccinelle.lip6.fr/)
> 
> // <smpl>
> @@
> expression x,n,flags;
> @@
> 
> x = 
> - kcalloc
> + kmalloc_array
>   (n,sizeof(struct scatterlist),flags)
> ...
> sg_init_table(x,n)
> // </smpl>
> 
> Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

It inits the first entry in the array, but what about all of the other
ones?  Is that "safe" to have uninitialized data in them like your
change causes to happen?

thanks,

greg k-h

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

* Re: [PATCH 01/14] pch_uart: drop double zeroing
@ 2020-09-20 12:14     ` Greg Kroah-Hartman
  0 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2020-09-20 12:14 UTC (permalink / raw)
  To: Julia Lawall; +Cc: kernel-janitors, Jiri Slaby, linux-serial, linux-kernel

On Sun, Sep 20, 2020 at 01:26:13PM +0200, Julia Lawall wrote:
> sg_init_table zeroes its first argument, so the allocation of that argument
> doesn't have to.
> 
> the semantic patch that makes this change is as follows:
> (http://coccinelle.lip6.fr/)
> 
> // <smpl>
> @@
> expression x,n,flags;
> @@
> 
> x = 
> - kcalloc
> + kmalloc_array
>   (n,sizeof(struct scatterlist),flags)
> ...
> sg_init_table(x,n)
> // </smpl>
> 
> Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

It inits the first entry in the array, but what about all of the other
ones?  Is that "safe" to have uninitialized data in them like your
change causes to happen?

thanks,

greg k-h

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

* Re: [PATCH 01/14] pch_uart: drop double zeroing
  2020-09-20 12:14     ` Greg Kroah-Hartman
@ 2020-09-20 12:47       ` Julia Lawall
  -1 siblings, 0 replies; 64+ messages in thread
From: Julia Lawall @ 2020-09-20 12:47 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: kernel-janitors, Jiri Slaby, linux-serial, linux-kernel



On Sun, 20 Sep 2020, Greg Kroah-Hartman wrote:

> On Sun, Sep 20, 2020 at 01:26:13PM +0200, Julia Lawall wrote:
> > sg_init_table zeroes its first argument, so the allocation of that argument
> > doesn't have to.
> >
> > the semantic patch that makes this change is as follows:
> > (http://coccinelle.lip6.fr/)
> >
> > // <smpl>
> > @@
> > expression x,n,flags;
> > @@
> >
> > x =
> > - kcalloc
> > + kmalloc_array
> >   (n,sizeof(struct scatterlist),flags)
> > ...
> > sg_init_table(x,n)
> > // </smpl>
> >
> > Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>
>
> It inits the first entry in the array, but what about all of the other
> ones?  Is that "safe" to have uninitialized data in them like your
> change causes to happen?

Sorry, I don't follow.  The complete code is:

        priv->sg_tx_p = kcalloc(num, sizeof(struct scatterlist), GFP_ATOMIC);
        if (!priv->sg_tx_p) {
		dev_err(priv->port.dev, "%s:kzalloc Failed\n", __func__);
                return 0;
	}

	sg_init_table(priv->sg_tx_p, num); /* Initialize SG table */

and the definition of sg_init_table is:

void sg_init_table(struct scatterlist *sgl, unsigned int nents)
{
	memset(sgl, 0, sizeof(*sgl) * nents);
	sg_init_marker(sgl, nents);
}

It looks to me like it zeroes all of the elements?  The same file does
contain a call:

sg_init_table(&priv->sg_rx, 1);

But that's not the one associated with the patch.

julia

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

* Re: [PATCH 01/14] pch_uart: drop double zeroing
@ 2020-09-20 12:47       ` Julia Lawall
  0 siblings, 0 replies; 64+ messages in thread
From: Julia Lawall @ 2020-09-20 12:47 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: kernel-janitors, Jiri Slaby, linux-serial, linux-kernel



On Sun, 20 Sep 2020, Greg Kroah-Hartman wrote:

> On Sun, Sep 20, 2020 at 01:26:13PM +0200, Julia Lawall wrote:
> > sg_init_table zeroes its first argument, so the allocation of that argument
> > doesn't have to.
> >
> > the semantic patch that makes this change is as follows:
> > (http://coccinelle.lip6.fr/)
> >
> > // <smpl>
> > @@
> > expression x,n,flags;
> > @@
> >
> > x > > - kcalloc
> > + kmalloc_array
> >   (n,sizeof(struct scatterlist),flags)
> > ...
> > sg_init_table(x,n)
> > // </smpl>
> >
> > Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>
>
> It inits the first entry in the array, but what about all of the other
> ones?  Is that "safe" to have uninitialized data in them like your
> change causes to happen?

Sorry, I don't follow.  The complete code is:

        priv->sg_tx_p = kcalloc(num, sizeof(struct scatterlist), GFP_ATOMIC);
        if (!priv->sg_tx_p) {
		dev_err(priv->port.dev, "%s:kzalloc Failed\n", __func__);
                return 0;
	}

	sg_init_table(priv->sg_tx_p, num); /* Initialize SG table */

and the definition of sg_init_table is:

void sg_init_table(struct scatterlist *sgl, unsigned int nents)
{
	memset(sgl, 0, sizeof(*sgl) * nents);
	sg_init_marker(sgl, nents);
}

It looks to me like it zeroes all of the elements?  The same file does
contain a call:

sg_init_table(&priv->sg_rx, 1);

But that's not the one associated with the patch.

julia

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

* Re: [PATCH 08/14] xprtrdma: drop double zeroing
  2020-09-20 11:26   ` Julia Lawall
@ 2020-09-20 15:37     ` Chuck Lever
  -1 siblings, 0 replies; 64+ messages in thread
From: Chuck Lever @ 2020-09-20 15:37 UTC (permalink / raw)
  To: Julia Lawall, Anna Schumaker
  Cc: Bruce Fields, kernel-janitors, Trond Myklebust, David S. Miller,
	Jakub Kicinski, Linux NFS Mailing List,
	open list:NETWORKING DRIVERS, open list

Thanks, Julia!

> On Sep 20, 2020, at 7:26 AM, Julia Lawall <Julia.Lawall@inria.fr> wrote:
> 
> sg_init_table zeroes its first argument, so the allocation of that argument
> doesn't have to.
> 
> the semantic patch that makes this change is as follows:
> (http://coccinelle.lip6.fr/)
> 
> // <smpl>
> @@
> expression x,n,flags;
> @@
> 
> x = 
> - kcalloc
> + kmalloc_array
>  (n,sizeof(*x),flags)
> ...
> sg_init_table(x,n)
> // </smpl>
> 
> Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

Acked-by: Chuck Lever <chuck.lever@oracle.com>

This one goes to Anna.


> ---
> net/sunrpc/xprtrdma/frwr_ops.c |    2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff -u -p a/net/sunrpc/xprtrdma/frwr_ops.c b/net/sunrpc/xprtrdma/frwr_ops.c
> --- a/net/sunrpc/xprtrdma/frwr_ops.c
> +++ b/net/sunrpc/xprtrdma/frwr_ops.c
> @@ -124,7 +124,7 @@ int frwr_mr_init(struct rpcrdma_xprt *r_
> 	if (IS_ERR(frmr))
> 		goto out_mr_err;
> 
> -	sg = kcalloc(depth, sizeof(*sg), GFP_NOFS);
> +	sg = kmalloc_array(depth, sizeof(*sg), GFP_NOFS);
> 	if (!sg)
> 		goto out_list_err;
> 
> 

--
Chuck Lever




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

* Re: [PATCH 08/14] xprtrdma: drop double zeroing
@ 2020-09-20 15:37     ` Chuck Lever
  0 siblings, 0 replies; 64+ messages in thread
From: Chuck Lever @ 2020-09-20 15:37 UTC (permalink / raw)
  To: Julia Lawall, Anna Schumaker
  Cc: Bruce Fields, kernel-janitors, Trond Myklebust, David S. Miller,
	Jakub Kicinski, Linux NFS Mailing List,
	open list:NETWORKING DRIVERS, open list

Thanks, Julia!

> On Sep 20, 2020, at 7:26 AM, Julia Lawall <Julia.Lawall@inria.fr> wrote:
> 
> sg_init_table zeroes its first argument, so the allocation of that argument
> doesn't have to.
> 
> the semantic patch that makes this change is as follows:
> (http://coccinelle.lip6.fr/)
> 
> // <smpl>
> @@
> expression x,n,flags;
> @@
> 
> x = 
> - kcalloc
> + kmalloc_array
>  (n,sizeof(*x),flags)
> ...
> sg_init_table(x,n)
> // </smpl>
> 
> Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

Acked-by: Chuck Lever <chuck.lever@oracle.com>

This one goes to Anna.


> ---
> net/sunrpc/xprtrdma/frwr_ops.c |    2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff -u -p a/net/sunrpc/xprtrdma/frwr_ops.c b/net/sunrpc/xprtrdma/frwr_ops.c
> --- a/net/sunrpc/xprtrdma/frwr_ops.c
> +++ b/net/sunrpc/xprtrdma/frwr_ops.c
> @@ -124,7 +124,7 @@ int frwr_mr_init(struct rpcrdma_xprt *r_
> 	if (IS_ERR(frmr))
> 		goto out_mr_err;
> 
> -	sg = kcalloc(depth, sizeof(*sg), GFP_NOFS);
> +	sg = kmalloc_array(depth, sizeof(*sg), GFP_NOFS);
> 	if (!sg)
> 		goto out_list_err;
> 
> 

--
Chuck Lever

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

* Re: [PATCH 03/14] dpaa2-eth: drop double zeroing
  2020-09-20 11:26   ` Julia Lawall
@ 2020-09-21  2:09     ` David Miller
  -1 siblings, 0 replies; 64+ messages in thread
From: David Miller @ 2020-09-21  2:09 UTC (permalink / raw)
  To: Julia.Lawall
  Cc: ioana.ciornei, kernel-janitors, ruxandra.radulescu, kuba, netdev,
	linux-kernel

From: Julia Lawall <Julia.Lawall@inria.fr>
Date: Sun, 20 Sep 2020 13:26:15 +0200

> sg_init_table zeroes its first argument, so the allocation of that argument
> doesn't have to.
> 
> the semantic patch that makes this change is as follows:
> (http://coccinelle.lip6.fr/)
> 
> // <smpl>
> @@
> expression x,n,flags;
> @@
> 
> x = 
> - kcalloc
> + kmalloc_array
>   (n,sizeof(struct scatterlist),flags)
> ...
> sg_init_table(x,n)
> // </smpl>
> 
> Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

Applied.

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

* Re: [PATCH 03/14] dpaa2-eth: drop double zeroing
@ 2020-09-21  2:09     ` David Miller
  0 siblings, 0 replies; 64+ messages in thread
From: David Miller @ 2020-09-21  2:09 UTC (permalink / raw)
  To: Julia.Lawall
  Cc: ioana.ciornei, kernel-janitors, ruxandra.radulescu, kuba, netdev,
	linux-kernel

From: Julia Lawall <Julia.Lawall@inria.fr>
Date: Sun, 20 Sep 2020 13:26:15 +0200

> sg_init_table zeroes its first argument, so the allocation of that argument
> doesn't have to.
> 
> the semantic patch that makes this change is as follows:
> (http://coccinelle.lip6.fr/)
> 
> // <smpl>
> @@
> expression x,n,flags;
> @@
> 
> x = 
> - kcalloc
> + kmalloc_array
>   (n,sizeof(struct scatterlist),flags)
> ...
> sg_init_table(x,n)
> // </smpl>
> 
> Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

Applied.

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

* Re: [PATCH 07/14] RDS: drop double zeroing
  2020-09-20 11:26   ` Julia Lawall
@ 2020-09-21  2:09     ` David Miller
  -1 siblings, 0 replies; 64+ messages in thread
From: David Miller @ 2020-09-21  2:09 UTC (permalink / raw)
  To: Julia.Lawall
  Cc: santosh.shilimkar, kernel-janitors, kuba, netdev, linux-rdma,
	rds-devel, linux-kernel

From: Julia Lawall <Julia.Lawall@inria.fr>
Date: Sun, 20 Sep 2020 13:26:19 +0200

> sg_init_table zeroes its first argument, so the allocation of that argument
> doesn't have to.
> 
> the semantic patch that makes this change is as follows:
> (http://coccinelle.lip6.fr/)
> 
> // <smpl>
> @@
> expression x,n,flags;
> @@
> 
> x = 
> - kcalloc
> + kmalloc_array
>   (n,sizeof(*x),flags)
> ...
> sg_init_table(x,n)
> // </smpl>
> 
> Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

Applied.

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

* Re: [PATCH 07/14] RDS: drop double zeroing
@ 2020-09-21  2:09     ` David Miller
  0 siblings, 0 replies; 64+ messages in thread
From: David Miller @ 2020-09-21  2:09 UTC (permalink / raw)
  To: Julia.Lawall
  Cc: santosh.shilimkar, kernel-janitors, kuba, netdev, linux-rdma,
	rds-devel, linux-kernel

From: Julia Lawall <Julia.Lawall@inria.fr>
Date: Sun, 20 Sep 2020 13:26:19 +0200

> sg_init_table zeroes its first argument, so the allocation of that argument
> doesn't have to.
> 
> the semantic patch that makes this change is as follows:
> (http://coccinelle.lip6.fr/)
> 
> // <smpl>
> @@
> expression x,n,flags;
> @@
> 
> x = 
> - kcalloc
> + kmalloc_array
>   (n,sizeof(*x),flags)
> ...
> sg_init_table(x,n)
> // </smpl>
> 
> Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

Applied.

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

* Re: [PATCH 05/14] RDMA/efa: drop double zeroing
  2020-09-20 11:26   ` Julia Lawall
@ 2020-09-21  7:13     ` Gal Pressman
  -1 siblings, 0 replies; 64+ messages in thread
From: Gal Pressman @ 2020-09-21  7:13 UTC (permalink / raw)
  To: Julia Lawall
  Cc: kernel-janitors, Yossi Leybovich, Doug Ledford, Jason Gunthorpe,
	linux-rdma, linux-kernel

On 20/09/2020 14:26, Julia Lawall wrote:
> sg_init_table zeroes its first argument, so the allocation of that argument
> doesn't have to.
> 
> the semantic patch that makes this change is as follows:
> (http://coccinelle.lip6.fr/)
> 
> // <smpl>
> @@
> expression x,n,flags;
> @@
> 
> x = 
> - kcalloc
> + kmalloc_array
>   (n,sizeof(*x),flags)
> ...
> sg_init_table(x,n)
> // </smpl>
> 
> Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

Thanks Julia,
Acked-by: Gal Pressman <galpress@amazon.com>

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

* Re: [PATCH 05/14] RDMA/efa: drop double zeroing
@ 2020-09-21  7:13     ` Gal Pressman
  0 siblings, 0 replies; 64+ messages in thread
From: Gal Pressman @ 2020-09-21  7:13 UTC (permalink / raw)
  To: Julia Lawall
  Cc: kernel-janitors, Yossi Leybovich, Doug Ledford, Jason Gunthorpe,
	linux-rdma, linux-kernel

On 20/09/2020 14:26, Julia Lawall wrote:
> sg_init_table zeroes its first argument, so the allocation of that argument
> doesn't have to.
> 
> the semantic patch that makes this change is as follows:
> (http://coccinelle.lip6.fr/)
> 
> // <smpl>
> @@
> expression x,n,flags;
> @@
> 
> x = 
> - kcalloc
> + kmalloc_array
>   (n,sizeof(*x),flags)
> ...
> sg_init_table(x,n)
> // </smpl>
> 
> Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

Thanks Julia,
Acked-by: Gal Pressman <galpress@amazon.com>

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

* Re: [PATCH 00/14] drop double zeroing
  2020-09-20 11:26 ` Julia Lawall
@ 2020-09-21 16:58   ` Mark Brown
  -1 siblings, 0 replies; 64+ messages in thread
From: Mark Brown @ 2020-09-21 16:58 UTC (permalink / raw)
  To: linux-spi, Julia Lawall
  Cc: linux-serial, linux-scsi, target-devel, kernel-janitors,
	linux-media, linux-block, Yossi Leybovich, linux-kernel,
	linux-nfs, dmaengine, linux-pci, netdev, linux-wireless,
	linux-rdma, Dan Williams, rds-devel

On Sun, 20 Sep 2020 13:26:12 +0200, Julia Lawall wrote:
> sg_init_table zeroes its first argument, so the allocation of that argument
> doesn't have to.

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next

Thanks!

[1/1] spi/topcliff-pch: drop double zeroing
      commit: ca03dba30f2b8ff45a2972c6691e4c96d8c52b3b

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

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

* Re: [PATCH 00/14] drop double zeroing
@ 2020-09-21 16:58   ` Mark Brown
  0 siblings, 0 replies; 64+ messages in thread
From: Mark Brown @ 2020-09-21 16:58 UTC (permalink / raw)
  To: linux-spi, Julia Lawall
  Cc: linux-serial, linux-scsi, target-devel, kernel-janitors,
	linux-media, linux-block, Yossi Leybovich, linux-kernel,
	linux-nfs, dmaengine, linux-pci, netdev, linux-wireless,
	linux-rdma, Dan Williams, rds-devel

On Sun, 20 Sep 2020 13:26:12 +0200, Julia Lawall wrote:
> sg_init_table zeroes its first argument, so the allocation of that argument
> doesn't have to.

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next

Thanks!

[1/1] spi/topcliff-pch: drop double zeroing
      commit: ca03dba30f2b8ff45a2972c6691e4c96d8c52b3b

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

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

* Re: [PATCH 05/14] RDMA/efa: drop double zeroing
  2020-09-20 11:26   ` Julia Lawall
@ 2020-09-22 23:27     ` Jason Gunthorpe
  -1 siblings, 0 replies; 64+ messages in thread
From: Jason Gunthorpe @ 2020-09-22 23:27 UTC (permalink / raw)
  To: Julia Lawall
  Cc: Gal Pressman, kernel-janitors, Yossi Leybovich, Doug Ledford,
	linux-rdma, linux-kernel

On Sun, Sep 20, 2020 at 01:26:17PM +0200, Julia Lawall wrote:
> sg_init_table zeroes its first argument, so the allocation of that argument
> doesn't have to.
> 
> the semantic patch that makes this change is as follows:
> (http://coccinelle.lip6.fr/)
> 
> // <smpl>
> @@
> expression x,n,flags;
> @@
> 
> x = 
> - kcalloc
> + kmalloc_array
>   (n,sizeof(*x),flags)
> ...
> sg_init_table(x,n)
> // </smpl>
> 
> Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>
> Acked-by: Gal Pressman <galpress@amazon.com>
> ---
>  drivers/infiniband/hw/efa/efa_verbs.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied to rdma.git for-next, thanks

Jason

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

* Re: [PATCH 05/14] RDMA/efa: drop double zeroing
@ 2020-09-22 23:27     ` Jason Gunthorpe
  0 siblings, 0 replies; 64+ messages in thread
From: Jason Gunthorpe @ 2020-09-22 23:27 UTC (permalink / raw)
  To: Julia Lawall
  Cc: Gal Pressman, kernel-janitors, Yossi Leybovich, Doug Ledford,
	linux-rdma, linux-kernel

On Sun, Sep 20, 2020 at 01:26:17PM +0200, Julia Lawall wrote:
> sg_init_table zeroes its first argument, so the allocation of that argument
> doesn't have to.
> 
> the semantic patch that makes this change is as follows:
> (http://coccinelle.lip6.fr/)
> 
> // <smpl>
> @@
> expression x,n,flags;
> @@
> 
> x = 
> - kcalloc
> + kmalloc_array
>   (n,sizeof(*x),flags)
> ...
> sg_init_table(x,n)
> // </smpl>
> 
> Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>
> Acked-by: Gal Pressman <galpress@amazon.com>
> ---
>  drivers/infiniband/hw/efa/efa_verbs.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied to rdma.git for-next, thanks

Jason

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

* Re: [PATCH 00/14] drop double zeroing
  2020-09-21 16:58   ` Mark Brown
@ 2020-09-23 15:10     ` Rolf Reintjes
  -1 siblings, 0 replies; 64+ messages in thread
From: Rolf Reintjes @ 2020-09-23 15:10 UTC (permalink / raw)
  To: Mark Brown, linux-spi, Julia Lawall
  Cc: linux-serial, linux-scsi, target-devel, kernel-janitors,
	linux-media, linux-block, Yossi Leybovich, linux-kernel,
	linux-nfs, dmaengine, linux-pci, netdev, linux-wireless,
	linux-rdma, Dan Williams, rds-devel

Hello Mark,

On 21.09.20 18:58, Mark Brown wrote:
> On Sun, 20 Sep 2020 13:26:12 +0200, Julia Lawall wrote:
>> sg_init_table zeroes its first argument, so the allocation of that argument
>> doesn't have to.
> 
> Applied to
> 
>     https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next
> 
> Thanks!

I do not understand which of the 14 patches you applied. Your mail 
responds to the 00/14 mail.

Rolf

> 
> [1/1] spi/topcliff-pch: drop double zeroing
>        commit: ca03dba30f2b8ff45a2972c6691e4c96d8c52b3b
> 
> All being well this means that it will be integrated into the linux-next
> tree (usually sometime in the next 24 hours) and sent to Linus during
> the next merge window (or sooner if it is a bug fix), however if
> problems are discovered then the patch may be dropped or reverted.
> 
> You may get further e-mails resulting from automated or manual testing
> and review of the tree, please engage with people reporting problems and
> send followup patches addressing any issues that are reported if needed.
> 
> If any updates are required or you are submitting further changes they
> should be sent as incremental updates against current git, existing
> patches will not be replaced.
> 
> Please add any relevant lists and maintainers to the CCs when replying
> to this mail.
> 
> Thanks,
> Mark
> 


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

* Re: [PATCH 00/14] drop double zeroing
@ 2020-09-23 15:10     ` Rolf Reintjes
  0 siblings, 0 replies; 64+ messages in thread
From: Rolf Reintjes @ 2020-09-23 15:10 UTC (permalink / raw)
  To: Mark Brown, linux-spi, Julia Lawall
  Cc: linux-serial, linux-scsi, target-devel, kernel-janitors,
	linux-media, linux-block, Yossi Leybovich, linux-kernel,
	linux-nfs, dmaengine, linux-pci, netdev, linux-wireless,
	linux-rdma, Dan Williams, rds-devel

Hello Mark,

On 21.09.20 18:58, Mark Brown wrote:
> On Sun, 20 Sep 2020 13:26:12 +0200, Julia Lawall wrote:
>> sg_init_table zeroes its first argument, so the allocation of that argument
>> doesn't have to.
> 
> Applied to
> 
>     https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next
> 
> Thanks!

I do not understand which of the 14 patches you applied. Your mail 
responds to the 00/14 mail.

Rolf

> 
> [1/1] spi/topcliff-pch: drop double zeroing
>        commit: ca03dba30f2b8ff45a2972c6691e4c96d8c52b3b
> 
> All being well this means that it will be integrated into the linux-next
> tree (usually sometime in the next 24 hours) and sent to Linus during
> the next merge window (or sooner if it is a bug fix), however if
> problems are discovered then the patch may be dropped or reverted.
> 
> You may get further e-mails resulting from automated or manual testing
> and review of the tree, please engage with people reporting problems and
> send followup patches addressing any issues that are reported if needed.
> 
> If any updates are required or you are submitting further changes they
> should be sent as incremental updates against current git, existing
> patches will not be replaced.
> 
> Please add any relevant lists and maintainers to the CCs when replying
> to this mail.
> 
> Thanks,
> Mark
> 

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

* Re: [PATCH 00/14] drop double zeroing
  2020-09-23 15:10     ` Rolf Reintjes
@ 2020-09-23 15:16       ` Mark Brown
  -1 siblings, 0 replies; 64+ messages in thread
From: Mark Brown @ 2020-09-23 15:16 UTC (permalink / raw)
  To: Rolf Reintjes
  Cc: linux-spi, Julia Lawall, linux-serial, linux-scsi, target-devel,
	kernel-janitors, linux-media, linux-block, Yossi Leybovich,
	linux-kernel, linux-nfs, dmaengine, linux-pci, netdev,
	linux-wireless, linux-rdma, Dan Williams, rds-devel

[-- Attachment #1: Type: text/plain, Size: 349 bytes --]

On Wed, Sep 23, 2020 at 05:10:33PM +0200, Rolf Reintjes wrote:
> On 21.09.20 18:58, Mark Brown wrote:

> I do not understand which of the 14 patches you applied. Your mail responds
> to the 00/14 mail.

As the mail you're replying to says:

> > [1/1] spi/topcliff-pch: drop double zeroing
> >        commit: ca03dba30f2b8ff45a2972c6691e4c96d8c52b3b

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH 00/14] drop double zeroing
@ 2020-09-23 15:16       ` Mark Brown
  0 siblings, 0 replies; 64+ messages in thread
From: Mark Brown @ 2020-09-23 15:16 UTC (permalink / raw)
  To: Rolf Reintjes
  Cc: linux-spi, Julia Lawall, linux-serial, linux-scsi, target-devel,
	kernel-janitors, linux-media, linux-block, Yossi Leybovich,
	linux-kernel, linux-nfs, dmaengine, linux-pci, netdev,
	linux-wireless, linux-rdma, Dan Williams, rds-devel

[-- Attachment #1: Type: text/plain, Size: 349 bytes --]

On Wed, Sep 23, 2020 at 05:10:33PM +0200, Rolf Reintjes wrote:
> On 21.09.20 18:58, Mark Brown wrote:

> I do not understand which of the 14 patches you applied. Your mail responds
> to the 00/14 mail.

As the mail you're replying to says:

> > [1/1] spi/topcliff-pch: drop double zeroing
> >        commit: ca03dba30f2b8ff45a2972c6691e4c96d8c52b3b

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH 06/14] block: drop double zeroing
  2020-09-20 11:26   ` Julia Lawall
@ 2020-09-23 15:18     ` Jens Axboe
  -1 siblings, 0 replies; 64+ messages in thread
From: Jens Axboe @ 2020-09-23 15:18 UTC (permalink / raw)
  To: Julia Lawall; +Cc: kernel-janitors, linux-block, linux-kernel

On 9/20/20 5:26 AM, Julia Lawall wrote:
> sg_init_table zeroes its first argument, so the allocation of that argument
> doesn't have to.
> 
> the semantic patch that makes this change is as follows:
> (http://coccinelle.lip6.fr/)
> 
> // <smpl>
> @@
> expression x;
> @@
> 
> x =
> - kzalloc
> + kmalloc
>  (...)
> ...
> sg_init_table(x,...)
> // </smpl>

Applied for 5.10, thanks.

-- 
Jens Axboe


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

* Re: [PATCH 06/14] block: drop double zeroing
@ 2020-09-23 15:18     ` Jens Axboe
  0 siblings, 0 replies; 64+ messages in thread
From: Jens Axboe @ 2020-09-23 15:18 UTC (permalink / raw)
  To: Julia Lawall; +Cc: kernel-janitors, linux-block, linux-kernel

On 9/20/20 5:26 AM, Julia Lawall wrote:
> sg_init_table zeroes its first argument, so the allocation of that argument
> doesn't have to.
> 
> the semantic patch that makes this change is as follows:
> (http://coccinelle.lip6.fr/)
> 
> // <smpl>
> @@
> expression x;
> @@
> 
> x > - kzalloc
> + kmalloc
>  (...)
> ...
> sg_init_table(x,...)
> // </smpl>

Applied for 5.10, thanks.

-- 
Jens Axboe

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

* Re: [PATCH 01/14] pch_uart: drop double zeroing
  2020-09-20 12:47       ` Julia Lawall
@ 2020-09-27 12:11         ` Greg Kroah-Hartman
  -1 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2020-09-27 12:11 UTC (permalink / raw)
  To: Julia Lawall; +Cc: kernel-janitors, Jiri Slaby, linux-serial, linux-kernel

On Sun, Sep 20, 2020 at 02:47:11PM +0200, Julia Lawall wrote:
> 
> 
> On Sun, 20 Sep 2020, Greg Kroah-Hartman wrote:
> 
> > On Sun, Sep 20, 2020 at 01:26:13PM +0200, Julia Lawall wrote:
> > > sg_init_table zeroes its first argument, so the allocation of that argument
> > > doesn't have to.
> > >
> > > the semantic patch that makes this change is as follows:
> > > (http://coccinelle.lip6.fr/)
> > >
> > > // <smpl>
> > > @@
> > > expression x,n,flags;
> > > @@
> > >
> > > x =
> > > - kcalloc
> > > + kmalloc_array
> > >   (n,sizeof(struct scatterlist),flags)
> > > ...
> > > sg_init_table(x,n)
> > > // </smpl>
> > >
> > > Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>
> >
> > It inits the first entry in the array, but what about all of the other
> > ones?  Is that "safe" to have uninitialized data in them like your
> > change causes to happen?
> 
> Sorry, I don't follow.  The complete code is:
> 
>         priv->sg_tx_p = kcalloc(num, sizeof(struct scatterlist), GFP_ATOMIC);
>         if (!priv->sg_tx_p) {
> 		dev_err(priv->port.dev, "%s:kzalloc Failed\n", __func__);
>                 return 0;
> 	}
> 
> 	sg_init_table(priv->sg_tx_p, num); /* Initialize SG table */
> 
> and the definition of sg_init_table is:
> 
> void sg_init_table(struct scatterlist *sgl, unsigned int nents)
> {
> 	memset(sgl, 0, sizeof(*sgl) * nents);
> 	sg_init_marker(sgl, nents);
> }

Ah, missed the "* nents" thing there, sorry, my fault.

greg k-h

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

* Re: [PATCH 01/14] pch_uart: drop double zeroing
@ 2020-09-27 12:11         ` Greg Kroah-Hartman
  0 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2020-09-27 12:11 UTC (permalink / raw)
  To: Julia Lawall; +Cc: kernel-janitors, Jiri Slaby, linux-serial, linux-kernel

On Sun, Sep 20, 2020 at 02:47:11PM +0200, Julia Lawall wrote:
> 
> 
> On Sun, 20 Sep 2020, Greg Kroah-Hartman wrote:
> 
> > On Sun, Sep 20, 2020 at 01:26:13PM +0200, Julia Lawall wrote:
> > > sg_init_table zeroes its first argument, so the allocation of that argument
> > > doesn't have to.
> > >
> > > the semantic patch that makes this change is as follows:
> > > (http://coccinelle.lip6.fr/)
> > >
> > > // <smpl>
> > > @@
> > > expression x,n,flags;
> > > @@
> > >
> > > x > > > - kcalloc
> > > + kmalloc_array
> > >   (n,sizeof(struct scatterlist),flags)
> > > ...
> > > sg_init_table(x,n)
> > > // </smpl>
> > >
> > > Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>
> >
> > It inits the first entry in the array, but what about all of the other
> > ones?  Is that "safe" to have uninitialized data in them like your
> > change causes to happen?
> 
> Sorry, I don't follow.  The complete code is:
> 
>         priv->sg_tx_p = kcalloc(num, sizeof(struct scatterlist), GFP_ATOMIC);
>         if (!priv->sg_tx_p) {
> 		dev_err(priv->port.dev, "%s:kzalloc Failed\n", __func__);
>                 return 0;
> 	}
> 
> 	sg_init_table(priv->sg_tx_p, num); /* Initialize SG table */
> 
> and the definition of sg_init_table is:
> 
> void sg_init_table(struct scatterlist *sgl, unsigned int nents)
> {
> 	memset(sgl, 0, sizeof(*sgl) * nents);
> 	sg_init_marker(sgl, nents);
> }

Ah, missed the "* nents" thing there, sorry, my fault.

greg k-h

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

* Re: [PATCH 14/14] PCI/P2PDMA: drop double zeroing
  2020-09-20 11:26   ` Julia Lawall
@ 2020-09-28 22:24     ` Bjorn Helgaas
  -1 siblings, 0 replies; 64+ messages in thread
From: Bjorn Helgaas @ 2020-09-28 22:24 UTC (permalink / raw)
  To: Julia Lawall; +Cc: Bjorn Helgaas, kernel-janitors, linux-pci, linux-kernel

On Sun, Sep 20, 2020 at 01:26:26PM +0200, Julia Lawall wrote:
> sg_init_table zeroes its first argument, so the allocation of that argument
> doesn't have to.
> 
> the semantic patch that makes this change is as follows:
> (http://coccinelle.lip6.fr/)
> 
> // <smpl>
> @@
> expression x;
> @@
> 
> x =
> - kzalloc
> + kmalloc
>  (...)
> ...
> sg_init_table(x,...)
> // </smpl>
> 
> Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

Applied to pci/misc for v5.10, thanks!

> ---
>  drivers/pci/p2pdma.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff -u -p a/drivers/pci/p2pdma.c b/drivers/pci/p2pdma.c
> --- a/drivers/pci/p2pdma.c
> +++ b/drivers/pci/p2pdma.c
> @@ -762,7 +762,7 @@ struct scatterlist *pci_p2pmem_alloc_sgl
>  	struct scatterlist *sg;
>  	void *addr;
>  
> -	sg = kzalloc(sizeof(*sg), GFP_KERNEL);
> +	sg = kmalloc(sizeof(*sg), GFP_KERNEL);
>  	if (!sg)
>  		return NULL;
>  
> 

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

* Re: [PATCH 14/14] PCI/P2PDMA: drop double zeroing
@ 2020-09-28 22:24     ` Bjorn Helgaas
  0 siblings, 0 replies; 64+ messages in thread
From: Bjorn Helgaas @ 2020-09-28 22:24 UTC (permalink / raw)
  To: Julia Lawall; +Cc: Bjorn Helgaas, kernel-janitors, linux-pci, linux-kernel

On Sun, Sep 20, 2020 at 01:26:26PM +0200, Julia Lawall wrote:
> sg_init_table zeroes its first argument, so the allocation of that argument
> doesn't have to.
> 
> the semantic patch that makes this change is as follows:
> (http://coccinelle.lip6.fr/)
> 
> // <smpl>
> @@
> expression x;
> @@
> 
> x > - kzalloc
> + kmalloc
>  (...)
> ...
> sg_init_table(x,...)
> // </smpl>
> 
> Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

Applied to pci/misc for v5.10, thanks!

> ---
>  drivers/pci/p2pdma.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff -u -p a/drivers/pci/p2pdma.c b/drivers/pci/p2pdma.c
> --- a/drivers/pci/p2pdma.c
> +++ b/drivers/pci/p2pdma.c
> @@ -762,7 +762,7 @@ struct scatterlist *pci_p2pmem_alloc_sgl
>  	struct scatterlist *sg;
>  	void *addr;
>  
> -	sg = kzalloc(sizeof(*sg), GFP_KERNEL);
> +	sg = kmalloc(sizeof(*sg), GFP_KERNEL);
>  	if (!sg)
>  		return NULL;
>  
> 

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

* Re: [PATCH 04/14] dmaengine: sh: drop double zeroing
  2020-09-20 11:26   ` Julia Lawall
@ 2020-10-05  4:48     ` Vinod Koul
  -1 siblings, 0 replies; 64+ messages in thread
From: Vinod Koul @ 2020-10-05  4:48 UTC (permalink / raw)
  To: Julia Lawall; +Cc: Dan Williams, kernel-janitors, dmaengine, linux-kernel

On 20-09-20, 13:26, Julia Lawall wrote:
> sg_init_table zeroes its first argument, so the allocation of that argument
> doesn't have to.
> 
> the semantic patch that makes this change is as follows:
> (http://coccinelle.lip6.fr/)

Applied, thanks

-- 
~Vinod

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

* Re: [PATCH 04/14] dmaengine: sh: drop double zeroing
@ 2020-10-05  4:48     ` Vinod Koul
  0 siblings, 0 replies; 64+ messages in thread
From: Vinod Koul @ 2020-10-05  4:48 UTC (permalink / raw)
  To: Julia Lawall; +Cc: Dan Williams, kernel-janitors, dmaengine, linux-kernel

On 20-09-20, 13:26, Julia Lawall wrote:
> sg_init_table zeroes its first argument, so the allocation of that argument
> doesn't have to.
> 
> the semantic patch that makes this change is as follows:
> (http://coccinelle.lip6.fr/)

Applied, thanks

-- 
~Vinod

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

* Re: [PATCH 09/14] dmaengine: rcar-dmac: drop double zeroing
  2020-09-20 11:26   ` Julia Lawall
@ 2020-10-05  4:48     ` Vinod Koul
  -1 siblings, 0 replies; 64+ messages in thread
From: Vinod Koul @ 2020-10-05  4:48 UTC (permalink / raw)
  To: Julia Lawall; +Cc: kernel-janitors, Dan Williams, dmaengine, linux-kernel

On 20-09-20, 13:26, Julia Lawall wrote:
> sg_init_table zeroes its first argument, so the allocation of that argument
> doesn't have to.
> 
> the semantic patch that makes this change is as follows:
> (http://coccinelle.lip6.fr/)

Applied, thanks

-- 
~Vinod

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

* Re: [PATCH 09/14] dmaengine: rcar-dmac: drop double zeroing
@ 2020-10-05  4:48     ` Vinod Koul
  0 siblings, 0 replies; 64+ messages in thread
From: Vinod Koul @ 2020-10-05  4:48 UTC (permalink / raw)
  To: Julia Lawall; +Cc: kernel-janitors, Dan Williams, dmaengine, linux-kernel

On 20-09-20, 13:26, Julia Lawall wrote:
> sg_init_table zeroes its first argument, so the allocation of that argument
> doesn't have to.
> 
> the semantic patch that makes this change is as follows:
> (http://coccinelle.lip6.fr/)

Applied, thanks

-- 
~Vinod

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

* Re: [PATCH 02/14] target/rd: drop double zeroing
  2020-09-20 11:26   ` Julia Lawall
@ 2020-10-08  2:31     ` Martin K. Petersen
  -1 siblings, 0 replies; 64+ messages in thread
From: Martin K. Petersen @ 2020-10-08  2:31 UTC (permalink / raw)
  To: Julia Lawall
  Cc: Martin K. Petersen, kernel-janitors, linux-scsi, target-devel,
	linux-kernel


Julia,

> sg_init_table zeroes its first argument, so the allocation of that argument
> doesn't have to.

Applied to 5.10/scsi-staging, thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering

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

* Re: [PATCH 02/14] target/rd: drop double zeroing
@ 2020-10-08  2:31     ` Martin K. Petersen
  0 siblings, 0 replies; 64+ messages in thread
From: Martin K. Petersen @ 2020-10-08  2:31 UTC (permalink / raw)
  To: Julia Lawall
  Cc: Martin K. Petersen, kernel-janitors, linux-scsi, target-devel,
	linux-kernel


Julia,

> sg_init_table zeroes its first argument, so the allocation of that argument
> doesn't have to.

Applied to 5.10/scsi-staging, thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering

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

* Re: [PATCH 00/14] drop double zeroing
  2020-09-20 11:26 ` Julia Lawall
@ 2020-10-13 22:42   ` Martin K. Petersen
  -1 siblings, 0 replies; 64+ messages in thread
From: Martin K. Petersen @ 2020-10-13 22:42 UTC (permalink / raw)
  To: linux-spi, Julia Lawall
  Cc: Martin K . Petersen, linux-kernel, linux-pci, dmaengine,
	kernel-janitors, linux-media, target-devel, linux-rdma,
	linux-wireless, netdev, Dan Williams, linux-serial, linux-nfs,
	linux-scsi, Yossi Leybovich, linux-block, rds-devel

On Sun, 20 Sep 2020 13:26:12 +0200, Julia Lawall wrote:

> sg_init_table zeroes its first argument, so the allocation of that argument
> doesn't have to.

Applied to 5.10/scsi-queue, thanks!

[02/14] scsi: target: rd: Drop double zeroing
        https://git.kernel.org/mkp/scsi/c/4b217e015b75

-- 
Martin K. Petersen	Oracle Linux Engineering

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

* Re: [PATCH 00/14] drop double zeroing
@ 2020-10-13 22:42   ` Martin K. Petersen
  0 siblings, 0 replies; 64+ messages in thread
From: Martin K. Petersen @ 2020-10-13 22:42 UTC (permalink / raw)
  To: linux-spi, Julia Lawall
  Cc: Martin K . Petersen, linux-kernel, linux-pci, dmaengine,
	kernel-janitors, linux-media, target-devel, linux-rdma,
	linux-wireless, netdev, Dan Williams, linux-serial, linux-nfs,
	linux-scsi, Yossi Leybovich, linux-block, rds-devel

On Sun, 20 Sep 2020 13:26:12 +0200, Julia Lawall wrote:

> sg_init_table zeroes its first argument, so the allocation of that argument
> doesn't have to.

Applied to 5.10/scsi-queue, thanks!

[02/14] scsi: target: rd: Drop double zeroing
        https://git.kernel.org/mkp/scsi/c/4b217e015b75

-- 
Martin K. Petersen	Oracle Linux Engineering

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

end of thread, other threads:[~2020-10-13 22:44 UTC | newest]

Thread overview: 64+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-20 11:26 [PATCH 00/14] drop double zeroing Julia Lawall
2020-09-20 11:26 ` Julia Lawall
2020-09-20 11:26 ` [PATCH 01/14] pch_uart: " Julia Lawall
2020-09-20 11:26   ` Julia Lawall
2020-09-20 12:14   ` Greg Kroah-Hartman
2020-09-20 12:14     ` Greg Kroah-Hartman
2020-09-20 12:47     ` Julia Lawall
2020-09-20 12:47       ` Julia Lawall
2020-09-27 12:11       ` Greg Kroah-Hartman
2020-09-27 12:11         ` Greg Kroah-Hartman
2020-09-20 11:26 ` [PATCH 02/14] target/rd: " Julia Lawall
2020-09-20 11:26   ` Julia Lawall
2020-10-08  2:31   ` Martin K. Petersen
2020-10-08  2:31     ` Martin K. Petersen
2020-09-20 11:26 ` [PATCH 03/14] dpaa2-eth: " Julia Lawall
2020-09-20 11:26   ` Julia Lawall
2020-09-21  2:09   ` David Miller
2020-09-21  2:09     ` David Miller
2020-09-20 11:26 ` [PATCH 04/14] dmaengine: sh: " Julia Lawall
2020-09-20 11:26   ` Julia Lawall
2020-10-05  4:48   ` Vinod Koul
2020-10-05  4:48     ` Vinod Koul
2020-09-20 11:26 ` [PATCH 05/14] RDMA/efa: " Julia Lawall
2020-09-20 11:26   ` Julia Lawall
2020-09-21  7:13   ` Gal Pressman
2020-09-21  7:13     ` Gal Pressman
2020-09-22 23:27   ` Jason Gunthorpe
2020-09-22 23:27     ` Jason Gunthorpe
2020-09-20 11:26 ` [PATCH 06/14] block: " Julia Lawall
2020-09-20 11:26   ` Julia Lawall
2020-09-23 15:18   ` Jens Axboe
2020-09-23 15:18     ` Jens Axboe
2020-09-20 11:26 ` [PATCH 07/14] RDS: " Julia Lawall
2020-09-20 11:26   ` Julia Lawall
2020-09-21  2:09   ` David Miller
2020-09-21  2:09     ` David Miller
2020-09-20 11:26 ` [PATCH 08/14] xprtrdma: " Julia Lawall
2020-09-20 11:26   ` Julia Lawall
2020-09-20 15:37   ` Chuck Lever
2020-09-20 15:37     ` Chuck Lever
2020-09-20 11:26 ` [PATCH 09/14] dmaengine: rcar-dmac: " Julia Lawall
2020-09-20 11:26   ` Julia Lawall
2020-10-05  4:48   ` Vinod Koul
2020-10-05  4:48     ` Vinod Koul
2020-09-20 11:26 ` [PATCH 10/14] iwlwifi: dbg_ini: " Julia Lawall
2020-09-20 11:26   ` Julia Lawall
2020-09-20 11:26 ` [PATCH 11/14] spi/topcliff-pch: " Julia Lawall
2020-09-20 11:26   ` Julia Lawall
2020-09-20 11:26 ` [PATCH 12/14] [media] saa7146: " Julia Lawall
2020-09-20 11:26   ` Julia Lawall
2020-09-20 11:26 ` [PATCH 13/14] misc: mic: " Julia Lawall
2020-09-20 11:26   ` Julia Lawall
2020-09-20 11:26 ` [PATCH 14/14] PCI/P2PDMA: " Julia Lawall
2020-09-20 11:26   ` Julia Lawall
2020-09-28 22:24   ` Bjorn Helgaas
2020-09-28 22:24     ` Bjorn Helgaas
2020-09-21 16:58 ` [PATCH 00/14] " Mark Brown
2020-09-21 16:58   ` Mark Brown
2020-09-23 15:10   ` Rolf Reintjes
2020-09-23 15:10     ` Rolf Reintjes
2020-09-23 15:16     ` Mark Brown
2020-09-23 15:16       ` Mark Brown
2020-10-13 22:42 ` Martin K. Petersen
2020-10-13 22:42   ` Martin K. Petersen

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.