git: d4b1761482a4 - stable/12 - if_dwc: dwc_get_hwaddr cannot fail, change return to void
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 11 Aug 2022 14:53:15 UTC
The branch stable/12 has been updated by mhorne:
URL: https://cgit.FreeBSD.org/src/commit/?id=d4b1761482a485fd51e4d1cb969e1199bde65bb6
commit d4b1761482a485fd51e4d1cb969e1199bde65bb6
Author: Emmanuel Vadot <manu@FreeBSD.org>
AuthorDate: 2020-11-20 11:29:20 +0000
Commit: Mitchell Horne <mhorne@FreeBSD.org>
CommitDate: 2022-08-11 14:52:02 +0000
if_dwc: dwc_get_hwaddr cannot fail, change return to void
No functional changes intended
(cherry picked from commit f88e0af64abb8317c67fa075125b1943a7f42997)
---
sys/dev/dwc/if_dwc.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/sys/dev/dwc/if_dwc.c b/sys/dev/dwc/if_dwc.c
index d4bc4caffa32..8a0adfeea6cd 100644
--- a/sys/dev/dwc/if_dwc.c
+++ b/sys/dev/dwc/if_dwc.c
@@ -1153,7 +1153,7 @@ out:
return (0);
}
-static int
+static void
dwc_get_hwaddr(struct dwc_softc *sc, uint8_t *hwaddr)
{
uint32_t hi, lo, rnd;
@@ -1185,8 +1185,6 @@ dwc_get_hwaddr(struct dwc_softc *sc, uint8_t *hwaddr)
hwaddr[4] = rnd >> 8;
hwaddr[5] = rnd >> 0;
}
-
- return (0);
}
#define GPIO_ACTIVE_LOW 1
@@ -1336,10 +1334,7 @@ dwc_attach(device_t dev)
}
/* Read MAC before reset */
- if (dwc_get_hwaddr(sc, macaddr)) {
- device_printf(sc->dev, "can't get mac\n");
- return (ENXIO);
- }
+ dwc_get_hwaddr(sc, macaddr);
/* Reset the PHY if needed */
if (dwc_reset(dev) != 0) {