From: Herbert Xu <herbert@gondor.apana.org.au>
To: Akhil R <akhilrajeev@nvidia.com>
Cc: Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
"David S. Miller" <davem@davemloft.net>,
Thierry Reding <thierry.reding@gmail.com>,
Jon Hunter <jonathanh@nvidia.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"kernel-janitors@vger.kernel.org"
<kernel-janitors@vger.kernel.org>,
"linux-crypto@vger.kernel.org" <linux-crypto@vger.kernel.org>,
"linux-tegra@vger.kernel.org" <linux-tegra@vger.kernel.org>
Subject: Re: [PATCH] crypto: tegra - Remove an incorrect iommu_fwspec_free() call in tegra_se_remove()
Date: Fri, 31 May 2024 13:23:18 +0800 [thread overview]
Message-ID: <Zllexnetg3eu6dSW@gondor.apana.org.au> (raw)
In-Reply-To: <SJ1PR12MB633943D654272A0612695F1DC0F22@SJ1PR12MB6339.namprd12.prod.outlook.com>
On Wed, May 29, 2024 at 06:53:42AM +0000, Akhil R wrote:
> > The only iommu function call in this driver is a
> > tegra_dev_iommu_get_stream_id() which does not allocate anything and does
> > not take any reference.
> >
> > More-over, what is freed is "se->dev" which has been devm_kzalloc()'ed in the
> > probe.
>
> I did not completely understand what is being tried to convey here.
> If I understand it right, iommu_fwspec_free() does not do anything
> with the "devm_kzalloc"ed variable.
>
> It would probably be a good idea to remove this line from the commit message.
I think he means that as the memory was allocated via devm, it will
be automatically freed by the kernel and the driver does not need
to (and should not) free the memory by hand.
Cheers,
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
next prev parent reply other threads:[~2024-05-31 5:23 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-25 15:14 [PATCH] crypto: tegra - Remove an incorrect iommu_fwspec_free() call in tegra_se_remove() Christophe JAILLET
2024-05-29 6:40 ` Akhil R
2024-05-29 6:53 ` Akhil R
2024-05-30 10:30 ` Thierry Reding
2024-05-31 5:23 ` Herbert Xu [this message]
2024-05-31 5:36 ` Akhil R
2024-05-31 20:04 ` Marion & Christophe JAILLET
2024-05-31 10:24 ` Herbert Xu
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=Zllexnetg3eu6dSW@gondor.apana.org.au \
--to=herbert@gondor.apana.org.au \
--cc=akhilrajeev@nvidia.com \
--cc=christophe.jaillet@wanadoo.fr \
--cc=davem@davemloft.net \
--cc=jonathanh@nvidia.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=thierry.reding@gmail.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