Date: Mon, 19 Sep 2016 22:16:03 +0000 (UTC) From: =?UTF-8?Q?Imre_Vad=c3=a1sz?= <ivadasz@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306003 - head/sys/dev/iwm Message-ID: <201609192216.u8JMG3is074321@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ivadasz Date: Mon Sep 19 22:16:03 2016 New Revision: 306003 URL: https://svnweb.freebsd.org/changeset/base/306003 Log: [iwm] Remove wrappers around iwm_dma_contig_free() calls. No functional changes. Inspired by: OpenBSD Approved by: adrian (mentor) Differential Revision: https://reviews.freebsd.org/D7933 Modified: head/sys/dev/iwm/if_iwm.c Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Mon Sep 19 22:13:08 2016 (r306002) +++ head/sys/dev/iwm/if_iwm.c Mon Sep 19 22:16:03 2016 (r306003) @@ -234,13 +234,9 @@ static int iwm_dma_contig_alloc(bus_dma_ bus_size_t, bus_size_t); static void iwm_dma_contig_free(struct iwm_dma_info *); static int iwm_alloc_fwmem(struct iwm_softc *); -static void iwm_free_fwmem(struct iwm_softc *); static int iwm_alloc_sched(struct iwm_softc *); -static void iwm_free_sched(struct iwm_softc *); static int iwm_alloc_kw(struct iwm_softc *); -static void iwm_free_kw(struct iwm_softc *); static int iwm_alloc_ict(struct iwm_softc *); -static void iwm_free_ict(struct iwm_softc *); static int iwm_alloc_rx_ring(struct iwm_softc *, struct iwm_rx_ring *); static void iwm_disable_rx_dma(struct iwm_softc *); static void iwm_reset_rx_ring(struct iwm_softc *, struct iwm_rx_ring *); @@ -902,12 +898,6 @@ iwm_alloc_fwmem(struct iwm_softc *sc) sc->sc_fwdmasegsz, 16); } -static void -iwm_free_fwmem(struct iwm_softc *sc) -{ - iwm_dma_contig_free(&sc->fw_dma); -} - /* tx scheduler rings. not used? */ static int iwm_alloc_sched(struct iwm_softc *sc) @@ -917,12 +907,6 @@ iwm_alloc_sched(struct iwm_softc *sc) nitems(sc->txq) * sizeof(struct iwm_agn_scd_bc_tbl), 1024); } -static void -iwm_free_sched(struct iwm_softc *sc) -{ - iwm_dma_contig_free(&sc->sched_dma); -} - /* keep-warm page is used internally by the card. see iwl-fh.h for more info */ static int iwm_alloc_kw(struct iwm_softc *sc) @@ -930,12 +914,6 @@ iwm_alloc_kw(struct iwm_softc *sc) return iwm_dma_contig_alloc(sc->sc_dmat, &sc->kw_dma, 4096, 4096); } -static void -iwm_free_kw(struct iwm_softc *sc) -{ - iwm_dma_contig_free(&sc->kw_dma); -} - /* interrupt cause table */ static int iwm_alloc_ict(struct iwm_softc *sc) @@ -944,12 +922,6 @@ iwm_alloc_ict(struct iwm_softc *sc) IWM_ICT_SIZE, 1<<IWM_ICT_PADDR_SHIFT); } -static void -iwm_free_ict(struct iwm_softc *sc) -{ - iwm_dma_contig_free(&sc->ict_dma); -} - static int iwm_alloc_rx_ring(struct iwm_softc *sc, struct iwm_rx_ring *ring) { @@ -6174,13 +6146,10 @@ iwm_detach_local(struct iwm_softc *sc, i iwm_fw_info_free(fw); /* Free scheduler */ - iwm_free_sched(sc); - if (sc->ict_dma.vaddr != NULL) - iwm_free_ict(sc); - if (sc->kw_dma.vaddr != NULL) - iwm_free_kw(sc); - if (sc->fw_dma.vaddr != NULL) - iwm_free_fwmem(sc); + iwm_dma_contig_free(&sc->sched_dma); + iwm_dma_contig_free(&sc->ict_dma); + iwm_dma_contig_free(&sc->kw_dma); + iwm_dma_contig_free(&sc->fw_dma); /* Finished with the hardware - detach things */ iwm_pci_detach(dev);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201609192216.u8JMG3is074321>