diff options
author | Joerg Roedel <jroedel@suse.de> | 2020-05-14 14:46:21 +0200 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2020-05-14 17:48:58 +0200 |
commit | 38b91f810b6873bcdfd6ef441e9a3794a9c69101 (patch) | |
tree | 1c981efdada3aab99e524880c2f9176ffe263f12 /drivers/iommu/sun50i-iommu.c | |
parent | ab785cfa5907b3fa141438baed898849b6b43b4e (diff) | |
download | linux-stable-38b91f810b6873bcdfd6ef441e9a3794a9c69101.tar.gz linux-stable-38b91f810b6873bcdfd6ef441e9a3794a9c69101.tar.bz2 linux-stable-38b91f810b6873bcdfd6ef441e9a3794a9c69101.zip |
iommu/sun50i: Use __GFP_ZERO instead of memset()
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
Diffstat (limited to 'drivers/iommu/sun50i-iommu.c')
-rw-r--r-- | drivers/iommu/sun50i-iommu.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/iommu/sun50i-iommu.c b/drivers/iommu/sun50i-iommu.c index a52f52eff7c8..9c763d4a8e2a 100644 --- 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); |