dmaengine Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH 00/14] drop double zeroing
@ 2020-09-20 11:26 Julia Lawall
  2020-09-20 11:26 ` [PATCH 04/14] dmaengine: sh: " Julia Lawall
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ 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] 9+ messages in thread

* [PATCH 04/14] dmaengine: sh: drop double zeroing
  2020-09-20 11:26 [PATCH 00/14] drop double zeroing Julia Lawall
@ 2020-09-20 11:26 ` Julia Lawall
  2020-10-05  4:48   ` Vinod Koul
  2020-09-20 11:26 ` [PATCH 09/14] dmaengine: rcar-dmac: " Julia Lawall
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 9+ 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] 9+ messages in thread

* [PATCH 09/14] dmaengine: rcar-dmac: drop double zeroing
  2020-09-20 11:26 [PATCH 00/14] drop double zeroing Julia Lawall
  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-09-21 16:58 ` [PATCH 00/14] " Mark Brown
  2020-10-13 22:42 ` Martin K. Petersen
  3 siblings, 1 reply; 9+ 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] 9+ messages in thread

* Re: [PATCH 00/14] drop double zeroing
  2020-09-20 11:26 [PATCH 00/14] drop double zeroing Julia Lawall
  2020-09-20 11:26 ` [PATCH 04/14] dmaengine: sh: " Julia Lawall
  2020-09-20 11:26 ` [PATCH 09/14] dmaengine: rcar-dmac: " Julia Lawall
@ 2020-09-21 16:58 ` Mark Brown
  2020-09-23 15:10   ` Rolf Reintjes
  2020-10-13 22:42 ` Martin K. Petersen
  3 siblings, 1 reply; 9+ 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] 9+ messages in thread

* Re: [PATCH 00/14] drop double zeroing
  2020-09-21 16:58 ` [PATCH 00/14] " Mark Brown
@ 2020-09-23 15:10   ` Rolf Reintjes
  2020-09-23 15:16     ` Mark Brown
  0 siblings, 1 reply; 9+ 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] 9+ messages in thread

* Re: [PATCH 00/14] drop double zeroing
  2020-09-23 15:10   ` Rolf Reintjes
@ 2020-09-23 15:16     ` Mark Brown
  0 siblings, 0 replies; 9+ 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] 9+ messages in thread

* Re: [PATCH 04/14] dmaengine: sh: drop double zeroing
  2020-09-20 11:26 ` [PATCH 04/14] dmaengine: sh: " Julia Lawall
@ 2020-10-05  4:48   ` Vinod Koul
  0 siblings, 0 replies; 9+ 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] 9+ messages in thread

* Re: [PATCH 09/14] dmaengine: rcar-dmac: drop double zeroing
  2020-09-20 11:26 ` [PATCH 09/14] dmaengine: rcar-dmac: " Julia Lawall
@ 2020-10-05  4:48   ` Vinod Koul
  0 siblings, 0 replies; 9+ 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] 9+ messages in thread

* Re: [PATCH 00/14] drop double zeroing
  2020-09-20 11:26 [PATCH 00/14] drop double zeroing Julia Lawall
                   ` (2 preceding siblings ...)
  2020-09-21 16:58 ` [PATCH 00/14] " Mark Brown
@ 2020-10-13 22:42 ` Martin K. Petersen
  3 siblings, 0 replies; 9+ 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] 9+ messages in thread

end of thread, back to index

Thread overview: 9+ 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 ` [PATCH 04/14] dmaengine: sh: " Julia Lawall
2020-10-05  4:48   ` Vinod Koul
2020-09-20 11:26 ` [PATCH 09/14] dmaengine: rcar-dmac: " Julia Lawall
2020-10-05  4:48   ` Vinod Koul
2020-09-21 16:58 ` [PATCH 00/14] " Mark Brown
2020-09-23 15:10   ` Rolf Reintjes
2020-09-23 15:16     ` Mark Brown
2020-10-13 22:42 ` Martin K. Petersen

dmaengine Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/dmaengine/0 dmaengine/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dmaengine dmaengine/ https://lore.kernel.org/dmaengine \
		dmaengine@vger.kernel.org
	public-inbox-index dmaengine

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.dmaengine


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git