All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-wired-lan] [PATCH v1 1/1] igc: Change type of the 'igc_check_downshift' method
@ 2022-04-23 16:55 Sasha Neftin
  2022-05-04  8:25 ` naamax.meir
  2022-05-04 11:24 ` Paul Menzel
  0 siblings, 2 replies; 3+ messages in thread
From: Sasha Neftin @ 2022-04-23 16:55 UTC (permalink / raw)
  To: intel-wired-lan

The 'igc_check_downshift' method always return 0 value. There is no point
return value. Change the return type of this method to void.

Signed-off-by: Sasha Neftin <sasha.neftin@intel.com>
---
 drivers/net/ethernet/intel/igc/igc_phy.c | 6 +-----
 drivers/net/ethernet/intel/igc/igc_phy.h | 2 +-
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/net/ethernet/intel/igc/igc_phy.c b/drivers/net/ethernet/intel/igc/igc_phy.c
index 2140ad1e8443..53b77c969c85 100644
--- a/drivers/net/ethernet/intel/igc/igc_phy.c
+++ b/drivers/net/ethernet/intel/igc/igc_phy.c
@@ -141,18 +141,14 @@ void igc_power_down_phy_copper(struct igc_hw *hw)
  * igc_check_downshift - Checks whether a downshift in speed occurred
  * @hw: pointer to the HW structure
  *
- * Success returns 0, Failure returns 1
- *
  * A downshift is detected by querying the PHY link health.
  */
-s32 igc_check_downshift(struct igc_hw *hw)
+void igc_check_downshift(struct igc_hw *hw)
 {
 	struct igc_phy_info *phy = &hw->phy;
 
 	/* speed downshift not supported */
 	phy->speed_downgraded = false;
-
-	return 0;
 }
 
 /**
diff --git a/drivers/net/ethernet/intel/igc/igc_phy.h b/drivers/net/ethernet/intel/igc/igc_phy.h
index 1b031372d206..832a7e359f18 100644
--- a/drivers/net/ethernet/intel/igc/igc_phy.h
+++ b/drivers/net/ethernet/intel/igc/igc_phy.h
@@ -11,7 +11,7 @@ s32 igc_phy_hw_reset(struct igc_hw *hw);
 s32 igc_get_phy_id(struct igc_hw *hw);
 s32 igc_phy_has_link(struct igc_hw *hw, u32 iterations,
 		     u32 usec_interval, bool *success);
-s32 igc_check_downshift(struct igc_hw *hw);
+void igc_check_downshift(struct igc_hw *hw);
 s32 igc_setup_copper_link(struct igc_hw *hw);
 void igc_power_up_phy_copper(struct igc_hw *hw);
 void igc_power_down_phy_copper(struct igc_hw *hw);
-- 
2.30.2


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

* [Intel-wired-lan] [PATCH v1 1/1] igc: Change type of the 'igc_check_downshift' method
  2022-04-23 16:55 [Intel-wired-lan] [PATCH v1 1/1] igc: Change type of the 'igc_check_downshift' method Sasha Neftin
@ 2022-05-04  8:25 ` naamax.meir
  2022-05-04 11:24 ` Paul Menzel
  1 sibling, 0 replies; 3+ messages in thread
From: naamax.meir @ 2022-05-04  8:25 UTC (permalink / raw)
  To: intel-wired-lan

On 4/23/2022 19:55, Sasha Neftin wrote:
> The 'igc_check_downshift' method always return 0 value. There is no point
> return value. Change the return type of this method to void.
> 
> Signed-off-by: Sasha Neftin <sasha.neftin@intel.com>
> ---
>   drivers/net/ethernet/intel/igc/igc_phy.c | 6 +-----
>   drivers/net/ethernet/intel/igc/igc_phy.h | 2 +-
>   2 files changed, 2 insertions(+), 6 deletions(-)
Tested-by: Naama Meir <naamax.meir@linux.intel.com>

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

* [Intel-wired-lan] [PATCH v1 1/1] igc: Change type of the 'igc_check_downshift' method
  2022-04-23 16:55 [Intel-wired-lan] [PATCH v1 1/1] igc: Change type of the 'igc_check_downshift' method Sasha Neftin
  2022-05-04  8:25 ` naamax.meir
@ 2022-05-04 11:24 ` Paul Menzel
  1 sibling, 0 replies; 3+ messages in thread
From: Paul Menzel @ 2022-05-04 11:24 UTC (permalink / raw)
  To: intel-wired-lan

Dear Sasha,


Thank you for the patch.

Am 23.04.22 um 18:55 schrieb Sasha Neftin:
> The 'igc_check_downshift' method always return 0 value. There is no point

return*s*

> return value. Change the return type of this method to void.

Maybe also make the summary more explicit. Maybe:

Change return type of 'igc_check_downshift' to void

> Signed-off-by: Sasha Neftin <sasha.neftin@intel.com>
> ---
>   drivers/net/ethernet/intel/igc/igc_phy.c | 6 +-----
>   drivers/net/ethernet/intel/igc/igc_phy.h | 2 +-
>   2 files changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/net/ethernet/intel/igc/igc_phy.c b/drivers/net/ethernet/intel/igc/igc_phy.c
> index 2140ad1e8443..53b77c969c85 100644
> --- a/drivers/net/ethernet/intel/igc/igc_phy.c
> +++ b/drivers/net/ethernet/intel/igc/igc_phy.c
> @@ -141,18 +141,14 @@ void igc_power_down_phy_copper(struct igc_hw *hw)
>    * igc_check_downshift - Checks whether a downshift in speed occurred
>    * @hw: pointer to the HW structure
>    *
> - * Success returns 0, Failure returns 1
> - *
>    * A downshift is detected by querying the PHY link health.
>    */
> -s32 igc_check_downshift(struct igc_hw *hw)
> +void igc_check_downshift(struct igc_hw *hw)
>   {
>   	struct igc_phy_info *phy = &hw->phy;
>   
>   	/* speed downshift not supported */
>   	phy->speed_downgraded = false;
> -
> -	return 0;
>   }
>   
>   /**
> diff --git a/drivers/net/ethernet/intel/igc/igc_phy.h b/drivers/net/ethernet/intel/igc/igc_phy.h
> index 1b031372d206..832a7e359f18 100644
> --- a/drivers/net/ethernet/intel/igc/igc_phy.h
> +++ b/drivers/net/ethernet/intel/igc/igc_phy.h
> @@ -11,7 +11,7 @@ s32 igc_phy_hw_reset(struct igc_hw *hw);
>   s32 igc_get_phy_id(struct igc_hw *hw);
>   s32 igc_phy_has_link(struct igc_hw *hw, u32 iterations,
>   		     u32 usec_interval, bool *success);
> -s32 igc_check_downshift(struct igc_hw *hw);
> +void igc_check_downshift(struct igc_hw *hw);
>   s32 igc_setup_copper_link(struct igc_hw *hw);
>   void igc_power_up_phy_copper(struct igc_hw *hw);
>   void igc_power_down_phy_copper(struct igc_hw *hw);

The rest looks good.


Kind regards,

Paul

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

end of thread, other threads:[~2022-05-04 11:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-23 16:55 [Intel-wired-lan] [PATCH v1 1/1] igc: Change type of the 'igc_check_downshift' method Sasha Neftin
2022-05-04  8:25 ` naamax.meir
2022-05-04 11:24 ` Paul Menzel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.