瀏覽代碼

enic: replace open-coded ARRAY_SIZE with macro

Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Jim Cromie 13 年之前
父節點
當前提交
4133099b3e
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/net/ethernet/cisco/enic/enic_pp.c

+ 1 - 1
drivers/net/ethernet/cisco/enic/enic_pp.c

@@ -184,7 +184,7 @@ static int (*enic_pp_handlers[])(struct enic *enic, int vf,
 };
 
 static const int enic_pp_handlers_count =
-			sizeof(enic_pp_handlers)/sizeof(*enic_pp_handlers);
+			ARRAY_SIZE(enic_pp_handlers);
 
 static int enic_pp_preassociate(struct enic *enic, int vf,
 	struct enic_port_profile *prev_pp, int *restore_pp)