Commit 355a1bb9 authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] NULL noise removal in skfp

Signed-off-by: default avatarAl Viro <viro@parcelfarce.linux.org.uk>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 713e675d
......@@ -1075,7 +1075,7 @@ static struct s_fpmc* mac_get_mc_table(struct s_smc *smc,
for (i = 0 ; i < 6 ; i++, p++)
*p = canonical[*p] ;
}
slot = 0 ;
slot = NULL;
for (i = 0, tb = smc->hw.fp.mc.table ; i < FPMAX_MULTICAST ; i++, tb++){
if (!tb->n) { /* not used */
if (!del && !slot) /* if !del save first free */
......
......@@ -1981,7 +1981,7 @@ void mac_drv_clear_txd(struct s_smc *smc)
{
struct s_smt_tx_queue *queue ;
struct s_smt_fp_txd volatile *t1 ;
struct s_smt_fp_txd volatile *t2=0 ;
struct s_smt_fp_txd volatile *t2 = NULL ;
SMbuf *mb ;
u_long tbctrl ;
int i ;
......
......@@ -558,8 +558,8 @@ void smt_add_para(struct s_smc *smc, struct s_pcon *pcon, u_short para,
{
struct smt_para *pa ;
const struct s_p_tab *pt ;
struct fddi_mib_m *mib_m = 0 ;
struct fddi_mib_p *mib_p = 0 ;
struct fddi_mib_m *mib_m = NULL;
struct fddi_mib_p *mib_p = NULL;
int len ;
int plen ;
char *from ;
......@@ -644,7 +644,7 @@ void smt_add_para(struct s_smc *smc, struct s_pcon *pcon, u_short para,
/*
* check special paras
*/
swap = 0 ;
swap = NULL;
switch (para) {
case SMT_P10F0 :
case SMT_P10F1 :
......@@ -1091,9 +1091,9 @@ int smt_set_para(struct s_smc *smc, struct smt_para *pa, int index, int local,
char c ;
char *mib_addr ;
struct fddi_mib *mib ;
struct fddi_mib_m *mib_m = 0 ;
struct fddi_mib_a *mib_a = 0 ;
struct fddi_mib_p *mib_p = 0 ;
struct fddi_mib_m *mib_m = NULL;
struct fddi_mib_a *mib_a = NULL;
struct fddi_mib_p *mib_p = NULL;
int mac ;
int path ;
int port ;
......@@ -1533,7 +1533,7 @@ static const struct s_p_tab *smt_get_ptab(u_short para)
const struct s_p_tab *pt ;
for (pt = p_tab ; pt->p_num && pt->p_num != para ; pt++)
;
return(pt->p_num ? pt : 0) ;
return(pt->p_num ? pt : NULL) ;
}
static int smt_mib_phys(struct s_smc *smc)
......
......@@ -1701,7 +1701,7 @@ void *sm_to_para(struct s_smc *smc, struct smt_header *sm, int para)
char *p ;
int len ;
int plen ;
void *found = 0 ;
void *found = NULL;
SK_UNUSED(smc) ;
......@@ -1715,16 +1715,16 @@ void *sm_to_para(struct s_smc *smc, struct smt_header *sm, int para)
len -= plen ;
if (len < 0) {
DB_SMT("SMT : sm_to_para - length error %d\n",plen,0) ;
return(0) ;
return NULL;
}
if ((plen & 3) && (para != SMT_P_ECHODATA)) {
DB_SMT("SMT : sm_to_para - odd length %d\n",plen,0) ;
return(0) ;
return NULL;
}
if (found)
return(found) ;
}
return(0) ;
return NULL;
}
#if 0
......
......@@ -262,7 +262,7 @@ static void smt_init_mib(struct s_smc *smc, int level)
*/
/* Attention: don't initialize mib pointer here! */
/* It must be initialized during phase 2 */
smc->y[port].mib = 0 ;
smc->y[port].mib = NULL;
mib->fddiSMTPORTIndexes[port] = port+INDEX_PORT ;
pm->fddiPORTIndex = port+INDEX_PORT ;
......
......@@ -73,7 +73,7 @@ static struct s_ptab {
{ "SBACOMMAND",16, 0 } ,
{ "SBAAVAILABLE",17, 1, 0, 100 } ,
#endif
{ 0 }
{ NULL }
} ;
/* Define maximum string size for values and keybuffer */
......
......@@ -30,9 +30,9 @@ static void timer_done(struct s_smc *smc, int restart);
void smt_timer_init(struct s_smc *smc)
{
smc->t.st_queue = 0 ;
smc->t.st_queue = NULL;
smc->t.st_fast.tm_active = FALSE ;
smc->t.st_fast.tm_next = 0 ;
smc->t.st_fast.tm_next = NULL;
hwt_init(smc) ;
}
......@@ -75,7 +75,7 @@ void smt_timer_start(struct s_smc *smc, struct smt_timer *timer, u_long time,
timer->tm_active = TRUE ;
if (!smc->t.st_queue) {
smc->t.st_queue = timer ;
timer->tm_next = 0 ;
timer->tm_next = NULL;
timer->tm_delta = time ;
hwt_start(smc,time) ;
return ;
......@@ -141,7 +141,7 @@ static void timer_done(struct s_smc *smc, int restart)
done = 1 ;
}
}
*last = 0 ;
*last = NULL;
next = smc->t.st_queue ;
smc->t.st_queue = tm ;
......
......@@ -167,7 +167,7 @@ static struct s_srf_evc *smt_get_evc(struct s_smc *smc, int code, int index)
if (evc->evc_code == code && evc->evc_index == index)
return(evc) ;
}
return(0) ;
return NULL;
}
#define THRESHOLD_2 (2*TICKS_PER_SECOND)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment