drivers/net/: all drivers/net/ cleanup with ARRAY_SIZE
Signed-off-by: Denis Cheng <crquan@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
This commit is contained in:
committed by
David S. Miller
parent
10d024c1b2
commit
ff8ac60948
@@ -1654,7 +1654,7 @@ static const struct smt_pdef {
|
||||
{ SMT_P4053, 0, SWAP_SMT_P4053 } ,
|
||||
} ;
|
||||
|
||||
#define N_SMT_PLEN (sizeof(smt_pdef)/sizeof(smt_pdef[0]))
|
||||
#define N_SMT_PLEN ARRAY_SIZE(smt_pdef)
|
||||
|
||||
int smt_check_para(struct s_smc *smc, struct smt_header *sm,
|
||||
const u_short list[])
|
||||
|
||||
@@ -43,7 +43,7 @@ static void clear_reported(struct s_smc *smc);
|
||||
static void smt_send_srf(struct s_smc *smc);
|
||||
static struct s_srf_evc *smt_get_evc(struct s_smc *smc, int code, int index);
|
||||
|
||||
#define MAX_EVCS (sizeof(smc->evcs)/sizeof(smc->evcs[0]))
|
||||
#define MAX_EVCS ARRAY_SIZE(smc->evcs)
|
||||
|
||||
struct evc_init {
|
||||
u_char code ;
|
||||
@@ -67,7 +67,7 @@ static const struct evc_init evc_inits[] = {
|
||||
{ SMT_EVENT_PORT_PATH_CHANGE, INDEX_PORT,NUMPHYS,SMT_P4053 } ,
|
||||
} ;
|
||||
|
||||
#define MAX_INIT_EVC (sizeof(evc_inits)/sizeof(evc_inits[0]))
|
||||
#define MAX_INIT_EVC ARRAY_SIZE(evc_inits)
|
||||
|
||||
void smt_init_evc(struct s_smc *smc)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user