lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Tue, 7 Jul 2015 13:46:54 +0100
From:	Lee Jones <lee.jones@...aro.org>
To:	Axel Lin <axel.lin@...ics.com>
Cc:	Mark Brown <broonie@...nel.org>,
	patches@...nsource.wolfsonmicro.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mfd: wm8994-regmap: Constify reg_default tables

On Tue, 07 Jul 2015, Axel Lin wrote:

> These reg_default tables are not modified after initialized, so make them
> const.
> 
> Signed-off-by: Axel Lin <axel.lin@...ics.com>
> ---
>  drivers/mfd/wm8994-regmap.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

Applied, thanks.

> diff --git a/drivers/mfd/wm8994-regmap.c b/drivers/mfd/wm8994-regmap.c
> index 300e9b6..c56b160 100644
> --- a/drivers/mfd/wm8994-regmap.c
> +++ b/drivers/mfd/wm8994-regmap.c
> @@ -19,7 +19,7 @@
>  
>  #include "wm8994.h"
>  
> -static struct reg_default wm1811_defaults[] = {
> +static const struct reg_default wm1811_defaults[] = {
>  	{ 0x0001, 0x0000 },    /* R1    - Power Management (1) */
>  	{ 0x0002, 0x6000 },    /* R2    - Power Management (2) */
>  	{ 0x0003, 0x0000 },    /* R3    - Power Management (3) */
> @@ -251,7 +251,7 @@ static struct reg_default wm1811_defaults[] = {
>  	{ 0x0748, 0x003F },    /* R1864 - IRQ Debounce */
>  };
>  
> -static struct reg_default wm8994_defaults[] = {
> +static const struct reg_default wm8994_defaults[] = {
>  	{ 0x0001, 0x0000 },    /* R1     - Power Management (1) */ 
>  	{ 0x0002, 0x6000 },    /* R2     - Power Management (2) */ 
>  	{ 0x0003, 0x0000 },    /* R3     - Power Management (3) */ 
> @@ -470,7 +470,7 @@ static struct reg_default wm8994_defaults[] = {
>  	{ 0x0748, 0x003F },    /* R1864  - IRQ Debounce */ 
>  };
>  
> -static struct reg_default wm8958_defaults[] = {
> +static const struct reg_default wm8958_defaults[] = {
>  	{ 0x0001, 0x0000 },    /* R1     - Power Management (1) */
>  	{ 0x0002, 0x6000 },    /* R2     - Power Management (2) */
>  	{ 0x0003, 0x0000 },    /* R3     - Power Management (3) */

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ