Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp2432888lqo; Mon, 13 May 2024 20:14:34 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUZ6jfCspdImifDCOdNaMUgEpp7AZfXkdSGmmBnaRgLVgMPsr5gbrf+++475r4F4UlJ+1564HRbtW9k6nZRQueOpDNst2sPlbZ9/VIG2w== X-Google-Smtp-Source: AGHT+IHvboiP6t13UjD8lD36KRgjKO2rjPG2Q+95SpAgRulCurrEvFx6xxHhxrfWTA/tInh7T7mD X-Received: by 2002:a17:906:394e:b0:a59:cb29:3fac with SMTP id a640c23a62f3a-a5a2d68aad7mr795665766b.65.1715656474172; Mon, 13 May 2024 20:14:34 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715656474; cv=pass; d=google.com; s=arc-20160816; b=dS0skXV5aI7uCHdY1ScZEQZasnKUu0Tv4v4bCxJcl/j4lS/M4f6vhtk8UwIqffmA3C bNi5uIeOgunih8jScSZFbW7qmAxODh7TvoItInKa/0ct8L6dFyzw/AlEYFVqw4EjhQqH RXcnzPPMC6H0AQNpplhMgsgsSwPrsFBdjIP/QMOvhw9CL2Mvv6CMKgFI3T2p5NVZhnKK ipKy71f9Bv8JQINg+CQ1k4LYWGk4LZlj2zo7v6D8HRPZWO5sHacRGKnwG70hxSnJ2Mxo JzTm7AblPsa6eJ3L///ey6LkT1V52e40aoGdGkqCCNQpGVqdAcYjzI/+bqQhzdvA0vUU KmsA== 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=Yx8Wlc4kWQHSUOC2nSVCmFZ+/Lg/055+71ogBmNcqJ4=; fh=RiBkbJRvxc1s/lD5uI7WsVHyDUYW/5b0Y8+xV9WDSeQ=; b=o3Fq2htA6fVMsHNdgH0OlhLABAsa9ycmWPWK5RQ4mOEdyAbRwzqyhFi/tiNePGbBcd 5AZRnXgBp8ime3MJdui+FHorwM2qkCc1wHmiyxDXfGRP30mtkyXLyQLrcKCA059rTSFW rZXbYHdNVJKdbYn0noYwQT/dOSck8WB0wqg1dJLiKB5hJJJJOy0rifPJxxLV/WbQnNcv kq/xTUbkzXaTqpjXo6BlbaQHIJTqj0mVBBab2C+8YZTZ7SQB2zKDoPq/wqhIQGGcu23k 4QjjU0uqy4cF+cctAEDCCkCY5rZ0ANxuioct/tbtonA4fds6io7thLAaT96ElDPVLeiE YfwQ==; 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-178286-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-178286-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a5a17c2cd4fsi593510366b.1051.2024.05.13.20.14.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 May 2024 20:14:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-178286-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=kylinos.cn); spf=pass (google.com: domain of linux-kernel+bounces-178286-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-178286-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 am.mirrors.kernel.org (Postfix) with ESMTPS id DE42F1F22988 for ; Tue, 14 May 2024 03:14:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6FB6C1173F; Tue, 14 May 2024 03:14:21 +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 D2326111AA for ; Tue, 14 May 2024 03:14:17 +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=1715656461; cv=none; b=QnhFAPIvvc6nBsDTcM7UEQQ9r4+j9DgCskbVUDEOORkxiJFMU8bJCt0ke8yN/WPbuB2Z1OyA+LWkw4bVXHu7/OMVGlJWnDGOk4jKy8HVhl/12WiaQVVLBE20kVC2d4wFDaiYORLvMUB0Gn5T/4o628KAdudonKp/lVptl7AUqX4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715656461; c=relaxed/simple; bh=snUCrlYSOP2eFW6684Pm8LxxgGbtjRvRmOA9GcQqO7I=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=rF0BQpmk9ksv/qzRqvXRyE7oMlQ5pHtEp81CKwmb8c7nD+lPWifu3lz4o1LB9TdFHny9wTqJmb+sIzjuaB7d6hyXkqW2kyq5omRfrjFDIDs51sjfD7l4+kqML6ozyn+fsFcbz6fONAF/PiifgH5qJ3jhxoECFt0PkBbFmiyX84U= 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: 08a3914811a011ef9305a59a3cc225df-20240514 X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.38,REQID:b2ba4032-03ae-4963-8b55-f28e8b96816b,IP:15, URL:0,TC:0,Content:0,EDM:0,RT:0,SF:-5,FILE:0,BULK:0,RULE:Release_Ham,ACTIO N:release,TS:10 X-CID-INFO: VERSION:1.1.38,REQID:b2ba4032-03ae-4963-8b55-f28e8b96816b,IP:15,UR L:0,TC:0,Content:0,EDM:0,RT:0,SF:-5,FILE:0,BULK:0,RULE:Release_Ham,ACTION: release,TS:10 X-CID-META: VersionHash:82c5f88,CLOUDID:e90e5226e805bd28d80d2b63f52d0017,BulkI D:240514111412IINTNKZK,BulkQuantity:0,Recheck:0,SF:66|38|24|72|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_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: 08a3914811a011ef9305a59a3cc225df-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 1243275688; Tue, 14 May 2024 11:14:10 +0800 From: cuitao To: maarten.lankhorst@linux.intel.com, dri-devel@lists.freedesktop.org Cc: mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, daniel@ffwll.ch, linux-kernel@vger.kernel.org, cuitao Subject: [PATCH] drm/xe: Simplify the allocation of sync slab caches Date: Tue, 14 May 2024 11:13:48 +0800 Message-Id: <20240514031348.15173-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/xe/xe_hw_fence.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/xe/xe_hw_fence.c b/drivers/gpu/drm/xe/xe_hw_fence.c index a5de3e7b0bd6..0f4eee529c6a 100644 --- a/drivers/gpu/drm/xe/xe_hw_fence.c +++ b/drivers/gpu/drm/xe/xe_hw_fence.c @@ -20,9 +20,7 @@ static struct kmem_cache *xe_hw_fence_slab; int __init xe_hw_fence_module_init(void) { - xe_hw_fence_slab = kmem_cache_create("xe_hw_fence", - sizeof(struct xe_hw_fence), 0, - SLAB_HWCACHE_ALIGN, NULL); + xe_hw_fence_slab = KMEM_CACHE(xe_hw_fence, SLAB_HWCACHE_ALIGN); if (!xe_hw_fence_slab) return -ENOMEM; -- 2.25.1