提交 8b14a536 编写于 作者: D Denis Cheng 提交者: David S. Miller

[NET]: all net/ cleanup with ARRAY_SIZE

Signed-off-by: NDenis Cheng <crquan@gmail.com>
上级 c40f6fff
......@@ -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]);
......
......@@ -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))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册