From: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
To: Kunwu Chan <chentao@kylinos.cn>
Cc: mhi@lists.linux.dev, linux-arm-msm@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] bus: mhi: ep: Simplify the allocation of slab caches in mhi_ep_register_controller
Date: Tue, 27 Feb 2024 10:42:36 +0530 [thread overview]
Message-ID: <20240227051236.GA2587@thinkpad> (raw)
In-Reply-To: <20240221085937.167200-1-chentao@kylinos.cn>
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.
>
There are multiple instances of kmem_cache_create() in this driver. Could you
change them also?
- Mani
> Signed-off-by: Kunwu Chan <chentao@kylinos.cn>
> ---
> drivers/bus/mhi/ep/main.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> 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_cntrl *mhi_cntrl,
> goto err_destroy_ev_ring_el_cache;
> }
>
> - mhi_cntrl->ring_item_cache = kmem_cache_create("mhi_ep_ring_item",
> - sizeof(struct mhi_ep_ring_item), 0,
> - 0, NULL);
> + mhi_cntrl->ring_item_cache = KMEM_CACHE(mhi_ep_ring_item, 0);
> if (!mhi_cntrl->ev_ring_el_cache) {
> ret = -ENOMEM;
> goto err_destroy_tre_buf_cache;
> --
> 2.39.2
>
>
--
மணிவண்ணன் சதாசிவம்
next prev parent reply other threads:[~2024-02-27 5:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-21 8:59 [PATCH] bus: mhi: ep: Simplify the allocation of slab caches in mhi_ep_register_controller Kunwu Chan
2024-02-27 5:12 ` Manivannan Sadhasivam [this message]
2024-02-27 9:55 ` Kunwu Chan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240227051236.GA2587@thinkpad \
--to=manivannan.sadhasivam@linaro.org \
--cc=chentao@kylinos.cn \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mhi@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.