aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc
diff options
context:
space:
mode:
authorSabyasachi Gupta <sabyasachi.linux@gmail.com>2018-11-03 10:54:52 +0530
committerDavid S. Miller <davem@davemloft.net>2018-11-18 18:58:35 -0800
commit86322ba9571a36b0b149a5f27fc3423c2dadbe39 (patch)
treee4aa2a7d7778666af15873782e7709bc06d490ad /arch/sparc
parentMerge tag 'libnvdimm-fixes-4.20-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm (diff)
downloadlinux-dev-86322ba9571a36b0b149a5f27fc3423c2dadbe39.tar.xz
linux-dev-86322ba9571a36b0b149a5f27fc3423c2dadbe39.zip
arch/sparc: Use kzalloc_node
Replaced kmalloc_node + memset with kzalloc_node Signed-off-by: Sabyasachi Gupta <sabyasachi.linux@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc')
-rw-r--r--arch/sparc/kernel/iommu.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/sparc/kernel/iommu.c b/arch/sparc/kernel/iommu.c
index 40d008b0bd3e..05eb016fc41b 100644
--- a/arch/sparc/kernel/iommu.c
+++ b/arch/sparc/kernel/iommu.c
@@ -108,10 +108,9 @@ int iommu_table_init(struct iommu *iommu, int tsbsize,
/* Allocate and initialize the free area map. */
sz = num_tsb_entries / 8;
sz = (sz + 7UL) & ~7UL;
- iommu->tbl.map = kmalloc_node(sz, GFP_KERNEL, numa_node);
+ iommu->tbl.map = kzalloc_node(sz, GFP_KERNEL, numa_node);
if (!iommu->tbl.map)
return -ENOMEM;
- memset(iommu->tbl.map, 0, sz);
iommu_tbl_pool_init(&iommu->tbl, num_tsb_entries, IO_PAGE_SHIFT,
(tlb_type != hypervisor ? iommu_flushall : NULL),