Re: [PATCH] MIPS: AR7: constify some arrays in gpio and prom code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Nov 04, 2011 at 06:25:35PM +0100, Florian Fainelli wrote:

> diff --git a/arch/mips/ar7/prom.c b/arch/mips/ar7/prom.c
> index 8088c6f..f642f64 100644
> --- a/arch/mips/ar7/prom.c
> +++ b/arch/mips/ar7/prom.c
> @@ -69,7 +69,7 @@ struct psbl_rec {
>  	u32	ffs_size;
>  };
>  
> -static __initdata char psp_env_version[] = "TIENV0.8";
> +static __initdata const char psp_env_version[] = "TIENV0.8";

Should be:

static const char psp_env_version[] __initconst = "TIENV0.8";

so psp_env_version actually ends up in a read-only section.

  Ralf



[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux