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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <56A215DD.5030904@osg.samsung.com>
Date:	Fri, 22 Jan 2016 08:43:25 -0300
From:	Javier Martinez Canillas <javier@....samsung.com>
To:	Laxman Dewangan <ldewangan@...dia.com>,
	linux-kernel@...r.kernel.org
Cc:	Kukjin Kim <kgene@...nel.org>, rtc-linux@...glegroups.com,
	Chanwoo Choi <cw00.choi@...sung.com>,
	Alexandre Belloni <alexandre.belloni@...e-electrons.com>,
	Krzysztof Kozlowski <k.kozlowski@...sung.com>,
	linux-samsung-soc@...r.kernel.org
Subject: Re: [PATCH v2 02/10] rtc: max77686: Use ARRAY_SIZE() instead of
 current array length

Hello Laxman,

Thanks a lot for your feedback and acks.

On 01/22/2016 06:39 AM, Laxman Dewangan wrote:
>
> On Friday 22 January 2016 01:53 AM, Javier Martinez Canillas wrote:
>> It is better to use the ARRAY_SIZE() macro instead of the array length
>> to avoid bugs if the array is later changed and the length not updated.
>>
>> Signed-off-by: Javier Martinez Canillas <javier@....samsung.com>
>> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@...sung.com>
>>
>>
> Acked-by: Laxman Dewangan <ldewangan@...dia.com>
>
>
> Similar stuffs are there on multiple places:
> u8 data[RTC_NR_TIME];
>
> :::
> ret = regmap_bulk_read(info->max77686->rtc_regmap,
>                                   MAX77686_ALARM1_SEC, data, RTC_NR_TIME);
>
>
> Should we say:
> ret = regmap_bulk_read(info->max77686->rtc_regmap,
>                                   MAX77686_ALARM1_SEC, data, ARRAY_SIZE(data));
>

Very good point, I'll change those on this patch as well for v3.

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ