[U-Boot] [PATCH] net: Use ARRAY_SIZE at appropriate places
Axel Lin
axel.lin at ingics.com
Sun Jun 30 05:40:45 CEST 2013
>> diff --git a/drivers/net/npe/include/IxOsalTypes.h
>> b/drivers/net/npe/include/IxOsalTypes.h index 06e71de..615c655 100644
>> --- a/drivers/net/npe/include/IxOsalTypes.h
>> +++ b/drivers/net/npe/include/IxOsalTypes.h
>> @@ -93,7 +93,7 @@ typedef volatile INT32 VINT32;
>>
>>
>> #ifndef NUMELEMS
>> -#define NUMELEMS(x) (sizeof(x) / sizeof((x)[0]))
>> +#define NUMELEMS(x) ARRAY_SIZE(x)
>> #endif
>
> Just kill this macro altogether please.
Ah, yes. I missed your comment here when I reply the mail.
NUMELEMS is not used at all so it can be removed.
Will fix it in v3.
I just sent v2 per Jagan Teki's request.
I think I'll wait for Jagan Teki's feedback before sending v3.
Thanks for the review.
Axel
More information about the U-Boot
mailing list