drivers/atm/nicstarmac.c: Array size calculations
Subsystems (2)
PATCH 1/1 drivers/atm/nicstarmac.c: Array size calculations
This patch replaces a line in drivers/atm/nicstarmac.c that caluclates the size of an array with the ARRAY_SIZE(x) macro.
Signed-off-by Andi Drebes <[email protected]>
---
Compile tested with allyesconfig on i386.
Diffed against Linus' git-tree
drivers/atm/nicstarmac.c +1 -1
@@ -134,7 +134,7 @@ nicstar_read_eprom_status( virt_addr_t base )/* Send read instruction */ val =NICSTAR_REG_READ ( base,NICSTAR_REG_GENERAL_PURPOSE ) &0xFFFFFFF0 ; -for (i=0 ; i<sizeof rdsrtab/sizeof rdsrtab[0 ]; i++) +for (i=0 ; i<ARRAY_SIZE (rdsrtab); i++) {NICSTAR_REG_WRITE ( base,NICSTAR_REG_GENERAL_PURPOSE , (val | rdsrtab[i]) );
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/kernel-janitors