Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1313728

Re: [PATCH 1/8] rtc: max77686: Use ARRAY_SIZE() instead of current array length

From Krzysztof Kozlowski <k.kozlowski@samsung.com>
Newsgroups linux.kernel
Subject Re: [PATCH 1/8] rtc: max77686: Use ARRAY_SIZE() instead of current array length
Date 2016-01-21 01:40 +0100
Message-ID <qTbs6-5IQ-15@gated-at.bofh.it> (permalink)
References <qT4Ah-1fm-7@gated-at.bofh.it> <qT4Ai-1fm-39@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 21.01.2016 02:14, 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@osg.samsung.com>
> ---
> 
>  drivers/rtc/rtc-max77686.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>

Best regards,
Krzysztof

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/8] rtc: max77686: Extend driver and add max77802 support Javier Martinez Canillas <javier@osg.samsung.com> - 2016-01-20 18:20 +0100
  [PATCH 5/8] rtc: max77686: Add max77802 support Javier Martinez Canillas <javier@osg.samsung.com> - 2016-01-20 18:20 +0100
    Re: [PATCH 5/8] rtc: max77686: Add max77802 support Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-01-21 03:00 +0100
      Re: [PATCH 5/8] rtc: max77686: Add max77802 support Javier Martinez Canillas <javier@osg.samsung.com> - 2016-01-21 16:20 +0100
  [PATCH 3/8] rtc: max77686: Use a driver data struct instead hard-coded values Javier Martinez Canillas <javier@osg.samsung.com> - 2016-01-20 18:20 +0100
    Re: [PATCH 3/8] rtc: max77686: Use a driver data struct instead  hard-coded values Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-01-21 02:10 +0100
      Re: [PATCH 3/8] rtc: max77686: Use a driver data struct instead  hard-coded values Javier Martinez Canillas <javier@osg.samsung.com> - 2016-01-21 16:00 +0100
  [PATCH 1/8] rtc: max77686: Use ARRAY_SIZE() instead of current array length Javier Martinez Canillas <javier@osg.samsung.com> - 2016-01-20 18:20 +0100
    Re: [PATCH 1/8] rtc: max77686: Use ARRAY_SIZE() instead of current  array length Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-01-21 01:40 +0100
  Re: [PATCH 0/8] rtc: max77686: Extend driver and add max77802 support Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-01-21 01:40 +0100
    Re: [PATCH 0/8] rtc: max77686: Extend driver and add max77802 support Javier Martinez Canillas <javier@osg.samsung.com> - 2016-01-21 16:00 +0100
  Re: [PATCH 0/8] rtc: max77686: Extend driver and add max77802 support Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2016-01-21 01:40 +0100
  Re: [PATCH 0/8] rtc: max77686: Extend driver and add max77802 support Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-01-21 01:50 +0100
    Re: [PATCH 0/8] rtc: max77686: Extend driver and add max77802 support Javier Martinez Canillas <javier@osg.samsung.com> - 2016-01-21 16:20 +0100

csiph-web