[PATCH] regulator: pf0900: Make regu_irqs variable static const

Krzysztof Kozlowski posted 1 patch 1 month, 2 weeks ago
drivers/regulator/pf0900-regulator.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] regulator: pf0900: Make regu_irqs variable static const
Posted by Krzysztof Kozlowski 1 month, 2 weeks ago
File-scope 'regu_irqs' is not used outside of this unit and is not
modified anywhere, so make it static const to silence sparse warning:

  pf0900-regulator.c:774:29: warning: symbol 'regu_irqs' was not declared. Should it be static?

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
---
 drivers/regulator/pf0900-regulator.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/regulator/pf0900-regulator.c b/drivers/regulator/pf0900-regulator.c
index b5effee32917..5c44d2dbcab4 100644
--- a/drivers/regulator/pf0900-regulator.c
+++ b/drivers/regulator/pf0900-regulator.c
@@ -771,7 +771,7 @@ static const struct pf0900_regulator_desc pf0900_regulators[] = {
 	},
 };
 
-struct pf0900_regulator_irq regu_irqs[] = {
+static const struct pf0900_regulator_irq regu_irqs[] = {
 	PF0900_REGU_IRQ(PF0900_REG_SW_ILIM_INT, PF0900_SW, REGULATOR_ERROR_OVER_CURRENT_WARN),
 	PF0900_REGU_IRQ(PF0900_REG_LDO_ILIM_INT, PF0900_LDO, REGULATOR_ERROR_OVER_CURRENT_WARN),
 	PF0900_REGU_IRQ(PF0900_REG_SW_UV_INT, PF0900_SW, REGULATOR_ERROR_UNDER_VOLTAGE_WARN),
-- 
2.51.0
Re: [PATCH] regulator: pf0900: Make regu_irqs variable static const
Posted by Mark Brown 1 month ago
On Mon, 16 Feb 2026 09:58:05 +0100, Krzysztof Kozlowski wrote:
> File-scope 'regu_irqs' is not used outside of this unit and is not
> modified anywhere, so make it static const to silence sparse warning:
> 
>   pf0900-regulator.c:774:29: warning: symbol 'regu_irqs' was not declared. Should it be static?
> 
> 

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next

Thanks!

[1/1] regulator: pf0900: Make regu_irqs variable static const
      commit: 0556bb42a84ee391a2145ddba86756f9747bc27f

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark