Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 7 Jan 2006 19:29:25 +0000 (UTC)
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/dev/sn if_sn.c
Message-ID:  <200601071929.k07JTP7x042378@repoman.freebsd.org>

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



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