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:	Tue, 20 Jan 2015 14:01:38 +0100
From:	Jacek Anaszewski <j.anaszewski@...sung.com>
To:	Lee Jones <lee.jones@...aro.org>
Cc:	linux-leds@...r.kernel.org, linux-media@...r.kernel.org,
	linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
	kyungmin.park@...sung.com, b.zolnierkie@...sung.com, pavel@....cz,
	cooloney@...il.com, rpurdie@...ys.net, sakari.ailus@....fi,
	s.nawrocki@...sung.com, Chanwoo Choi <cw00.choi@...sung.com>
Subject: Re: [PATCH/RFC v10 07/19] mfd: max77693: Adjust FLASH_EN_SHIFT and
 TORCH_EN_SHIFT macros

On 01/20/2015 12:17 PM, Lee Jones wrote:
> On Fri, 09 Jan 2015, Jacek Anaszewski wrote:
>
>> Modify FLASH_EN_SHIFT and TORCH_EN_SHIFT macros to work properly
>> when passed enum max77693_fled values (0 for FLED1 and 1 for FLED2)
>> from leds-max77693 driver.
>
> Off-by-one ay?  Wasn't the original code tested?

The driver using these macros is a part of LED / flash API integration
patch series, which still undergoes modifications and it hasn't
reached its final state yet, as there are many things to discuss.

>> Signed-off-by: Jacek Anaszewski <j.anaszewski@...sung.com>
>> Acked-by: Kyungmin Park <kyungmin.park@...sung.com>
>> Cc: Chanwoo Choi <cw00.choi@...sung.com>
>> Cc: Lee Jones <lee.jones@...aro.org>
>> ---
>>   include/linux/mfd/max77693-private.h |    4 ++--
>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/include/linux/mfd/max77693-private.h b/include/linux/mfd/max77693-private.h
>> index 08dae01..01799a9 100644
>> --- a/include/linux/mfd/max77693-private.h
>> +++ b/include/linux/mfd/max77693-private.h
>> @@ -113,8 +113,8 @@ enum max77693_pmic_reg {
>>   #define FLASH_EN_FLASH		0x1
>>   #define FLASH_EN_TORCH		0x2
>>   #define FLASH_EN_ON		0x3
>> -#define FLASH_EN_SHIFT(x)	(6 - ((x) - 1) * 2)
>> -#define TORCH_EN_SHIFT(x)	(2 - ((x) - 1) * 2)
>> +#define FLASH_EN_SHIFT(x)	(6 - (x) * 2)
>> +#define TORCH_EN_SHIFT(x)	(2 - (x) * 2)
>>
>>   /* MAX77693 MAX_FLASH1 register */
>>   #define MAX_FLASH1_MAX_FL_EN	0x80
>


-- 
Best Regards,
Jacek Anaszewski
--
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