Date: Mon, 25 Sep 2017 02:06:51 +0000 (UTC) From: Marcin Wojtas <mw@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323983 - head/sys/dev/neta Message-ID: <201709250206.v8P26pej083491@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mw Date: Mon Sep 25 02:06:51 2017 New Revision: 323983 URL: https://svnweb.freebsd.org/changeset/base/323983 Log: Fix gcc compilation issues in the mvneta driver Compiling mvneta driver with gcc unveiled two issues, that required fixing. Reported by: andrew Obtained from: Semihalf Modified: head/sys/dev/neta/if_mvneta.c Modified: head/sys/dev/neta/if_mvneta.c ============================================================================== --- head/sys/dev/neta/if_mvneta.c Sun Sep 24 23:35:01 2017 (r323982) +++ head/sys/dev/neta/if_mvneta.c Mon Sep 25 02:06:51 2017 (r323983) @@ -97,16 +97,6 @@ __FBSDID("$FreeBSD$"); #define A3700_TCLK_250MHZ 250000000 -STATIC uint32_t -mvneta_get_clk() -{ -#if defined(__aarch64__) - return (A3700_TCLK_250MHZ); -#else - return (get_tclk()); -#endif -} - /* Device Register Initialization */ STATIC int mvneta_initreg(struct ifnet *); @@ -213,6 +203,9 @@ STATIC int mvneta_detach(device_t); STATIC int mvneta_miibus_readreg(device_t, int, int); STATIC int mvneta_miibus_writereg(device_t, int, int, int); +/* Clock */ +STATIC uint32_t mvneta_get_clk(void); + static device_method_t mvneta_methods[] = { /* Device interface */ DEVMETHOD(device_detach, mvneta_detach), @@ -354,6 +347,16 @@ static struct { { mvneta_rxtxth_intr, "MVNETA aggregated interrupt" }, }; +STATIC uint32_t +mvneta_get_clk() +{ +#if defined(__aarch64__) + return (A3700_TCLK_250MHZ); +#else + return (get_tclk()); +#endif +} + static int mvneta_set_mac_address(struct mvneta_softc *sc, uint8_t *addr) { @@ -831,11 +834,9 @@ STATIC int mvneta_detach(device_t dev) { struct mvneta_softc *sc; - struct ifnet *ifp; int q; sc = device_get_softc(dev); - ifp = sc->ifp; mvneta_stop(sc); /* Detach network interface */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201709250206.v8P26pej083491>