Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp66709rdb; Thu, 1 Feb 2024 02:09:53 -0800 (PST) X-Google-Smtp-Source: AGHT+IEeym2JVSqfaD0ORx34LOXg/fIfymupgdhEiBPmJoTytnRcbK3EmEcVDK3MFJXlOESeR1Z1 X-Received: by 2002:a05:6870:b50d:b0:206:95ba:abcb with SMTP id v13-20020a056870b50d00b0020695baabcbmr3819152oap.53.1706782193361; Thu, 01 Feb 2024 02:09:53 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706782193; cv=pass; d=google.com; s=arc-20160816; b=LymAn64SJYxNu7iJEZDACUl+DW4N/folqhVDhLLaVyvk0p/lxBDIP8cBb3VSiWaBGC CkUtDGHgj9Ec8we+TNE09/vxDqUM2KJ5nr/adMY3p1YpAv2qmmdTSJSu+QcwOckpFtrG pB4x6nfSzjDZRx6CafYNzJewmHraWMroa9JJ2OvjpdeMxnFcspcaGIcQ2STlt0m7EtBg TzLejf5FKD/wP0JAqRMDHHM5IWX/py7uwg/se1jb/rYuho4NPHWIwLNMPQvzhebLo/5N 4h/ENEj+Jni4ILY8kQQP55+brXBwZcEhGJtwCi7gL8I2gXvkoY8QpDr1LzoDQpky8Lo/ BOJQ== 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=vKvHer6Qx93wKrfb/JXERMzzZWZ4mC+2+8m/9EUtpag=; fh=L0QhXeaJzDIn5vejbhSJE4r3ripnRDTNzB51SReHSfM=; b=w8O3Wch2InhL5FhfqxfmBOj6n7GU+r2quPSOGS0zcUHeFdW/GEN3ZV5s3XGyfRdm5C OpR935wvPC+5JYK8DMqEofzJZlr845vdSWwsBgPoxV6zAyiDsukZiGmcBF9OijSmkEKz xZeMMZ4DUETI0FUaSkAlkQeCjPZjl8zrCuG+BNOjFOPjtF4SCCQHWz0Tsxd03pBhYC0C oSVn9dLS7gbFS+BlmOFeielRMRRrt69d3YfZtL2phUTL3M5I8LZK8FFHFxuQ2cUXk01w a8opZELJBWzE5KDw+zqUBH1DDidAtXv7ZPvKRmZVzM2qSxwp/cUfZRPJbKluzLMk9zvM cbbA==; 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-47940-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47940-linux.lists.archive=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCVLRSrrgf3d2ClnN00tFyWBWthO+zwU85rucjCtYc0/oGshyFV/374VPAGN+xNFa6mk45fYhCbU7LCfDhJV8TK0ufZkiu8bwPEPwFv0UQ== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id l7-20020a63ba47000000b005d8c05cd744si9191959pgu.890.2024.02.01.02.09.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 02:09:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-47940-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=kylinos.cn); spf=pass (google.com: domain of linux-kernel+bounces-47940-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47940-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 04626284995 for ; Thu, 1 Feb 2024 10:09:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C8EED15B96C; Thu, 1 Feb 2024 10:09: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 54C134DA1D; Thu, 1 Feb 2024 10:09: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=1706782179; cv=none; b=ApgvLUXrYObTFZDRNHSazrVQZ0szK65JDJigmlMveBcSCkq7IZee0/URFDOJ3Wcf8z0friFY22ZQKK3ycjdUZGCY1klmqbPL01pEdF6iiZ3qH5WKMrXaNUOddSmvfTWX/8n+EHVf5j69MDnVv4HQOtOiPCiffvRtE9SFM5y0Xb4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706782179; c=relaxed/simple; bh=sUELeIL8A4dMOkQ6Uu6mJ6Gg/l8qd0uKqcRrayxEFTw=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=YWYokFJ2SOSxzvR0GOUxz3JgDFv1LXYk8xPUm4ClEf03vCZwNoJq/RJR6XtzI8QEkeSWHQQtBfuGALxKLnxFsKCN6w++4j0SjWhlHYCQM6PwmTwmMVftfvn+uCGbNvyIMUaHOPlPZXRXrpxTH6DKN+uRRfF/YiybcwmpOfWJe3s= 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: 8e60355f3f044216afb21e30a2e3a3e9-20240201 X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.35,REQID:5a88fb0a-d436-49d2-8459-4aef407d2d46,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:5a88fb0a-d436-49d2-8459-4aef407d2d46,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:80c80180-4f93-4875-95e7-8c66ea833d57,B ulkID:240201180932CHGT3RUC,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_FAS,TF_CID_SPAM_FSD,TF_CID_SPAM_FSI,TF_CID_SPAM_SNR X-UUID: 8e60355f3f044216afb21e30a2e3a3e9-20240201 Received: from mail.kylinos.cn [(39.156.73.10)] by mailgw (envelope-from ) (Generic MTA) with ESMTP id 1476708960; Thu, 01 Feb 2024 18:09:29 +0800 Received: from mail.kylinos.cn (localhost [127.0.0.1]) by mail.kylinos.cn (NSMail) with SMTP id A812AE000EB9; Thu, 1 Feb 2024 18:09:29 +0800 (CST) X-ns-mid: postfix-65BB6DD9-4795091386 Received: from kernel.. (unknown [172.20.15.254]) by mail.kylinos.cn (NSMail) with ESMTPA id 1FB48E000EB9; Thu, 1 Feb 2024 18:09:25 +0800 (CST) From: Kunwu Chan To: dhowells@redhat.com, marc.dionne@auristor.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com Cc: linux-afs@lists.infradead.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Kunwu Chan Subject: [PATCH net-next] rxrpc: Simplify the allocation of slab caches Date: Thu, 1 Feb 2024 18:09:24 +0800 Message-Id: <20240201100924.210298-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 --- net/rxrpc/af_rxrpc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/net/rxrpc/af_rxrpc.c b/net/rxrpc/af_rxrpc.c index 465bfe5eb061..1326a1bff2d7 100644 --- a/net/rxrpc/af_rxrpc.c +++ b/net/rxrpc/af_rxrpc.c @@ -1026,9 +1026,7 @@ static int __init af_rxrpc_init(void) =20 ret =3D -ENOMEM; rxrpc_gen_version_string(); - rxrpc_call_jar =3D kmem_cache_create( - "rxrpc_call_jar", sizeof(struct rxrpc_call), 0, - SLAB_HWCACHE_ALIGN, NULL); + rxrpc_call_jar =3D KMEM_CACHE(rxrpc_call, SLAB_HWCACHE_ALIGN); if (!rxrpc_call_jar) { pr_notice("Failed to allocate call jar\n"); goto error_call_jar; --=20 2.39.2