From patchwork Wed Feb 21 09:04:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kunwu Chan X-Patchwork-Id: 13565137 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 22C2AC48BF6 for ; Wed, 21 Feb 2024 09:04:21 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3ABC210E012; Wed, 21 Feb 2024 09:04:20 +0000 (UTC) Received: from mailgw.kylinos.cn (mailgw.kylinos.cn [124.126.103.232]) by gabe.freedesktop.org (Postfix) with ESMTPS id F217E10E012 for ; Wed, 21 Feb 2024 09:04:17 +0000 (UTC) X-UUID: e055a30fdd404a3482e5e0535a320678-20240221 X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.35, REQID:19c1cea5-6803-4bd9-a913-92849b05674b, 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:19c1cea5-6803-4bd9-a913-92849b05674b, 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:af722484-8d4f-477b-89d2-1e3bdbef96d1, B ulkID:2402211704136R5RNTJ7,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_FSI,TF_CID_SPAM_SNR,TF_CID_SPAM_FAS,TF_CID_SPAM_FSD X-UUID: e055a30fdd404a3482e5e0535a320678-20240221 Received: from mail.kylinos.cn [(39.156.73.10)] by mailgw (envelope-from ) (Generic MTA) with ESMTP id 1046188438; Wed, 21 Feb 2024 17:04:12 +0800 Received: from mail.kylinos.cn (localhost [127.0.0.1]) by mail.kylinos.cn (NSMail) with SMTP id 64F1FE000EBC; Wed, 21 Feb 2024 17:04:12 +0800 (CST) X-ns-mid: postfix-65D5BC8C-208931588 Received: from kernel.. (unknown [172.20.15.254]) by mail.kylinos.cn (NSMail) with ESMTPA id C8665E000EBC; Wed, 21 Feb 2024 17:04:10 +0800 (CST) From: Kunwu Chan To: yuq825@gmail.com, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, daniel@ffwll.ch Cc: dri-devel@lists.freedesktop.org, lima@lists.freedesktop.org, linux-kernel@vger.kernel.org, Kunwu Chan Subject: [PATCH] drm/lima: Simplify the allocation of slab caches in lima_sched_slab_init Date: Wed, 21 Feb 2024 17:04:09 +0800 Message-Id: <20240221090409.167478-1-chentao@kylinos.cn> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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/lima/lima_sched.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/lima/lima_sched.c b/drivers/gpu/drm/lima/lima_sched.c index c3bf8cda8498..265ee6ca3c44 100644 --- a/drivers/gpu/drm/lima/lima_sched.c +++ b/drivers/gpu/drm/lima/lima_sched.c @@ -27,9 +27,7 @@ static int lima_fence_slab_refcnt; int lima_sched_slab_init(void) { if (!lima_fence_slab) { - lima_fence_slab = kmem_cache_create( - "lima_fence", sizeof(struct lima_fence), 0, - SLAB_HWCACHE_ALIGN, NULL); + lima_fence_slab = KMEM_CACHE(lima_fence, SLAB_HWCACHE_ALIGN); if (!lima_fence_slab) return -ENOMEM; }