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] [thread-next>] [day] [month] [year] [list]
Message-id: <04c401ccb540$3d4813d0$b7d83b70$%kim@samsung.com>
Date:	Thu, 08 Dec 2011 09:27:59 +0900
From:	Kukjin Kim <kgene.kim@...sung.com>
To:	'Mark Brown' <broonie@...nsource.wolfsonmicro.com>,
	'Grant Likely' <grant.likely@...retlab.ca>
Cc:	linux-kernel@...r.kernel.org
Subject: RE: [PATCH 1/4] gpio: Explicitly index samsung_gpio_cfgs

Mark Brown wrote:
> 
> Make it easier to follow the by number references into samsung_gpio_cfgs
> by putting the indexes into the code initialising the array, improving
> readability a bit. Ideally we wouldn't be using magic array indexes at all
> but this is easier than coming up with a better way.
> 
> Signed-off-by: Mark Brown <broonie@...nsource.wolfsonmicro.com>

Acked-by: Kukjin Kim <kgene.kim@...sung.com>

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@...sung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.

> ---
>  drivers/gpio/gpio-samsung.c |   29 +++++++++++++++++++----------
>  1 files changed, 19 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/gpio/gpio-samsung.c b/drivers/gpio/gpio-samsung.c
> index 6b4d23f..f1c1ecd 100644
> --- a/drivers/gpio/gpio-samsung.c
> +++ b/drivers/gpio/gpio-samsung.c
> @@ -470,33 +470,42 @@ static struct samsung_gpio_cfg s5p64x0_gpio_cfg_rbank = {
>  #endif
> 
>  static struct samsung_gpio_cfg samsung_gpio_cfgs[] = {
> -	{
> +	[0] = {
>  		.cfg_eint	= 0x0,
> -	}, {
> +	},
> +	[1] = {
>  		.cfg_eint	= 0x3,
> -	}, {
> +	},
> +	[2] = {
>  		.cfg_eint	= 0x7,
> -	}, {
> +	},
> +	[3] = {
>  		.cfg_eint	= 0xF,
> -	}, {
> +	},
> +	[4] = {
>  		.cfg_eint	= 0x0,
>  		.set_config	= samsung_gpio_setcfg_2bit,
>  		.get_config	= samsung_gpio_getcfg_2bit,
> -	}, {
> +	},
> +	[5] = {
>  		.cfg_eint	= 0x2,
>  		.set_config	= samsung_gpio_setcfg_2bit,
>  		.get_config	= samsung_gpio_getcfg_2bit,
> -	}, {
> +	},
> +	[6] = {
>  		.cfg_eint	= 0x3,
>  		.set_config	= samsung_gpio_setcfg_2bit,
>  		.get_config	= samsung_gpio_getcfg_2bit,
> -	}, {
> +	},
> +	[7] = {
>  		.set_config	= samsung_gpio_setcfg_2bit,
>  		.get_config	= samsung_gpio_getcfg_2bit,
> -	}, {
> +	},
> +	[8] = {
>  		.set_pull	= exynos4_gpio_setpull,
>  		.get_pull	= exynos4_gpio_getpull,
> -	}, {
> +	},
> +	[9] = {
>  		.cfg_eint	= 0x3,
>  		.set_pull	= exynos4_gpio_setpull,
>  		.get_pull	= exynos4_gpio_getpull,
> --
> 1.7.7.3

--
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