cvs commit: src/sys/dev/sn if_sn.c

Warner Losh imp at FreeBSD.org
Sat Jan 7 11:29:25 PST 2006


imp         2006-01-07 19:29:25 UTC

  FreeBSD src repository

  Modified files:
    sys/dev/sn           if_sn.c 
  Log:
  While reviewing if_sn in an attempt to understand network drivers
  better, I discovered sn doing too many pointer dereferences.  This
  driver would do silly things like:
          sn_foo(struct ifnet *ifp)
          {
                  struct sn_softc *sc = ifp->if_softc;
  
                  sc->ifp->mumble
                  /* Other stuff */
          }
  
  while /* other stuff */ usually needed sc, the extra deref isn't
  needed.  Eliminate a few dozen of them.
  
  Revision  Changes    Path
  1.52      +34 -34    src/sys/dev/sn/if_sn.c


More information about the cvs-src mailing list