From nobody Tue Feb 10 14:49:32 2026 Received: from mail-ed1-f43.google.com (mail-ed1-f43.google.com [209.85.208.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2D93E37E2F7 for ; Mon, 9 Feb 2026 15:07:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770649671; cv=none; b=Fjubk/R9EzuCjIukJnh9BMCKLe4sH+7i/NONTE/ggVEb+IvUTyV3cTu2ApjqyF5f8u6iTT6hPBhGO6Ji/GN1NhGn0RLoU94M57eaoKphYIpUYuP86LaoOMxwO+QjOKiLSYaF0uWti8JCxSEYZE7sCZibqNIjxJv9E62zkD5cmGY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770649671; c=relaxed/simple; bh=C7mQCeEr/HdbKguNqig8yEGFQ8i0l7imyEakSsdZ4wU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=nGYEB/zrU2vpkCRq06h6+jasdZa2a58A98Nc15clkJ1J8r2GleNO4T+h+dGubGHZDXwj99BILXDo3YcQEIQkcrwvpzvaWalWT1r1Lu+VYbOlUykgRMLaPs1rLmH4SK95+UL3PsInA+1q0zgE/RA3DWDeRkLo5vPN+BeoE+0WAk0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=Px7pYXIz; arc=none smtp.client-ip=209.85.208.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Px7pYXIz" Received: by mail-ed1-f43.google.com with SMTP id 4fb4d7f45d1cf-658ad86082dso4356446a12.0 for ; Mon, 09 Feb 2026 07:07:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1770649669; x=1771254469; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=XegibK6nZtE74LWspbesvNEx78XvtPq2jMKaE0vnzoI=; b=Px7pYXIzNoRnX6/1nw7mMSYxejRIeX4YBej3uecoRzNR1dyjl0tnSDP+3U3DP3pLiq Q7+gZqG3DjviAJbXJj3tCZiiz4R8KX23Me0cGJfIgOervpu+A+6ilwtdYb89ss1MtEuy NMQ+1pKkPuM4xlGlAVW5IeS94Zq9b9vf7ioM9rYQEL4xngcJX8YbXTFmoSa9fZ1To1IS KvFFl5F8/uqbt22tTpJHdFo243IAn/+ppaXH4efpNCLINiRmt+Pmn0lQbhRmwNph4onc 8dLLi9xa/3kANVv+KDjdS/stNFIt85e5tUdGSTIgZ1L0iZhBFLVrxyGZ7rbCM4GaxRq3 J0xg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770649669; x=1771254469; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=XegibK6nZtE74LWspbesvNEx78XvtPq2jMKaE0vnzoI=; b=SSEgtXsmKHTknApjHdkHWdK0LXGsCAmfvTwYv5YphqhnLAll0a0O1DLNEmBcgnxQtD si2fDyepgZqu0KC0WHXpazjJ+i0rCiQ2hPDz94ZsTAtSGZxzcdVO/zRUj01xZ0/vUqhr o07e1qU6ShI/1aQ3xxmDoQpCK2yUCCpoA2B1oOZCs9kerQDgI+RRKF/sCct8mlAmd5A/ UkcR/8mgw4R6o7o7uNChtOMejPMwBjsrPO7/akqEbfviSMfd5/AwDWXpWFoEHKk2u32L xBanD5y9dlmXrczBSVHAfmcpe71IjAus0GHydIZiWVGjngS5kT/y2M5IaCXyGb5q/66J bpJQ== X-Gm-Message-State: AOJu0YwzMwWOq8C3I7CPs++QI41QYiZFsUeFBMZk/+hO5LryhJOxyzsR PfTERro6yPoGR1ncSj55xEPptmevEr88jHITI3uMu3ARtkbD3YCk7hxttdArV+maloo= X-Gm-Gg: AZuq6aKqImXx/zvqgZ0Ip22li7KKjKo7SQxqmXNmI0k7lNgYW2kjWsqMQ0r7wx5lQjF 778C//VrSrSxsXJ/eyzk+TY3jZxiDEqY01ZiKqYxwStTnWKxsvsOon2MVQLy+R9H/f81iH55xZD hQutwNEBcYVhdZPv/0OdMfJm5JE8B2/xtEcTcDP8oR7jtkR133n1DhTH66PuA39yg1wU+kEkPap wl/nNwBmmAUs+vWmQ/bGXniIdJzBrAnxHN2K9RuUXAUm6qX1SRJQ5nVhYwXArNyH3ZrH4/YRuJ2 ED01TZ9s0/7o9J3SryBhK47jJk57Ht3c/sj+WAzY00fLc0EFcWCtzHaeQpRE33Df8PKMEIT4KvY 6RAn9dB7/QIa/zrmi87JBv2N8l4i6YIoXci2FzHkDlgaahq867wgtrVYf0EsptbWmuLknwAPHcG QTIJvLE/L8XFEnSRR6YzmJViuuN3SpFubdw6n9QDKCeb9f6idHwMxRxLrrGN/4c8bfHT2kZnzpY 9jmNQ== X-Received: by 2002:a17:907:72c7:b0:b88:505d:2ac with SMTP id a640c23a62f3a-b8edf14ca75mr556288166b.1.1770649669481; Mon, 09 Feb 2026 07:07:49 -0800 (PST) Received: from puffmais2.c.googlers.com (244.175.141.34.bc.googleusercontent.com. [34.141.175.244]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b8edae6fa84sm393516366b.67.2026.02.09.07.07.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Feb 2026 07:07:49 -0800 (PST) From: =?utf-8?q?Andr=C3=A9_Draszik?= Date: Mon, 09 Feb 2026 15:07:47 +0000 Subject: [PATCH 1/2] regulator: s2mps11: drop redundant sanity checks in s2mpg10_of_parse_cb() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260209-s2mpg1x-regulators-fixes-v1-1-ead348e64e14@linaro.org> References: <20260209-s2mpg1x-regulators-fixes-v1-0-ead348e64e14@linaro.org> In-Reply-To: <20260209-s2mpg1x-regulators-fixes-v1-0-ead348e64e14@linaro.org> To: Krzysztof Kozlowski , Liam Girdwood , Mark Brown Cc: linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org, =?utf-8?q?Andr=C3=A9_Draszik?= , Dan Carpenter X-Mailer: b4 0.14.2 The sanity checks being removed in this commit are useless as earlier code checks for out-of-bounds conditions already. They also are incorrect (as they're off-by-one). Simply remove this incorrect code. No functional change. Reported-by: Dan Carpenter Closes: https://lore.kernel.org/all/aYmsu8qREppwBESH@stanley.mountain/ Signed-off-by: Andr=C3=A9 Draszik Reviewed-by: Krzysztof Kozlowski --- drivers/regulator/s2mps11.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/regulator/s2mps11.c b/drivers/regulator/s2mps11.c index 2d5510acd0780ab6f9296c48ddcde5efe15ff488..2d67c5c16f487506a2e9e4b119f= 33faa846269f7 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; } =20 - if (ext_control > ARRAY_SIZE(ext_control_s2mpg10)) - return -EINVAL; ext_control =3D ext_control_s2mpg10[ext_control]; break; =20 @@ -503,8 +501,6 @@ static int s2mpg10_of_parse_cb(struct device_node *np, return -EINVAL; } =20 - if (ext_control > ARRAY_SIZE(ext_control_s2mpg11)) - return -EINVAL; ext_control =3D ext_control_s2mpg11[ext_control]; break; =20 --=20 2.53.0.rc2.204.g2597b5adb4-goog From nobody Tue Feb 10 14:49:32 2026 Received: from mail-ej1-f47.google.com (mail-ej1-f47.google.com [209.85.218.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8931637E30E for ; Mon, 9 Feb 2026 15:07:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.47 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770649671; cv=none; b=Rt6mzMC1FPY0pYm1NuCheAjlvggALhLfIYiWagmqOoXxJ2KSzEv1lG/nLKOFuU/KgPHf1kRfkniw2ow7jyQfmjY2x6lqDaC8g5WGLql91GdZhMoHMRf7MFvsHXn+FrPOe9utk/xEeZJfJcFxRjU8vTYuxbkBxqUD9rrhZ8d7F6s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770649671; c=relaxed/simple; bh=V8OfhvBu1qNdN0KD4nFF3ROMtpeDRLHG6GJmQmeUi2M=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=PkprzyuyGi80l0IFr/Ko3wUfevuQCT5sY5TWs9VchVhQ3fHgh29xdxdzez9RTuQerqbaGYpqvkr4JbEFq/BpSQwkZTVPIF95QFYXSgOCL1OYeOBgBPs217XzoXs7DGUyFg/roYHUU4yWA+Ao06WmbG9lcI8yDGsvEQ9nE5+8AME= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=T3RSrrWw; arc=none smtp.client-ip=209.85.218.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="T3RSrrWw" Received: by mail-ej1-f47.google.com with SMTP id a640c23a62f3a-b885e8c679bso411892066b.1 for ; Mon, 09 Feb 2026 07:07:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1770649670; x=1771254470; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=iQDNu+LBE5AULrwMKg6yBqocyEp3U+FKLIXmvE5hWBs=; b=T3RSrrWwX9hL7Ed2MhOoyl+8HMC1lDGudWnFmpHZUdYyT1idnLAAHqEwtdhOfi/6Rs ruqkHDKE7wqdzOSpoNCebTRhOo11eU4DbAxA3B5/Iz4dbM9/OFj1l/Q94xwCs4FfNaZq 85KdbaloqHlgf0h0Uf7jJC1bVPGNKub/fQJEW0yhkMqnZ824mesNog81z1jI8mkWfIx2 C/g9CBCE9VTT3W9g74EfRc468//jpq9QXEO+oZnYunP8EIzOkAj34QfSN6jmOhTZyYz4 Vtv80Kbogtg4gWpKgXUTGtz8nSJkqA5rjxhw6EREpltgNPqOPIWuAT+s13KhcVHPAPgg nbwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770649670; x=1771254470; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=iQDNu+LBE5AULrwMKg6yBqocyEp3U+FKLIXmvE5hWBs=; b=VTfpFFK+iYzJXJ+vWarPQigPuuCkPaXuf6yRDguxHML72v+k1TGKwNUfbQBNEt6wLD 0byBF9+0+56cqKNxChqsUkC+p5YSKQ/d8WvX4zN3XJ9RVYkWhHxZTxnj1VdVDdNjNewy aXzSh99ZUhp+l4WWNVgjAsg0H3as+oFjCB9zFpuIaTzx0/nMbNmXwSsTHlK2l9G7LCoR nJOboD9O1abv1HxUJxTlVjQapIhY5bTKwd6SESxxQmsaIEAeeVyDXzSibHnva/gePIbh 7MjYd54ZRIyg2YQlgv5vmNAJgpwpM9DnpYhIBVapVww8lT1P3yFLds3mh2qAZPNXsOKU MNBQ== X-Gm-Message-State: AOJu0YxXrvmNwmKM5uYrVbk5R4cwY5+49c00kRq1YAoTkSIjMJ7bzPt/ dU55KXm/+JUgV0fIPzSsbpq38orBnQO4K/HCXKYDxmIN+/X1juJEYxK3Mxy1LSx4X2c= X-Gm-Gg: AZuq6aLBiEuTA50vVEBoZA0Aru1BcaDXiRPkJ4p4XD0wxleNHG5NkxBPcMr/8A2Y/Pw qmlartWXa9sLtCbxQxUVAubeufvo1zIOZPVoUMANEQVYG8X52v9xAsFZTRVnYj+99I92i4e/f8l i2zvTh/DWX7NeQa4SEroxGGP8ZRUUu94Hq78zVE934dcZBQVndBgoOK7AMDkr8DSFkSOLBetcbJ LwWjEVtzBeUADFV7JSwqCfoV9PG2UeFZ/W+pHYvzGLBl7m/ZfmRyaqYpA7vSCNUKu5VQ855iScS oO1bO9I5Ii8NqEC+b6i7Lz2YjZay1l+sr/hSDKReTEqTzoq7DuC7h7MXv72cG1jpjyRsTvGxUwb Vqc4iTNtSpVQ1WdfHwtTYxO4sQe+9yJKIGZ85N+ha/9fkNZ2JSu9j2Z4WDR154tJvJIfRBRtjyW tfzZs6iS5KTBE8eJQSjc1cg+Vmk/Db4CF6EwuzED0m8KMOLzYs0Cqp9SaY/5RH5t/+a+prBr1Wi tDYDQ== X-Received: by 2002:a17:906:d550:b0:b84:2075:b902 with SMTP id a640c23a62f3a-b8edf2f9c23mr597148866b.36.1770649669979; Mon, 09 Feb 2026 07:07:49 -0800 (PST) Received: from puffmais2.c.googlers.com (244.175.141.34.bc.googleusercontent.com. [34.141.175.244]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b8edae6fa84sm393516366b.67.2026.02.09.07.07.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Feb 2026 07:07:49 -0800 (PST) From: =?utf-8?q?Andr=C3=A9_Draszik?= Date: Mon, 09 Feb 2026 15:07:48 +0000 Subject: [PATCH 2/2] regulator: s2mps11: fix pctrlsel macro usage in s2mpg10_of_parse_cb() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260209-s2mpg1x-regulators-fixes-v1-2-ead348e64e14@linaro.org> References: <20260209-s2mpg1x-regulators-fixes-v1-0-ead348e64e14@linaro.org> In-Reply-To: <20260209-s2mpg1x-regulators-fixes-v1-0-ead348e64e14@linaro.org> To: Krzysztof Kozlowski , Liam Girdwood , Mark Brown Cc: linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org, =?utf-8?q?Andr=C3=A9_Draszik?= X-Mailer: b4 0.14.2 Commit 979dd8da76eb ("regulator: s2mps11: add S2MPG11 regulator") incorrectly ended up using macros for S2MPG10 in the S2MPG11 case. They happen to end up giving the same result, but for clarity, the correct macros should be used. No functional change. Signed-off-by: Andr=C3=A9 Draszik --- drivers/regulator/s2mps11.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/regulator/s2mps11.c b/drivers/regulator/s2mps11.c index 2d67c5c16f487506a2e9e4b119f33faa846269f7..81cfd60460f8bb35a460f44753a= bfbb745121322 100644 --- a/drivers/regulator/s2mps11.c +++ b/drivers/regulator/s2mps11.c @@ -440,15 +440,15 @@ static int s2mpg10_of_parse_cb(struct device_node *np, [S2MPG10_EXTCTRL_LDO20M_EN] =3D S2MPG10_PCTRLSEL_LDO20M_EN, }; static const u32 ext_control_s2mpg11[] =3D { - [S2MPG11_EXTCTRL_PWREN] =3D S2MPG10_PCTRLSEL_PWREN, - [S2MPG11_EXTCTRL_PWREN_MIF] =3D S2MPG10_PCTRLSEL_PWREN_MIF, - [S2MPG11_EXTCTRL_AP_ACTIVE_N] =3D S2MPG10_PCTRLSEL_AP_ACTIVE_N, - [S2MPG11_EXTCTRL_G3D_EN] =3D S2MPG10_PCTRLSEL_CPUCL1_EN, - [S2MPG11_EXTCTRL_G3D_EN2] =3D S2MPG10_PCTRLSEL_CPUCL1_EN2, - [S2MPG11_EXTCTRL_AOC_VDD] =3D S2MPG10_PCTRLSEL_CPUCL2_EN, - [S2MPG11_EXTCTRL_AOC_RET] =3D S2MPG10_PCTRLSEL_CPUCL2_EN2, - [S2MPG11_EXTCTRL_UFS_EN] =3D S2MPG10_PCTRLSEL_TPU_EN, - [S2MPG11_EXTCTRL_LDO13S_EN] =3D S2MPG10_PCTRLSEL_TPU_EN2, + [S2MPG11_EXTCTRL_PWREN] =3D S2MPG11_PCTRLSEL_PWREN, + [S2MPG11_EXTCTRL_PWREN_MIF] =3D S2MPG11_PCTRLSEL_PWREN_MIF, + [S2MPG11_EXTCTRL_AP_ACTIVE_N] =3D S2MPG11_PCTRLSEL_AP_ACTIVE_N, + [S2MPG11_EXTCTRL_G3D_EN] =3D S2MPG11_PCTRLSEL_G3D_EN, + [S2MPG11_EXTCTRL_G3D_EN2] =3D S2MPG11_PCTRLSEL_G3D_EN2, + [S2MPG11_EXTCTRL_AOC_VDD] =3D S2MPG11_PCTRLSEL_AOC_VDD, + [S2MPG11_EXTCTRL_AOC_RET] =3D S2MPG11_PCTRLSEL_AOC_RET, + [S2MPG11_EXTCTRL_UFS_EN] =3D S2MPG11_PCTRLSEL_UFS_EN, + [S2MPG11_EXTCTRL_LDO13S_EN] =3D S2MPG11_PCTRLSEL_LDO13S_EN, }; u32 ext_control; =20 --=20 2.53.0.rc2.204.g2597b5adb4-goog