ARM Sunxi Platform Development
 help / color / mirror / Atom feed
* [PATCH] soc: sunxi: sram: Constify struct regmap_config
@ 2024-07-05 10:52 Javier Carrasco
  2024-07-06 22:50 ` Andre Przywara
  2024-07-10 18:13 ` Chen-Yu Tsai
  0 siblings, 2 replies; 3+ messages in thread
From: Javier Carrasco @ 2024-07-05 10:52 UTC (permalink / raw)
  To: Chen-Yu Tsai, Jernej Skrabec, Samuel Holland
  Cc: linux-arm-kernel, linux-sunxi, linux-kernel, Javier Carrasco

`sunxi_sram_regmap_config` is not modified and can be declared as const
to move its data to a read-only section.

Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
---
 drivers/soc/sunxi/sunxi_sram.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/soc/sunxi/sunxi_sram.c b/drivers/soc/sunxi/sunxi_sram.c
index 71cc377b5e24..2781a091a6a6 100644
--- a/drivers/soc/sunxi/sunxi_sram.c
+++ b/drivers/soc/sunxi/sunxi_sram.c
@@ -344,7 +344,7 @@ static void sunxi_sram_unlock(void *_lock)
 	spin_unlock(lock);
 }
 
-static struct regmap_config sunxi_sram_regmap_config = {
+static const struct regmap_config sunxi_sram_regmap_config = {
 	.reg_bits       = 32,
 	.val_bits       = 32,
 	.reg_stride     = 4,

---
base-commit: 0b58e108042b0ed28a71cd7edf5175999955b233
change-id: 20240705-sunxi-sram-const-regmap_config-d05d1bb0583c

Best regards,
-- 
Javier Carrasco <javier.carrasco.cruz@gmail.com>


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

* Re: [PATCH] soc: sunxi: sram: Constify struct regmap_config
  2024-07-05 10:52 [PATCH] soc: sunxi: sram: Constify struct regmap_config Javier Carrasco
@ 2024-07-06 22:50 ` Andre Przywara
  2024-07-10 18:13 ` Chen-Yu Tsai
  1 sibling, 0 replies; 3+ messages in thread
From: Andre Przywara @ 2024-07-06 22:50 UTC (permalink / raw)
  To: Javier Carrasco
  Cc: Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, linux-arm-kernel,
	linux-sunxi, linux-kernel

On Fri, 05 Jul 2024 12:52:27 +0200
Javier Carrasco <javier.carrasco.cruz@gmail.com> wrote:

> `sunxi_sram_regmap_config` is not modified and can be declared as const
> to move its data to a read-only section.
> 
> Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>

Reviewed-by: Andre Przywara <andre.przywara@arm.com>

Cheers,
Andre

> ---
>  drivers/soc/sunxi/sunxi_sram.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/soc/sunxi/sunxi_sram.c b/drivers/soc/sunxi/sunxi_sram.c
> index 71cc377b5e24..2781a091a6a6 100644
> --- a/drivers/soc/sunxi/sunxi_sram.c
> +++ b/drivers/soc/sunxi/sunxi_sram.c
> @@ -344,7 +344,7 @@ static void sunxi_sram_unlock(void *_lock)
>  	spin_unlock(lock);
>  }
>  
> -static struct regmap_config sunxi_sram_regmap_config = {
> +static const struct regmap_config sunxi_sram_regmap_config = {
>  	.reg_bits       = 32,
>  	.val_bits       = 32,
>  	.reg_stride     = 4,
> 
> ---
> base-commit: 0b58e108042b0ed28a71cd7edf5175999955b233
> change-id: 20240705-sunxi-sram-const-regmap_config-d05d1bb0583c
> 
> Best regards,


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

* Re: [PATCH] soc: sunxi: sram: Constify struct regmap_config
  2024-07-05 10:52 [PATCH] soc: sunxi: sram: Constify struct regmap_config Javier Carrasco
  2024-07-06 22:50 ` Andre Przywara
@ 2024-07-10 18:13 ` Chen-Yu Tsai
  1 sibling, 0 replies; 3+ messages in thread
From: Chen-Yu Tsai @ 2024-07-10 18:13 UTC (permalink / raw)
  To: Jernej Skrabec, Samuel Holland, Javier Carrasco
  Cc: linux-arm-kernel, linux-sunxi, linux-kernel

On Fri, 05 Jul 2024 12:52:27 +0200, Javier Carrasco wrote:
> `sunxi_sram_regmap_config` is not modified and can be declared as const
> to move its data to a read-only section.
> 
> 

Applied to sunxi/drivers-for-6.11 in sunxi/linux.git, thanks!

[1/1] soc: sunxi: sram: Constify struct regmap_config
      https://git.kernel.org/sunxi/linux/c/9bc1e34a7b0c

Best regards,
-- 
Chen-Yu Tsai <wens@csie.org>


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

end of thread, other threads:[~2024-07-10 18:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-05 10:52 [PATCH] soc: sunxi: sram: Constify struct regmap_config Javier Carrasco
2024-07-06 22:50 ` Andre Przywara
2024-07-10 18:13 ` Chen-Yu Tsai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox