diff mbox series

[net-next] phy: convert to boolean for the mac_managed_pm flag

Message ID 4bca2d92-e966-81d7-d5a6-2c4240194ff4@suse.de (mailing list archive)
State Changes Requested
Delegated to: Netdev Maintainers
Headers show
Series [net-next] phy: convert to boolean for the mac_managed_pm flag | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix success Link
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers warning 6 maintainers not CCed: nic_swsd@realtek.com linux-usb@vger.kernel.org davem@davemloft.net linux@rempel-privat.de edumazet@google.com pabeni@redhat.com
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch warning WARNING: From:/Signed-off-by: email name mismatch: 'From: Denis Kirjanov <dkirjanov@suse.de>' != 'Signed-off-by: Dennis Kirjanov <dkirjanov@suse.de>' WARNING: Missing commit description - Add an appropriate one
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Denis Kirjanov Oct. 27, 2022, 3:05 p.m. UTC
Signed-off-by: Dennis Kirjanov <dkirjanov@suse.de>
---
 drivers/net/ethernet/freescale/fec_main.c | 2 +-
 drivers/net/ethernet/realtek/r8169_main.c | 2 +-
 drivers/net/usb/asix_devices.c            | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

Comments

Andrew Lunn Oct. 27, 2022, 5:36 p.m. UTC | #1
On Thu, Oct 27, 2022 at 06:05:27PM +0300, Denis Kirjanov wrote:

The subject "[net-next] phy:" is not very helpful. You don't change
any generic PHYs, not network PHYs. "drivers: net " would be a better
prefix, it at least makes it clear it is touching multiple network
drivers.

The change itself is O.K.

    Andrew
Heiner Kallweit Oct. 27, 2022, 9:09 p.m. UTC | #2
On 27.10.2022 17:05, Denis Kirjanov wrote:
> Signed-off-by: Dennis Kirjanov <dkirjanov@suse.de>

Commit message is missing.
It should be "net: phy:" instead of "phy:".
You state that you convert the flag to boolean but you convert only the users.

> ---
>  drivers/net/ethernet/freescale/fec_main.c | 2 +-
>  drivers/net/ethernet/realtek/r8169_main.c | 2 +-
>  drivers/net/usb/asix_devices.c            | 4 ++--

This should be separate patches.

>  3 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
> index 98d5cd313fdd..4d38a297ec00 100644
> --- a/drivers/net/ethernet/freescale/fec_main.c
> +++ b/drivers/net/ethernet/freescale/fec_main.c
> @@ -2226,7 +2226,7 @@ static int fec_enet_mii_probe(struct net_device *ndev)
>  	fep->link = 0;
>  	fep->full_duplex = 0;
>  
> -	phy_dev->mac_managed_pm = 1;
> +	phy_dev->mac_managed_pm = true;
>  
Definition is: unsigned mac_managed_pm:1;
Therefore 1 is the correct value, why assigning a bool to a bitfield member?

>  	phy_attached_info(phy_dev);
>  
> diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c
> index a73d061d9fcb..5bc1181f829b 100644
> --- a/drivers/net/ethernet/realtek/r8169_main.c
> +++ b/drivers/net/ethernet/realtek/r8169_main.c
> @@ -5018,7 +5018,7 @@ static int r8169_mdio_register(struct rtl8169_private *tp)
>  		return -EUNATCH;
>  	}
>  
> -	tp->phydev->mac_managed_pm = 1;
> +	tp->phydev->mac_managed_pm = true;
>  
>  	phy_support_asym_pause(tp->phydev);
>  
> diff --git a/drivers/net/usb/asix_devices.c b/drivers/net/usb/asix_devices.c
> index 11f60d32be82..02941d97d034 100644
> --- a/drivers/net/usb/asix_devices.c
> +++ b/drivers/net/usb/asix_devices.c
> @@ -700,7 +700,7 @@ static int ax88772_init_phy(struct usbnet *dev)
>  	}
>  
>  	phy_suspend(priv->phydev);
> -	priv->phydev->mac_managed_pm = 1;
> +	priv->phydev->mac_managed_pm = true;
>  
>  	phy_attached_info(priv->phydev);
>  
> @@ -720,7 +720,7 @@ static int ax88772_init_phy(struct usbnet *dev)
>  		return -ENODEV;
>  	}
>  
> -	priv->phydev_int->mac_managed_pm = 1;
> +	priv->phydev_int->mac_managed_pm = true;
>  	phy_suspend(priv->phydev_int);
>  
>  	return 0;
Denis Kirjanov Oct. 28, 2022, 10:25 a.m. UTC | #3
On 10/28/22 00:09, Heiner Kallweit wrote:
> On 27.10.2022 17:05, Denis Kirjanov wrote:
>> Signed-off-by: Dennis Kirjanov <dkirjanov@suse.de>
> 
> Commit message is missing.
> It should be "net: phy:" instead of "phy:".
> You state that you convert the flag to boolean but you convert only the users.

Yes, I've sent a v2. I've converted the flag to make it consistent across the users 

> 
>> ---
>>  drivers/net/ethernet/freescale/fec_main.c | 2 +-
>>  drivers/net/ethernet/realtek/r8169_main.c | 2 +-
>>  drivers/net/usb/asix_devices.c            | 4 ++--
> 
> This should be separate patches.
> 
>>  3 files changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
>> index 98d5cd313fdd..4d38a297ec00 100644
>> --- a/drivers/net/ethernet/freescale/fec_main.c
>> +++ b/drivers/net/ethernet/freescale/fec_main.c
>> @@ -2226,7 +2226,7 @@ static int fec_enet_mii_probe(struct net_device *ndev)
>>  	fep->link = 0;
>>  	fep->full_duplex = 0;
>>  
>> -	phy_dev->mac_managed_pm = 1;
>> +	phy_dev->mac_managed_pm = true;
>>  
> Definition is: unsigned mac_managed_pm:1;
> Therefore 1 is the correct value, why assigning a bool to a bitfield member?
> 
>>  	phy_attached_info(phy_dev);
>>  
>> diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c
>> index a73d061d9fcb..5bc1181f829b 100644
>> --- a/drivers/net/ethernet/realtek/r8169_main.c
>> +++ b/drivers/net/ethernet/realtek/r8169_main.c
>> @@ -5018,7 +5018,7 @@ static int r8169_mdio_register(struct rtl8169_private *tp)
>>  		return -EUNATCH;
>>  	}
>>  
>> -	tp->phydev->mac_managed_pm = 1;
>> +	tp->phydev->mac_managed_pm = true;
>>  
>>  	phy_support_asym_pause(tp->phydev);
>>  
>> diff --git a/drivers/net/usb/asix_devices.c b/drivers/net/usb/asix_devices.c
>> index 11f60d32be82..02941d97d034 100644
>> --- a/drivers/net/usb/asix_devices.c
>> +++ b/drivers/net/usb/asix_devices.c
>> @@ -700,7 +700,7 @@ static int ax88772_init_phy(struct usbnet *dev)
>>  	}
>>  
>>  	phy_suspend(priv->phydev);
>> -	priv->phydev->mac_managed_pm = 1;
>> +	priv->phydev->mac_managed_pm = true;
>>  
>>  	phy_attached_info(priv->phydev);
>>  
>> @@ -720,7 +720,7 @@ static int ax88772_init_phy(struct usbnet *dev)
>>  		return -ENODEV;
>>  	}
>>  
>> -	priv->phydev_int->mac_managed_pm = 1;
>> +	priv->phydev_int->mac_managed_pm = true;
>>  	phy_suspend(priv->phydev_int);
>>  
>>  	return 0;
>
diff mbox series

Patch

diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index 98d5cd313fdd..4d38a297ec00 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -2226,7 +2226,7 @@  static int fec_enet_mii_probe(struct net_device *ndev)
 	fep->link = 0;
 	fep->full_duplex = 0;
 
-	phy_dev->mac_managed_pm = 1;
+	phy_dev->mac_managed_pm = true;
 
 	phy_attached_info(phy_dev);
 
diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c
index a73d061d9fcb..5bc1181f829b 100644
--- a/drivers/net/ethernet/realtek/r8169_main.c
+++ b/drivers/net/ethernet/realtek/r8169_main.c
@@ -5018,7 +5018,7 @@  static int r8169_mdio_register(struct rtl8169_private *tp)
 		return -EUNATCH;
 	}
 
-	tp->phydev->mac_managed_pm = 1;
+	tp->phydev->mac_managed_pm = true;
 
 	phy_support_asym_pause(tp->phydev);
 
diff --git a/drivers/net/usb/asix_devices.c b/drivers/net/usb/asix_devices.c
index 11f60d32be82..02941d97d034 100644
--- a/drivers/net/usb/asix_devices.c
+++ b/drivers/net/usb/asix_devices.c
@@ -700,7 +700,7 @@  static int ax88772_init_phy(struct usbnet *dev)
 	}
 
 	phy_suspend(priv->phydev);
-	priv->phydev->mac_managed_pm = 1;
+	priv->phydev->mac_managed_pm = true;
 
 	phy_attached_info(priv->phydev);
 
@@ -720,7 +720,7 @@  static int ax88772_init_phy(struct usbnet *dev)
 		return -ENODEV;
 	}
 
-	priv->phydev_int->mac_managed_pm = 1;
+	priv->phydev_int->mac_managed_pm = true;
 	phy_suspend(priv->phydev_int);
 
 	return 0;