Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp738621pxv; Thu, 24 Jun 2021 19:35:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxoLFMXD8QsDtOETQIkcM8o1PkupjmOJcvfNtwgLCzPZamsyTrorYf1nmfH00i9VrVWytGO X-Received: by 2002:aa7:d955:: with SMTP id l21mr11557426eds.35.1624588500057; Thu, 24 Jun 2021 19:35:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624588500; cv=none; d=google.com; s=arc-20160816; b=IfzvzmDGFw4Hq1BcPwS+I+qjrf3YCWUWWTluIq7RMApfSgO7WGok3exNlSgEhmbgCQ qcuOYa2TN7cigu1tKvrmr2Hccdvf/cLMANyZSh8Hf1zZ/v1VrwfaxS2trvzGpCPP1GJl BUWV4EidOpULCceYC3ONtBKwW1222r9nYpkJpVpncg7XDbHfubHbMF2lv2ypZ+v1TVmX oQlon0pVCn91qWAAU8J3umGyRJGKBi37GdHK2FlzvY0zdI2eIijEp786Ga0I1dqgv5Sx ZFOGMj1FMf46cDx6OuWFqp5CYbvSqExagkWTgOu9McZH0AFGdY1G34A71QtDVQw8uVwi SjmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=NNXjAf9ckJiB7x5duXKq1lTleIlhQCxaeC7eLzGliDU=; b=VjmyfrY8IKYmQDlVGIF1Tu4jDuy6ayjSszTdab8RB7QOViZmMt2NTZJvYv6yDHCt0i c88gThZNME2TxxyDUdY94W5/BD7Eok50bKOGgwf8iN9nHczECO+337byrBjxWhI43NH+ lzBaSyUUQ641doebtfeVj6NHPtVGs36gDPAkltWWTUpveaytJZa2wGNXu7aYdwxkk00g GEXVVwkX/yojy3wXwb053BRiFQY4j2u+FUB0CyRrwWjCFlpJboQtjPlR7rnYRGsXtMZZ e9Icx2bGayaFUhTMof+pT6UpnkEEPjpeFiK36rZajqiUbGvm+oOraHD7cm/ldEjndwFD uRpg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o12si4666062edc.382.2021.06.24.19.34.35; Thu, 24 Jun 2021 19:35:00 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233056AbhFYCf4 (ORCPT + 99 others); Thu, 24 Jun 2021 22:35:56 -0400 Received: from lucky1.263xmail.com ([211.157.147.135]:56676 "EHLO lucky1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233017AbhFYCfw (ORCPT ); Thu, 24 Jun 2021 22:35:52 -0400 Received: from localhost (unknown [192.168.167.225]) by lucky1.263xmail.com (Postfix) with ESMTP id 7CB96AFF1D; Fri, 25 Jun 2021 10:33:31 +0800 (CST) X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-ADDR-CHECKED: 0 X-SKE-CHECKED: 1 X-ANTISPAM-LEVEL: 2 Received: from localhost.localdomain (unknown [58.240.82.166]) by smtp.263.net (postfix) whith ESMTP id P31196T139969978935040S1624588406684274_; Fri, 25 Jun 2021 10:33:31 +0800 (CST) X-IP-DOMAINF: 1 X-UNIQUE-TAG: <82ebafcd2d8448668e02a058c521561b> X-RL-SENDER: huqiqiao@uniontech.com X-SENDER: huqiqiao@uniontech.com X-LOGIN-NAME: huqiqiao@uniontech.com X-FST-TO: alexander.deucher@amd.com X-RCPT-COUNT: 5 X-SENDER-IP: 58.240.82.166 X-ATTACHMENT-NUM: 0 X-System-Flag: 0 From: huqiqiao To: alexander.deucher@amd.com, christian.koenig@amd.com Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, huqiqiao Subject: [PATCH] drm/amdgpu: use kvcalloc for entry->entries. Date: Fri, 25 Jun 2021 10:33:30 +0800 Message-Id: <20210625023330.17463-1-huqiqiao@uniontech.com> X-Mailer: git-send-email 2.11.0 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org kmalloc_array + __GFP_ZERO is the same with kvcalloc. Signed-off-by: huqiqiao --- 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