mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "André Draszik" <andre.draszik@linaro.org>
To: Krzysztof Kozlowski <krzk@kernel.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	 Mark Brown <broonie@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org,
	Dan Carpenter <dan.carpenter@linaro.org>
Subject: Re: [PATCH 1/2] regulator: s2mps11: drop redundant sanity checks in s2mpg10_of_parse_cb()
Date: Tue, 10 Feb 2026 11:35:01 +0000	[thread overview]
Message-ID: <91c191bf483512ae10850648a23037e0ca23e3d4.camel@linaro.org> (raw)
In-Reply-To: <1300929e-7b47-45d2-a863-778fd3012a76@kernel.org>

On Tue, 2026-02-10 at 11:51 +0100, Krzysztof Kozlowski wrote:
> On 10/02/2026 10:37, André Draszik wrote:
> > Hi Krzysztof,
> > 
> > On Tue, 2026-02-10 at 08:28 +0100, Krzysztof Kozlowski wrote:
> > 
> > 
> > > I also wonder why you left the second - ext_control_s2mpg11 - untouched.
> > 
> > Could you point me to it please? I'm not sure I see what you mean.
> 
> There is exact same line, which you touch here, ~20 lines below. At
> least in linux-next from 5th Feb.

So you mean
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/drivers/regulator/s2mps11.c#n506
? It is part of the patch:

diff --git a/drivers/regulator/s2mps11.c b/drivers/regulator/s2mps11.c
index 2d5510acd0780ab6f9296c48ddcde5efe15ff488..2d67c5c16f487506a2e9e4b119f33faa846269f7 100644
--- a/drivers/regulator/s2mps11.c
+++ b/drivers/regulator/s2mps11.c
@@ -478,8 +478,6 @@ static int s2mpg10_of_parse_cb(struct device_node *np,
 			return -EINVAL;
 		}
 
-		if (ext_control > ARRAY_SIZE(ext_control_s2mpg10))
-			return -EINVAL;
 		ext_control = ext_control_s2mpg10[ext_control];
 		break;
 
@@ -503,8 +501,6 @@ static int s2mpg10_of_parse_cb(struct device_node *np,
 			return -EINVAL;
 		}
 
-		if (ext_control > ARRAY_SIZE(ext_control_s2mpg11))
-			return -EINVAL;
 		ext_control = ext_control_s2mpg11[ext_control];
 		break;
 

Otherwise I still don't see it :-)


Cheers,
Andre'

  reply	other threads:[~2026-02-10 11:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-09 15:07 [PATCH 0/2] regulator: s2mps11: two small bug fixes (s2mpg1x) André Draszik
2026-02-09 15:07 ` [PATCH 1/2] regulator: s2mps11: drop redundant sanity checks in s2mpg10_of_parse_cb() André Draszik
2026-02-09 16:09   ` Krzysztof Kozlowski
2026-02-10  5:59     ` André Draszik
2026-02-10  7:28       ` Krzysztof Kozlowski
2026-02-10  9:37         ` André Draszik
2026-02-10 10:51           ` Krzysztof Kozlowski
2026-02-10 11:35             ` André Draszik [this message]
2026-02-10 11:39               ` Krzysztof Kozlowski
2026-02-09 15:07 ` [PATCH 2/2] regulator: s2mps11: fix pctrlsel macro usage " André Draszik

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=91c191bf483512ae10850648a23037e0ca23e3d4.camel@linaro.org \
    --to=andre.draszik@linaro.org \
    --cc=broonie@kernel.org \
    --cc=dan.carpenter@linaro.org \
    --cc=krzk@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@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

all inboxes | Powered by JetHome®