Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Apr 2022 04:32:57 GMT
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: c972f2c065bd - main - xl_attach: eliminate write only variable unit
Message-ID:  <202204050432.2354Wv3L009694@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202204050432.2354Wv3L009694>