Date: Fri, 3 Apr 2015 11:37:24 +0000 (UTC) From: Ruslan Bukin <br@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281019 - head/sys/dev/dwc Message-ID: <201504031137.t33BbOFY007346@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: br Date: Fri Apr 3 11:37:23 2015 New Revision: 281019 URL: https://svnweb.freebsd.org/changeset/base/281019 Log: o Remove superfluous includes o Avoid NULL pointer access o Fix 'set but not used' warning Submitted by: Sebastian Huber <sebastian.huber@embedded-brains.de> Modified: head/sys/dev/dwc/if_dwc.c Modified: head/sys/dev/dwc/if_dwc.c ============================================================================== --- head/sys/dev/dwc/if_dwc.c Fri Apr 3 11:12:59 2015 (r281018) +++ head/sys/dev/dwc/if_dwc.c Fri Apr 3 11:37:23 2015 (r281019) @@ -46,8 +46,6 @@ __FBSDID("$FreeBSD$"); #include <sys/module.h> #include <sys/malloc.h> #include <sys/rman.h> -#include <sys/timeet.h> -#include <sys/timetc.h> #include <sys/endian.h> #include <sys/lock.h> #include <sys/mbuf.h> @@ -72,8 +70,6 @@ __FBSDID("$FreeBSD$"); #include <machine/bus.h> #include <machine/fdt.h> -#include <machine/cpu.h> -#include <machine/intr.h> #include <dev/mii/mii.h> #include <dev/mii/miivar.h> @@ -550,7 +546,8 @@ dwc_alloc_mbufcl(struct dwc_softc *sc) struct mbuf *m; m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); - m->m_pkthdr.len = m->m_len = m->m_ext.ext_size; + if (m != NULL) + m->m_pkthdr.len = m->m_len = m->m_ext.ext_size; return (m); } @@ -744,12 +741,9 @@ dwc_txfinish_locked(struct dwc_softc *sc { struct dwc_bufmap *bmap; struct dwc_hwdesc *desc; - struct ifnet *ifp; DWC_ASSERT_LOCKED(sc); - ifp = sc->ifp; - while (sc->tx_idx_tail != sc->tx_idx_head) { desc = &sc->txdesc_ring[sc->tx_idx_tail]; if ((desc->tdes0 & DDESC_TDES0_OWN) != 0)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201504031137.t33BbOFY007346>