Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp2263614rdb; Wed, 21 Feb 2024 02:05:30 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUdp5nRW7gdzV1qJC/hDv6j5bqCkd/ddQ1b6lRN+K54JaTovsz0YCimPAlAHnvgN0cb8RRnBpSbZv8epmgWwkeiv1RMbxBrBydaELgcTQ== X-Google-Smtp-Source: AGHT+IFwAR8qpH9/5JZIoCK1rm9uug7xqy80N35fw+H5/yT32q5IuQZhxCaGCCsWZjAEfxNSiFO6 X-Received: by 2002:a05:620a:35a:b0:783:f683:ee26 with SMTP id t26-20020a05620a035a00b00783f683ee26mr16553554qkm.31.1708509930653; Wed, 21 Feb 2024 02:05:30 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708509930; cv=pass; d=google.com; s=arc-20160816; b=aAI+b3c97ukuxRO5IS4IN2CNA0L1XOeDoLgD9qfPWINwwfKCBPInRV6vSNhz0lOWxw Tw2MfAGWSDZxRwq4s1VEqHeX8VDPQHPTruHKupD6fb+uFM5laZNtFLybleMNa5E1cesv y9RpDoRzSn1QSL2WoOhIhkCFsaoEEXr30leUBkyNdJQgUC1HYxxVxd2/6l8D6EOXVk7b 1pi9CFN1LGz7YQjCWo+G9gEkXOtstB0zmsUE6CPkA7zEjbhnhIh2ubHJGjb0uBOKpcTt ir4Q+kp2BhcNEVnof9ZdJjyC+Xg4PAbe5v0XKu4HniBxWeW26gjqVlZ4wnu+KLFrScaI Ncvw== 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:references:in-reply-to:message-id :date:subject:cc:to:from; bh=xMmmSVDbz+Yz/X31dsO0kQDGsn3o8JTmi+DKMzvqmrE=; fh=/+7C6FaRdYsH4siaUR2phuFq3K99zCqwXFtJszu8I1I=; b=wFEdxuW/jUrFcVX6D3K65CeFjylao6KbnD/Jh8zYi5JhGxLKVA9CzI2vAauCfRD3tL e1xWMNrmbOASANJ/X+Rv9jTfOyntsPBh396wn4o6jG9+e5AERrN4rJX/z2ZQzEDvbs82 v5BYVzhrRTeiaIvn9zNjrDw2tH6RRQscdphHEEntKjY2yNQlOnLk3DkpSlBwNY6kpU7V NcC6Jn6Edyu2YvKM/EuOUYLxMFEPqVTUiBScW+aDmJbB0wgBcsTPb05xgKUCquU5w5OS +mUtqkiY9inwFN65QHeBcR8JOJpm+2G/03/wd+MHjt9xmOiwqxTuziBCXpUyKeQ/s7kZ 0L/Q==; 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-74494-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-74494-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 p14-20020a05620a22ee00b00787273e4b87si9871053qki.711.2024.02.21.02.05.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 02:05:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-74494-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-74494-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-74494-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 156E01C23C25 for ; Wed, 21 Feb 2024 10:05:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BD72A3F9D6; Wed, 21 Feb 2024 10:00:39 +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 4A0C63D54C for ; Wed, 21 Feb 2024 10:00:35 +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=1708509639; cv=none; b=KnD2+vzT6wNHnZsAdb8QAmHqTOspaT2JwsZNH3IOS+FpzQ3pjA7ZF8CTR0KJfUSqWljmFMre26qI3MsIYsEAeDTmC2iNDsafPCAzitcUDmn8exbXYUIH2Pd0rQBMvfoCJ88b/IdTbv3H2KFXOyCUpthfJ0UAOGMzkO1cjVs1fq8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708509639; c=relaxed/simple; bh=MGZaqLmMzO6wbM7prH14xhw2vpbo3yMc/zyQLmT9EFs=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=HAzRDjxY55KyLwbP7i0/b5YHjjfVMSP7qiNmRhwK8jfKR4tegEtfXkFm/MUleQJFiRCwxLe3BHmVwOmoHkAkDyqy4xPCxbTNEVsetxGc701IfePePL11S/OlOIzNHiOv6Fo3t3Y4y3SJiLUxZkKndjEyWxO8qEk3VQXTxn/PWpo= 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: 02cc5fc8cccf4f98ab5783f712d703ca-20240221 X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.35,REQID:623a14fd-5008-4c40-89be-891b8c45b351,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:623a14fd-5008-4c40-89be-891b8c45b351,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:deed8b8f-e2c0-40b0-a8fe-7c7e47299109,B ulkID:2402211800264WKWF8CQ,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_SNR,TF_CID_SPAM_FAS,TF_CID_SPAM_FSD,TF_CID_SPAM_FSI X-UUID: 02cc5fc8cccf4f98ab5783f712d703ca-20240221 Received: from mail.kylinos.cn [(39.156.73.10)] by mailgw (envelope-from ) (Generic MTA) with ESMTP id 156901990; Wed, 21 Feb 2024 18:00:23 +0800 Received: from mail.kylinos.cn (localhost [127.0.0.1]) by mail.kylinos.cn (NSMail) with SMTP id 9FE0CE000EBC; Wed, 21 Feb 2024 18:00:23 +0800 (CST) X-ns-mid: postfix-65D5C9B7-383174114 Received: from kernel.. (unknown [172.20.15.254]) by mail.kylinos.cn (NSMail) with ESMTPA id D4F04E000EBD; Wed, 21 Feb 2024 18:00:22 +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 3/3] drm/amdgpu: Simplify the allocation of sync slab caches Date: Wed, 21 Feb 2024 17:59:07 +0800 Message-Id: <20240221095907.172408-4-chentao@kylinos.cn> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240221095907.172408-1-chentao@kylinos.cn> References: <20240221095907.172408-1-chentao@kylinos.cn> 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/amd/amdgpu/amdgpu_sync.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c b/drivers/gpu/drm/a= md/amdgpu/amdgpu_sync.c index 1b013a44ca99..bdf1ef825d89 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c @@ -441,9 +441,7 @@ void amdgpu_sync_free(struct amdgpu_sync *sync) */ int amdgpu_sync_init(void) { - amdgpu_sync_slab =3D kmem_cache_create( - "amdgpu_sync", sizeof(struct amdgpu_sync_entry), 0, - SLAB_HWCACHE_ALIGN, NULL); + amdgpu_sync_slab =3D KMEM_CACHE(amdgpu_sync_entry, SLAB_HWCACHE_ALIGN); if (!amdgpu_sync_slab) return -ENOMEM; =20 --=20 2.39.2