]> git.baikalelectronics.ru Git - kernel.git/commit
IB/hfi1: Use kcalloc() in hfi1_user_exp_rcv_init()
authorMarkus Elfring <elfring@users.sourceforge.net>
Thu, 9 Feb 2017 14:30:53 +0000 (15:30 +0100)
committerDoug Ledford <dledford@redhat.com>
Thu, 20 Apr 2017 20:23:25 +0000 (16:23 -0400)
commit47911c707096e41228a8f1e70aa56cd7ffba1a44
treeec41cd82720b5fbf4ffdc92e5f6e4e2353a2ab5c
parentd4f3ab8dd5e8a51cb36d6af6329b5faee6d7600a
IB/hfi1: Use kcalloc() in hfi1_user_exp_rcv_init()

* A multiplication for the size determination of a memory allocation
  indicated that an array data structure 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_exp_rcv.c