Linux USB
 help / color / mirror / Atom feed
* [PATCH net-next] net: usb: lan78xx: constify fphy_status
@ 2025-05-23 19:51 Heiner Kallweit
  2025-05-23 21:17 ` Andrew Lunn
  2025-05-23 21:26 ` Florian Fainelli
  0 siblings, 2 replies; 3+ messages in thread
From: Heiner Kallweit @ 2025-05-23 19:51 UTC (permalink / raw)
  To: Thangaraj Samynathan, Rengarajan Sundararajan,
	Microchip Linux Driver Support, Andrew Lunn, Jakub Kicinski,
	Paolo Abeni, Eric Dumazet, David Miller, Simon Horman
  Cc: netdev@vger.kernel.org, Linux USB Mailing List

Constify variable fphy_status.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
 drivers/net/usb/lan78xx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/usb/lan78xx.c b/drivers/net/usb/lan78xx.c
index 759dab980..17c23eada 100644
--- a/drivers/net/usb/lan78xx.c
+++ b/drivers/net/usb/lan78xx.c
@@ -2630,7 +2630,7 @@ static int lan78xx_configure_flowcontrol(struct lan78xx_net *dev,
  */
 static struct phy_device *lan78xx_register_fixed_phy(struct lan78xx_net *dev)
 {
-	struct fixed_phy_status fphy_status = {
+	static const struct fixed_phy_status fphy_status = {
 		.link = 1,
 		.speed = SPEED_1000,
 		.duplex = DUPLEX_FULL,
-- 
2.49.0


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

* Re: [PATCH net-next] net: usb: lan78xx: constify fphy_status
  2025-05-23 19:51 [PATCH net-next] net: usb: lan78xx: constify fphy_status Heiner Kallweit
@ 2025-05-23 21:17 ` Andrew Lunn
  2025-05-23 21:26 ` Florian Fainelli
  1 sibling, 0 replies; 3+ messages in thread
From: Andrew Lunn @ 2025-05-23 21:17 UTC (permalink / raw)
  To: Heiner Kallweit
  Cc: Thangaraj Samynathan, Rengarajan Sundararajan,
	Microchip Linux Driver Support, Andrew Lunn, Jakub Kicinski,
	Paolo Abeni, Eric Dumazet, David Miller, Simon Horman,
	netdev@vger.kernel.org, Linux USB Mailing List

On Fri, May 23, 2025 at 09:51:58PM +0200, Heiner Kallweit wrote:
> Constify variable fphy_status.
> 
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

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

* Re: [PATCH net-next] net: usb: lan78xx: constify fphy_status
  2025-05-23 19:51 [PATCH net-next] net: usb: lan78xx: constify fphy_status Heiner Kallweit
  2025-05-23 21:17 ` Andrew Lunn
@ 2025-05-23 21:26 ` Florian Fainelli
  1 sibling, 0 replies; 3+ messages in thread
From: Florian Fainelli @ 2025-05-23 21:26 UTC (permalink / raw)
  To: Heiner Kallweit, Thangaraj Samynathan, Rengarajan Sundararajan,
	Microchip Linux Driver Support, Andrew Lunn, Jakub Kicinski,
	Paolo Abeni, Eric Dumazet, David Miller, Simon Horman
  Cc: netdev@vger.kernel.org, Linux USB Mailing List

On 5/23/25 12:51, Heiner Kallweit wrote:
> Constify variable fphy_status.
> 
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
> ---
>   drivers/net/usb/lan78xx.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/usb/lan78xx.c b/drivers/net/usb/lan78xx.c
> index 759dab980..17c23eada 100644
> --- a/drivers/net/usb/lan78xx.c
> +++ b/drivers/net/usb/lan78xx.c
> @@ -2630,7 +2630,7 @@ static int lan78xx_configure_flowcontrol(struct lan78xx_net *dev,
>    */
>   static struct phy_device *lan78xx_register_fixed_phy(struct lan78xx_net *dev)
>   {
> -	struct fixed_phy_status fphy_status = {
> +	static const struct fixed_phy_status fphy_status = {

You are also making this static, but that's not detailed in the commit 
message.
-- 
Florian

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

end of thread, other threads:[~2025-05-23 21:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-23 19:51 [PATCH net-next] net: usb: lan78xx: constify fphy_status Heiner Kallweit
2025-05-23 21:17 ` Andrew Lunn
2025-05-23 21:26 ` Florian Fainelli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox