diff options
author | Geert Uytterhoeven <geert+renesas@glider.be> | 2017-09-21 07:27:02 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-09-21 23:35:17 -0400 |
commit | 059fbe8b5171960bd5c2371bb327ac18733773de (patch) | |
tree | add2af8a38802b033c43b16a5ea68c7b170f6749 | |
parent | 5d6b66c031ed040c6eeedbc0b0477511edcbfa1b (diff) |
net: phy: Fix truncation of large IRQ numbers in phy_attached_print()
Given NR_IRQS is 2048 on sparc64, and even 32784 on alpha, 3 digits is
not enough to represent interrupt numbers on all architectures. Hence
PHY interrupt numbers may be truncated during printing.
Increase the buffer size from 4 to 8 bytes to fix this.
Fixes: 5e369aefdce4818c ("net: stmmac: Delete dead code for MDIO registration")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/phy/phy_device.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c index 8cf0c5901f95..67f25ac29025 100644 --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c | |||
@@ -879,7 +879,7 @@ void phy_attached_print(struct phy_device *phydev, const char *fmt, ...) | |||
879 | { | 879 | { |
880 | const char *drv_name = phydev->drv ? phydev->drv->name : "unbound"; | 880 | const char *drv_name = phydev->drv ? phydev->drv->name : "unbound"; |
881 | char *irq_str; | 881 | char *irq_str; |
882 | char irq_num[4]; | 882 | char irq_num[8]; |
883 | 883 | ||
884 | switch(phydev->irq) { | 884 | switch(phydev->irq) { |
885 | case PHY_POLL: | 885 | case PHY_POLL: |