Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp722907pxv; Thu, 24 Jun 2021 19:05:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxkHI0QDPHhmnYTUjM31Oy0pP0uJ/pPPcYnPcv+rL/WEFNHnogy61gHGr6pXpFC6Cd2p+1i X-Received: by 2002:a05:6402:12da:: with SMTP id k26mr11381729edx.10.1624586714248; Thu, 24 Jun 2021 19:05:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624586714; cv=none; d=google.com; s=arc-20160816; b=s/jDEFXx4j3NHXH1XoHVZF4us7p4+aI2uR3fOSZ4S/rv5vJmX/W7hIz4jfTKvtNiXG /cDs3G1+VYY2YekSKiNmpoVrrWOfcTXbVuyKa1P5EU04Xj2rFzy0K6KZe+AHdGGkkqiU d6qQmncnIJ8hySYRnkwMby3Za2w8AizUdUhkKTffXewtSlJBX2Cj8CXBdJLLtdef4FD8 UCZhCAqE6XWQhNtpmzOM2TKRll+6TVSwlVkdG/hymhkRjxv6hFxYQ4yp2GLFhgksoc7y tDvviZ02jIbOlH/tQ7+LcvARWUcG767GHPCOWKUZq2WX1JRzT6qLVO/6yBSx2JSM9xJ1 lYKg== 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=uSSLi7j+nlnUeYp3BAkPBTK3oDP2XqgfJURZ4QfTa9Q=; b=ffF5ZEp4+gxlAqFpqMQ4BEgxky0+FSw+ubSFBixqrZ5wK936f0SWM/O/WSMQREGQfK 9FCB/X5nH89He+NMkBl0/htpV+lgLJmObs+b2NUwMRRShRbPfUgXPbu6acXTAe2CfNMx QhGsF1suZFUomwSfl2CHv7AMuugU9K2QwgUeXfGAtH9L941MHTntyDlUuCWSBU97malU FBWFwYYN8mGk4Lks5T+VH9dhrs5Bw7FgKiC+YH1fOwDxrY50EAyFUvDBXjq2qWe4DvmZ g2jemDKvy890NSWbq2xe3T/uEoWk984VJf7b6d6THhekTcD9Ehg+hZviQreXHL7pIymJ dbvw== 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 ec18si4515925edb.387.2021.06.24.19.04.50; Thu, 24 Jun 2021 19:05:14 -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 S232973AbhFYCGN (ORCPT + 99 others); Thu, 24 Jun 2021 22:06:13 -0400 Received: from lucky1.263xmail.com ([211.157.147.135]:46492 "EHLO lucky1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232917AbhFYCGM (ORCPT ); Thu, 24 Jun 2021 22:06:12 -0400 Received: from localhost (unknown [192.168.167.235]) by lucky1.263xmail.com (Postfix) with ESMTP id 86DD1B1916; Fri, 25 Jun 2021 10:03:49 +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 P1334T140034502022912S1624586622420447_; Fri, 25 Jun 2021 10:03:49 +0800 (CST) X-IP-DOMAINF: 1 X-UNIQUE-TAG: <7e806d5e61b4e62798b4abb7502b1da4> 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:03:44 +0800 Message-Id: <20210625020344.30979-1-huqiqiao@uniontech.com> X-Mailer: git-send-email 2.11.0 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org malloc_array + __GFP_ZERO is the same with kvcalloc. Signed-off-by: huqiqiao --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c index b8c31e3469c0..5cadfadc625f 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c @@ -909,7 +909,7 @@ static int amdgpu_vm_alloc_pts(struct amdgpu_device *adev, num_entries = amdgpu_vm_num_entries(adev, cursor->level); entry->entries = kvcalloc(num_entries, - sizeof(*entry->entries), GFP_KERNEL); + sizeof(*entry->entries), GFP_KERNEL); if (!entry->entries) return -ENOMEM; } -- 2.11.0