]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: PPC: e500: Replace kzalloc() calls by kcalloc() in two functions
authorMarkus Elfring <elfring@users.sourceforge.net>
Sun, 28 Aug 2016 16:30:38 +0000 (18:30 +0200)
committerPaul Mackerras <paulus@ozlabs.org>
Mon, 12 Sep 2016 00:12:56 +0000 (10:12 +1000)
commitda4218efc3687255c56eeb6269b661e6a801300d
tree9dd4fbcbc70f610fd24ddc9d94a549fa2310ba84
parent6cca6fc8d8b710655a9dcfba00f8c153f4c3f1ec
KVM: PPC: e500: Replace kzalloc() calls by kcalloc() in two functions

* A multiplication for the size determination of a memory allocation
  indicated that an array data structure should be processed.
  Thus use the corresponding function "kcalloc".

Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
  This issue was detected also by using the Coccinelle software.

* Replace the specification of data structures by pointer dereferences
  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: Paul Mackerras <paulus@ozlabs.org>
arch/powerpc/kvm/e500_mmu.c