projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ab785cf
)
iommu/sun50i: Use __GFP_ZERO instead of memset()
author
Joerg Roedel
<jroedel@suse.de>
Thu, 14 May 2020 12:46:21 +0000
(14:46 +0200)
committer
Joerg Roedel
<jroedel@suse.de>
Thu, 14 May 2020 15:48:58 +0000
(17:48 +0200)
Allocate zeroed memory so there is no need to memset it to 0 in the
driver.
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Cc: Maxime Ripard <maxime@cerno.tech>
Link:
https://lore.kernel.org/r/20200514124621.25999-2-joro@8bytes.org
drivers/iommu/sun50i-iommu.c
patch
|
blob
|
history
diff --git
a/drivers/iommu/sun50i-iommu.c
b/drivers/iommu/sun50i-iommu.c
index a52f52eff7c805cfd3c56c0f7f4f981a90e19b7f..9c763d4a8e2a4c0e58a7538ab74777aff8a872f6 100644
(file)
--- a/
drivers/iommu/sun50i-iommu.c
+++ b/
drivers/iommu/sun50i-iommu.c
@@
-616,11
+616,10
@@
static struct iommu_domain *sun50i_iommu_domain_alloc(unsigned type)
iommu_get_dma_cookie(&sun50i_domain->domain))
goto err_free_domain;
- sun50i_domain->dt = (u32 *)__get_free_pages(GFP_KERNEL,
+ sun50i_domain->dt = (u32 *)__get_free_pages(GFP_KERNEL
| __GFP_ZERO
,
get_order(DT_SIZE));
if (!sun50i_domain->dt)
goto err_put_cookie;
- memset(sun50i_domain->dt, 0, DT_SIZE);
refcount_set(&sun50i_domain->refcnt, 1);