Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/nick-nhusb]: src/sys/dev/usb Style / more const. No functional change i...



details:   https://anonhg.NetBSD.org/src/rev/6ad3ed33e30e
branches:  nick-nhusb
changeset: 334634:6ad3ed33e30e
user:      skrll <skrll%NetBSD.org@localhost>
date:      Thu Feb 02 07:40:51 2017 +0000

description:
Style / more const.  No functional change intended.

diffstat:

 sys/dev/usb/if_smsc.c |  16 +++++++---------
 1 files changed, 7 insertions(+), 9 deletions(-)

diffs (46 lines):

diff -r e314c16210e9 -r 6ad3ed33e30e sys/dev/usb/if_smsc.c
--- a/sys/dev/usb/if_smsc.c     Thu Feb 02 07:36:45 2017 +0000
+++ b/sys/dev/usb/if_smsc.c     Thu Feb 02 07:40:51 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_smsc.c,v 1.22.2.28 2017/02/02 07:36:45 skrll Exp $  */
+/*     $NetBSD: if_smsc.c,v 1.22.2.29 2017/02/02 07:40:51 skrll Exp $  */
 
 /*     $OpenBSD: if_smsc.c,v 1.4 2012/09/27 12:38:11 jsg Exp $ */
 /*     $FreeBSD: src/sys/dev/usb/net/if_smsc.c,v 1.1 2012/08/15 04:03:55 gonzo Exp $ */
@@ -679,7 +679,7 @@
 void
 smsc_tick(void *xsc)
 {
-       struct smsc_softc *sc = xsc;
+       struct smsc_softc * const sc = xsc;
 
        if (sc == NULL)
                return;
@@ -1225,22 +1225,20 @@
 void
 smsc_tick_task(void *xsc)
 {
-       int                      s;
-       struct smsc_softc       *sc = xsc;
-       struct ifnet            *ifp;
-       struct mii_data         *mii;
+       struct smsc_softc * const sc = xsc;
 
        if (sc == NULL)
                return;
 
        if (sc->sc_dying)
                return;
-       ifp = &sc->sc_ec.ec_if;
-       mii = &sc->sc_mii;
+
+       struct ifnet * const ifp = &sc->sc_ec.ec_if;
+       struct mii_data * const mii = &sc->sc_mii;
        if (mii == NULL)
                return;
 
-       s = splnet();
+       const int s = splnet();
 
        mii_tick(mii);
        if ((sc->sc_flags & SMSC_FLAG_LINK) == 0)



Home | Main Index | Thread Index | Old Index