Skip to content

Commit 910cc72

Browse files
Merav Sicrondavem330
authored andcommitted
bnx2x: Add static declaration to several functions
This patch adds static declaration to several functions in bnx2x. It eliminates newly introduced sparse warnings reported by Fengguang Wu. Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Merav Sicron <meravs@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 5cb0443 commit 910cc72

2 files changed

Lines changed: 15 additions & 15 deletions

File tree

‎drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11934,8 +11934,8 @@ int bnx2x_phy_probe(struct link_params *params)
1193411934
return 0;
1193511935
}
1193611936

11937-
void bnx2x_init_bmac_loopback(struct link_params *params,
11938-
struct link_vars *vars)
11937+
static void bnx2x_init_bmac_loopback(struct link_params *params,
11938+
struct link_vars *vars)
1193911939
{
1194011940
struct bnx2x *bp = params->bp;
1194111941
vars->link_up = 1;
@@ -11954,8 +11954,8 @@ void bnx2x_init_bmac_loopback(struct link_params *params,
1195411954
REG_WR(bp, NIG_REG_EGRESS_DRAIN0_MODE + params->port*4, 0);
1195511955
}
1195611956

11957-
void bnx2x_init_emac_loopback(struct link_params *params,
11958-
struct link_vars *vars)
11957+
static void bnx2x_init_emac_loopback(struct link_params *params,
11958+
struct link_vars *vars)
1195911959
{
1196011960
struct bnx2x *bp = params->bp;
1196111961
vars->link_up = 1;
@@ -11973,8 +11973,8 @@ void bnx2x_init_emac_loopback(struct link_params *params,
1197311973
REG_WR(bp, NIG_REG_EGRESS_DRAIN0_MODE + params->port*4, 0);
1197411974
}
1197511975

11976-
void bnx2x_init_xmac_loopback(struct link_params *params,
11977-
struct link_vars *vars)
11976+
static void bnx2x_init_xmac_loopback(struct link_params *params,
11977+
struct link_vars *vars)
1197811978
{
1197911979
struct bnx2x *bp = params->bp;
1198011980
vars->link_up = 1;
@@ -11999,8 +11999,8 @@ void bnx2x_init_xmac_loopback(struct link_params *params,
1199911999
REG_WR(bp, NIG_REG_EGRESS_DRAIN0_MODE + params->port*4, 0);
1200012000
}
1200112001

12002-
void bnx2x_init_umac_loopback(struct link_params *params,
12003-
struct link_vars *vars)
12002+
static void bnx2x_init_umac_loopback(struct link_params *params,
12003+
struct link_vars *vars)
1200412004
{
1200512005
struct bnx2x *bp = params->bp;
1200612006
vars->link_up = 1;
@@ -12014,8 +12014,8 @@ void bnx2x_init_umac_loopback(struct link_params *params,
1201412014
REG_WR(bp, NIG_REG_EGRESS_DRAIN0_MODE + params->port*4, 0);
1201512015
}
1201612016

12017-
void bnx2x_init_xgxs_loopback(struct link_params *params,
12018-
struct link_vars *vars)
12017+
static void bnx2x_init_xgxs_loopback(struct link_params *params,
12018+
struct link_vars *vars)
1201912019
{
1202012020
struct bnx2x *bp = params->bp;
1202112021
vars->link_up = 1;

‎drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1482,7 +1482,7 @@ static void bnx2x_igu_int_disable(struct bnx2x *bp)
14821482
BNX2X_ERR("BUG! proper val not read from IGU!\n");
14831483
}
14841484

1485-
void bnx2x_int_disable(struct bnx2x *bp)
1485+
static void bnx2x_int_disable(struct bnx2x *bp)
14861486
{
14871487
if (bp->common.int_block == INT_BLOCK_HC)
14881488
bnx2x_hc_int_disable(bp);
@@ -7051,7 +7051,7 @@ static void bnx2x_clear_func_ilt(struct bnx2x *bp, u32 func)
70517051
}
70527052

70537053

7054-
void bnx2x_init_searcher(struct bnx2x *bp)
7054+
static void bnx2x_init_searcher(struct bnx2x *bp)
70557055
{
70567056
int port = BP_PORT(bp);
70577057
bnx2x_src_init_t2(bp, bp->t2, bp->t2_mapping, SRC_CONN_NUM);
@@ -7081,7 +7081,7 @@ static inline int bnx2x_func_switch_update(struct bnx2x *bp, int suspend)
70817081
return rc;
70827082
}
70837083

7084-
int bnx2x_reset_nic_mode(struct bnx2x *bp)
7084+
static int bnx2x_reset_nic_mode(struct bnx2x *bp)
70857085
{
70867086
int rc, i, port = BP_PORT(bp);
70877087
int vlan_en = 0, mac_en[NUM_MACS];
@@ -7968,7 +7968,7 @@ static void bnx2x_pf_q_prep_init(struct bnx2x *bp,
79687968
}
79697969
}
79707970

7971-
int bnx2x_setup_tx_only(struct bnx2x *bp, struct bnx2x_fastpath *fp,
7971+
static int bnx2x_setup_tx_only(struct bnx2x *bp, struct bnx2x_fastpath *fp,
79727972
struct bnx2x_queue_state_params *q_params,
79737973
struct bnx2x_queue_setup_tx_only_params *tx_only_params,
79747974
int tx_index, bool leading)
@@ -9011,7 +9011,7 @@ static int bnx2x_process_kill(struct bnx2x *bp, bool global)
90119011
return 0;
90129012
}
90139013

9014-
int bnx2x_leader_reset(struct bnx2x *bp)
9014+
static int bnx2x_leader_reset(struct bnx2x *bp)
90159015
{
90169016
int rc = 0;
90179017
bool global = bnx2x_reset_is_global(bp);

0 commit comments

Comments
 (0)