Skip to contentSkip to conversation

sunhme: Uninitialized variable in happy_meal_init()

PATCH Applied Dan Carpenter 3 participants 3 messages Oct 14, 2022 – Oct 15, 2022

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 sunhme: Uninitialized variable in happy_meal_init()

The "burst" string is only initialized for CONFIG_SPARC. It should be set to "64" because that's what is used by PCI.

Fixes 24cddbc3ef11 ("sunhme: Combine continued messages")

---
v2: Use "64" instead of ""

 drivers/net/ethernet/sun/sunhme.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/sun/sunhme.c +1 -1
index 62deed210a95..55f7ec836744 100644
@@ -1328,7 +1328,7 @@ static int happy_meal_init(struct happy_meal *hp)
 	void __iomem *erxregs      = hp->erxregs;
 	void __iomem *bregs        = hp->bigmacregs;
 	void __iomem *tregs        = hp->tcvregs;
-	const char *bursts;
+	const char *bursts = "64";
 	u32 regtmp, rxcfg;
 
 	/* If auto-negotiation timer is running, kill it. */
Signature · 1 line
2.35.1
maintainer Reviewed-by on v2 1/1
#1 lore raw
Quoted 16 lines · Dan Carpenter

The "burst" string is only initialized for CONFIG_SPARC. It should be set to "64" because that's what is used by PCI.

Fixes 24cddbc3ef11 ("sunhme: Combine continued messages")

---
v2: Use "64" instead of ""

  drivers/net/ethernet/sun/sunhme.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/sun/sunhme.c +0 -0
index 62deed210a95..55f7ec836744 100644

drivers/net/ethernet/sun/sunhme.c static int happy_meal_init(struct happy_meal *hp) · line 1334

Quoted 8 lines
drivers/net/ethernet/sun/sunhme.c +1 -1
@@ -1328,7 +1328,7 @@ static int happy_meal_init(struct happy_meal *hp)
  	void __iomem *erxregs      = hp->erxregs;
  	void __iomem *bregs        = hp->bigmacregs;
  	void __iomem *tregs        = hp->tcvregs;
-	const char *bursts;
+	const char *bursts = "64";
  	u32 regtmp, rxcfg;
 
  	/* If auto-negotiation timer is running, kill it. */
#2 lore raw
In reply to Dan Carpenter
This patch was applied to netdev/net.git (master) by David S. Miller <[email protected]>:

Hello:

This patch was applied to netdev/net.git (master)
by David S. Miller <[email protected]>:

Quoted 9 lines · On Fri, 14 Oct 2022 17:33:02 +0300 you wrote:

The "burst" string is only initialized for CONFIG_SPARC. It should be set to "64" because that's what is used by PCI.

Fixes 24cddbc3ef11 ("sunhme: Combine continued messages")

---
v2: Use "64" instead of ""

[...]

Here is the summary with links:
- [net,v2] sunhme: Uninitialized variable in happy_meal_init()

    https://git.kernel.org/netdev/net/c/9408f3d321ed

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html