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, 20 Apr 2016 10:53:24 +0200
From:	"H. Nikolaus Schaller" <hns@...delico.com>
To:	Jacek Anaszewski <j.anaszewski@...sung.com>
Cc:	Mark Rutland <mark.rutland@....com>, devicetree@...r.kernel.org,
	Pawel Moll <pawel.moll@....com>,
	Ian Campbell <ijc+devicetree@...lion.org.uk>,
	kernel@...a-handheld.com, LKML <linux-kernel@...r.kernel.org>,
	Rob Herring <robh+dt@...nel.org>,
	Richard Purdie <rpurdie@...ys.net>,
	Kumar Gala <galak@...eaurora.org>, linux-leds@...r.kernel.org,
	Discussions about the Letux Kernel 
	<letux-kernel@...nphoenux.org>
Subject: Re: [Letux-kernel] [PATCH] drivers: led: is31fl319x: 6/9-channel light effect led driver

Hi Jacek,

>>> +static void is31fl319x_brightness_set(struct led_classdev *led_cdev,
>>> +				   enum led_brightness brightness)
>>> +{
>>> +	struct is31fl319x_led *led = container_of(led_cdev,
>>> +						  struct is31fl319x_led,
>>> +						  led_cdev);
>>> +	struct is31fl319x_chip *is31 = led->chip;
>>> +	unsigned long flags;
>>> +
>>> +	spin_lock_irqsave(&is31->lock, flags);
>>> +
>>> +	if (brightness != is31fl319x_brightness_get(led_cdev)) {
>> 
>> Current brightness is cached in led_cdev->brightness.
> 
> Hm. I could not find the code line where it is cached.
> 
> And if I remember correctly (it is a while ago that we did develop
> this driver) experiments didn't show that it is cached there. Or the
> old value is not available inside the brightness setter but already
> the new one. Something like that was the reason why we cache
> it inside the driver.
> 

I have added a printk inside is31fl319x_brightness_set but never got
a difference between brightness and led_cdev->brightness.

This seems to confirm that it is already set to the new value. Thus we
can't detect changes in brightness by comparing to the previous value.

Can you please confirm?

Otherwise the driver works well so that I am almost ready for posting
V2.

Thanks,
Nikolaus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ