From: huqiqiao <huqiqiao@uniontech.com>
To: alexander.deucher@amd.com, christian.koenig@amd.com
Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
huqiqiao <huqiqiao@uniontech.com>
Subject: [PATCH] drm/amdgpu: use kvcalloc for entry->entries.
Date: Fri, 25 Jun 2021 10:33:30 +0800 [thread overview]
Message-ID: <20210625023330.17463-1-huqiqiao@uniontech.com> (raw)
kmalloc_array + __GFP_ZERO is the same with kvcalloc.
Signed-off-by: huqiqiao <huqiqiao@uniontech.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index 9acee4a5b2ba..5a012321d09e 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -909,8 +909,7 @@ static int amdgpu_vm_alloc_pts(struct amdgpu_device *adev,
num_entries = amdgpu_vm_num_entries(adev, cursor->level);
entry->entries = kvmalloc_array(num_entries,
- sizeof(*entry->entries),
- GFP_KERNEL | __GFP_ZERO);
+ sizeof(*entry->entries), GFP_KERNEL);
if (!entry->entries)
return -ENOMEM;
}
--
2.11.0
next reply other threads:[~2021-06-25 2:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-25 2:33 huqiqiao [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-06-25 2:03 [PATCH] drm/amdgpu: use kvcalloc for entry->entries huqiqiao
2021-06-28 15:00 ` Christian König
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210625023330.17463-1-huqiqiao@uniontech.com \
--to=huqiqiao@uniontech.com \
--cc=alexander.deucher@amd.com \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).