Re: [PATCH v3 resend2] s3c/s3c24xx: arm: leds: Make s3c24xx LEDS driver use gpiolib

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

 



On Wed, 2011-12-14 at 00:05 +0200, Denis Kuzmenko wrote:
> On 12/13/2011 11:40 PM, Joe Perches wrote:
> > On Tue, 2011-12-13 at 23:33 +0200, Denis Kuzmenko wrote:
> >> On 12/13/2011 11:28 PM, Joe Perches wrote:
> >>> The LEDF_ACTLOW use is dependent on it being #defined
> >>> to 1 when using ^.  I think that's unintelligible.
> >> Sorry, can't understand. Can you please clarify last two sentences?
> > 	s3c2410_gpio_setpin(pd->gpio, (value ? 1 : 0) ^
> > 			    (pd->flags & S3C24XX_LEDF_ACTLOW));
> > I think this should be:
> > 	s3c2410_gpio_setpin(pd->gpio,
> > 			    !!value ^ !!(pd->flags & S3C24XX_LEDF_ACTLOW));
> So you've found a BUG.

It's not really a bug, it's more lack of consistency
style defect.  It's also an example of why I prefer
consistent style to equivalent but different styles.

> As I understand my code will behave wrong if
> S3C24XX_LEDF_ACTLOW value will be changed.

> Thank you, I'll make a new version.

cheers, Joe

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux SoC Development]     [Linux Rockchip Development]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Linux SCSI]     [Yosemite News]

  Powered by Linux