Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp2237717rdb; Wed, 21 Feb 2024 01:01:39 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCU6gOitvg/nxN1xoKV8Xz104Vt66rB34FnB5QJcXTqZxxDDxPLYZ+r1BRvvODFqrWTJhekMPbxI5fpkNJXAKtGOmRCMAwm8O5vA6rT93w== X-Google-Smtp-Source: AGHT+IF40qNTHIKBGnqoWpQ11/p30dBgrhkNwXZinJ1VKIac3Y+L8ZQttV0Q/EbCK3L9Lj9i8XJ9 X-Received: by 2002:a05:620a:3956:b0:785:86e0:c3fc with SMTP id qs22-20020a05620a395600b0078586e0c3fcmr19991823qkn.5.1708506098810; Wed, 21 Feb 2024 01:01:38 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708506098; cv=pass; d=google.com; s=arc-20160816; b=no6KqzjOIRb7dLouHTBtkbdF8kQDUusPpD0+wAugNCI5yoGb2yg7lRTgbSd9Ckhtrk gc9iAnVfdEg+ZimIx39o8aKDo1mqwotGQt1JK7O1yUX6njcfpgG/UI9IFFBy5rGmnRE+ SiTLLHYnsFxsTcTW4aS6CN6UjjQQJQZS1xXa4Ubwv2sDKPnOq/cg1wqU0Yg5+c+Xfzbe rQSOiDO8VpQ4U/gg1Sli9Bi39yLVToCTqP3TOq2Nqz7YFesG3Skp8NZDECln9S/1Z39m DoI/UJN+r5xD5DUxrjC5sHSG6OpbYoBCH9B0JNJZJy/TsFyHxHjyqBJvS+xuRBIO4RDp FA4w== 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=jOsgPU/TVcfPx0UiqrT8ACLgDBGBWKArOCzBRggN+N8=; fh=8ArvNctlq/lPScEUPURZ0JaLFZ8kBd2KNsA1/Ks2vro=; b=pUD5W5BTWnSP/WSe14XnFYXynN/RkyFIcQAgtH2lrStiId8A5P3z2wkqCC+bYmkGpD 7yGzsj0KgBx1LWFmxo5dDnZuqWLcV/th6qfIcCB0XCIrotZo3WnaxMi0bJliJ9e4ji13 3dNBPTujjdL3d3AiR4h6ymwSgaIbYkMF3MRpBn7+wIXz8MqxPgdYtV+/0UhyNtLR+yVT M42zeSL+G63UfHa4FK+2vAOUWuEU0ZdlIivQFCPeL3waoFcrevP39SVVbSGJMTuR8T9A 0bQUWttCfRYThxq5LKzTZ7pCwwHGIDjydN7VclEujtTKK1Jv7MUjmMxyDQPKXgs70Dad xEqA==; 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-74341-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-74341-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id j18-20020a05620a0a5200b00785d862b469si10288387qka.561.2024.02.21.01.01.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 01:01:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-74341-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=kylinos.cn); spf=pass (google.com: domain of linux-kernel+bounces-74341-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-74341-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 8656C1C21B2E for ; Wed, 21 Feb 2024 09:01:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 030DA3D0B8; Wed, 21 Feb 2024 09:01:33 +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 D80BC3C497 for ; Wed, 21 Feb 2024 09:01:29 +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=1708506092; cv=none; b=g4+v9CeHqKrO3cs3AZEMNom12XpQeI/cxTXyr6iwBOvTeLGs3gcjuGgYWdzBpgfQDckRp9v6VliewmK4k0w3rv3IwqDUdqM2pvo41ABLP8kSJcOcBH8EDb06bZr56qnlCmfmg0drwj+FUhiAzpNgtxJHBLzLEOzt0DoTxhgpMKc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708506092; c=relaxed/simple; bh=1S4AsCBkhTEWibR9crMuAzFv0ZZTi4TJLhXgEEgbKq0=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=tbF/LAAETd11e6Y2RUu1ooPexI94XZ3UbkQRpSG3a+xS9jKVhZ831OsgCz6tidzXeFN6qnI9TQfWF/1Qas7aEH9/822/JF+/dhtde7SFilNND+G566v6PkfA9QxyfA6IoPl4V+ULzTLyqT37qKu8lyw2AauiXCvfd0sh65UXifU= 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: 0aa368f3530545ed8de1e400171aded9-20240221 X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.35,REQID:8dc1fbd6-5e04-4cb7-a59c-c0138488e143,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:8dc1fbd6-5e04-4cb7-a59c-c0138488e143,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:013b8b8f-e2c0-40b0-a8fe-7c7e47299109,B ulkID:240221165604J5OQ83PO,BulkQuantity:0,Recheck:0,SF:19|44|66|38|24|17|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_FAS,TF_CID_SPAM_FSD,TF_CID_SPAM_FSI,TF_CID_SPAM_SNR X-UUID: 0aa368f3530545ed8de1e400171aded9-20240221 Received: from mail.kylinos.cn [(39.156.73.10)] by mailgw (envelope-from ) (Generic MTA) with ESMTP id 436310388; Wed, 21 Feb 2024 16:56:02 +0800 Received: from mail.kylinos.cn (localhost [127.0.0.1]) by mail.kylinos.cn (NSMail) with SMTP id 54D8BE000EBC; Wed, 21 Feb 2024 16:56:02 +0800 (CST) X-ns-mid: postfix-65D5BAA2-127793529 Received: from kernel.. (unknown [172.20.15.254]) by mail.kylinos.cn (NSMail) with ESMTPA id 89F08E000EBC; Wed, 21 Feb 2024 16:56:00 +0800 (CST) From: Kunwu Chan To: ltuikov89@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, linux-kernel@vger.kernel.org, Kunwu Chan Subject: [PATCH] drm/scheduler: Simplify the allocation of slab caches in drm_sched_fence_slab_init Date: Wed, 21 Feb 2024 16:55:58 +0800 Message-Id: <20240221085558.166774-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 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/scheduler/sched_fence.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/scheduler/sched_fence.c b/drivers/gpu/drm/sc= heduler/sched_fence.c index 06cedfe4b486..0f35f009b9d3 100644 --- a/drivers/gpu/drm/scheduler/sched_fence.c +++ b/drivers/gpu/drm/scheduler/sched_fence.c @@ -33,9 +33,7 @@ static struct kmem_cache *sched_fence_slab; =20 static int __init drm_sched_fence_slab_init(void) { - sched_fence_slab =3D kmem_cache_create( - "drm_sched_fence", sizeof(struct drm_sched_fence), 0, - SLAB_HWCACHE_ALIGN, NULL); + sched_fence_slab =3D KMEM_CACHE(drm_sched_fence, SLAB_HWCACHE_ALIGN); if (!sched_fence_slab) return -ENOMEM; =20 --=20 2.39.2