From: "Christian König" <christian.koenig@amd.com>
To: Bernard Zhao <bernard@vivo.com>,
Alex Deucher <alexander.deucher@amd.com>,
David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
Felix Kuehling <Felix.Kuehling@amd.com>,
Joerg Roedel <jroedel@suse.de>, Borislav Petkov <bp@suse.de>,
Fenghua Yu <fenghua.yu@intel.com>,
amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org
Cc: opensource.kernel@vivo.com
Subject: Re: [PATCH] amdgpu/amdgpu_ids: fix kmalloc_array not uses number as first arg
Date: Wed, 18 Nov 2020 09:17:06 +0100 [thread overview]
Message-ID: <d61726de-c9a9-ee9c-cb8a-c34f0625a973@amd.com> (raw)
In-Reply-To: <20201118024234.102485-1-bernard@vivo.com>
Am 18.11.20 um 03:42 schrieb Bernard Zhao:
> Fix check_patch.pl warning:
> kmalloc_array uses number as first arg, sizeof is generally wrong.
> +fences = kmalloc_array(sizeof(void *), id_mgr->num_ids,
> GFP_KERNEL);
>
> Signed-off-by: Bernard Zhao <bernard@vivo.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c
> index 6e9a9e5dbea0..f2bd4b0e06f6 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c
> @@ -208,7 +208,7 @@ static int amdgpu_vmid_grab_idle(struct amdgpu_vm *vm,
> if (ring->vmid_wait && !dma_fence_is_signaled(ring->vmid_wait))
> return amdgpu_sync_fence(sync, ring->vmid_wait);
>
> - fences = kmalloc_array(sizeof(void *), id_mgr->num_ids, GFP_KERNEL);
> + fences = kmalloc_array(id_mgr->num_ids, sizeof(void *), GFP_KERNEL);
> if (!fences)
> return -ENOMEM;
>
next prev parent reply other threads:[~2020-11-18 8:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-18 2:42 Bernard Zhao
2020-11-18 8:17 ` Christian König [this message]
2020-11-19 21:54 ` Alex Deucher
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=d61726de-c9a9-ee9c-cb8a-c34f0625a973@amd.com \
--to=christian.koenig@amd.com \
--cc=Felix.Kuehling@amd.com \
--cc=airlied@linux.ie \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=bernard@vivo.com \
--cc=bp@suse.de \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=fenghua.yu@intel.com \
--cc=jroedel@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=opensource.kernel@vivo.com \
/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
all inboxes | Powered by JetHome®