git: c972f2c065bd - main - xl_attach: eliminate write only variable unit
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 05 Apr 2022 04:32:57 UTC
The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=c972f2c065bdb7031e7935aac406365e4810df19 commit c972f2c065bdb7031e7935aac406365e4810df19 Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2022-04-05 02:33:25 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2022-04-05 04:30:45 +0000 xl_attach: eliminate write only variable unit Sponsored by: Netflix --- sys/dev/xl/if_xl.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/dev/xl/if_xl.c b/sys/dev/xl/if_xl.c index ca6184758815..ae4d9fb8f5ff 100644 --- a/sys/dev/xl/if_xl.c +++ b/sys/dev/xl/if_xl.c @@ -1069,14 +1069,12 @@ xl_attach(device_t dev) struct xl_softc *sc; struct ifnet *ifp; int media, pmcap; - int error = 0, phy, rid, res, unit; + int error = 0, phy, rid, res; uint16_t did; sc = device_get_softc(dev); sc->xl_dev = dev; - unit = device_get_unit(dev); - mtx_init(&sc->xl_mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK, MTX_DEF); ifmedia_init(&sc->ifmedia, 0, xl_ifmedia_upd, xl_ifmedia_sts);