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] [day] [month] [year] [list]
Message-ID: <544AC56F16B56944AEC3BD4E3D59177148736CE09D@LIMKCMBX1.ad.analog.com>
Date:	Mon, 16 Jan 2012 08:33:38 +0000
From:	"Hennerich, Michael" <Michael.Hennerich@...log.com>
To:	"axel.lin@...il.com" <axel.lin@...il.com>,
	Andrew Morton <akpm@...ux-foundation.org>
CC:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Richard Purdie <rpurdie@...ys.net>,
	"device-drivers-devel@...ckfin.uclinux.org" 
	<device-drivers-devel@...ckfin.uclinux.org>
Subject: RE: [PATCH] backlight: Fix the logic to set bits in adp8860_bl and
 adp8870_bl drivers

Axel Lin wrote on 2012-01-14:
>>> diff --git a/drivers/video/backlight/adp8860_bl.c
>>> b/drivers/video/backlight/adp8860_bl.c index 66bc74d..378276c 100644
>>> --- a/drivers/video/backlight/adp8860_bl.c +++
>>> b/drivers/video/backlight/adp8860_bl.c @@ -146,7 +146,7 @@ static int
>>> adp8860_set_bits(struct i2c_client *client, int reg, uint8_t bit_mask
>>>
>>>       ret = adp8860_read(client, reg, &reg_val);
>>>
>>> -     if (!ret && ((reg_val & bit_mask) == 0)) { +     if (!ret &&
>>> ((reg_val & bit_mask) != bit_mask)) {               reg_val |=
>>> bit_mask;               ret = adp8860_write(client, reg, reg_val);
>>>   } diff --git a/drivers/video/backlight/adp8870_bl.c
>>> b/drivers/video/backlight/adp8870_bl.c index 6c68a68..6735059 100644
>>> --- a/drivers/video/backlight/adp8870_bl.c +++
>>> b/drivers/video/backlight/adp8870_bl.c @@ -160,7 +160,7 @@ static int
>>> adp8870_set_bits(struct i2c_client *client, int reg, uint8_t bit_mask
>>>
>>>       ret = adp8870_read(client, reg, &reg_val);
>>>
>>> -     if (!ret && ((reg_val & bit_mask) == 0)) {
>>> +     if (!ret && ((reg_val & bit_mask) != bit_mask)) {
>>>               reg_val |= bit_mask;
>>>               ret = adp8870_write(client, reg, reg_val);
>>>       }
>>
>> This patch is applicable to 3.2.x, but I don't know whether to route it
>> to -stable becasue you didn't tell me what effect the patch has :(
>>
>
> It's because I don't have this hardware.
> I just found the bug while reading the code.
>
> I was thinking I should CC stable, but since the code is there for a
> long time
> and I don't know any complains of the bug. So I didn't CC stable.
>
> Michael, do you see any user-visible effects of the bug?

No - This fixes a bug. The code seemed to be working before,
only by accident.


Greetings,
Michael

--
Analog Devices GmbH      Wilhelm-Wagenfeld-Str. 6      80807 Muenchen
Sitz der Gesellschaft: Muenchen; Registergericht: Muenchen HRB 40368;
Geschaeftsfuehrer:Dr.Carsten Suckrow, Thomas Wessel, William A. Martin, Margaret Seif



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