]> git.baikalelectronics.ru Git - kernel.git/commit
IB/hfi1: Use kcalloc() in hfi1_user_sdma_alloc_queues()
authorMarkus Elfring <elfring@users.sourceforge.net>
Thu, 9 Feb 2017 15:06:12 +0000 (16:06 +0100)
committerDoug Ledford <dledford@redhat.com>
Thu, 20 Apr 2017 20:23:25 +0000 (16:23 -0400)
commit130ec2284d5099d6f5622096ee13dafabbf02c17
treef6ff653ac2b3b6ab5e30d1e01cd41a08e2971e03
parent47911c707096e41228a8f1e70aa56cd7ffba1a44
IB/hfi1: Use kcalloc() in hfi1_user_sdma_alloc_queues()

* Multiplications for the size determination of memory allocations
  indicated that array data structures should be processed.
  Thus reuse the corresponding function "kcalloc".

  This issue was detected by using the Coccinelle software.

* Replace the specification of a data type by a pointer dereference
  to make the corresponding size determination a bit safer according to
  the Linux coding style convention.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/hfi1/user_sdma.c