Hi Nathan,

On Wed, 24 Apr 2013 10:55:08 -0500 Nathan Fontenot <nf...@linux.vnet.ibm.com> 
wrote:
>
> When iterating over the entries in firmware_features_table we only need
> to go over the actual number of entries in the array instead of declaring
> it to be bigger and checking to make sure there is a valid entry in every
> slot.
> 
> This patch removes the FIRMWARE_MAX_FEATURES #define and replaces the
> array looping with the use of ARRAY_SIZE().
> 

Suggested-by: Stephen Rothwell <s...@canb.auug.org.au>

> Signed-off-by: Nathan Fontenot <nf...@linux.vnet.ibm.com>
> @@ -77,12 +77,10 @@
>       pr_debug(" -> fw_feature_init()\n");
>  
>       for (s = hypertas; s < hypertas + len; s += strlen(s) + 1) {
> -             for (i = 0; i < FIRMWARE_MAX_FEATURES; i++) {
> +             for (i = 0; i < ARRAY_SIZE(firmware_features_table); i++) {

You should explicitly include linux/kernel.h to use ARRAY_SIZE().

-- 
Cheers,
Stephen Rothwell                    s...@canb.auug.org.au

Attachment: pgpqkhZaB7acz.pgp
Description: PGP signature

_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Reply via email to