linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mfd: Constify reg_sequence and regmap_irq
@ 2025-05-28 19:44 Krzysztof Kozlowski
  2025-05-29 10:08 ` Charles Keepax
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2025-05-28 19:44 UTC (permalink / raw)
  To: James Ogletree, Fred Treven, Ben Bright, Lee Jones,
	Matti Vaittinen, Aaro Koskinen, Andreas Kemnade, Kevin Hilman,
	Roger Quadros, Tony Lindgren, patches, linux-kernel, linux-omap
  Cc: Krzysztof Kozlowski

Static 'struct reg_sequence' array, 'struct regmap_irq_sub_irq_map' and
'struct regmap_irq_chip ' are not modified so can be changed to const
for more safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 drivers/mfd/cs40l50-core.c | 2 +-
 drivers/mfd/rohm-bd71828.c | 2 +-
 drivers/mfd/tps65219.c     | 4 ++--
 drivers/mfd/twl6040.c      | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/mfd/cs40l50-core.c b/drivers/mfd/cs40l50-core.c
index 4859a33777a0..c91bccda0858 100644
--- a/drivers/mfd/cs40l50-core.c
+++ b/drivers/mfd/cs40l50-core.c
@@ -52,7 +52,7 @@ static const struct regmap_irq cs40l50_reg_irqs[] = {
 		       CS40L50_GLOBAL_ERROR_MASK),
 };
 
-static struct regmap_irq_chip cs40l50_irq_chip = {
+static const struct regmap_irq_chip cs40l50_irq_chip = {
 	.name =		"cs40l50",
 	.status_base =	CS40L50_IRQ1_INT_1,
 	.mask_base =	CS40L50_IRQ1_MASK_1,
diff --git a/drivers/mfd/rohm-bd71828.c b/drivers/mfd/rohm-bd71828.c
index 738d8b3b9ffe..47e574a57077 100644
--- a/drivers/mfd/rohm-bd71828.c
+++ b/drivers/mfd/rohm-bd71828.c
@@ -223,7 +223,7 @@ static unsigned int bit5_offsets[] = {3};		/* VSYS IRQ */
 static unsigned int bit6_offsets[] = {1, 2};		/* DCIN IRQ */
 static unsigned int bit7_offsets[] = {0};		/* BUCK IRQ */
 
-static struct regmap_irq_sub_irq_map bd718xx_sub_irq_offsets[] = {
+static const struct regmap_irq_sub_irq_map bd718xx_sub_irq_offsets[] = {
 	REGMAP_IRQ_MAIN_REG_OFFSET(bit0_offsets),
 	REGMAP_IRQ_MAIN_REG_OFFSET(bit1_offsets),
 	REGMAP_IRQ_MAIN_REG_OFFSET(bit2_offsets),
diff --git a/drivers/mfd/tps65219.c b/drivers/mfd/tps65219.c
index fd390600fbf0..30bdd37413fd 100644
--- a/drivers/mfd/tps65219.c
+++ b/drivers/mfd/tps65219.c
@@ -238,7 +238,7 @@ static unsigned int tps65214_bit4_offsets[] = { TPS65214_REG_INT_BUCK_3_POS };
 static unsigned int tps65214_bit5_offsets[] = { TPS65214_REG_INT_LDO_1_2_POS };
 static unsigned int tps65214_bit7_offsets[] = { TPS65214_REG_INT_PB_POS };
 
-static struct regmap_irq_sub_irq_map tps65219_sub_irq_offsets[] = {
+static const struct regmap_irq_sub_irq_map tps65219_sub_irq_offsets[] = {
 	REGMAP_IRQ_MAIN_REG_OFFSET(bit0_offsets),
 	REGMAP_IRQ_MAIN_REG_OFFSET(bit1_offsets),
 	REGMAP_IRQ_MAIN_REG_OFFSET(bit2_offsets),
@@ -249,7 +249,7 @@ static struct regmap_irq_sub_irq_map tps65219_sub_irq_offsets[] = {
 	REGMAP_IRQ_MAIN_REG_OFFSET(bit7_offsets),
 };
 
-static struct regmap_irq_sub_irq_map tps65215_sub_irq_offsets[] = {
+static const struct regmap_irq_sub_irq_map tps65215_sub_irq_offsets[] = {
 	REGMAP_IRQ_MAIN_REG_OFFSET(bit0_offsets),
 	REGMAP_IRQ_MAIN_REG_OFFSET(bit1_offsets),
 	REGMAP_IRQ_MAIN_REG_OFFSET(bit2_offsets),
diff --git a/drivers/mfd/twl6040.c b/drivers/mfd/twl6040.c
index 218d6195fad2..562a0f939f6e 100644
--- a/drivers/mfd/twl6040.c
+++ b/drivers/mfd/twl6040.c
@@ -69,7 +69,7 @@ static const struct reg_default twl6040_defaults[] = {
 	{ 0x2E, 0x00 }, /* REG_STATUS	(ro) */
 };
 
-static struct reg_sequence twl6040_patch[] = {
+static const struct reg_sequence twl6040_patch[] = {
 	/*
 	 * Select I2C bus access to dual access registers
 	 * Interrupt register is cleared on read
-- 
2.45.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] mfd: Constify reg_sequence and regmap_irq
  2025-05-28 19:44 [PATCH] mfd: Constify reg_sequence and regmap_irq Krzysztof Kozlowski
@ 2025-05-29 10:08 ` Charles Keepax
  2025-05-30  4:26 ` Matti Vaittinen
  2025-06-13 13:47 ` (subset) " Lee Jones
  2 siblings, 0 replies; 4+ messages in thread
From: Charles Keepax @ 2025-05-29 10:08 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: James Ogletree, Fred Treven, Ben Bright, Lee Jones,
	Matti Vaittinen, Aaro Koskinen, Andreas Kemnade, Kevin Hilman,
	Roger Quadros, Tony Lindgren, patches, linux-kernel, linux-omap

On Wed, May 28, 2025 at 09:44:17PM +0200, Krzysztof Kozlowski wrote:
> Static 'struct reg_sequence' array, 'struct regmap_irq_sub_irq_map' and
> 'struct regmap_irq_chip ' are not modified so can be changed to const
> for more safety.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
>  drivers/mfd/cs40l50-core.c | 2 +-
>
> -static struct regmap_irq_chip cs40l50_irq_chip = {
> +static const struct regmap_irq_chip cs40l50_irq_chip = {
>  	.name =		"cs40l50",
>  	.status_base =	CS40L50_IRQ1_INT_1,
>  	.mask_base =	CS40L50_IRQ1_MASK_1,

For the cs40l50:

Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>

Thanks,
Charles

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] mfd: Constify reg_sequence and regmap_irq
  2025-05-28 19:44 [PATCH] mfd: Constify reg_sequence and regmap_irq Krzysztof Kozlowski
  2025-05-29 10:08 ` Charles Keepax
@ 2025-05-30  4:26 ` Matti Vaittinen
  2025-06-13 13:47 ` (subset) " Lee Jones
  2 siblings, 0 replies; 4+ messages in thread
From: Matti Vaittinen @ 2025-05-30  4:26 UTC (permalink / raw)
  To: Krzysztof Kozlowski, James Ogletree, Fred Treven, Ben Bright,
	Lee Jones, Aaro Koskinen, Andreas Kemnade, Kevin Hilman,
	Roger Quadros, Tony Lindgren, patches, linux-kernel, linux-omap

Thanks Krzysztof!

On 28/05/2025 22:44, Krzysztof Kozlowski wrote:
> Static 'struct reg_sequence' array, 'struct regmap_irq_sub_irq_map' and
> 'struct regmap_irq_chip ' are not modified so can be changed to const
> for more safety.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Reviewed-by: Matti Vaittinen <mazziesaccount@gmail.com>

Yours,
	-- Matti

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: (subset) [PATCH] mfd: Constify reg_sequence and regmap_irq
  2025-05-28 19:44 [PATCH] mfd: Constify reg_sequence and regmap_irq Krzysztof Kozlowski
  2025-05-29 10:08 ` Charles Keepax
  2025-05-30  4:26 ` Matti Vaittinen
@ 2025-06-13 13:47 ` Lee Jones
  2 siblings, 0 replies; 4+ messages in thread
From: Lee Jones @ 2025-06-13 13:47 UTC (permalink / raw)
  To: James Ogletree, Fred Treven, Ben Bright, Lee Jones,
	Matti Vaittinen, Aaro Koskinen, Andreas Kemnade, Kevin Hilman,
	Roger Quadros, Tony Lindgren, patches, linux-kernel, linux-omap,
	Krzysztof Kozlowski

On Wed, 28 May 2025 21:44:17 +0200, Krzysztof Kozlowski wrote:
> Static 'struct reg_sequence' array, 'struct regmap_irq_sub_irq_map' and
> 'struct regmap_irq_chip ' are not modified so can be changed to const
> for more safety.
> 
> 

Applied, thanks!

[1/1] mfd: Constify reg_sequence and regmap_irq
      commit: 754b317d617d76e8acbc54de5a68264bd8f21b25

--
Lee Jones [李琼斯]


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-06-13 13:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-28 19:44 [PATCH] mfd: Constify reg_sequence and regmap_irq Krzysztof Kozlowski
2025-05-29 10:08 ` Charles Keepax
2025-05-30  4:26 ` Matti Vaittinen
2025-06-13 13:47 ` (subset) " Lee Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).