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]
Date:	Wed, 22 May 2013 16:59:46 +0400
From:	Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To:	Philip Avinash <avinashphilip@...com>
CC:	nsekhar@...com, khilman@...prootsystems.com,
	linux@....linux.org.uk, grant.likely@...retlab.ca,
	linus.walleij@...aro.org,
	davinci-linux-open-source@...ux.davincidsp.com,
	linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH 02/11] gpio: davinci: coding style correction

Hello.

On 22-05-2013 11:10, Philip Avinash wrote:

> 1. Corrects coding and commenting styles
> 2. Variables name change to meaningful name
> 3. Remove unnecessary variable usage
> 4. Add BINTEN macro definition
>
> Signed-off-by: Philip Avinash <avinashphilip@...com>
> ---
>   drivers/gpio/gpio-davinci.c |  182 +++++++++++++++++++++----------------------
>   1 file changed, 89 insertions(+), 93 deletions(-)

> diff --git a/drivers/gpio/gpio-davinci.c b/drivers/gpio/gpio-davinci.c
> index 17df6db..d308955 100644
> --- a/drivers/gpio/gpio-davinci.c
> +++ b/drivers/gpio/gpio-davinci.c
[...]
> @@ -31,10 +31,11 @@ struct davinci_gpio_regs {
>   	u32	intstat;
>   };
>
> +#define BINTEN	0x08 /* GPIO Interrupt Per-Bank Enable Register */

    Empty line needed here.

>   #define chip2controller(chip)	\
>   	container_of(chip, struct davinci_gpio_controller, chip)
>
[...]
> @@ -98,8 +94,8 @@ static int davinci_direction_in(struct gpio_chip *chip, unsigned offset)
>   	return __davinci_direction(chip, offset, false, 0);
>   }
>
> -static int
> -davinci_direction_out(struct gpio_chip *chip, unsigned offset, int value)
> +static int davinci_direction_out(struct gpio_chip *chip, unsigned offset,
> +		int value)

     This line should be aligned under the next character after (.

[...]
> @@ -113,22 +109,22 @@ davinci_direction_out(struct gpio_chip *chip, unsigned offset, int value)
[...]
>   /*
>    * Assuming the pin is muxed as a gpio output, set its output value.
>    */
> -static void
> -davinci_gpio_set(struct gpio_chip *chip, unsigned offset, int value)
> +static void davinci_gpio_set(struct gpio_chip *chip, unsigned offset,
> +		int value)

     Same here.

[...]
> @@ -368,16 +363,16 @@ static int __init davinci_gpio_irq_setup(void)
[...]
>   	for (gpio = 0, bank = 0; gpio < ngpio; bank++, gpio += 32) {
> -		chips[bank].chip.to_irq = gpio_to_irq_banked;
> -		chips[bank].irq_base = soc_info->gpio_unbanked
> -			? -EINVAL
> -			: (soc_info->intc_irq_num + gpio);
> +		ctlrs[bank].chip.to_irq = gpio_to_irq_banked;
> +		ctlrs[bank].irq_base = soc_info->gpio_unbanked ?
> +			-EINVAL : (soc_info->intc_irq_num + gpio);

    () not needed here.

WBR, Sergei

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