From: Dan Carpenter <dan.carpenter@linaro.org>
To: Joerg Roedel <joro@8bytes.org>
Cc: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>,
Will Deacon <will@kernel.org>,
Robin Murphy <robin.murphy@arm.com>,
iommu@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] iommu/amd: Return a literal in init_gcr3_table()
Date: Thu, 20 Mar 2025 11:53:34 +0300 [thread overview]
Message-ID: <f688c2a2-a4d9-42c4-bf09-5ecbdbe9c9b5@stanley.mountain> (raw)
In-Reply-To: <Z9vLuWvzVJOyuuWu@8bytes.org>
On Thu, Mar 20, 2025 at 09:03:05AM +0100, Joerg Roedel wrote:
> On Mon, Mar 17, 2025 at 09:43:32AM +0300, Dan Carpenter wrote:
> > This code intentionally returns zero but it does it as "return ret;"
> > Returning ret looks like an error path where return 0 is more
> > clear and looks more intentional.
> >
> > Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
> > ---
> > drivers/iommu/amd/iommu.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/iommu/amd/iommu.c b/drivers/iommu/amd/iommu.c
> > index ce2626801ddf..7cbcc4933c8b 100644
> > --- a/drivers/iommu/amd/iommu.c
> > +++ b/drivers/iommu/amd/iommu.c
> > @@ -2150,7 +2150,7 @@ static int init_gcr3_table(struct iommu_dev_data *dev_data,
> >
> > /* Setup GCR3[0] only if domain is setup with v2 page table mode */
> > if (!pdom_is_v2_pgtbl_mode(pdom))
> > - return ret;
> > + return 0;
>
> There is another case of this a couple lines above in the same function.
> Mind changing that as well?
Thanks. Happy to. I'll resend.
regards,
dan carpenter
prev parent reply other threads:[~2025-03-20 8:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-17 6:42 [PATCH 0/2] iommu/amd: two tiny cleanups Dan Carpenter
2025-03-17 6:43 ` [PATCH 1/2] iommu/amd: Delete unnecessary NULL check Dan Carpenter
2025-03-17 6:43 ` [PATCH 2/2] iommu/amd: Return a literal in init_gcr3_table() Dan Carpenter
2025-03-20 8:03 ` Joerg Roedel
2025-03-20 8:53 ` Dan Carpenter [this message]
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=f688c2a2-a4d9-42c4-bf09-5ecbdbe9c9b5@stanley.mountain \
--to=dan.carpenter@linaro.org \
--cc=iommu@lists.linux.dev \
--cc=joro@8bytes.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robin.murphy@arm.com \
--cc=suravee.suthikulpanit@amd.com \
--cc=will@kernel.org \
/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
all inboxes | Powered by JetHome®