All of lore.kernel.org
 help / color / mirror / Atom feed
* [KJ] [PATCH] drivers/atm/nicstarmac.c: Array size calculations
@ 2007-05-26 10:51 Andi Drebes
  0 siblings, 0 replies; only message in thread
From: Andi Drebes @ 2007-05-26 10:51 UTC (permalink / raw)
  To: kernel-janitors

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 <lists-receive@programmierforen.de>
---
Compile tested with allyesconfig on i386.
Diffed against Linus' git-tree


diff --git a/drivers/atm/nicstarmac.c b/drivers/atm/nicstarmac.c
index 480947f..842e26c 100644
--- a/drivers/atm/nicstarmac.c
+++ b/drivers/atm/nicstarmac.c
@@ -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
Kernel-janitors@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/kernel-janitors

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2007-05-26 10:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-26 10:51 [KJ] [PATCH] drivers/atm/nicstarmac.c: Array size calculations Andi Drebes

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.