linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH next] igc: make non-global functions static
@ 2020-01-08 13:39 Chen Zhou
  2020-02-01  1:58 ` Brown, Aaron F
  2020-02-26 23:32 ` [Intel-wired-lan] " Neftin, Sasha
  0 siblings, 2 replies; 3+ messages in thread
From: Chen Zhou @ 2020-01-08 13:39 UTC (permalink / raw)
  To: jeffrey.t.kirsher, davem
  Cc: intel-wired-lan, netdev, linux-kernel, chenzhou10

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 <hulkci@huawei.com>
Signed-off-by: Chen Zhou <chenzhou10@huawei.com>
---
 drivers/net/ethernet/intel/igc/igc_ptp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/igc/igc_ptp.c b/drivers/net/ethernet/intel/igc/igc_ptp.c
index 6935065..389a969 100644
--- a/drivers/net/ethernet/intel/igc/igc_ptp.c
+++ b/drivers/net/ethernet/intel/igc/igc_ptp.c
@@ -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;
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* RE: [PATCH next] igc: make non-global functions static
  2020-01-08 13:39 [PATCH next] igc: make non-global functions static Chen Zhou
@ 2020-02-01  1:58 ` Brown, Aaron F
  2020-02-26 23:32 ` [Intel-wired-lan] " Neftin, Sasha
  1 sibling, 0 replies; 3+ messages in thread
From: Brown, Aaron F @ 2020-02-01  1:58 UTC (permalink / raw)
  To: Chen Zhou, Kirsher, Jeffrey T, davem
  Cc: intel-wired-lan, netdev, linux-kernel

> From: netdev-owner@vger.kernel.org <netdev-owner@vger.kernel.org>
> On Behalf Of Chen Zhou
> Sent: Wednesday, January 8, 2020 5:40 AM
> To: Kirsher, Jeffrey T <jeffrey.t.kirsher@intel.com>; davem@davemloft.net
> Cc: intel-wired-lan@lists.osuosl.org; netdev@vger.kernel.org; linux-
> kernel@vger.kernel.org; chenzhou10@huawei.com
> Subject: [PATCH next] 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?
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Chen Zhou <chenzhou10@huawei.com>
> ---
>  drivers/net/ethernet/intel/igc/igc_ptp.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Tested-by: Aaron Brown <aaron.f.brown@intel.com>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Intel-wired-lan] [PATCH next] igc: make non-global functions static
  2020-01-08 13:39 [PATCH next] igc: make non-global functions static Chen Zhou
  2020-02-01  1:58 ` Brown, Aaron F
@ 2020-02-26 23:32 ` Neftin, Sasha
  1 sibling, 0 replies; 3+ messages in thread
From: Neftin, Sasha @ 2020-02-26 23:32 UTC (permalink / raw)
  To: Chen Zhou, jeffrey.t.kirsher, davem; +Cc: netdev, intel-wired-lan, linux-kernel

On 1/8/2020 05:39, Chen Zhou wrote:
> 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 <hulkci@huawei.com>
> Signed-off-by: Chen Zhou <chenzhou10@huawei.com>
> ---
>   drivers/net/ethernet/intel/igc/igc_ptp.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/intel/igc/igc_ptp.c b/drivers/net/ethernet/intel/igc/igc_ptp.c
> index 6935065..389a969 100644
> --- a/drivers/net/ethernet/intel/igc/igc_ptp.c
> +++ b/drivers/net/ethernet/intel/igc/igc_ptp.c
> @@ -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;
> 
This patch should be partially reverted for "igc_ptp_suspend".
"igc_ptp_suspend" declared in igc.h file and used in "__igc_shutdown" 
method.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-02-26 23:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-08 13:39 [PATCH next] igc: make non-global functions static Chen Zhou
2020-02-01  1:58 ` Brown, Aaron F
2020-02-26 23:32 ` [Intel-wired-lan] " Neftin, Sasha

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).