From patchwork Wed Feb 21 09:59:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Kunwu Chan X-Patchwork-Id: 20722 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2685:b0:108:e6aa:91d0 with SMTP id mn5csp939457dyc; Wed, 21 Feb 2024 02:05:04 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWZuxq6KToRniMdyhlcjQ7xmtSRUDyR450c82lHYiq9DVUWxbrrfVxJKI6JZEBcE7AdUZ20j7ObeTFm0SCLlUxjEKBqLw== X-Google-Smtp-Source: AGHT+IFtzFr6S/96mxpRRmnJTRPdhF8EthstEwASNgNKCcWoNrcz0qVHalRI1eTzv+5TopIkLR08 X-Received: by 2002:a81:430c:0:b0:608:7e4f:1359 with SMTP id q12-20020a81430c000000b006087e4f1359mr1102350ywa.3.1708509903853; Wed, 21 Feb 2024 02:05:03 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708509903; cv=pass; d=google.com; s=arc-20160816; b=RI37jqnzys5hnqzpfoNKMt3n0Hpuwhuuy/30YQf8CHynTJNa1aZyJvlxyD/Jq/7mW1 AA1SzM0LjsUZNzZWrJgYn9cJf+bghB5RX/NOik/4iX9C9bAFCwBwDLzGDNeJq+XIYKPV F2TuyiRXmYbE4HLXyYxPsioz5geSgGEAZt67Y+3p5+QbcQiHs7VrghxziaObZWoKFmkp 4rfW/ay9/jgMk0Rez0maBvczPwd4Lpkmnmz+iQ7AKZ3HENInuNyZnH3CfFhrP+KlXc0P Xfs9HfbBvNL7H5q/N2xrGptwPxuqH/jcubKiBKpdKu+561y6PNOonRc9pRauH9KPgFIo vMPw== 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:message-id:date:subject:cc:to :from; bh=YKapEZ2fe164z3kAT7bg17/UD0JHmdAxAfT63P5Kdd4=; fh=/+7C6FaRdYsH4siaUR2phuFq3K99zCqwXFtJszu8I1I=; b=TS16Wc8dRDsD1MVCmS0gt+79IHYchCwrZWOZwcN1I0Qp9QhZZy5TpuDhZO3pJgJjoA KI/LQvGCHovvIm8E5U+i+d2go4Kg0OzlgEgARCidmXvnwnsUpW1GcGjYX9o/R4I70muM 8VjMnUv8l0L6AvwAbt4tlH0Y2w7CAIVS+xEVgaO0qfqwNMPIPhIS0yAaSBKNqYLCCPe3 v4J3SnS5IrkHoiiY//s03GP1bX0k6UtwVNHMFb9nOrZtF75c13MLYr8w5mRw99EVWSf0 8LDsPA8A0WF65Pb6uwacFCToyaKymTBYzrfjP9QwpZrkQiaQht8Pie2UyH0ypI6hyW5O 4Tdg==; 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-74491-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-74491-ouuuleilei=gmail.com@vger.kernel.org" Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id dz20-20020a05620a2b9400b0078774188b15si4626940qkb.103.2024.02.21.02.05.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 02:05:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-74491-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=kylinos.cn); spf=pass (google.com: domain of linux-kernel+bounces-74491-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-74491-ouuuleilei=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 ny.mirrors.kernel.org (Postfix) with ESMTPS id A1DFF1C23D8F for ; Wed, 21 Feb 2024 10:05:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EFBB23F8DF; 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 898BF3D96B for ; Wed, 21 Feb 2024 10:00:32 +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=1708509637; cv=none; b=qNXcYUHYidT3cBP8YieOqP2kjBuNMV7e1NqU8LRwQLXE/7g4FEib01mFcH07Fv132FjgWbbp1eHd2kkFOlRalYzGwSchYqBIfiRIbQkLdcYM40zg8hp8Ai4mNViTdZttvqdIAK8nLTlr47uT1tzgdU2o7PA24QX6LQZCfqAqP6c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708509637; c=relaxed/simple; bh=asLTIf3kHNjnWv81SRWiDTUYxbZvoxLwdWFfcAI8w+I=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=WWEhlgEXHXPRmj8CCz3X2vXEltf1ZBWqtMOShLepVJv10gObUG7UbwpjE7KMDPvcp75WiWEXyZI2B49hMiEK1ciC/7b6lsegExeGWVwuskHU8093CsS6f21htpK/M6al8PXnTN07bVLjTeHHn6wldaK20k7oKpIZ7dlowdqXnDg= 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: f8f4a4c73756420db3cf6e8ab271d598-20240221 X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.35,REQID:134349bb-e8f3-4364-ab0f-8b59cd6c96bd,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:134349bb-e8f3-4364-ab0f-8b59cd6c96bd,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:0bf7a480-4f93-4875-95e7-8c66ea833d57,B ulkID:240221180023CP571469,BulkQuantity:0,Recheck:0,SF:66|38|24|17|19|44|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_FSI,TF_CID_SPAM_SNR,TF_CID_SPAM_FAS,TF_CID_SPAM_FSD X-UUID: f8f4a4c73756420db3cf6e8ab271d598-20240221 Received: from mail.kylinos.cn [(39.156.73.10)] by mailgw (envelope-from ) (Generic MTA) with ESMTP id 1544235045; Wed, 21 Feb 2024 18:00:21 +0800 Received: from mail.kylinos.cn (localhost [127.0.0.1]) by mail.kylinos.cn (NSMail) with SMTP id F037FE000EBC; Wed, 21 Feb 2024 18:00:20 +0800 (CST) X-ns-mid: postfix-65D5C9B4-760618111 Received: from kernel.. (unknown [172.20.15.254]) by mail.kylinos.cn (NSMail) with ESMTPA id 9FBA0E000EBC; Wed, 21 Feb 2024 18:00:18 +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 0/3] drm/amdgpu: Use KMEM_CACHE instead of kmem_cache_create Date: Wed, 21 Feb 2024 17:59:04 +0800 Message-Id: <20240221095907.172408-1-chentao@kylinos.cn> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791502480707010152 X-GMAIL-MSGID: 1791502480707010152 For where the cache name and the structure name match. Use the new KMEM_CACHE() macro instead of direct kmem_cache_create to simplify the creation of SLAB caches. Kunwu Chan (3): drm/amdgpu: Simplify the allocation of fence slab caches drm/amdgpu: Simplify the allocation of mux_chunk slab caches drm/amdgpu: Simplify the allocation of sync slab caches drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 4 +--- drivers/gpu/drm/amd/amdgpu/amdgpu_ring_mux.c | 4 +--- drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c | 4 +--- 3 files changed, 3 insertions(+), 9 deletions(-) Reviewed-by: Christian König for the entire