mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] net: phy: micrel: drop superfluous use of temp variable
@ 2023-02-20 20:39 Wolfram Sang
  2023-02-20 22:12 ` Andrew Lunn
  2023-02-21  7:51 ` Geert Uytterhoeven
  0 siblings, 2 replies; 3+ messages in thread
From: Wolfram Sang @ 2023-02-20 20:39 UTC (permalink / raw)
  To: linux-renesas-soc
  Cc: Wolfram Sang, Andrew Lunn, Heiner Kallweit, Russell King,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	netdev, linux-kernel

'temp' was used before commit c0c99d0cd107 ("net: phy: micrel: remove
the use of .ack_interrupt()") refactored the code. Now, we can simplify
it a little.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
 drivers/net/phy/micrel.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c
index 54a17b576eac..82bbda820a33 100644
--- a/drivers/net/phy/micrel.c
+++ b/drivers/net/phy/micrel.c
@@ -412,11 +412,9 @@ static int kszphy_config_intr(struct phy_device *phydev)
 		if (err)
 			return err;
 
-		temp = KSZPHY_INTCS_ALL;
-		err = phy_write(phydev, MII_KSZPHY_INTCS, temp);
+		err = phy_write(phydev, MII_KSZPHY_INTCS, KSZPHY_INTCS_ALL);
 	} else {
-		temp = 0;
-		err = phy_write(phydev, MII_KSZPHY_INTCS, temp);
+		err = phy_write(phydev, MII_KSZPHY_INTCS, 0);
 		if (err)
 			return err;
 
-- 
2.30.2


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

* Re: [PATCH] net: phy: micrel: drop superfluous use of temp variable
  2023-02-20 20:39 [PATCH] net: phy: micrel: drop superfluous use of temp variable Wolfram Sang
@ 2023-02-20 22:12 ` Andrew Lunn
  2023-02-21  7:51 ` Geert Uytterhoeven
  1 sibling, 0 replies; 3+ messages in thread
From: Andrew Lunn @ 2023-02-20 22:12 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-renesas-soc, Heiner Kallweit, Russell King,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	netdev, linux-kernel

On Mon, Feb 20, 2023 at 09:39:30PM +0100, Wolfram Sang wrote:
> 'temp' was used before commit c0c99d0cd107 ("net: phy: micrel: remove
> the use of .ack_interrupt()") refactored the code. Now, we can simplify
> it a little.
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Hi Wolfram

netdev has a few process things which other subsystems do not
have. Take a look at

https://www.kernel.org/doc/html/latest/process/maintainer-netdev.html

This should be for net-next. It could be that tree is already closed
for the merge window.

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

    Andrew

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

* Re: [PATCH] net: phy: micrel: drop superfluous use of temp variable
  2023-02-20 20:39 [PATCH] net: phy: micrel: drop superfluous use of temp variable Wolfram Sang
  2023-02-20 22:12 ` Andrew Lunn
@ 2023-02-21  7:51 ` Geert Uytterhoeven
  1 sibling, 0 replies; 3+ messages in thread
From: Geert Uytterhoeven @ 2023-02-21  7:51 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-renesas-soc, Andrew Lunn, Heiner Kallweit, Russell King,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	netdev, linux-kernel

On Mon, Feb 20, 2023 at 9:44 PM Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
> 'temp' was used before commit c0c99d0cd107 ("net: phy: micrel: remove
> the use of .ack_interrupt()") refactored the code. Now, we can simplify
> it a little.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

end of thread, other threads:[~2023-02-21  7:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-20 20:39 [PATCH] net: phy: micrel: drop superfluous use of temp variable Wolfram Sang
2023-02-20 22:12 ` Andrew Lunn
2023-02-21  7:51 ` Geert Uytterhoeven

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

all inboxes | Powered by JetHome®