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]
Message-ID: <56CACDB3.3000804@analog.com>
Date:	Mon, 22 Feb 2016 09:58:27 +0100
From:	Michael Hennerich <michael.hennerich@...log.com>
To:	Dan Bogdan Nechita <dan.bogdan.nechita@...il.com>,
	Arnd Bergmann <arnd@...db.de>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
CC:	<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] misc: ad525x_dpot: Fix the enabling of the "otpXen"
 attributes

On 11/19/2015 09:22 AM, Michael Hennerich wrote:
> On 11/18/2015 05:16 PM, Dan Bogdan Nechita wrote:
>> Currently writing the attributes with "echo" will result in comparing:
>> "enabled\n" with "enabled\0" and attribute is always set to false.
>>
>> Use the sysfs_streq() instead because it treats both NUL and
>> new-line-then-NUL as equivalent string terminations.
>>
>> Signed-off-by: Dan Bogdan Nechita <dan.bogdan.nechita@...il.com>
>
> Acked-by: Michael Hennerich <michael.hennerich@...log.com>


Looks like to patch got lost?


>
>> ---
>>   drivers/misc/ad525x_dpot.c |    2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/misc/ad525x_dpot.c b/drivers/misc/ad525x_dpot.c
>> index 15e8807..4230e6a 100644
>> --- a/drivers/misc/ad525x_dpot.c
>> +++ b/drivers/misc/ad525x_dpot.c
>> @@ -452,7 +452,7 @@ static ssize_t sysfs_set_reg(struct device *dev,
>>       int err;
>>
>>       if (reg & DPOT_ADDR_OTP_EN) {
>> -        if (!strncmp(buf, "enabled", sizeof("enabled")))
>> +        if (sysfs_streq(buf, "enabled"))
>>               set_bit(DPOT_RDAC_MASK & reg, data->otp_en_mask);
>>           else
>>               clear_bit(DPOT_RDAC_MASK & reg, data->otp_en_mask);
>>
>
>


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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ