igc: make non-global functions static
Subsystems (3)
PATCH 1/1 igc: make non-global functions static
Fix sparse warning:drivers/net/ethernet/intel/igc/igc_ptp.c:512:6:
warning: symbol 'igc_ptp_tx_work' was not declared. Should it be static?drivers/net/ethernet/intel/igc/igc_ptp.c:644:6:
warning: symbol 'igc_ptp_suspend' was not declared. Should it be static?
--- drivers/net/ethernet/intel/igc/igc_ptp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/intel/igc/igc_ptp.c +2 -2
@@ -509,7 +509,7 @@ static void igc_ptp_tx_hwtstamp(struct igc_adapter *adapter)* This work function polls the TSYNCTXCTL valid bit to determine when a * timestamp has been taken for the current stored skb. */ -void igc_ptp_tx_work (struct work_struct *work) +static void igc_ptp_tx_work (struct work_struct *work) { struct igc_adapter *adapter = container_of(work, struct igc_adapter, ptp_tx_work);
@@ -641,7 +641,7 @@ void igc_ptp_init(struct igc_adapter *adapter)* This function stops the overflow check work and PTP Tx timestamp work, and * will prepare the device for OS suspend. */ -void igc_ptp_suspend (struct igc_adapter *adapter) +static void igc_ptp_suspend (struct igc_adapter *adapter) {if (!(adapter->ptp_flags &IGC_PTP_ENABLED ))return ;
Signature · 1 line
2.7.4
Quoted 16 lines
From: netdev-owner at vger.kernel.org <[email protected]> On Behalf Of Chen Zhou
Sent: Wednesday, January 8, 2020 5:40 AM
To: Kirsher, Jeffrey T <[email protected]>; davem at davemloft.net
Cc: intel-wired-lan at lists.osuosl.org; netdev at vger.kernel.org; linux- kernel at vger.kernel.org; chenzhou10 at huawei.com
Subject: [PATCH next] igc: make non-global functions staticFix sparse warning:
drivers/net/ethernet/intel/igc/igc_ptp.c:512:6:
warning: symbol 'igc_ptp_tx_work' was not declared. Should it be
static?drivers/net/ethernet/intel/igc/igc_ptp.c:644:6:
warning: symbol 'igc_ptp_suspend' was not declared. Should it be
static?
Quoted 5 lines
Reported-by Hulk Robot <[email protected]>Signed-off-by Chen Zhou <[email protected]>--- drivers/net/ethernet/intel/igc/igc_ptp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Quoted 27 lines · Chen Zhou
Fix sparse warning:
drivers/net/ethernet/intel/igc/igc_ptp.c:512:6:
warning: symbol 'igc_ptp_tx_work' was not declared. Should it be static?drivers/net/ethernet/intel/igc/igc_ptp.c:644:6:
warning: symbol 'igc_ptp_suspend' was not declared. Should it be static?Reported-by Hulk Robot <[email protected]>Signed-off-by Chen Zhou <[email protected]>--- drivers/net/ethernet/intel/igc/igc_ptp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/net/ethernet/intel/igc/igc_ptp.c +1
-1@@ -509,7 +509,7 @@ static void igc_ptp_tx_hwtstamp(struct igc_adapter *adapter)* This work function polls the TSYNCTXCTL valid bit to determine when a * timestamp has been taken for the current stored skb. */ -void igc_ptp_tx_work (struct work_struct *work) +static void igc_ptp_tx_work (struct work_struct *work) { struct igc_adapter *adapter = container_of(work, struct igc_adapter, ptp_tx_work);
drivers/net/ethernet/intel/igc/igc_ptp.c void igc_ptp_init(struct igc_adapter *adapter) · line 647
Quoted 8 lines
drivers/net/ethernet/intel/igc/igc_ptp.c +1
-1@@ -641,7 +641,7 @@ void igc_ptp_init(struct igc_adapter *adapter)* This function stops the overflow check work and PTP Tx timestamp work, and * will prepare the device for OS suspend. */ -void igc_ptp_suspend (struct igc_adapter *adapter) +static void igc_ptp_suspend (struct igc_adapter *adapter) {if (!(adapter->ptp_flags &IGC_PTP_ENABLED ))return ;
This patch should be partially reverted for "igc_ptp_suspend". "igc_ptp_suspend" declared in igc.h file and used in "__igc_shutdown" method.