Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp789975pxb; Thu, 19 Nov 2020 13:59:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJxG1y4mspZV74B1N8RINV0VqckYsosFSxvbr1yS7gZQOJ6L0Md8Wb9wiqWUGmrkGKUOcex9 X-Received: by 2002:a50:9f2b:: with SMTP id b40mr32501544edf.20.1605823145334; Thu, 19 Nov 2020 13:59:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605823145; cv=none; d=google.com; s=arc-20160816; b=nwzPrSpKZ1mlgmzjfAdZCH9wUNLYU6camralIdEl4ITXh/7Es26mjEPBSnxQeSwsX1 SI6cHOQ3H396ZZOe8m51MZiXO8m7KnZUV4jjAuGF3lrHvnVSeeEITvQhqKCHtFTrOokk Lx9PAyTa/BbYlOhHyBsErus5+YLqst4Jb76/lFiAzRPPEov4Rpz0RLY8dZ0ocI/ifyPU PSQ33ZDfd+APwJeJ36EuDLKH8yTGPQjyPdIJZCf63CZs4xSO2IUmbM1LUUMB0sSKXMes JCiGkE0cOuN9qscg5Mlv2GnLhQTGcCxiwSw8RIbegX7GOpazHRhCqe56gRQtpJG08qvv u+Cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=QPqvc1x5t7qLXCW8n18+RH8/nuMRFmIb+j6wkjvSoac=; b=H1IawsLaCm9U0QlY+sWXpcWPiOSbYju/QxzrXk3RAOSxhjhn/FsgHwi1sP1RqC182Z xvYgu1vfizy8Zx8AaU1l1DiXyd57OqfOWpg2s8fWMN5GzEVhP/H7znD3lDnTpal7L5yg HgasPc7pUWKh6zIph7AkcLUMclwck+XpUme8v6hKyNjMqfZfU4WxB3fJASwxbUUB2kSP xkWv/DFDTi7aTbdoyWPw330ZdMQ7rbWU6harGnNwQuG2lh8Zxq+c+kFVx1j3Cje2WPw9 RRTVKh+b1klqPTM+2hJDPXyHRkEGULL8UpjbYpVzYon+tgjV0PXHwULMfJ5VMl+7/Z42 JLBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Gwqz797T; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g3si58114edj.521.2020.11.19.13.58.42; Thu, 19 Nov 2020 13:59:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Gwqz797T; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726536AbgKSVzP (ORCPT + 99 others); Thu, 19 Nov 2020 16:55:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48150 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725887AbgKSVzP (ORCPT ); Thu, 19 Nov 2020 16:55:15 -0500 Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A70B8C0613CF for ; Thu, 19 Nov 2020 13:55:12 -0800 (PST) Received: by mail-wm1-x343.google.com with SMTP id h21so8070589wmb.2 for ; Thu, 19 Nov 2020 13:55:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=QPqvc1x5t7qLXCW8n18+RH8/nuMRFmIb+j6wkjvSoac=; b=Gwqz797TCkbOAVXSCqrZyYHhgCS7dzOjYtHH0GBsaR7yAMjfsqRYgOOflkXnGQoqak sQ9s5hKxA3pyQoNSOp12r4A+7s8b69QGMD3QIdbXngX7xoUK7N4c5E7NSiy6u8iaxP5H jIWTiAuptzNvlg/xBNvDmCANQYgytMNEnsMU1EDPZlYmBQ/9EDcOWj60bOZaKOIzZP/S ujjFP/4/RCnlt+H8abbC0kmLlmuagt9dLZFUklOFACs+21kZifVVdWqbNVyWng3YGFZH izvPt6qHxkhRnb6D0A8sL1LVc9B6G579wlb/QBQ8eTwx0Rk4frvNeRLCNqjV3jYNLSBF jw6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=QPqvc1x5t7qLXCW8n18+RH8/nuMRFmIb+j6wkjvSoac=; b=ApiVWWakdfqlxeHI9kVDuyMX5G765TWtU9hUS5ky6Ze/1cCabJ4OSZKZZ8m3mi+xr9 sxIvi5CFQS3QDi2obrS03n5boIl2ovRdpg2wUlnAoFfOkdrEfhIi7Uv+5+YzKQV3UiEo YGoc6GFuH9cWtSLa6ZA3dnLhVfa2Ka0ACrDIyaEC3fbd6HpFfapc5r/GzuRI7WWLDP/E D/RhYLjEEVGe1HFt+U5JxSMDF2EBkQVUGzmqGB8BKeIP436bCchj88WA5rhSvkhJZt+A fmt0KUQRjgZj2/WZNJ+lD0z5OB/zIe/vzTHQx4t6TXtf3CQISM2rq8gctwDz9xKauKMx 8UpA== X-Gm-Message-State: AOAM532tOuPYOZtYGCWHiY1BOgVpspN4kmdwuu11mBOYp030j3KbWuyJ W3q386JDjKz0kuKkbFqzMmvujQgnKi9vplc71AY= X-Received: by 2002:a1c:f017:: with SMTP id a23mr6746684wmb.56.1605822911406; Thu, 19 Nov 2020 13:55:11 -0800 (PST) MIME-Version: 1.0 References: <20201118024234.102485-1-bernard@vivo.com> In-Reply-To: From: Alex Deucher Date: Thu, 19 Nov 2020 16:54:59 -0500 Message-ID: Subject: Re: [PATCH] amdgpu/amdgpu_ids: fix kmalloc_array not uses number as first arg To: =?UTF-8?Q?Christian_K=C3=B6nig?= Cc: Bernard Zhao , Alex Deucher , David Airlie , Daniel Vetter , Felix Kuehling , Joerg Roedel , Borislav Petkov , Fenghua Yu , amd-gfx list , Maling list - DRI developers , LKML , opensource.kernel@vivo.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Applied. Thanks! Alex On Wed, Nov 18, 2020 at 3:17 AM Christian K=C3=B6nig wrote: > > 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 =3D kmalloc_array(sizeof(void *), id_mgr->num_ids, > > GFP_KERNEL); > > > > Signed-off-by: Bernard Zhao > > Reviewed-by: Christian K=C3=B6nig > > > --- > > 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 =3D kmalloc_array(sizeof(void *), id_mgr->num_ids, GFP_KER= NEL); > > + fences =3D kmalloc_array(id_mgr->num_ids, sizeof(void *), GFP_KER= NEL); > > if (!fences) > > return -ENOMEM; > > > > _______________________________________________ > amd-gfx mailing list > amd-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/amd-gfx