Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp2430450lqo; Mon, 13 May 2024 20:07:08 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVOu5SzJnZ7gyCok+ezELc+bulHgEObqZz8prvnNGqPdktwxW9hcqIvcMdCiM0eYolFhSh0yErOEsklkmnnb7Mi26X71H9g5pNLL88LYg== X-Google-Smtp-Source: AGHT+IEHPnQb7AMI/r3f0DKkXWFagt/+usaiNTgc7P0b939pUZq2pvczEAA+Mybn68q7h22YFePG X-Received: by 2002:a0d:d608:0:b0:61b:3487:df12 with SMTP id 00721157ae682-622affda228mr119167717b3.35.1715656028723; Mon, 13 May 2024 20:07:08 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715656028; cv=pass; d=google.com; s=arc-20160816; b=GdhDCVZMVXHzoyvfSoqQQ2vcsIht+iamoN4j6boMd9doAT1zBKOerxyXQFgBD/zFMV L8nNyEyJDqlsd3Mo84cSXGZ+wbB3TcY4Bt99vmkWao3mzNRomz1+6C3OHSIbg6bLxVEP peDQdjFOmzspcXqxDvL6pHqLRTZfQyoRQZohBk8irneLgWu+DjimURk6Y8HnsphVhMxi 9RLoW8yJ/1/7344CLi7O5XxcroTZOXu8gv+7+re8709tAeo70ENinX0Lh98nqGgWCc6a iqHHBA6jvhL9Y3nXE5Gw28uOk9cR9j3hDgrFV7ao9377Sdjv3KJ46gvg6ioLEQIErdaS liZg== 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=Ttr6pPV2QRHO7npuAniurcI4cIc9PSJQ08WEBXhNSwk=; fh=96/j1POLb7PCmaAd6/NKH22LclN0okzEhBWieJ2fwEM=; b=jfr23/aWGndwUAzyo2cZNyP/QTU2fJiGvNyHpd6SGmIf2XLWMSSIQh2rh/SwY0wGKA sQy560HNIiwjDcb6sro+dddUPMP91TnTFlv2TzyJ3EsOYEuiwmyRe0/qY9jZ5FkeHPlk z+YPCb4B8b1S+b7Fu2F6PBce4i8EavxAAEWfxSlHSV57SRhtDcYXtPzdG2fb0CccDdUd jq9C7CjrdUv+fyiULf98LjUXGw6Woo+fKPF1dkn2NWXsn0bE7RvnIdNaN7y8LPdmi3So mSZyWvCzKUYntimR8Jlks/uHi3CmyK8h3M68OPhjYgfpCs7OX7hsL+2o9idAyg20jjLL PQmw==; 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-178282-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-178282-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id d75a77b69052e-43df549d434si102390511cf.112.2024.05.13.20.07.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 May 2024 20:07:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-178282-linux.lists.archive=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-178282-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-178282-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 70EBD1C20D7A for ; Tue, 14 May 2024 03:07:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 017C2B653; Tue, 14 May 2024 03:07:04 +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 8FF18AD53 for ; Tue, 14 May 2024 03:06:55 +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=1715656023; cv=none; b=ZTw2ff3gGd80CB6m9vqJ3Q5j+Lvr0Q/+nu4T8vy2CaHXZJ8Pw/GrmWqunJPfelWbrEMjw3HqMw/wXy5p3Dk/yz+dnfwzu9/AlCW1xGRB/UebCN2ErgBpo0AQ8ZiLsV8l+u8s+mikfO8SoGP8wYA6dffSWHu5AcunQGy3pO//OiY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715656023; c=relaxed/simple; bh=ycqcWDLmeN8CU1EMpuQX4M6i8oTxCx/kV82hx0oox/Y=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=XejE6oZq97XsTkTlIT/bdCW/0pRiDlJy/VGerzVtVhtFw07EhtwR+lE6tUfuWPLQlL+k8qcMqIHs5Tcv11AN6OVA0yJXjFpxe6JMCHuApIeBY/beH9l0rRUiJ3hfvslueP81z14KpezS1e/ori83vHWUFLhOkQaG+XEiJG8gG1U= 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: 024cb122119f11ef9305a59a3cc225df-20240514 X-CID-UNFAMILIAR: 1 X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.38,REQID:a63ab78e-0f97-4de1-b6a2-02799ef45fe2,IP:15, URL:0,TC:0,Content:0,EDM:0,RT:0,SF:8,FILE:0,BULK:0,RULE:Release_Ham,ACTION :release,TS:23 X-CID-INFO: VERSION:1.1.38,REQID:a63ab78e-0f97-4de1-b6a2-02799ef45fe2,IP:15,UR L:0,TC:0,Content:0,EDM:0,RT:0,SF:8,FILE:0,BULK:0,RULE:Release_HamU,ACTION: release,TS:23 X-CID-META: VersionHash:82c5f88,CLOUDID:37fb2e2b3d59177dacdf6e4160e7f6d5,BulkI D:240514110651FZNTF11P,BulkQuantity:0,Recheck:0,SF:66|38|24|16|19|44|102,T C:nil,Content:0,EDM:-3,IP:-2,URL:0,File:nil,RT:nil,Bulk:nil,QS:nil,BEC:nil ,COL: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_USA,TF_CID_SPAM_FSD,TF_CID_SPAM_FSI,TF_CID_SPAM_SNR X-CTIC-Tags: HR_CC_COUNT, HR_CC_DOMAIN_COUNT, HR_CC_NAME, HR_CC_NO_NAME, HR_CTE_8B HR_CTT_MISS, HR_DATE_H, HR_DATE_WKD, HR_DATE_ZONE, HR_FROM_NAME HR_SJ_LANG, HR_SJ_LEN, HR_SJ_LETTER, HR_SJ_NOR_SYM, HR_SJ_PHRASE HR_SJ_PHRASE_LEN, HR_SJ_WS, HR_TO_COUNT, HR_TO_DOMAIN_COUNT, HR_TO_NO_NAME IP_TRUSTED, SRC_TRUSTED, DN_TRUSTED, SA_UNTRUSTED, SA_LOWREP SA_EXISTED, SN_UNTRUSTED, SN_UNFAMILIAR, SPF_NOPASS, DKIM_NOPASS DMARC_NOPASS, CIE_BAD, CIE_GOOD_SPF, GTI_FG_BS, GTI_RG_INFO GTI_C_BU, AMN_T1, AMN_GOOD, AMN_C_TI, AMN_C_BU ABX_MISS_RDNS X-UUID: 024cb122119f11ef9305a59a3cc225df-20240514 X-User: cuitao@kylinos.cn Received: from localhost.localdomain [(39.156.73.13)] by mailgw.kylinos.cn (envelope-from ) (Generic MTA with TLSv1.3 TLS_AES_256_GCM_SHA384 256/256) with ESMTP id 1664633602; Tue, 14 May 2024 11:06:50 +0800 From: cuitao To: yuq825@gmail.com, dri-devel@lists.freedesktop.org Cc: maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, daniel@ffwll.ch, linux-kernel@vger.kernel.org, cuitao Subject: [PATCH] drm/lima: implify the allocation of sync slab caches Date: Tue, 14 May 2024 11:05:32 +0800 Message-Id: <20240514030532.15065-1-cuitao@kylinos.cn> X-Mailer: git-send-email 2.25.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Use the new KMEM_CACHE() macro instead of direct kmem_cache_create to simplify the creation of SLAB caches. Signed-off-by: cuitao --- 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 00b19adfc888..414a45082b86 100644 --- a/drivers/gpu/drm/lima/lima_sched.c +++ b/drivers/gpu/drm/lima/lima_sched.c @@ -28,9 +28,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; } -- 2.25.1