From owner-svn-src-all@FreeBSD.ORG Fri Apr 3 11:37:24 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3E7F0FA4; Fri, 3 Apr 2015 11:37:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 29DC1C53; Fri, 3 Apr 2015 11:37:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t33BbOOO007347; Fri, 3 Apr 2015 11:37:24 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t33BbOFY007346; Fri, 3 Apr 2015 11:37:24 GMT (envelope-from br@FreeBSD.org) Message-Id: <201504031137.t33BbOFY007346@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Fri, 3 Apr 2015 11:37:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281019 - head/sys/dev/dwc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Apr 2015 11:37:24 -0000 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 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 #include #include -#include -#include #include #include #include @@ -72,8 +70,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include #include #include @@ -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)