From: Marc Zyngier <maz@kernel.org>
To: Xu Qiang <xuqiang36@huawei.com>
Cc: <tglx@linutronix.de>, <linux-kernel@vger.kernel.org>,
<rui.xiang@huawei.com>
Subject: Re: [PATCH -next 1/2] irqdomain: fix possible uninitialized variable in irq_find_mapping()
Date: Mon, 18 Jul 2022 15:12:53 +0100 [thread overview]
Message-ID: <87r12izeze.wl-maz@kernel.org> (raw)
In-Reply-To: <20220718130759.67777-2-xuqiang36@huawei.com>
On Mon, 18 Jul 2022 14:07:58 +0100,
Xu Qiang <xuqiang36@huawei.com> wrote:
>
> In irq_find_mapping,ret value may be uninitialized.However,even if
> the local variable irq is initialized, it only solves the uninitialized
> problem and ret value is still an incorrect virq, so my modification
> method is to set virq in __irq_resolve_mapping function.
I think I understand what you are fixing, but I sadly don't understand
the commit message. Here's what I suggest as a commit message:
<commit>
When using a NOMAP domain, __irq_resolve_mapping() doesn't store the
Linux IRQ number at the address optionally provided by the caller.
While this isn't a huge deal (the returned value is guaranteed to the
hwirq that was passed as a parameter), let's honour the letter of the
API by writing the expected value.
</commit>
Does this match what you expected?
Thanks,
M.
--
Without deviation from the norm, progress is not possible.
next prev parent reply other threads:[~2022-07-18 14:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-18 13:07 [PATCH -next 0/2] Fix a bug and commit a code optimization Xu Qiang
2022-07-18 13:07 ` [PATCH -next 1/2] irqdomain: fix possible uninitialized variable in irq_find_mapping() Xu Qiang
2022-07-18 14:12 ` Marc Zyngier [this message]
2022-07-18 13:07 ` [PATCH -next 2/2] irqdomain: Replace revmap_direct_max_irq field with hwirq_max field Xu Qiang
2022-07-18 17:00 ` kernel test robot
2022-07-18 14:21 ` [PATCH -next 0/2] Fix a bug and commit a code optimization Marc Zyngier
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=87r12izeze.wl-maz@kernel.org \
--to=maz@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rui.xiang@huawei.com \
--cc=tglx@linutronix.de \
--cc=xuqiang36@huawei.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 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.