From: Johan Hovold <johan@kernel.org>
To: Konrad Dybcio <konrad.dybcio@linaro.org>
Cc: Johan Hovold <johan+linaro@kernel.org>,
Bjorn Andersson <andersson@kernel.org>,
Andy Gross <agross@kernel.org>,
linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH] soc: qcom: pmic_glink_altmode: fix port sanity check
Date: Thu, 9 Nov 2023 14:48:04 +0100 [thread overview]
Message-ID: <ZUzjFFUc1dOE8C54@hovoldconsulting.com> (raw)
In-Reply-To: <0edf26f9-46c8-4c9b-a68e-a92a78b5684e@linaro.org>
On Thu, Nov 09, 2023 at 02:28:59PM +0100, Konrad Dybcio wrote:
> On 11/9/23 10:31, Johan Hovold wrote:
> > - if (!altmode->ports[port].altmode) {
> > + if (port >= ARRAY_SIZE(altmode->ports) || !altmode->ports[port].altmode) {
> I'd personally use PMIC_GLINK_MAX_PORTS directly but it's the same
That's what I'd generally do as well, but here I followed the style of
this driver (and using ARRAY_SIZE() is arguable more safe).
> Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Thanks for reviewing.
Johan
next prev parent reply other threads:[~2023-11-09 13:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-09 9:31 [PATCH] soc: qcom: pmic_glink_altmode: fix port sanity check Johan Hovold
2023-11-09 13:28 ` Konrad Dybcio
2023-11-09 13:48 ` Johan Hovold [this message]
2023-11-09 14:28 ` Dmitry Baryshkov
2023-12-08 14:55 ` Bjorn Andersson
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=ZUzjFFUc1dOE8C54@hovoldconsulting.com \
--to=johan@kernel.org \
--cc=agross@kernel.org \
--cc=andersson@kernel.org \
--cc=johan+linaro@kernel.org \
--cc=konrad.dybcio@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.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