Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp2265562rdb; Wed, 21 Feb 2024 02:09:59 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVQEjTISbnI6iGJGUrVZgDLA03fuMwCJrUojDVOesHzVvz1XWGcXPCJ0sIeJf/b5zL+CaeXdtq24KMkL28Jt+PZ+GwwN+Dl0EQIyNBVdA== X-Google-Smtp-Source: AGHT+IEE/7ImS9KSMm/I7iK+UDSpYIdpTod6Ym8uiOm+4EvsvUYYB6Q+VEIJvg17MJWTtkcsF6vH X-Received: by 2002:a17:90a:da03:b0:296:416e:ce88 with SMTP id e3-20020a17090ada0300b00296416ece88mr12990440pjv.49.1708510199279; Wed, 21 Feb 2024 02:09:59 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708510199; cv=pass; d=google.com; s=arc-20160816; b=eXSw5h8wu3iu3EboXajAI5jn3+9THMhNyuPjBiv8Q52Wzoa3/Sr5O5LcBkQUiLwfFs tVGBlwg9nFGDRW7f493V13hAEwSva82RR2AMT8qYWUEaT17YCUdIR9ITXIXY59/IJ+nk zE52RMcGCOglIQtslsThnQbUfohhPbOgCH4YyhqwMJWSNLzwSbws6tR4ZC5GO6iAxexu V+zL6ha5ubPNWhqfRCSd1x2JbrUrZHu+PjlPq+Icg8bthfaI3D5/UPfY5S6mlN52EjpD QPifT6YC37Rr7P0/+6ZC8WgY++sOIfUyRe2AmigDGcDUtPY+hJ9sXxGOgNoWiVeciCTz jyZg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=KgALLySs/X1k/3G06cb7Mboqcj0i0dIOXld/B54L540=; fh=/+7C6FaRdYsH4siaUR2phuFq3K99zCqwXFtJszu8I1I=; b=DwyTBatE0SDnrm3xhjMh6V55pZLSQN/G2/WAc0fIU+ISr78Qjf36dIQU/ZTCLvUW+J XVSFbjmDD8TsBKxU+alJQC3JEMlfMx+jd+vgj7whooT7/agB3JouMYKEWW774QkE2DRw djnjqGwcyuTQXJvCclJrYRTdlUChq0HlW529l2L9Bj2SsMTRSuu/uCQ7WxiK/lcDmiT2 RoeVV2f+tC/LKdBnFm/SA54YTvD504M3MwKNFMqQhaygWShK7n69QS5ivvg+W7iQcMDt hnijlGrIC1ghz8S0TIs+HEELcid44Ve4uKxURLGpiHPnIPwUgSB5BtghP4VTNbcAEgs0 /tAw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=kylinos.cn); spf=pass (google.com: domain of linux-kernel+bounces-74493-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-74493-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id i6-20020a17090332c600b001da15f2a761si7794687plr.13.2024.02.21.02.09.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 02:09:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-74493-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=kylinos.cn); spf=pass (google.com: domain of linux-kernel+bounces-74493-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-74493-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 2FF10282BBC for ; Wed, 21 Feb 2024 10:05:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CBB2A3F8D4; Wed, 21 Feb 2024 10:00:38 +0000 (UTC) Received: from mailgw.kylinos.cn (mailgw.kylinos.cn [124.126.103.232]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C3A393DB8B for ; Wed, 21 Feb 2024 10:00:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=124.126.103.232 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708509638; cv=none; b=Z8rY5qVLPxd2aqOr078cj2nu7nI9qpXktpYLQsdt5BJGHx/qRTSDzs8Il/9gmAbWP98IVR6miYro6Lc0opRWp6xdIw/MH+CTIDn7JkzIgXeEHF2c+gsFszzlntD5hCTQxUb9cJsKjudUIVY/msTCpEdd31NvHltr/nin4tdHqEs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708509638; c=relaxed/simple; bh=iNK1j0Yg3W8SG48bEV/m85JuGiivmYKOT1ZQLl8TNe0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=vBUHtuoxJS5H0khHnhes4QK1Perm/kwEnaIFpjThoGVvXPIbdIRadsn8e+dGAYTC2xi3uEYYTkQWdDk5NOSuRY2+SMPnfpbs1RiElB1Gm2o88qs+DlxCcE2LP7NqSgRLVswVHXvMs66jH48wgR7hlcV4z0noA0UqoBowCdXtmlg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kylinos.cn; spf=pass smtp.mailfrom=kylinos.cn; arc=none smtp.client-ip=124.126.103.232 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kylinos.cn Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=kylinos.cn X-UUID: 6c386430499b4389a9f0883f1c0d84e6-20240221 X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.35,REQID:3f8f4e42-865d-459e-8215-6035bc0ce356,IP:10, URL:0,TC:0,Content:0,EDM:0,RT:0,SF:-15,FILE:0,BULK:0,RULE:Release_Ham,ACTI ON:release,TS:-5 X-CID-INFO: VERSION:1.1.35,REQID:3f8f4e42-865d-459e-8215-6035bc0ce356,IP:10,UR L:0,TC:0,Content:0,EDM:0,RT:0,SF:-15,FILE:0,BULK:0,RULE:Release_Ham,ACTION :release,TS:-5 X-CID-META: VersionHash:5d391d7,CLOUDID:0df7a480-4f93-4875-95e7-8c66ea833d57,B ulkID:240221180024PLCRANR9,BulkQuantity:0,Recheck:0,SF:38|24|17|19|44|66|1 02,TC:nil,Content:0,EDM:-3,IP:-2,URL:0,File:nil,Bulk:nil,QS:nil,BEC:nil,CO L:0,OSI:0,OSA:0,AV:0,LES:1,SPR:NO,DKR:0,DKP:0,BRR:0,BRE:0 X-CID-BVR: 0,NGT X-CID-BAS: 0,NGT,0,_ X-CID-FACTOR: TF_CID_SPAM_FSD,TF_CID_SPAM_FSI,TF_CID_SPAM_SNR,TF_CID_SPAM_FAS X-UUID: 6c386430499b4389a9f0883f1c0d84e6-20240221 Received: from mail.kylinos.cn [(39.156.73.10)] by mailgw (envelope-from ) (Generic MTA) with ESMTP id 1480455945; Wed, 21 Feb 2024 18:00:22 +0800 Received: from mail.kylinos.cn (localhost [127.0.0.1]) by mail.kylinos.cn (NSMail) with SMTP id EE804E000EBC; Wed, 21 Feb 2024 18:00:21 +0800 (CST) X-ns-mid: postfix-65D5C9B5-768232112 Received: from kernel.. (unknown [172.20.15.254]) by mail.kylinos.cn (NSMail) with ESMTPA id 0AE6BE000EBD; Wed, 21 Feb 2024 18:00:20 +0800 (CST) From: Kunwu Chan To: alexander.deucher@amd.com, christian.koenig@amd.com, Xinhui.Pan@amd.com, airlied@gmail.com, daniel@ffwll.ch Cc: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Kunwu Chan Subject: [PATCH 1/3] drm/amdgpu: Simplify the allocation of fence slab caches Date: Wed, 21 Feb 2024 17:59:05 +0800 Message-Id: <20240221095907.172408-2-chentao@kylinos.cn> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240221095907.172408-1-chentao@kylinos.cn> References: <20240221095907.172408-1-chentao@kylinos.cn> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Use the new KMEM_CACHE() macro instead of direct kmem_cache_create to simplify the creation of SLAB caches. Signed-off-by: Kunwu Chan --- drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c b/drivers/gpu/drm/= amd/amdgpu/amdgpu_fence.c index 70bff8cecfda..10832b470448 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c @@ -61,9 +61,7 @@ static struct kmem_cache *amdgpu_fence_slab; =20 int amdgpu_fence_slab_init(void) { - amdgpu_fence_slab =3D kmem_cache_create( - "amdgpu_fence", sizeof(struct amdgpu_fence), 0, - SLAB_HWCACHE_ALIGN, NULL); + amdgpu_fence_slab =3D KMEM_CACHE(amdgpu_fence, SLAB_HWCACHE_ALIGN); if (!amdgpu_fence_slab) return -ENOMEM; return 0; --=20 2.39.2