All of lore.kernel.org
 help / color / mirror / Atom feed
From: Denis Kuzmenko <linux@solonet.org.ua>
To: Joe Perches <joe@perches.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	linux-arm-kernel@lists.infradead.org,
	linux-samsung-soc@vger.kernel.org,
	Grant Likely <grant.likely@secretlab.ca>,
	Linus Walleij <linus.walleij@linaro.org>,
	Kukjin Kim <kgene.kim@samsung.com>,
	Richard Purdie <rpurdie@rpsys.net>
Subject: Re: [PATCH v3 resend2] s3c/s3c24xx: arm: leds: Make s3c24xx LEDS driver use gpiolib
Date: Tue, 13 Dec 2011 23:21:13 +0200	[thread overview]
Message-ID: <4EE7C1C9.8080000@solonet.org.ua> (raw)
In-Reply-To: <1323810417.3837.25.camel@joe2Laptop>

Hi Joe,
Thank you for review.

On 12/13/2011 11:06 PM, Joe Perches wrote:
> On Tue, 2011-12-13 at 22:22 +0200, Denis Kuzmenko wrote:
>> Make s3c24xx LEDS driver use gpiolib. Fix error disabling pull during probe.
> []
>> diff --git a/drivers/leds/leds-s3c24xx.c b/drivers/leds/leds-s3c24xx.c
> []
>> @@ -45,23 +45,35 @@ static void s3c24xx_led_set(struct led_classdev *led_cdev,
>> +	/*
>> +	 * ensure value is 0 or 1 to use it with bitwise XOR (^)
>> +	 * (only 100% brightness is supported)
>> +	 */
>> +	value = value ? 1 : 0;
> 
> Maybe value = !!value;

IMHO my variant is better readable.

>> +		/* no point in having a pull-up as we are always driving */
>> +		s3c_gpio_setpull(pdata->gpio, S3C_GPIO_PULL_NONE);
>> +		ret = gpio_direction_output(pdata->gpio,
>> +				!!(pdata->flags & S3C24XX_LEDF_ACTLOW));
> 
> akin to this use.

There is no so much space for implementation used before so I've used
shorter notation, again, for better readability.

-- 
Best regards, Denis Kuzmenko.

WARNING: multiple messages have this Message-ID (diff)
From: linux@solonet.org.ua (Denis Kuzmenko)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 resend2] s3c/s3c24xx: arm: leds: Make s3c24xx LEDS driver use gpiolib
Date: Tue, 13 Dec 2011 23:21:13 +0200	[thread overview]
Message-ID: <4EE7C1C9.8080000@solonet.org.ua> (raw)
In-Reply-To: <1323810417.3837.25.camel@joe2Laptop>

Hi Joe,
Thank you for review.

On 12/13/2011 11:06 PM, Joe Perches wrote:
> On Tue, 2011-12-13 at 22:22 +0200, Denis Kuzmenko wrote:
>> Make s3c24xx LEDS driver use gpiolib. Fix error disabling pull during probe.
> []
>> diff --git a/drivers/leds/leds-s3c24xx.c b/drivers/leds/leds-s3c24xx.c
> []
>> @@ -45,23 +45,35 @@ static void s3c24xx_led_set(struct led_classdev *led_cdev,
>> +	/*
>> +	 * ensure value is 0 or 1 to use it with bitwise XOR (^)
>> +	 * (only 100% brightness is supported)
>> +	 */
>> +	value = value ? 1 : 0;
> 
> Maybe value = !!value;

IMHO my variant is better readable.

>> +		/* no point in having a pull-up as we are always driving */
>> +		s3c_gpio_setpull(pdata->gpio, S3C_GPIO_PULL_NONE);
>> +		ret = gpio_direction_output(pdata->gpio,
>> +				!!(pdata->flags & S3C24XX_LEDF_ACTLOW));
> 
> akin to this use.

There is no so much space for implementation used before so I've used
shorter notation, again, for better readability.

-- 
Best regards, Denis Kuzmenko.

  reply	other threads:[~2011-12-13 21:22 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-13 20:22 [PATCH v3 resend2] s3c/s3c24xx: arm: leds: Make s3c24xx LEDS driver use gpiolib Denis Kuzmenko
2011-12-13 20:22 ` Denis Kuzmenko
2011-12-13 21:06 ` Joe Perches
2011-12-13 21:06   ` Joe Perches
2011-12-13 21:21   ` Denis Kuzmenko [this message]
2011-12-13 21:21     ` Denis Kuzmenko
2011-12-13 21:28     ` Joe Perches
2011-12-13 21:28       ` Joe Perches
2011-12-13 21:33       ` Denis Kuzmenko
2011-12-13 21:33         ` Denis Kuzmenko
2011-12-13 21:40         ` Joe Perches
2011-12-13 21:40           ` Joe Perches
2011-12-13 22:05           ` Denis Kuzmenko
2011-12-13 22:05             ` Denis Kuzmenko
2011-12-13 22:16             ` Joe Perches
2011-12-13 22:16               ` Joe Perches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4EE7C1C9.8080000@solonet.org.ua \
    --to=linux@solonet.org.ua \
    --cc=grant.likely@secretlab.ca \
    --cc=joe@perches.com \
    --cc=kgene.kim@samsung.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=rpurdie@rpsys.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.