Commit c19b05b8 authored by Tetsuo Handa's avatar Tetsuo Handa Committed by David S. Miller

net: fddi: skfp: Remove addr_to_string().

kbuild test robot found that addr_to_string() is available only when
DEBUG is defined. And I found that what that function is doing is
what %pM will do. Thus, replace %s with %pM and remove thread-unsafe
addr_to_string() function.
Reported-by: default avatarkbuild test robot <lkp@intel.com>
Signed-off-by: default avatarTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 528ae84a
...@@ -148,7 +148,7 @@ int ess_raf_received_pack(struct s_smc *smc, SMbuf *mb, struct smt_header *sm, ...@@ -148,7 +148,7 @@ int ess_raf_received_pack(struct s_smc *smc, SMbuf *mb, struct smt_header *sm,
DB_ESSN(2, "fc %x ft %x", sm->smt_class, sm->smt_type); DB_ESSN(2, "fc %x ft %x", sm->smt_class, sm->smt_type);
DB_ESSN(2, "ver %x tran %x", sm->smt_version, sm->smt_tid); DB_ESSN(2, "ver %x tran %x", sm->smt_version, sm->smt_tid);
DB_ESSN(2, "stn_id %s", addr_to_string(&sm->smt_source)); DB_ESSN(2, "stn_id %pM", &sm->smt_source);
DB_ESSN(2, "infolen %x res %lx", sm->smt_len, msg_res_type); DB_ESSN(2, "infolen %x res %lx", sm->smt_len, msg_res_type);
DB_ESSN(2, "sbacmd %x", cmd->sba_cmd); DB_ESSN(2, "sbacmd %x", cmd->sba_cmd);
...@@ -308,8 +308,8 @@ int ess_raf_received_pack(struct s_smc *smc, SMbuf *mb, struct smt_header *sm, ...@@ -308,8 +308,8 @@ int ess_raf_received_pack(struct s_smc *smc, SMbuf *mb, struct smt_header *sm,
p = (void *) sm_to_para(smc,sm,SMT_P3210) ; p = (void *) sm_to_para(smc,sm,SMT_P3210) ;
overhead = ((struct smt_p_3210 *)p)->mib_overhead ; overhead = ((struct smt_p_3210 *)p)->mib_overhead ;
DB_ESSN(2, "ESS: Change Request from %s", DB_ESSN(2, "ESS: Change Request from %pM",
addr_to_string(&sm->smt_source)); &sm->smt_source);
DB_ESSN(2, "payload= %lx overhead= %lx", DB_ESSN(2, "payload= %lx overhead= %lx",
payload, overhead); payload, overhead);
...@@ -339,8 +339,8 @@ int ess_raf_received_pack(struct s_smc *smc, SMbuf *mb, struct smt_header *sm, ...@@ -339,8 +339,8 @@ int ess_raf_received_pack(struct s_smc *smc, SMbuf *mb, struct smt_header *sm,
return fs; return fs;
} }
DB_ESSN(2, "ESS: Report Request from %s", DB_ESSN(2, "ESS: Report Request from %pM",
addr_to_string(&sm->smt_source)); &sm->smt_source);
/* /*
* verify that the resource type is sync bw only * verify that the resource type is sync bw only
......
...@@ -640,7 +640,6 @@ void dump_smt(struct s_smc *smc, struct smt_header *sm, char *text); ...@@ -640,7 +640,6 @@ void dump_smt(struct s_smc *smc, struct smt_header *sm, char *text);
#define dump_smt(smc,sm,text) #define dump_smt(smc,sm,text)
#endif #endif
char* addr_to_string(struct fddi_addr *addr);
#ifdef DEBUG #ifdef DEBUG
void dump_hex(char *p, int len); void dump_hex(char *p, int len);
#endif #endif
......
...@@ -520,8 +520,8 @@ void smt_received_pack(struct s_smc *smc, SMbuf *mb, int fs) ...@@ -520,8 +520,8 @@ void smt_received_pack(struct s_smc *smc, SMbuf *mb, int fs)
* ignore any packet with NSA and A-indicator set * ignore any packet with NSA and A-indicator set
*/ */
if ( (fs & A_INDICATOR) && m_fc(mb) == FC_SMT_NSA) { if ( (fs & A_INDICATOR) && m_fc(mb) == FC_SMT_NSA) {
DB_SMT("SMT : ignoring NSA with A-indicator set from %s", DB_SMT("SMT : ignoring NSA with A-indicator set from %pM",
addr_to_string(&sm->smt_source)); &sm->smt_source);
smt_free_mbuf(smc,mb) ; smt_free_mbuf(smc,mb) ;
return ; return ;
} }
...@@ -552,8 +552,8 @@ void smt_received_pack(struct s_smc *smc, SMbuf *mb, int fs) ...@@ -552,8 +552,8 @@ void smt_received_pack(struct s_smc *smc, SMbuf *mb, int fs)
break ; break ;
} }
if (illegal) { if (illegal) {
DB_SMT("SMT : version = %d, dest = %s", DB_SMT("SMT : version = %d, dest = %pM",
sm->smt_version, addr_to_string(&sm->smt_source)); sm->smt_version, &sm->smt_source);
smt_send_rdf(smc,mb,m_fc(mb),SMT_RDF_VERSION,local) ; smt_send_rdf(smc,mb,m_fc(mb),SMT_RDF_VERSION,local) ;
smt_free_mbuf(smc,mb) ; smt_free_mbuf(smc,mb) ;
return ; return ;
...@@ -582,8 +582,8 @@ void smt_received_pack(struct s_smc *smc, SMbuf *mb, int fs) ...@@ -582,8 +582,8 @@ void smt_received_pack(struct s_smc *smc, SMbuf *mb, int fs)
if (!is_equal( if (!is_equal(
&smc->mib.m[MAC0].fddiMACUpstreamNbr, &smc->mib.m[MAC0].fddiMACUpstreamNbr,
&sm->smt_source)) { &sm->smt_source)) {
DB_SMT("SMT : updated my UNA = %s", DB_SMT("SMT : updated my UNA = %pM",
addr_to_string(&sm->smt_source)); &sm->smt_source);
if (!is_equal(&smc->mib.m[MAC0]. if (!is_equal(&smc->mib.m[MAC0].
fddiMACUpstreamNbr,&SMT_Unknown)){ fddiMACUpstreamNbr,&SMT_Unknown)){
/* Do not update unknown address */ /* Do not update unknown address */
...@@ -612,8 +612,8 @@ void smt_received_pack(struct s_smc *smc, SMbuf *mb, int fs) ...@@ -612,8 +612,8 @@ void smt_received_pack(struct s_smc *smc, SMbuf *mb, int fs)
is_individual(&sm->smt_source) && is_individual(&sm->smt_source) &&
((!(fs & A_INDICATOR) && m_fc(mb) == FC_SMT_NSA) || ((!(fs & A_INDICATOR) && m_fc(mb) == FC_SMT_NSA) ||
(m_fc(mb) != FC_SMT_NSA))) { (m_fc(mb) != FC_SMT_NSA))) {
DB_SMT("SMT : replying to NIF request %s", DB_SMT("SMT : replying to NIF request %pM",
addr_to_string(&sm->smt_source)); &sm->smt_source);
smt_send_nif(smc,&sm->smt_source, smt_send_nif(smc,&sm->smt_source,
FC_SMT_INFO, FC_SMT_INFO,
sm->smt_tid, sm->smt_tid,
...@@ -621,8 +621,8 @@ void smt_received_pack(struct s_smc *smc, SMbuf *mb, int fs) ...@@ -621,8 +621,8 @@ void smt_received_pack(struct s_smc *smc, SMbuf *mb, int fs)
} }
break ; break ;
case SMT_REPLY : case SMT_REPLY :
DB_SMT("SMT : received NIF response from %s", DB_SMT("SMT : received NIF response from %pM",
addr_to_string(&sm->smt_source)); &sm->smt_source);
if (fs & A_INDICATOR) { if (fs & A_INDICATOR) {
smc->sm.pend[SMT_TID_NIF] = 0 ; smc->sm.pend[SMT_TID_NIF] = 0 ;
DB_SMT("SMT : duplicate address"); DB_SMT("SMT : duplicate address");
...@@ -682,23 +682,23 @@ void smt_received_pack(struct s_smc *smc, SMbuf *mb, int fs) ...@@ -682,23 +682,23 @@ void smt_received_pack(struct s_smc *smc, SMbuf *mb, int fs)
case SMT_SIF_CONFIG : /* station information */ case SMT_SIF_CONFIG : /* station information */
if (sm->smt_type != SMT_REQUEST) if (sm->smt_type != SMT_REQUEST)
break ; break ;
DB_SMT("SMT : replying to SIF Config request from %s", DB_SMT("SMT : replying to SIF Config request from %pM",
addr_to_string(&sm->smt_source)); &sm->smt_source);
smt_send_sif_config(smc,&sm->smt_source,sm->smt_tid,local) ; smt_send_sif_config(smc,&sm->smt_source,sm->smt_tid,local) ;
break ; break ;
case SMT_SIF_OPER : /* station information */ case SMT_SIF_OPER : /* station information */
if (sm->smt_type != SMT_REQUEST) if (sm->smt_type != SMT_REQUEST)
break ; break ;
DB_SMT("SMT : replying to SIF Operation request from %s", DB_SMT("SMT : replying to SIF Operation request from %pM",
addr_to_string(&sm->smt_source)); &sm->smt_source);
smt_send_sif_operation(smc,&sm->smt_source,sm->smt_tid,local) ; smt_send_sif_operation(smc,&sm->smt_source,sm->smt_tid,local) ;
break ; break ;
case SMT_ECF : /* echo frame */ case SMT_ECF : /* echo frame */
switch (sm->smt_type) { switch (sm->smt_type) {
case SMT_REPLY : case SMT_REPLY :
smc->mib.priv.fddiPRIVECF_Reply_Rx++ ; smc->mib.priv.fddiPRIVECF_Reply_Rx++ ;
DB_SMT("SMT: received ECF reply from %s", DB_SMT("SMT: received ECF reply from %pM",
addr_to_string(&sm->smt_source)); &sm->smt_source);
if (sm_to_para(smc,sm,SMT_P_ECHODATA) == NULL) { if (sm_to_para(smc,sm,SMT_P_ECHODATA) == NULL) {
DB_SMT("SMT: ECHODATA missing"); DB_SMT("SMT: ECHODATA missing");
break ; break ;
...@@ -727,8 +727,8 @@ void smt_received_pack(struct s_smc *smc, SMbuf *mb, int fs) ...@@ -727,8 +727,8 @@ void smt_received_pack(struct s_smc *smc, SMbuf *mb, int fs)
local) ; local) ;
break ; break ;
} }
DB_SMT("SMT - sending ECF reply to %s", DB_SMT("SMT - sending ECF reply to %pM",
addr_to_string(&sm->smt_source)); &sm->smt_source);
/* set destination addr. & reply */ /* set destination addr. & reply */
sm->smt_dest = sm->smt_source ; sm->smt_dest = sm->smt_source ;
...@@ -794,8 +794,8 @@ void smt_received_pack(struct s_smc *smc, SMbuf *mb, int fs) ...@@ -794,8 +794,8 @@ void smt_received_pack(struct s_smc *smc, SMbuf *mb, int fs)
* we need to send a RDF frame according to 8.1.3.1.1, * we need to send a RDF frame according to 8.1.3.1.1,
* only if it is a REQUEST. * only if it is a REQUEST.
*/ */
DB_SMT("SMT : class = %d, send RDF to %s", DB_SMT("SMT : class = %d, send RDF to %pM",
sm->smt_class, addr_to_string(&sm->smt_source)); sm->smt_class, &sm->smt_source);
smt_send_rdf(smc,mb,m_fc(mb),SMT_RDF_CLASS,local) ; smt_send_rdf(smc,mb,m_fc(mb),SMT_RDF_CLASS,local) ;
break ; break ;
...@@ -864,8 +864,8 @@ static void smt_send_rdf(struct s_smc *smc, SMbuf *rej, int fc, int reason, ...@@ -864,8 +864,8 @@ static void smt_send_rdf(struct s_smc *smc, SMbuf *rej, int fc, int reason,
if (sm->smt_type != SMT_REQUEST) if (sm->smt_type != SMT_REQUEST)
return ; return ;
DB_SMT("SMT: sending RDF to %s,reason = 0x%x", DB_SMT("SMT: sending RDF to %pM,reason = 0x%x",
addr_to_string(&sm->smt_source), reason); &sm->smt_source, reason);
/* /*
...@@ -1715,22 +1715,6 @@ void fddi_send_antc(struct s_smc *smc, struct fddi_addr *dest) ...@@ -1715,22 +1715,6 @@ void fddi_send_antc(struct s_smc *smc, struct fddi_addr *dest)
} }
#endif #endif
#ifdef DEBUG
char *addr_to_string(struct fddi_addr *addr)
{
int i ;
static char string[6*3] = "****" ;
for (i = 0 ; i < 6 ; i++) {
string[i * 3] = hex_asc_hi(addr->a[i]);
string[i * 3 + 1] = hex_asc_lo(addr->a[i]);
string[i * 3 + 2] = ':';
}
string[5 * 3 + 2] = 0;
return string;
}
#endif
/* /*
* return static mac index * return static mac index
*/ */
......
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