Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
From: Markus Elfring <Markus.Elfring@web.de>
To: Krishna Chaitanya Chundru <krishna.chundru@oss.qualcomm.com>,
	Sumit Kumar <sumit.kumar@oss.qualcomm.com>,
	mhi@lists.linux.dev, linux-arm-msm@vger.kernel.org,
	Manivannan Sadhasivam <mani@kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Akhil Vinod <akhil.vinod@oss.qualcomm.com>,
	Subramanian Ananthanarayanan
	<subramanian.ananthanarayanan@oss.qualcomm.com>,
	Vivek Pernamitta <quic_vpernami@quicinc.com>
Subject: Re: [PATCH 1/2] bus: mhi: host: Add loopback driver with sysfs interface
Date: Mon, 29 Sep 2025 11:14:20 +0200	[thread overview]
Message-ID: <97a640d0-d80c-4c96-8204-719493d258aa@web.de> (raw)
In-Reply-To: <20250923-loopback_mhi-v1-1-8618f31f44aa@oss.qualcomm.com>

…
> +++ b/drivers/bus/mhi/host/mhi_loopback.c
> @@ -0,0 +1,348 @@
> +static ssize_t start_store(struct device *dev,
> +			   struct device_attribute *attr,
> +			   const char *buf, size_t count)
> +{
> +	struct mhi_loopback *mhi_lb = dev_get_drvdata(dev);
> +	void *send_buf, *recv_buf;
> +	guard(mutex)(&mhi_lb->lb_mutex);
> +free_buf:
> +	kfree(send_buf);
> +free_recv_buf:
> +	kfree(recv_buf);
> +unlock:
+	mhi_lb->loopback_in_progress = false;
> +	return ret;
> +}
…

Under which circumstances would you become interested to apply an attribute
like “__free(kfree)”?
https://elixir.bootlin.com/linux/v6.17-rc7/source/include/linux/slab.h#L476

Regards,
Markus

  reply	other threads:[~2025-09-29  9:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-23  6:37 [PATCH 0/2] bus: mhi: Add loopback driver for host & ep Sumit Kumar
2025-09-23  6:37 ` [PATCH 1/2] bus: mhi: host: Add loopback driver with sysfs interface Sumit Kumar
2025-09-29  9:14   ` Markus Elfring [this message]
2025-09-23  6:37 ` [PATCH 2/2] bus: mhi: ep: Add loopback driver for data path testing Sumit Kumar
2025-09-28 19:10   ` kernel test robot

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=97a640d0-d80c-4c96-8204-719493d258aa@web.de \
    --to=markus.elfring@web.de \
    --cc=akhil.vinod@oss.qualcomm.com \
    --cc=krishna.chundru@oss.qualcomm.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mani@kernel.org \
    --cc=mhi@lists.linux.dev \
    --cc=quic_vpernami@quicinc.com \
    --cc=subramanian.ananthanarayanan@oss.qualcomm.com \
    --cc=sumit.kumar@oss.qualcomm.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox