]> git.baikalelectronics.ru Git - kernel.git/commit
PCI/P2PDMA: Drop double zeroing for sg_init_table()
authorJulia Lawall <Julia.Lawall@inria.fr>
Sun, 20 Sep 2020 11:26:26 +0000 (13:26 +0200)
committerBjorn Helgaas <bhelgaas@google.com>
Wed, 30 Sep 2020 21:51:32 +0000 (16:51 -0500)
commit8246fa0a9f717307076f9232fabc6aac20918c95
tree86a91280a1d360af86f052c25b71ef9330eb7441
parent2ad2b31f8904e6dff1b8d3a8c82baf68680143b9
PCI/P2PDMA: Drop double zeroing for sg_init_table()

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>

Link: https://lore.kernel.org/r/1600601186-7420-15-git-send-email-Julia.Lawall@inria.fr
Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/p2pdma.c