[U-Boot] [PATCH v3] net: Use ARRAY_SIZE at appropriate places

Joe Hershberger joe.hershberger at gmail.com
Tue Jul 9 00:25:35 CEST 2013


Hi Axel,

On Tue, Jul 2, 2013 at 10:24 PM, Axel Lin <axel.lin at ingics.com> wrote:
> Use ARRAY_SIZE instead of having similar implementation in each drivers.
> The NUMELEMS defined in drivers/net/npe/include/IxOsalTypes.h is not used
> at all, so this patch removes it instead of converting it to use ARRAY_SIZE.
>
> Signed-off-by: Axel Lin <axel.lin at ingics.com>
> Cc: Albert Aribaud <albert.u.boot at aribaud.net>
> Cc: Ben Warren <biggerbadderben at gmail.com>
> Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com>
> Cc: Joe Hershberger <joe.hershberger at ni.com>
> Cc: Marek Vasut <marex at denx.de>
> Cc: Mike Frysinger <vapier at gentoo.org>
> Cc: Nobuhiro Iwamatsu <iwamatsu at nigauri.org>
> Cc: TsiChungLiew <Tsi-Chung.Liew at freescale.com>
> Cc: Wolfgang Denk <wd at denx.de>
> Cc: York Sun <yorksun at freescale.com>
> ---
> v2: Fix checkpatch issues. (abandoned)
> v3: Modified from v1, because v2 makes the patch bigger.
>     And using tab (which takes 8 spaces) as indent makes the code looks odd
>     because the whole file uses 4 spaces as indent.
>     Note, the checkpatch issue is not introduced by this patch itself, it's
>     because original source code does not pass checkpatch at all.
>     Address Marek's comment:
>     Remove NUMELEMS in drivers/net/npe/include/IxOsalTypes.h
>     because it is not used at all.

I agree that this is better than v2 in the scope of the patch.

-Joe


More information about the U-Boot mailing list