From: Denis Cheng Date: Sun, 16 Sep 2007 23:41:29 +0000 (-0700) Subject: [NET]: all net/ cleanup with ARRAY_SIZE X-Git-Tag: v2.6.24-rc1~1454^2~470 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=8b14a536701b50559a0d69d5d593323f550db4e9;p=linux-2.6-omap-h63xx.git [NET]: all net/ cleanup with ARRAY_SIZE Signed-off-by: Denis Cheng --- diff --git a/net/atm/proc.c b/net/atm/proc.c index 3a6be64b051..5d9d5ffba14 100644 --- a/net/atm/proc.c +++ b/net/atm/proc.c @@ -176,7 +176,7 @@ static void pvc_info(struct seq_file *seq, struct atm_vcc *vcc) seq_printf(seq, "%3d %3d %5d %-3s %7d %-5s %7d %-6s", vcc->dev->number,vcc->vpi,vcc->vci, - vcc->qos.aal >= sizeof(aal_name)/sizeof(aal_name[0]) ? "err" : + vcc->qos.aal >= ARRAY_SIZE(aal_name) ? "err" : aal_name[vcc->qos.aal],vcc->qos.rxtp.min_pcr, class_name[vcc->qos.rxtp.traffic_class],vcc->qos.txtp.min_pcr, class_name[vcc->qos.txtp.traffic_class]); diff --git a/net/decnet/dn_dev.c b/net/decnet/dn_dev.c index ddfd2aff44d..fa24614b5a3 100644 --- a/net/decnet/dn_dev.c +++ b/net/decnet/dn_dev.c @@ -150,7 +150,7 @@ static struct dn_dev_parms dn_dev_list[] = { } }; -#define DN_DEV_LIST_SIZE (sizeof(dn_dev_list)/sizeof(struct dn_dev_parms)) +#define DN_DEV_LIST_SIZE ARRAY_SIZE(dn_dev_list) #define DN_DEV_PARMS_OFFSET(x) ((int) ((char *) &((struct dn_dev_parms *)0)->x))