Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp1815754rbb; Tue, 27 Feb 2024 01:56:07 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCX1hlekV/ra1SBtEENbthjELUUgfx5wR2wDp2ZhZ3anp6e26Fr8omeINSsuFap8CjzQQRXSXvlbYr+c/8rCorksWJs1wMMUcsioX9v2xA== X-Google-Smtp-Source: AGHT+IFy3iV9Qgc3Hbdybtxi5G69zZtTK8BRaZzFJ770DV1w7ALH8WV/MwS24FyDP4JkQGMgh3oz X-Received: by 2002:aa7:d6cf:0:b0:564:a4e9:3683 with SMTP id x15-20020aa7d6cf000000b00564a4e93683mr7337127edr.16.1709027767270; Tue, 27 Feb 2024 01:56:07 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709027767; cv=pass; d=google.com; s=arc-20160816; b=tkp1m/WiBfw2Uh0ITscWkVsDbQ1ChMDPigy5DhXA2rtTinBKG4KXevarKxkfvbvu9b mPQqtpxdhy+U5R5dedQtrvtifzj58BS41sN2h0D4R6fzt/G5pR6o/4csyyus+zVvL8gb MwDp4QK47/CHWrBQovUnP8Zd7nnmG1AcvAwXPOy67FAjVzTtkvjzAM0pppP2Xci3sScV dz4BKPx3qVWee9pfZ+BtoIBPTYw/9aORS9M0hiOwRFo9iuibtHlOCmKqY8YeM8uQTIRH v11nPmvXTFmV4C9HKJ53UaEJmDs11sweu3I7NYX5TNGCRSyk9cEUMV6e+KEambon7xUL k3wA== 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=vGlG+/gEG9WOAhzKoU2hfbsQlEQHurSXDUUPtk5C8Q8=; fh=4J0aIlZxg+5PKLAQpbQVKXsvqxBKa5iz7zTURznO178=; b=TsjfQq6Dc/KOnoiixFGYDVvTQrz13yGwlxS8XhUux+0/OAVywEZl7cYyxvuVRYVWb2 jwjpZ4s83/sPlZpRfi4ixDq6E+fTsUQRYJBPPw+HaybXPwmcmATFKmm6qQXnUS17mGDa ruLCUB4/ZC8wHCeOZRsReaOEe41ZjZO7uaE3CNb7bBQDyVMs511SsdTlFlqxinhLqJ9s lxnOv3mjM4UM5LbpL7E/7XCMDicn9OPzIwF5o53im4SN4l0Q7egdKkO30y0kdyQwnVG7 sYYrOVVEe/mIu4NmZMPO5ZARPSh76kSKhiu0hWufKJjNUfAkhO6pGejUt2kf1ZclE5qe xLIA==; 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-82994-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-82994-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 m15-20020aa7c2cf000000b005640ae1a532si583937edp.359.2024.02.27.01.56.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Feb 2024 01:56:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-82994-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-82994-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-82994-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 0F1001F24BF4 for ; Tue, 27 Feb 2024 09:56:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1FBD7137C2F; Tue, 27 Feb 2024 09:56:00 +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 E27C313699C; Tue, 27 Feb 2024 09:55:54 +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=1709027759; cv=none; b=gGKALv32GWBb33rVUMLxjSKE7wWHkk6Aa5KAvoXqSDNKH9G2R1U59XUISaHa2jGyV00+smkJZWF82q/0zrJzwIxuvMxTxKT+JIQHCu9YfQTBMOv5hC8/TwqD6BzgnlLJAQtLsvoxdVryfpAc1ZWEQKSJQmzNUen4oLXAplI8sH4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709027759; c=relaxed/simple; bh=xq3qBvU4gk1ltWqMXc7Ql/8kJ/Mxz+rJm9geJy5TnhA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=b1AgDgSOaG/iJx5l8qbaVSPvVtF/c6haCP4jPGs8RQEqB0o1yN8/s95P2TJ4A8MMiGT4Q0uMJLbVkw/H9Razt8p79xV4KnPhO29ePPgOz0svUNO5CX28pS3dz7Ky+Y8gilGj9JJw4v+yrwuUZcRksz3rlT6f9WbA2XP8gqm85Fs= 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: 3cf98a80e6454bb8b1d6f00fd9077175-20240227 X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.37,REQID:162797f2-c538-442e-bc87-ce312ef5383f,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.37,REQID:162797f2-c538-442e-bc87-ce312ef5383f,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:6f543d0,CLOUDID:d9de43ff-c16b-4159-a099-3b9d0558e447,B ulkID:2402271312595MEHZP25,BulkQuantity:5,Recheck:0,SF:24|17|19|44|64|66|1 02,TC:nil,Content:0,EDM:-3,IP:-2,URL:0,File:nil,RT:nil,Bulk:40,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: 1,FCT|NGT X-CID-BAS: 1,FCT|NGT,0,_ X-CID-FACTOR: TF_CID_SPAM_FSI,TF_CID_SPAM_SNR,TF_CID_SPAM_FAS,TF_CID_SPAM_FSD X-UUID: 3cf98a80e6454bb8b1d6f00fd9077175-20240227 Received: from mail.kylinos.cn [(39.156.73.10)] by mailgw (envelope-from ) (Generic MTA) with ESMTP id 763447630; Tue, 27 Feb 2024 17:55:49 +0800 Received: from mail.kylinos.cn (localhost [127.0.0.1]) by mail.kylinos.cn (NSMail) with SMTP id 493D2E000EBC; Tue, 27 Feb 2024 17:55:49 +0800 (CST) X-ns-mid: postfix-65DDB1A5-1319371114 Received: from kernel.. (unknown [172.20.15.254]) by mail.kylinos.cn (NSMail) with ESMTPA id 6132CE000EBC; Tue, 27 Feb 2024 17:55:48 +0800 (CST) From: Kunwu Chan To: manivannan.sadhasivam@linaro.org Cc: chentao@kylinos.cn, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, mhi@lists.linux.dev Subject: Re: [PATCH] bus: mhi: ep: Simplify the allocation of slab caches in mhi_ep_register_controller Date: Tue, 27 Feb 2024 17:55:47 +0800 Message-Id: <20240227095547.160357-1-chentao@kylinos.cn> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240227051236.GA2587@thinkpad> References: <20240227051236.GA2587@thinkpad> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=8bit Content-Transfer-Encoding: quoted-printable Thanks for the reply. > > On Wed, Feb 21, 2024 at 04:59:37PM +0800, Kunwu Chan wrote: > > Use the new KMEM_CACHE() macro instead of direct kmem_cache_create > > to simplify the creation of SLAB caches. > >=20 >=20 > There are multiple instances of kmem_cache_create() in this driver. Cou= ld you > change them also? Sure, I'll change all of them if possible in v2 patch. >=20 > - Mani >=20 > > Signed-off-by: Kunwu Chan > > --- > > drivers/bus/mhi/ep/main.c | 4 +--- > > 1 file changed, 1 insertion(+), 3 deletions(-) > >=20 > > diff --git a/drivers/bus/mhi/ep/main.c b/drivers/bus/mhi/ep/main.c > > index 65fc1d738bec..7b61d384b2b6 100644 > > --- a/drivers/bus/mhi/ep/main.c > > +++ b/drivers/bus/mhi/ep/main.c > > @@ -1493,9 +1493,7 @@ int mhi_ep_register_controller(struct mhi_ep_cn= trl *mhi_cntrl, > > goto err_destroy_ev_ring_el_cache; > > } > > =20 > > - mhi_cntrl->ring_item_cache =3D kmem_cache_create("mhi_ep_ring_item"= , > > - sizeof(struct mhi_ep_ring_item), 0, > > - 0, NULL); > > + mhi_cntrl->ring_item_cache =3D KMEM_CACHE(mhi_ep_ring_item, 0); > > if (!mhi_cntrl->ev_ring_el_cache) { > > ret =3D -ENOMEM; > > goto err_destroy_tre_buf_cache; > > --=20 > > 2.39.2 > >=20 > >=20 >=20 > --=20 > =E0=AE=AE=E0=AE=A3=E0=AE=BF=E0=AE=B5=E0=AE=A3=E0=AF=8D=E0=AE=A3=E0=AE=A9= =E0=AF=8D =E0=AE=9A=E0=AE=A4=E0=AE=BE=E0=AE=9A=E0=AE=BF=E0=AE=B5=E0=AE=AE= =E0=AF=8D >=20 Thanks, Kunwu.Chan