diff --git a/sys/mips/atheros/apb.c b/sys/mips/atheros/apb.c index 37819fac2e9..47dd77de18d 100644 --- a/sys/mips/atheros/apb.c +++ b/sys/mips/atheros/apb.c @@ -356,7 +356,6 @@ apb_filter(void *arg) reg = ATH_READ_REG(AR71XX_MISC_INTR_STATUS); for (irq = 0; irq < APB_NIRQS; irq++) { if (reg & (1 << irq)) { - switch (ar71xx_soc) { case AR71XX_SOC_AR7240: case AR71XX_SOC_AR7241: @@ -509,7 +508,6 @@ apb_print_child(device_t bus, device_t child) return (retval); } - static device_method_t apb_methods[] = { DEVMETHOD(bus_activate_resource, apb_activate_resource), DEVMETHOD(bus_add_child, apb_add_child), diff --git a/sys/mips/atheros/ar531x/apb.c b/sys/mips/atheros/ar531x/apb.c index 6e224a5e930..f81f63d18c0 100644 --- a/sys/mips/atheros/ar531x/apb.c +++ b/sys/mips/atheros/ar531x/apb.c @@ -386,7 +386,6 @@ apb_release_resource(device_t dev, device_t child, int type, return (0); } - static int apb_setup_intr(device_t bus, device_t child, struct resource *ires, int flags, driver_filter_t *filt, driver_intr_t *handler, @@ -402,7 +401,7 @@ apb_setup_intr(device_t bus, device_t child, struct resource *ires, #ifdef INTRNG struct intr_irqsrc *isrc; const char *name; - + if ((rman_get_flags(ires) & RF_SHAREABLE) == 0) flags |= INTR_EXCL; @@ -479,7 +478,6 @@ apb_teardown_intr(device_t dev, device_t child, struct resource *ires, #endif } - static int apb_filter(void *arg) { @@ -496,7 +494,6 @@ apb_filter(void *arg) for (irq = 0; irq < APB_NIRQS; irq++) { if (reg & (1 << irq)) { - if(ar531x_soc >= AR531X_SOC_AR5315) { ATH_WRITE_REG(AR5315_SYSREG_BASE + AR5315_SYSREG_MISC_INTSTAT, diff --git a/sys/mips/atheros/ar531x/ar5312_chip.c b/sys/mips/atheros/ar531x/ar5312_chip.c index 33c2bebd113..440334cf604 100644 --- a/sys/mips/atheros/ar531x/ar5312_chip.c +++ b/sys/mips/atheros/ar531x/ar5312_chip.c @@ -87,7 +87,6 @@ ar5312_chip_detect_sys_frequency(void) uint32_t predivisor; uint32_t multiplier; - const uint32_t clockctl = ATH_READ_REG(AR5312_SYSREG_BASE + AR5312_SYSREG_CLOCKCTL); if(ar531x_soc == AR531X_SOC_AR5313) { predivisor = __SHIFTOUT(clockctl, AR2313_CLOCKCTL_PREDIVIDE); diff --git a/sys/mips/atheros/ar531x/ar5315_chip.c b/sys/mips/atheros/ar531x/ar5315_chip.c index 94374e5ddda..f04b3aabfe5 100644 --- a/sys/mips/atheros/ar531x/ar5315_chip.c +++ b/sys/mips/atheros/ar531x/ar5315_chip.c @@ -181,7 +181,7 @@ ar5315_chip_device_start(void) ATH_WRITE_REG(AR5315_SYSREG_BASE+AR5315_SYSREG_AHB_ARB_CTL, ATH_READ_REG(AR5315_SYSREG_BASE+AR5315_SYSREG_AHB_ARB_CTL) | AR5315_ARB_ENET); - + // set Ethernet controller byteswap control /* ATH_WRITE_REG(AR5315_SYSREG_BASE+AR5315_SYSREG_ENDIAN, diff --git a/sys/mips/atheros/ar531x/ar5315_cpudef.h b/sys/mips/atheros/ar531x/ar5315_cpudef.h index 49ba8d27d9a..370b10e9b53 100644 --- a/sys/mips/atheros/ar531x/ar5315_cpudef.h +++ b/sys/mips/atheros/ar531x/ar5315_cpudef.h @@ -122,18 +122,14 @@ extern uint32_t u_ar531x_gpio_pins; extern uint32_t u_ar531x_wdog_ctl; extern uint32_t u_ar531x_wdog_timer; - static inline uint32_t ar531x_cpu_freq(void) { return u_ar531x_cpu_freq; } static inline uint32_t ar531x_ahb_freq(void) { return u_ar531x_ahb_freq; } static inline uint32_t ar531x_ddr_freq(void) { return u_ar531x_ddr_freq; } - static inline uint32_t ar531x_uart_addr(void) { return u_ar531x_uart_addr; } - static inline uint32_t ar531x_gpio_di(void) { return u_ar531x_gpio_di; } static inline uint32_t ar531x_gpio_cr(void) { return u_ar531x_gpio_cr; } static inline uint32_t ar531x_gpio_do(void) { return u_ar531x_gpio_do; } static inline uint32_t ar531x_gpio_pins(void) { return u_ar531x_gpio_pins; } - static inline uint32_t ar531x_wdog_ctl(void) { return u_ar531x_wdog_ctl; } static inline uint32_t ar531x_wdog_timer(void) { return u_ar531x_wdog_timer; } #endif diff --git a/sys/mips/atheros/ar531x/ar5315_gpio.c b/sys/mips/atheros/ar531x/ar5315_gpio.c index 88d7c8099ca..8e824cd237c 100644 --- a/sys/mips/atheros/ar531x/ar5315_gpio.c +++ b/sys/mips/atheros/ar531x/ar5315_gpio.c @@ -308,8 +308,6 @@ ar5315_gpio_filter(void *arg) return (FILTER_STRAY); } - - static void ar5315_gpio_intr(void *arg) { diff --git a/sys/mips/atheros/ar531x/ar5315_machdep.c b/sys/mips/atheros/ar531x/ar5315_machdep.c index c0023491ac3..d3c04f50cde 100644 --- a/sys/mips/atheros/ar531x/ar5315_machdep.c +++ b/sys/mips/atheros/ar531x/ar5315_machdep.c @@ -241,7 +241,6 @@ platform_start(__register_t a0 __unused, __register_t a1 __unused, /* Detect the system type - this is needed for subsequent chipset-specific calls */ - ar531x_device_soc_init(); ar531x_detect_sys_frequency(); diff --git a/sys/mips/atheros/ar531x/ar5315_setup.c b/sys/mips/atheros/ar531x/ar5315_setup.c index 059ea173a69..a0d6453f260 100644 --- a/sys/mips/atheros/ar531x/ar5315_setup.c +++ b/sys/mips/atheros/ar531x/ar5315_setup.c @@ -39,12 +39,12 @@ __FBSDID("$FreeBSD$"); #include #include #include - + #include #include - + #include - + #include #include #include @@ -52,7 +52,7 @@ __FBSDID("$FreeBSD$"); #include #include #include - + #include #include #include @@ -158,4 +158,3 @@ ar5315_get_system_type(void) { return ar5315_sys_type; } - diff --git a/sys/mips/atheros/ar531x/ar5315_wdog.c b/sys/mips/atheros/ar531x/ar5315_wdog.c index 26f8374547a..f47d5b32808 100644 --- a/sys/mips/atheros/ar531x/ar5315_wdog.c +++ b/sys/mips/atheros/ar531x/ar5315_wdog.c @@ -116,12 +116,11 @@ ar5315_wdog_sysctl(device_t dev) "whether the system rebooted from the watchdog"); } - static int ar5315_wdog_attach(device_t dev) { struct ar5315_wdog_softc *sc = device_get_softc(dev); - + /* Initialise */ sc->reboot_from_watchdog = 0; sc->armed = 0; diff --git a/sys/mips/atheros/ar531x/ar5315reg.h b/sys/mips/atheros/ar531x/ar5315reg.h index 553ba9f55ed..5851d8bd401 100644 --- a/sys/mips/atheros/ar531x/ar5315reg.h +++ b/sys/mips/atheros/ar531x/ar5315reg.h @@ -223,7 +223,7 @@ #define ATH_READ_REG(reg) \ *((volatile uint32_t *)MIPS_PHYS_TO_KSEG1((reg))) - + #define ATH_WRITE_REG(reg, val) \ *((volatile uint32_t *)MIPS_PHYS_TO_KSEG1((reg))) = (val) diff --git a/sys/mips/atheros/ar531x/if_are.c b/sys/mips/atheros/ar531x/if_are.c index 07e2a1e5a48..5460c6fffca 100644 --- a/sys/mips/atheros/ar531x/if_are.c +++ b/sys/mips/atheros/ar531x/if_are.c @@ -195,7 +195,6 @@ DRIVER_MODULE(aremdio, nexus, aremdio_driver, aremdio_devclass, 0, 0); DRIVER_MODULE(mdio, aremdio, mdio_driver, mdio_devclass, 0, 0); #endif - static int are_probe(device_t dev) { @@ -1472,7 +1471,6 @@ are_fixup_rx(struct mbuf *m) m->m_data -= ETHER_ALIGN; } - static void are_tx(struct are_softc *sc) { @@ -1538,7 +1536,6 @@ are_tx(struct are_softc *sc) sc->are_cdata.are_tx_ring_map, BUS_DMASYNC_PREWRITE); } - static void are_rx(struct are_softc *sc) { @@ -1611,7 +1608,6 @@ are_rx(struct are_softc *sc) bus_dmamap_sync(sc->are_cdata.are_rx_ring_tag, sc->are_cdata.are_rx_ring_map, BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); - } if (prog > 0) { diff --git a/sys/mips/atheros/ar531x/if_arereg.h b/sys/mips/atheros/ar531x/if_arereg.h index cb84edd9e58..b2483e52eb6 100644 --- a/sys/mips/atheros/ar531x/if_arereg.h +++ b/sys/mips/atheros/ar531x/if_arereg.h @@ -141,7 +141,6 @@ struct are_softc { #define CSR_READ_4(sc, reg) \ bus_space_read_4(sc->are_btag, sc->are_bhandle, reg) - /* $NetBSD: aereg.h,v 1.2 2008/04/28 20:23:28 martin Exp $ */ /*- @@ -254,7 +253,7 @@ struct are_softc { #define CSR_MIIDATA 0x0018 /* mii data */ #define CSR_FLOWC 0x001C /* flow control */ #define CSR_VL1 0x0020 /* vlan 1 tag */ - + /* these are more or less normal Tulip registers */ #define CSR_BUSMODE 0x1000 /* bus mode */ #define CSR_TXPOLL 0x1004 /* tx poll demand */ @@ -331,7 +330,6 @@ struct are_softc { /* CSR_TXPOLL - Transmit Poll Demand */ #define TXPOLL_TPD 0x00000001 /* transmit poll demand */ - /* CSR_RXPOLL - Receive Poll Demand */ #define RXPOLL_RPD 0x00000001 /* receive poll demand */ @@ -393,7 +391,6 @@ struct are_softc { /* CSR_INTEN - Interrupt Enable */ /* See bits for CSR_STATUS -- Status */ - /* CSR_MISSED - Missed Frames */ #define MISSED_MFC 0xffff0000 /* missed packet count */ #define MISSED_FOC 0x0000ffff /* fifo overflow counter */ diff --git a/sys/mips/atheros/ar71xx_cpudef.h b/sys/mips/atheros/ar71xx_cpudef.h index 53454764a5d..a8028be5172 100644 --- a/sys/mips/atheros/ar71xx_cpudef.h +++ b/sys/mips/atheros/ar71xx_cpudef.h @@ -171,7 +171,6 @@ extern uint32_t u_ar71xx_ddr_freq; extern uint32_t u_ar71xx_uart_freq; extern uint32_t u_ar71xx_wdt_freq; extern uint32_t u_ar71xx_mdio_freq; - static inline uint64_t ar71xx_refclk(void) { return u_ar71xx_refclk; } static inline uint64_t ar71xx_cpu_freq(void) { return u_ar71xx_cpu_freq; } static inline uint64_t ar71xx_ahb_freq(void) { return u_ar71xx_ahb_freq; } diff --git a/sys/mips/atheros/ar71xx_gpio.c b/sys/mips/atheros/ar71xx_gpio.c index fd3d51a02c7..539e108cb79 100644 --- a/sys/mips/atheros/ar71xx_gpio.c +++ b/sys/mips/atheros/ar71xx_gpio.c @@ -411,8 +411,6 @@ ar71xx_gpio_filter(void *arg) return (FILTER_STRAY); } - - static void ar71xx_gpio_intr(void *arg) { diff --git a/sys/mips/atheros/ar71xx_ohci.c b/sys/mips/atheros/ar71xx_ohci.c index 22a15745e6b..cb1601b019c 100644 --- a/sys/mips/atheros/ar71xx_ohci.c +++ b/sys/mips/atheros/ar71xx_ohci.c @@ -79,7 +79,6 @@ ar71xx_ohci_intr(void *arg) ohci_interrupt(arg); } - static int ar71xx_ohci_attach(device_t dev) { diff --git a/sys/mips/atheros/ar71xx_pci.c b/sys/mips/atheros/ar71xx_pci.c index 9ff605acb97..145bdc933e1 100644 --- a/sys/mips/atheros/ar71xx_pci.c +++ b/sys/mips/atheros/ar71xx_pci.c @@ -358,7 +358,6 @@ ar71xx_pci_slot_fixup(device_t dev, u_int bus, u_int slot, u_int func) return; } - device_printf(dev, "found EEPROM at 0x%lx on %d.%d.%d\n", flash_addr, bus, slot, func); ar71xx_pci_fixup(dev, bus, slot, func, flash_addr, size); @@ -660,7 +659,7 @@ static int ar71xx_pci_route_interrupt(device_t pcib, device_t device, int pin) { struct ar71xx_pci_softc *sc = device_get_softc(pcib); - + if (pci_get_slot(device) < sc->sc_baseslot) panic("%s: PCI slot %d is less then AR71XX_PCI_BASE_SLOT", __func__, pci_get_slot(device)); diff --git a/sys/mips/atheros/ar71xx_pci_bus_space.c b/sys/mips/atheros/ar71xx_pci_bus_space.c index 99b81be24d2..def31bd60df 100644 --- a/sys/mips/atheros/ar71xx_pci_bus_space.c +++ b/sys/mips/atheros/ar71xx_pci_bus_space.c @@ -188,7 +188,7 @@ pcimem_bs_w_2_s(void *t, bus_space_handle_t h, bus_size_t o, uint16_t v) static uint32_t pcimem_bs_r_4_s(void *t, bus_space_handle_t h, bus_size_t o) { - + return le32toh(readl(h + o)); } diff --git a/sys/mips/atheros/ar71xx_setup.c b/sys/mips/atheros/ar71xx_setup.c index d3a330c7f2d..897f1360fea 100644 --- a/sys/mips/atheros/ar71xx_setup.c +++ b/sys/mips/atheros/ar71xx_setup.c @@ -39,12 +39,12 @@ __FBSDID("$FreeBSD$"); #include #include #include - + #include #include - + #include - + #include #include #include @@ -52,7 +52,7 @@ __FBSDID("$FreeBSD$"); #include #include #include - + #include #include #include @@ -234,4 +234,3 @@ ar71xx_get_system_type(void) { return ar71xx_sys_type; } - diff --git a/sys/mips/atheros/ar71xx_spi.c b/sys/mips/atheros/ar71xx_spi.c index 694f168a468..f851667dbf6 100644 --- a/sys/mips/atheros/ar71xx_spi.c +++ b/sys/mips/atheros/ar71xx_spi.c @@ -282,7 +282,6 @@ static device_method_t ar71xx_spi_methods[] = { DEVMETHOD(device_detach, ar71xx_spi_detach), DEVMETHOD(spibus_transfer, ar71xx_spi_transfer), - {0, 0} }; diff --git a/sys/mips/atheros/ar71xx_wdog.c b/sys/mips/atheros/ar71xx_wdog.c index e752c3f85c6..1d92b16ec5c 100644 --- a/sys/mips/atheros/ar71xx_wdog.c +++ b/sys/mips/atheros/ar71xx_wdog.c @@ -143,12 +143,11 @@ ar71xx_wdog_sysctl(device_t dev) "whether the system rebooted from the watchdog"); } - static int ar71xx_wdog_attach(device_t dev) { struct ar71xx_wdog_softc *sc = device_get_softc(dev); - + /* Initialise */ sc->reboot_from_watchdog = 0; sc->armed = 0; diff --git a/sys/mips/atheros/ar724x_pci.c b/sys/mips/atheros/ar724x_pci.c index ebb40142ccb..74fb91a29d3 100644 --- a/sys/mips/atheros/ar724x_pci.c +++ b/sys/mips/atheros/ar724x_pci.c @@ -594,7 +594,6 @@ ar724x_pci_intr(void *arg) struct intr_event *event; uint32_t reg, irq, mask; - reg = ATH_READ_REG(AR724X_PCI_INTR_STATUS); mask = ATH_READ_REG(AR724X_PCI_INTR_MASK); /* @@ -602,7 +601,6 @@ ar724x_pci_intr(void *arg) */ reg &= mask; if (reg & AR724X_PCI_INTR_DEV0) { - irq = AR71XX_PCI_IRQ_START; event = sc->sc_eventstab[irq]; if (!event || CK_SLIST_EMPTY(&event->ie_handlers)) { diff --git a/sys/mips/atheros/ar933x_chip.c b/sys/mips/atheros/ar933x_chip.c index 791a999ab23..73000a0220e 100644 --- a/sys/mips/atheros/ar933x_chip.c +++ b/sys/mips/atheros/ar933x_chip.c @@ -215,7 +215,6 @@ ar933x_chip_ddr_flush(ar71xx_flush_ddr_id_t id) } } - static uint32_t ar933x_chip_get_eth_pll(unsigned int mac, int speed) { diff --git a/sys/mips/atheros/ar934x_chip.c b/sys/mips/atheros/ar934x_chip.c index a0d51f205ee..0bd0547ecac 100644 --- a/sys/mips/atheros/ar934x_chip.c +++ b/sys/mips/atheros/ar934x_chip.c @@ -286,7 +286,6 @@ ar934x_chip_ddr_flush(ar71xx_flush_ddr_id_t id) } } - static uint32_t ar934x_chip_get_eth_pll(unsigned int mac, int speed) { diff --git a/sys/mips/atheros/if_arge.c b/sys/mips/atheros/if_arge.c index 771dc3f7d7c..df7f80135c1 100644 --- a/sys/mips/atheros/if_arge.c +++ b/sys/mips/atheros/if_arge.c @@ -84,7 +84,6 @@ __FBSDID("$FreeBSD$"); #include "mdio_if.h" #endif - MODULE_DEPEND(arge, ether, 1, 1, 1); MODULE_DEPEND(arge, miibus, 1, 1, 1); MODULE_VERSION(arge, 1); @@ -230,7 +229,7 @@ static device_method_t argemdio_methods[] = { /* bus interface */ DEVMETHOD(bus_add_child, device_add_child_ordered), - + /* MDIO access */ DEVMETHOD(mdio_readreg, arge_miibus_readreg), DEVMETHOD(mdio_writereg, arge_miibus_writereg), @@ -1242,7 +1241,6 @@ arge_update_link_locked(struct arge_softc *sc) } if (mii->mii_media_status & IFM_ACTIVE) { - media = IFM_SUBTYPE(mii->mii_media_active); if (media != IFM_NONE) { sc->arge_link_status = 1; @@ -1373,7 +1371,6 @@ arge_set_pll(struct arge_softc *sc, int media, int duplex) #endif } - static void arge_reset_dma(struct arge_softc *sc) { @@ -1738,7 +1735,6 @@ arge_start_locked(struct ifnet *ifp) if (m_head == NULL) break; - /* * Pack the data into the transmit ring. */ @@ -1784,7 +1780,6 @@ arge_stop(struct arge_softc *sc) arge_tx_ring_free(sc); } - static int arge_ioctl(struct ifnet *ifp, u_long command, caddr_t data) { @@ -2419,7 +2414,6 @@ arge_poll(struct ifnet *ifp, enum poll_cmd cmd, int count) } #endif /* DEVICE_POLLING */ - static void arge_tx_locked(struct arge_softc *sc) { @@ -2484,7 +2478,6 @@ arge_tx_locked(struct arge_softc *sc) sc->arge_cdata.arge_tx_ring_map, BUS_DMASYNC_PREWRITE); } - static int arge_rx_locked(struct arge_softc *sc) { @@ -2541,7 +2534,6 @@ arge_rx_locked(struct arge_softc *sc) } if (prog > 0) { - i = sc->arge_cdata.arge_rx_cons; for (; prog > 0 ; prog--) { if (arge_newbuf(sc, i) != 0) { @@ -2699,7 +2691,6 @@ arge_intr(void *arg) ARGE_WRITE(sc, AR71XX_DMA_INTR, DMA_INTR_ALL); } - static void arge_tick(void *xsc) { diff --git a/sys/mips/atheros/if_argevar.h b/sys/mips/atheros/if_argevar.h index 576fe501a8d..498a7f1695d 100644 --- a/sys/mips/atheros/if_argevar.h +++ b/sys/mips/atheros/if_argevar.h @@ -50,7 +50,6 @@ ((sc)->arge_rdata.arge_rx_ring_paddr + sizeof(struct arge_desc) * (i)) #define ARGE_INC(x,y) (x) = (((x) + 1) % y) - #define ARGE_MII_TIMEOUT 1000 #define ARGE_LOCK(_sc) mtx_lock(&(_sc)->arge_mtx) diff --git a/sys/mips/atheros/pcf2123reg.h b/sys/mips/atheros/pcf2123reg.h index e20ca86acd6..e3f84d4d5b7 100644 --- a/sys/mips/atheros/pcf2123reg.h +++ b/sys/mips/atheros/pcf2123reg.h @@ -66,4 +66,3 @@ #define PCF2123_WRITE(reg) (PCF2123_CMD_WRITE | (1 << 4) | (reg)) #endif /* __PCF2123REG_H__ */ - diff --git a/sys/mips/atheros/qca955xreg.h b/sys/mips/atheros/qca955xreg.h index 394b9636844..51d2ccc575e 100644 --- a/sys/mips/atheros/qca955xreg.h +++ b/sys/mips/atheros/qca955xreg.h @@ -193,7 +193,6 @@ #define QCA955X_NFC_BASE 0x1b800200 #define QCA955X_NFC_SIZE 0xb8 - /* GMAC Interface */ #define QCA955X_GMAC_REG_ETH_CFG (QCA955X_GMAC_BASE + 0x00) diff --git a/sys/mips/atheros/uart_dev_ar933x.c b/sys/mips/atheros/uart_dev_ar933x.c index 6545ec64fb3..e7e4626b9b9 100644 --- a/sys/mips/atheros/uart_dev_ar933x.c +++ b/sys/mips/atheros/uart_dev_ar933x.c @@ -54,8 +54,6 @@ __FBSDID("$FreeBSD$"); #define ar933x_setreg(bas, reg, value) \ bus_space_write_4((bas)->bst, (bas)->bsh, reg, value) - - static int ar933x_drain(struct uart_bas *bas, int what) { @@ -78,7 +76,6 @@ ar933x_drain(struct uart_bas *bas, int what) if (what & UART_DRAIN_RECEIVER) { limit=10*4096; while (--limit) { - /* XXX duplicated from ar933x_getc() */ /* XXX TODO: refactor! */ @@ -193,7 +190,6 @@ ar933x_param(struct uart_bas *bas, int baudrate, int databits, int stopbits, return (0); } - /* * Low-level UART interface. */ diff --git a/sys/mips/beri/beri_iommu.c b/sys/mips/beri/beri_iommu.c index f4165f4af42..14903dec77e 100644 --- a/sys/mips/beri/beri_iommu.c +++ b/sys/mips/beri/beri_iommu.c @@ -210,7 +210,6 @@ beri_iommu_detach(device_t dev) } static device_method_t beri_iommu_methods[] = { - /* xDMA IOMMU interface */ DEVMETHOD(xdma_iommu_init, beri_iommu_init), DEVMETHOD(xdma_iommu_release, beri_iommu_release), @@ -221,7 +220,6 @@ static device_method_t beri_iommu_methods[] = { DEVMETHOD(device_probe, beri_iommu_probe), DEVMETHOD(device_attach, beri_iommu_attach), DEVMETHOD(device_detach, beri_iommu_detach), - { 0, 0 } }; diff --git a/sys/mips/beri/beri_machdep.c b/sys/mips/beri/beri_machdep.c index cdea6dcedbe..8f9a9a16584 100644 --- a/sys/mips/beri/beri_machdep.c +++ b/sys/mips/beri/beri_machdep.c @@ -115,7 +115,6 @@ mips_init(void) #ifdef FDT if (fdt_get_mem_regions(mr, &mr_cnt, &val) == 0) { - physmem = btoc(val); KASSERT((phys_avail[0] >= mr[0].mr_start) && \ diff --git a/sys/mips/beri/beri_mp.c b/sys/mips/beri/beri_mp.c index 8f8ab9a86a0..1089a12c59d 100644 --- a/sys/mips/beri/beri_mp.c +++ b/sys/mips/beri/beri_mp.c @@ -171,7 +171,6 @@ platform_init_secondary(int cpuid) } } - void platform_ipi_send(int cpuid) { diff --git a/sys/mips/broadcom/bcm_bmips.c b/sys/mips/broadcom/bcm_bmips.c index 100664bb26a..0efd4706941 100644 --- a/sys/mips/broadcom/bcm_bmips.c +++ b/sys/mips/broadcom/bcm_bmips.c @@ -103,7 +103,6 @@ bcm_bmips_probe(device_t dev) return (BUS_PROBE_DEFAULT); } - static int bcm_bmips_attach(device_t dev) { diff --git a/sys/mips/broadcom/bcm_bmips_exts.h b/sys/mips/broadcom/bcm_bmips_exts.h index 1ced180b776..7e28d7b9b5e 100644 --- a/sys/mips/broadcom/bcm_bmips_exts.h +++ b/sys/mips/broadcom/bcm_bmips_exts.h @@ -39,7 +39,6 @@ * $FreeBSD$ */ - /* ********************************************************************* * Broadcom Common Firmware Environment (CFE) * diff --git a/sys/mips/broadcom/bcm_mips.c b/sys/mips/broadcom/bcm_mips.c index ab38f01b063..a3540416dff 100644 --- a/sys/mips/broadcom/bcm_mips.c +++ b/sys/mips/broadcom/bcm_mips.c @@ -477,7 +477,6 @@ bcm_mips_pic_teardown_intr(device_t dev, struct intr_irqsrc *irqsrc, return (error); } - /** return our PIC's xref */ static uintptr_t bcm_mips_pic_xref(struct bcm_mips_softc *sc) diff --git a/sys/mips/broadcom/bcm_mips74k.c b/sys/mips/broadcom/bcm_mips74k.c index 3b25b5bde3b..dc86d4736b8 100644 --- a/sys/mips/broadcom/bcm_mips74k.c +++ b/sys/mips/broadcom/bcm_mips74k.c @@ -200,7 +200,6 @@ bcm_mips74k_detach(device_t dev) return (0); } - /* PIC_DISABLE_INTR() */ static void bcm_mips74k_pic_disable_intr(device_t dev, struct intr_irqsrc *irqsrc) diff --git a/sys/mips/broadcom/bcm_mips74kreg.h b/sys/mips/broadcom/bcm_mips74kreg.h index d9b09e238ab..92e8a8e53ef 100644 --- a/sys/mips/broadcom/bcm_mips74kreg.h +++ b/sys/mips/broadcom/bcm_mips74kreg.h @@ -64,5 +64,4 @@ #define BCM_MIPS74K_GET_TIMER_IRQ() \ ((mips_rd_intctl() & MIPS_INTCTL_IPTI_MASK) >> MIPS_INTCTL_IPTI_SHIFT) - #endif /* _MIPS_BROADCOM_MIPS74KREG_H_ */ diff --git a/sys/mips/broadcom/bcm_mipsvar.h b/sys/mips/broadcom/bcm_mipsvar.h index bc8e19888fe..b2c10026895 100644 --- a/sys/mips/broadcom/bcm_mipsvar.h +++ b/sys/mips/broadcom/bcm_mipsvar.h @@ -51,7 +51,6 @@ struct bcm_mips_softc; #define BCM_MIPS_IRQ_SHARED 0 /**< MIPS CPU IRQ reserved for shared interrupt handling */ #define INTR_MAP_DATA_BCM_MIPS INTR_MAP_DATA_PLAT_2 /**< Broadcom MIPS PIC interrupt map data type */ - int bcm_mips_attach(device_t dev, u_int num_cpuirqs, u_int timer_irq, driver_filter_t filter); int bcm_mips_detach(device_t dev); @@ -100,7 +99,6 @@ struct bcm_mips_softc { struct mtx mtx; }; - #define BCM_MIPS_IVEC_MASK(_isrc) (1 << ((_isrc)->ivec)) #define BCM_MIPS_LOCK_INIT(sc) \ diff --git a/sys/mips/broadcom/bcm_nvram_cfe.c b/sys/mips/broadcom/bcm_nvram_cfe.c index a237e983253..380a2731862 100644 --- a/sys/mips/broadcom/bcm_nvram_cfe.c +++ b/sys/mips/broadcom/bcm_nvram_cfe.c @@ -104,7 +104,6 @@ bhnd_nvram_cfe_probe(device_t dev) return (BUS_PROBE_NOWILDCARD); } - static int bhnd_nvram_cfe_attach(device_t dev) { @@ -240,7 +239,6 @@ bcm_nvram_find_cfedev(struct bcm_nvram_iocfe *iocfe, return (ENODEV); } - /** * Initialize a new CFE device-backed I/O context. * @@ -343,7 +341,6 @@ bcm_nvram_iocfe_init(struct bcm_nvram_iocfe *iocfe, char *dname) req_blk_erase = !(fi.flash_flags & FLASH_FLAG_NOERASE); } - /* Verify that the full NVRAM layout can be represented via size_t */ if (nv_size > SIZE_MAX || SIZE_MAX - nv_size < nv_offset) { IOCFE_LOG(iocfe, "invalid NVRAM layout (%#x/%#jx)\n", @@ -449,7 +446,7 @@ bhnd_nvram_iocfe_read(struct bhnd_nvram_io *io, size_t offset, void *buffer, cfe_noff = cfe_offset + nread; p = ((uint8_t *)buffer + nread); nreq = ummin(INT_MAX, remain); - + nr = cfe_readblk(iocfe->fd, cfe_noff, p, nreq); if (nr < 0) { IOCFE_LOG(iocfe, "cfe_readblk() failed: %d\n", nr); diff --git a/sys/mips/broadcom/bcm_pmu.c b/sys/mips/broadcom/bcm_pmu.c index e9d6d4d2ab3..8b9399d47a1 100644 --- a/sys/mips/broadcom/bcm_pmu.c +++ b/sys/mips/broadcom/bcm_pmu.c @@ -121,7 +121,7 @@ bcm_get_uart_clkcfg(struct bcm_platform *bp) /* PLL M2 clock source? */ if (!bcm_has_pmu(bp) && BCM_PMU_PLL_TYPE(bp) == CHIPC_PLL_TYPE1) { uint32_t n, m; - + n = BCM_CHIPC_READ_4(bp, CHIPC_CLKC_N); m = BCM_CHIPC_READ_4(bp, CHIPC_CLKC_M2); @@ -130,7 +130,7 @@ bcm_get_uart_clkcfg(struct bcm_platform *bp) BCM_UART_RCLK_PLL_T1_DIV, bhnd_pwrctl_clock_rate(BCM_PMU_PLL_TYPE(bp), n, m) }; - + return (cfg); } @@ -247,7 +247,7 @@ bcm_get_cpufreq(struct bcm_platform *bp) m = BCM_CHIPC_READ_4(bp, mreg); return (bhnd_pwrctl_cpu_clock_rate(&bp->cid, pll_type, n, m)); - + } /** Backplane clock frequency (in Hz) */ @@ -277,7 +277,6 @@ bcm_get_sifreq(struct bcm_platform *bp) return (bhnd_pwrctl_si_clock_rate(&bp->cid, pll_type, n, m)); } - static uint32_t bcm_pmu_read4(bus_size_t reg, void *ctx) { struct bcm_platform *bp = ctx; diff --git a/sys/mips/broadcom/bhnd_nexus.c b/sys/mips/broadcom/bhnd_nexus.c index 553e0300baa..6d3e735a297 100644 --- a/sys/mips/broadcom/bhnd_nexus.c +++ b/sys/mips/broadcom/bhnd_nexus.c @@ -63,7 +63,6 @@ __FBSDID("$FreeBSD$"); #include "bhnd_nexusvar.h" - /** * Default bhnd_nexus implementation of BHND_BUS_GET_SERVICE_REGISTRY(). */ diff --git a/sys/mips/broadcom/uart_bus_chipc.c b/sys/mips/broadcom/uart_bus_chipc.c index b796c371da3..d93f8a21a4f 100644 --- a/sys/mips/broadcom/uart_bus_chipc.c +++ b/sys/mips/broadcom/uart_bus_chipc.c @@ -50,7 +50,6 @@ __FBSDID("$FreeBSD$"); #include "bcm_machdep.h" - static int uart_chipc_probe(device_t dev) { diff --git a/sys/mips/cavium/ciu.c b/sys/mips/cavium/ciu.c index 0592e6a4cf9..74dc7904dd5 100644 --- a/sys/mips/cavium/ciu.c +++ b/sys/mips/cavium/ciu.c @@ -143,7 +143,7 @@ ciu_attach(device_t dev) sc->irq_rman.rm_type = RMAN_ARRAY; sc->irq_rman.rm_descr = "CIU IRQ"; - + error = rman_init(&sc->irq_rman); if (error != 0) return (error); @@ -178,7 +178,7 @@ ciu_alloc_resource(device_t bus, device_t child, int type, int *rid, { struct resource *res; struct ciu_softc *sc; - + sc = device_get_softc(bus); switch (type) { @@ -276,7 +276,7 @@ ciu_bind_intr(device_t bus, device_t child, struct resource *res, int cpu) { struct intr_event *event; int irq; - + irq = rman_get_start(res); if (irq <= CIU_IRQ_EN0_END) event = ciu_en0_intr_events[irq - CIU_IRQ_EN0_BEGIN]; @@ -295,7 +295,7 @@ ciu_describe_intr(device_t bus, device_t child, struct resource *res, mips_intrcnt_t intrcnt; int error; int irq; - + irq = rman_get_start(res); if (irq <= CIU_IRQ_EN0_END) { event = ciu_en0_intr_events[irq - CIU_IRQ_EN0_BEGIN]; @@ -476,7 +476,6 @@ static device_method_t ciu_methods[] = { DEVMETHOD(bus_add_child, bus_generic_add_child), DEVMETHOD(bus_hinted_child, ciu_hinted_child), - { 0, 0 } }; diff --git a/sys/mips/cavium/cryptocteon/cavium_crypto.c b/sys/mips/cavium/cryptocteon/cavium_crypto.c index 7961a8b136e..fcb1fcfc379 100644 --- a/sys/mips/cavium/cryptocteon/cavium_crypto.c +++ b/sys/mips/cavium/cryptocteon/cavium_crypto.c @@ -388,7 +388,6 @@ octo_aes_cbc_encrypt( return 0; } - int octo_aes_cbc_decrypt( struct octo_sess *od, @@ -646,7 +645,6 @@ octo_aes_cbc_sha1_encrypt( IOV_CONSUME(iov, data32, data_i, data_l); mydata[1].data32[1] = *data32; - if (crypt_off <= 0) { if (crypt_len > 0) { CVMX_MT_AES_ENC_CBC0(*pdata); diff --git a/sys/mips/cavium/cryptocteon/cryptocteon.c b/sys/mips/cavium/cryptocteon/cryptocteon.c index c2801e2947d..446736eb342 100644 --- a/sys/mips/cavium/cryptocteon/cryptocteon.c +++ b/sys/mips/cavium/cryptocteon/cryptocteon.c @@ -372,7 +372,6 @@ cryptocteon_process(device_t dev, struct cryptop *crp, int hint) panic("can't happen"); } - /* * setup a new explicit key */ @@ -381,7 +380,6 @@ cryptocteon_process(device_t dev, struct cryptop *crp, int hint) if (crp->crp_auth_key != NULL) cryptocteon_calc_hash(csp, crp->crp_auth_key, od); - if (CRYPTO_OP_IS_ENCRYPT(crp->crp_op)) (*od->octo_encrypt)(od, od->octo_iov, iovcnt, iovlen, auth_off, auth_len, crypt_off, crypt_len, icv, ivp); @@ -414,7 +412,6 @@ static device_method_t cryptocteon_methods[] = { DEVMETHOD(cryptodev_probesession, cryptocteon_probesession), DEVMETHOD(cryptodev_newsession, cryptocteon_newsession), DEVMETHOD(cryptodev_process, cryptocteon_process), - { 0, 0 } }; diff --git a/sys/mips/cavium/if_octm.c b/sys/mips/cavium/if_octm.c index 4166dccd135..f26596d8373 100644 --- a/sys/mips/cavium/if_octm.c +++ b/sys/mips/cavium/if_octm.c @@ -99,7 +99,6 @@ static device_method_t octm_methods[] = { DEVMETHOD(device_attach, octm_attach), DEVMETHOD(device_detach, octm_detach), DEVMETHOD(device_shutdown, octm_shutdown), - { 0, 0 } }; @@ -464,7 +463,7 @@ octm_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) } sc->sc_flags = ifp->if_flags; return (0); - + case SIOCSIFCAP: /* * Just change the capabilities in software, currently none @@ -484,7 +483,7 @@ octm_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) if (error != 0) return (error); return (0); - + default: error = ether_ioctl(ifp, cmd, data); if (error != 0) @@ -513,7 +512,6 @@ octm_rx_intr(void *arg) return; } - len = cvmx_mgmt_port_receive(sc->sc_port, MCLBYTES, m->m_data); if (len > 0) { m->m_pkthdr.rcvif = sc->sc_ifp; diff --git a/sys/mips/cavium/obio.c b/sys/mips/cavium/obio.c index 0d0dcb02d3c..7975d90cf6d 100644 --- a/sys/mips/cavium/obio.c +++ b/sys/mips/cavium/obio.c @@ -165,7 +165,7 @@ obio_alloc_resource(device_t bus, device_t child, int type, int *rid, rman_set_rid(rv, *rid); rman_set_bustag(rv, bt); rman_set_bushandle(rv, bh); - + if (0) { if (bus_activate_resource(child, type, *rid, rv)) { rman_release_resource(rv); diff --git a/sys/mips/cavium/obiovar.h b/sys/mips/cavium/obiovar.h index fbf33b508c6..3cccf59d92e 100644 --- a/sys/mips/cavium/obiovar.h +++ b/sys/mips/cavium/obiovar.h @@ -51,7 +51,7 @@ struct obio_softc { bus_size_t oba_size; /* size of device */ struct rman oba_rman; struct rman oba_irq_rman; - + }; #endif /* _OCTEON_OBIOVAR_H_ */ diff --git a/sys/mips/cavium/octe/cavium-ethernet.h b/sys/mips/cavium/octe/cavium-ethernet.h index 37cba4eb516..7d9fe3f1084 100644 --- a/sys/mips/cavium/octe/cavium-ethernet.h +++ b/sys/mips/cavium/octe/cavium-ethernet.h @@ -4,7 +4,6 @@ SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2003-2007 Cavium Networks (support@cavium.com). All rights reserved. - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -90,7 +89,6 @@ typedef struct { struct mtx tx_mtx; } cvm_oct_private_t; - /** * Free a work queue entry received in a intercept callback. * diff --git a/sys/mips/cavium/octe/ethernet-common.c b/sys/mips/cavium/octe/ethernet-common.c index 02a9fa3ecfc..41e122a0f84 100644 --- a/sys/mips/cavium/octe/ethernet-common.c +++ b/sys/mips/cavium/octe/ethernet-common.c @@ -4,7 +4,6 @@ SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2003-2007 Cavium Networks (support@cavium.com). All rights reserved. - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -91,7 +90,6 @@ void cvm_oct_common_set_multicast_list(struct ifnet *ifp) } } - /** * Assign a MAC addres from the pool of available MAC addresses * Can return as either a 64-bit value and/or 6 octets. @@ -116,7 +114,7 @@ int cvm_assign_mac_address(uint64_t *macp, uint8_t *octets) if (cvm_oct_mac_addr_offset >= cvmx_sysinfo_get()->mac_addr_count) return ENXIO; /* Out of addresses to assign */ - + if (macp) *macp = cvm_oct_mac_addr; if (octets) @@ -165,7 +163,6 @@ void cvm_oct_common_set_mac_address(struct ifnet *ifp, const void *addr) } } - /** * Change the link MTU. Unimplemented * @@ -210,7 +207,6 @@ int cvm_oct_common_change_mtu(struct ifnet *ifp, int new_mtu) return 0; } - /** * Enable port. */ @@ -240,7 +236,6 @@ int cvm_oct_common_open(struct ifnet *ifp) return 0; } - /** * Disable port. */ @@ -298,7 +293,6 @@ void cvm_oct_common_poll(struct ifnet *ifp) priv->need_link_update = 1; } - /** * Per network device initialization * @@ -344,4 +338,3 @@ void cvm_oct_common_uninit(struct ifnet *ifp) { /* Currently nothing to do */ } - diff --git a/sys/mips/cavium/octe/ethernet-common.h b/sys/mips/cavium/octe/ethernet-common.h index 33e27c952d9..d7a8d298a6d 100644 --- a/sys/mips/cavium/octe/ethernet-common.h +++ b/sys/mips/cavium/octe/ethernet-common.h @@ -4,7 +4,6 @@ SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2003-2007 Cavium Networks (support@cavium.com). All rights reserved. - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -54,4 +53,3 @@ int cvm_oct_sgmii_init(struct ifnet *ifp); int cvm_oct_spi_init(struct ifnet *ifp); void cvm_oct_spi_uninit(struct ifnet *ifp); int cvm_oct_xaui_init(struct ifnet *ifp); - diff --git a/sys/mips/cavium/octe/ethernet-defines.h b/sys/mips/cavium/octe/ethernet-defines.h index 1be9d54b01e..ba3140661f3 100644 --- a/sys/mips/cavium/octe/ethernet-defines.h +++ b/sys/mips/cavium/octe/ethernet-defines.h @@ -4,7 +4,6 @@ SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2003-2007 Cavium Networks (support@cavium.com). All rights reserved. - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -50,4 +49,3 @@ AND WITH ALL FAULTS AND CAVIUM NETWORKS MAKES NO PROMISES, REPRESENTATIONS OR W #define FAU_NUM_PACKET_BUFFERS_TO_FREE (CVMX_FAU_REG_END - sizeof(uint32_t)) #define TOTAL_NUMBER_OF_PORTS (CVMX_PIP_NUM_INPUT_PORTS+1) - diff --git a/sys/mips/cavium/octe/ethernet-headers.h b/sys/mips/cavium/octe/ethernet-headers.h index 2a677aaf750..51386209b5a 100644 --- a/sys/mips/cavium/octe/ethernet-headers.h +++ b/sys/mips/cavium/octe/ethernet-headers.h @@ -4,7 +4,6 @@ SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2003-2007 Cavium Networks (support@cavium.com). All rights reserved. - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/sys/mips/cavium/octe/ethernet-mdio.c b/sys/mips/cavium/octe/ethernet-mdio.c index e679d75cc09..68c72fe51ac 100644 --- a/sys/mips/cavium/octe/ethernet-mdio.c +++ b/sys/mips/cavium/octe/ethernet-mdio.c @@ -4,7 +4,6 @@ SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2003-2007 Cavium Networks (support@cavium.com). All rights reserved. - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -85,7 +84,6 @@ int cvm_oct_mdio_read(struct ifnet *ifp, int phy_id, int location) return 0; } - /** * Perform an MII write. Called by the generic MII routines * @@ -135,4 +133,3 @@ int cvm_oct_mdio_setup_device(struct ifnet *ifp) return 0; } - diff --git a/sys/mips/cavium/octe/ethernet-mdio.h b/sys/mips/cavium/octe/ethernet-mdio.h index d55fccb9233..bd0e5c58eb3 100644 --- a/sys/mips/cavium/octe/ethernet-mdio.h +++ b/sys/mips/cavium/octe/ethernet-mdio.h @@ -4,7 +4,6 @@ SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2003-2007 Cavium Networks (support@cavium.com). All rights reserved. - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -39,4 +38,3 @@ extern struct mtx cvm_oct_mdio_mtx; int cvm_oct_mdio_read(struct ifnet *ifp, int phy_id, int location); void cvm_oct_mdio_write(struct ifnet *ifp, int phy_id, int location, int val); int cvm_oct_mdio_setup_device(struct ifnet *ifp); - diff --git a/sys/mips/cavium/octe/ethernet-mem.c b/sys/mips/cavium/octe/ethernet-mem.c index 99a11c4483d..ea629750724 100644 --- a/sys/mips/cavium/octe/ethernet-mem.c +++ b/sys/mips/cavium/octe/ethernet-mem.c @@ -4,7 +4,6 @@ SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2003-2007 Cavium Networks (support@cavium.com). All rights reserved. - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -74,7 +73,6 @@ int cvm_oct_mem_fill_fpa(int pool, int size, int elements) return (elements - freed); } - /** * Free the supplied hardware pool of mbufs * diff --git a/sys/mips/cavium/octe/ethernet-mem.h b/sys/mips/cavium/octe/ethernet-mem.h index 3751d99ddfd..f5fbbe22df9 100644 --- a/sys/mips/cavium/octe/ethernet-mem.h +++ b/sys/mips/cavium/octe/ethernet-mem.h @@ -4,7 +4,6 @@ SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2003-2007 Cavium Networks (support@cavium.com). All rights reserved. - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -32,4 +31,3 @@ AND WITH ALL FAULTS AND CAVIUM NETWORKS MAKES NO PROMISES, REPRESENTATIONS OR W int cvm_oct_mem_fill_fpa(int pool, int size, int elements); void cvm_oct_mem_empty_fpa(int pool, int size, int elements); - diff --git a/sys/mips/cavium/octe/ethernet-rgmii.c b/sys/mips/cavium/octe/ethernet-rgmii.c index 530d8af8642..b098a9c9c39 100644 --- a/sys/mips/cavium/octe/ethernet-rgmii.c +++ b/sys/mips/cavium/octe/ethernet-rgmii.c @@ -4,7 +4,6 @@ SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2003-2007 Cavium Networks (support@cavium.com). All rights reserved. - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -71,11 +70,9 @@ static void cvm_oct_rgmii_poll(struct ifnet *ifp) link_info = cvmx_helper_link_get(priv->port); if (link_info.u64 == priv->link_info) { - /* If the 10Mbps preamble workaround is supported and we're at 10Mbps we may need to do some special checking */ if (USE_10MBPS_PREAMBLE_WORKAROUND && (link_info.s.speed == 10)) { - /* Read the GMXX_RXX_INT_REG[PCTERR] bit and see if we are getting preamble errors */ int interface = INTERFACE(priv->port); @@ -83,7 +80,6 @@ static void cvm_oct_rgmii_poll(struct ifnet *ifp) cvmx_gmxx_rxx_int_reg_t gmxx_rxx_int_reg; gmxx_rxx_int_reg.u64 = cvmx_read_csr(CVMX_GMXX_RXX_INT_REG(index, interface)); if (gmxx_rxx_int_reg.s.pcterr) { - /* We are getting preamble errors at 10Mbps. Most likely the PHY is giving us packets with mis aligned preambles. In order to get @@ -116,7 +112,6 @@ static void cvm_oct_rgmii_poll(struct ifnet *ifp) every speed change. If errors occur during 10Mbps operation the above code will change this stuff */ if (USE_10MBPS_PREAMBLE_WORKAROUND) { - cvmx_gmxx_rxx_frm_ctl_t gmxx_rxx_frm_ctl; cvmx_ipd_sub_port_fcs_t ipd_sub_port_fcs; cvmx_gmxx_rxx_int_reg_t gmxx_rxx_int_reg; @@ -144,7 +139,6 @@ static void cvm_oct_rgmii_poll(struct ifnet *ifp) mtx_unlock_spin(&global_register_lock); } - static int cvm_oct_rgmii_rml_interrupt(void *dev_id) { cvmx_npi_rsl_int_blocks_t rsl_int_blocks; @@ -155,18 +149,15 @@ static int cvm_oct_rgmii_rml_interrupt(void *dev_id) /* Check and see if this interrupt was caused by the GMX0 block */ if (rsl_int_blocks.s.gmx0) { - int interface = 0; /* Loop through every port of this interface */ for (index = 0; index < cvmx_helper_ports_on_interface(interface); index++) { - /* Read the GMX interrupt status bits */ cvmx_gmxx_rxx_int_reg_t gmx_rx_int_reg; gmx_rx_int_reg.u64 = cvmx_read_csr(CVMX_GMXX_RXX_INT_REG(index, interface)); gmx_rx_int_reg.u64 &= cvmx_read_csr(CVMX_GMXX_RXX_INT_EN(index, interface)); /* Poll the port if inband status changed */ if (gmx_rx_int_reg.s.phy_dupx || gmx_rx_int_reg.s.phy_link || gmx_rx_int_reg.s.phy_spd) { - struct ifnet *ifp = cvm_oct_device[cvmx_helper_get_ipd_port(interface, index)]; if (ifp) cvm_oct_rgmii_poll(ifp); @@ -182,18 +173,15 @@ static int cvm_oct_rgmii_rml_interrupt(void *dev_id) /* Check and see if this interrupt was caused by the GMX1 block */ if (rsl_int_blocks.s.gmx1) { - int interface = 1; /* Loop through every port of this interface */ for (index = 0; index < cvmx_helper_ports_on_interface(interface); index++) { - /* Read the GMX interrupt status bits */ cvmx_gmxx_rxx_int_reg_t gmx_rx_int_reg; gmx_rx_int_reg.u64 = cvmx_read_csr(CVMX_GMXX_RXX_INT_REG(index, interface)); gmx_rx_int_reg.u64 &= cvmx_read_csr(CVMX_GMXX_RXX_INT_EN(index, interface)); /* Poll the port if inband status changed */ if (gmx_rx_int_reg.s.phy_dupx || gmx_rx_int_reg.s.phy_link || gmx_rx_int_reg.s.phy_spd) { - struct ifnet *ifp = cvm_oct_device[cvmx_helper_get_ipd_port(interface, index)]; if (ifp) cvm_oct_rgmii_poll(ifp); @@ -209,7 +197,6 @@ static int cvm_oct_rgmii_rml_interrupt(void *dev_id) return return_status; } - int cvm_oct_rgmii_init(struct ifnet *ifp) { struct octebus_softc *sc; @@ -257,9 +244,7 @@ int cvm_oct_rgmii_init(struct ifnet *ifp) a RGMII port */ if (((priv->imode == CVMX_HELPER_INTERFACE_MODE_GMII) && (priv->port == 0)) || (priv->imode == CVMX_HELPER_INTERFACE_MODE_RGMII)) { - if (cvmx_sysinfo_get()->board_type != CVMX_BOARD_TYPE_SIM) { - cvmx_gmxx_rxx_int_en_t gmx_rx_int_en; int interface = INTERFACE(priv->port); int index = INDEX(priv->port); @@ -286,9 +271,7 @@ void cvm_oct_rgmii_uninit(struct ifnet *ifp) a RGMII port */ if (((priv->imode == CVMX_HELPER_INTERFACE_MODE_GMII) && (priv->port == 0)) || (priv->imode == CVMX_HELPER_INTERFACE_MODE_RGMII)) { - if (cvmx_sysinfo_get()->board_type != CVMX_BOARD_TYPE_SIM) { - cvmx_gmxx_rxx_int_en_t gmx_rx_int_en; int interface = INTERFACE(priv->port); int index = INDEX(priv->port); @@ -307,4 +290,3 @@ void cvm_oct_rgmii_uninit(struct ifnet *ifp) if (number_rgmii_ports == 0) panic("%s: need to implement IRQ release.", __func__); } - diff --git a/sys/mips/cavium/octe/ethernet-rx.c b/sys/mips/cavium/octe/ethernet-rx.c index 159f529e5e6..5f89c964809 100644 --- a/sys/mips/cavium/octe/ethernet-rx.c +++ b/sys/mips/cavium/octe/ethernet-rx.c @@ -4,7 +4,6 @@ SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2003-2007 Cavium Networks (support@cavium.com). All rights reserved. - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -82,7 +81,6 @@ int cvm_oct_do_interrupt(void *dev_id) return FILTER_HANDLED; } - /** * This is called on receive errors, and determines if the packet * can be dropped early-on in cvm_oct_tasklet_rx(). @@ -98,7 +96,6 @@ static inline int cvm_oct_check_rcv_error(cvmx_wqe_t *work) Note these packets still get counted as frame errors. */ } else if (USE_10MBPS_PREAMBLE_WORKAROUND && ((work->word2.snoip.err_code == 5) || (work->word2.snoip.err_code == 7))) { - /* We received a packet with either an alignment error or a FCS error. This may be signalling that we are running 10Mbps with GMXX_RXX_FRM_CTL[PRE_CHK} off. If this is the @@ -109,7 +106,6 @@ static inline int cvm_oct_check_rcv_error(cvmx_wqe_t *work) cvmx_gmxx_rxx_frm_ctl_t gmxx_rxx_frm_ctl; gmxx_rxx_frm_ctl.u64 = cvmx_read_csr(CVMX_GMXX_RXX_FRM_CTL(index, interface)); if (gmxx_rxx_frm_ctl.s.pre_chk == 0) { - uint8_t *ptr = cvmx_phys_to_ptr(work->packet_ptr.s.addr); int i = 0; @@ -201,7 +197,6 @@ void cvm_oct_tasklet_rx(void *context, int pending) CVMX_PREFETCH(cvm_oct_device[work->word1.cn38xx.ipprt], 0); //CVMX_PREFETCH(m, 0); - rx_count++; /* Immediately throw away all packets with receive errors */ if ((work->word2.snoip.rcv_error)) { @@ -224,7 +219,6 @@ void cvm_oct_tasklet_rx(void *context, int pending) */ m->m_data += (work->packet_ptr.s.back << 7) + (work->packet_ptr.s.addr & 0x7f); } else { - /* We have to copy the packet. First allocate an mbuf for it */ MGETHDR(m, M_NOWAIT, MT_DATA); @@ -362,8 +356,6 @@ void cvm_oct_tasklet_rx(void *context, int pending) } } - - void cvm_oct_rx_initialize(void) { int cpu; @@ -385,4 +377,3 @@ void cvm_oct_rx_shutdown(void) { panic("%s: not yet implemented.", __func__); } - diff --git a/sys/mips/cavium/octe/ethernet-rx.h b/sys/mips/cavium/octe/ethernet-rx.h index 04952ccc6da..79d5c4a61fd 100644 --- a/sys/mips/cavium/octe/ethernet-rx.h +++ b/sys/mips/cavium/octe/ethernet-rx.h @@ -4,7 +4,6 @@ SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2003-2007 Cavium Networks (support@cavium.com). All rights reserved. - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -36,4 +35,3 @@ void cvm_oct_tasklet_rx(void *context, int pending); void cvm_oct_rx_initialize(void); void cvm_oct_rx_shutdown(void); - diff --git a/sys/mips/cavium/octe/ethernet-sgmii.c b/sys/mips/cavium/octe/ethernet-sgmii.c index 4f9e24e0079..6643c2127b5 100644 --- a/sys/mips/cavium/octe/ethernet-sgmii.c +++ b/sys/mips/cavium/octe/ethernet-sgmii.c @@ -4,7 +4,6 @@ SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2003-2007 Cavium Networks (support@cavium.com). All rights reserved. - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/sys/mips/cavium/octe/ethernet-spi.c b/sys/mips/cavium/octe/ethernet-spi.c index 6296481a733..56a6c83e8f8 100644 --- a/sys/mips/cavium/octe/ethernet-spi.c +++ b/sys/mips/cavium/octe/ethernet-spi.c @@ -4,7 +4,6 @@ SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2003-2007 Cavium Networks (support@cavium.com). All rights reserved. - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -68,7 +67,6 @@ static int cvm_oct_spi_rml_interrupt(void *dev_id) spx_int_reg.u64 = cvmx_read_csr(CVMX_SPXX_INT_REG(1)); cvmx_write_csr(CVMX_SPXX_INT_REG(1), spx_int_reg.u64); if (!need_retrain[1]) { - spx_int_reg.u64 &= cvmx_read_csr(CVMX_SPXX_INT_MSK(1)); if (spx_int_reg.s.spf) printf("SPI1: SRX Spi4 interface down\n"); @@ -97,7 +95,6 @@ static int cvm_oct_spi_rml_interrupt(void *dev_id) stx_int_reg.u64 = cvmx_read_csr(CVMX_STXX_INT_REG(1)); cvmx_write_csr(CVMX_STXX_INT_REG(1), stx_int_reg.u64); if (!need_retrain[1]) { - stx_int_reg.u64 &= cvmx_read_csr(CVMX_STXX_INT_MSK(1)); if (stx_int_reg.s.syncerr) printf("SPI1: STX Interface encountered a fatal error\n"); @@ -132,7 +129,6 @@ static int cvm_oct_spi_rml_interrupt(void *dev_id) spx_int_reg.u64 = cvmx_read_csr(CVMX_SPXX_INT_REG(0)); cvmx_write_csr(CVMX_SPXX_INT_REG(0), spx_int_reg.u64); if (!need_retrain[0]) { - spx_int_reg.u64 &= cvmx_read_csr(CVMX_SPXX_INT_MSK(0)); if (spx_int_reg.s.spf) printf("SPI0: SRX Spi4 interface down\n"); @@ -161,7 +157,6 @@ static int cvm_oct_spi_rml_interrupt(void *dev_id) stx_int_reg.u64 = cvmx_read_csr(CVMX_STXX_INT_REG(0)); cvmx_write_csr(CVMX_STXX_INT_REG(0), stx_int_reg.u64); if (!need_retrain[0]) { - stx_int_reg.u64 &= cvmx_read_csr(CVMX_STXX_INT_MSK(0)); if (stx_int_reg.s.syncerr) printf("SPI0: STX Interface encountered a fatal error\n"); @@ -229,9 +224,7 @@ static void cvm_oct_spi_poll(struct ifnet *ifp) int interface; for (interface = 0; interface < 2; interface++) { - if ((priv->port == interface*16) && need_retrain[interface]) { - if (cvmx_spi_restart_interface(interface, CVMX_SPI_MODE_DUPLEX, 10) == 0) { need_retrain[interface] = 0; cvm_oct_spi_enable_error_reporting(interface); @@ -256,7 +249,6 @@ static void cvm_oct_spi_poll(struct ifnet *ifp) } } - int cvm_oct_spi_init(struct ifnet *ifp) { struct octebus_softc *sc; diff --git a/sys/mips/cavium/octe/ethernet-tx.c b/sys/mips/cavium/octe/ethernet-tx.c index a444aef3652..0b05b4522e3 100644 --- a/sys/mips/cavium/octe/ethernet-tx.c +++ b/sys/mips/cavium/octe/ethernet-tx.c @@ -4,7 +4,6 @@ SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2003-2007 Cavium Networks (support@cavium.com). All rights reserved. - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -57,7 +56,6 @@ __FBSDID("$FreeBSD$"); #define GET_MBUF_QOS(m) 0 #endif - /** * Packet transmit * @@ -257,7 +255,6 @@ int cvm_oct_xmit(struct mbuf *m, struct ifnet *ifp) return dropped; } - /** * This function frees all mbufs that are currenty queued for TX. * diff --git a/sys/mips/cavium/octe/ethernet-tx.h b/sys/mips/cavium/octe/ethernet-tx.h index 749c30f83b1..4a8ad9064b2 100644 --- a/sys/mips/cavium/octe/ethernet-tx.h +++ b/sys/mips/cavium/octe/ethernet-tx.h @@ -4,7 +4,6 @@ Copyright (c) 2003-2007 Cavium Networks (support@cavium.com). All rights reserved. - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -32,4 +31,3 @@ AND WITH ALL FAULTS AND CAVIUM NETWORKS MAKES NO PROMISES, REPRESENTATIONS OR W int cvm_oct_xmit(struct mbuf *m, struct ifnet *ifp); void cvm_oct_tx_shutdown(struct ifnet *ifp); - diff --git a/sys/mips/cavium/octe/ethernet-util.h b/sys/mips/cavium/octe/ethernet-util.h index add5f891883..2c6c280a15b 100644 --- a/sys/mips/cavium/octe/ethernet-util.h +++ b/sys/mips/cavium/octe/ethernet-util.h @@ -4,7 +4,6 @@ SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2003-2007 Cavium Networks (support@cavium.com). All rights reserved. - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -44,7 +43,6 @@ static inline char *cvm_oct_get_buffer_ptr(cvmx_buf_ptr_t packet_ptr) return cvmx_phys_to_ptr(((packet_ptr.s.addr >> 7) - packet_ptr.s.back) << 7); } - /** * Given an IPD/PKO port number, return the logical interface it is * on. @@ -67,7 +65,6 @@ static inline int INTERFACE(int ipd_port) panic("Illegal ipd_port %d passed to INTERFACE\n", ipd_port); } - /** * Given an IPD/PKO port number, return the port's index on a * logical interface. @@ -83,4 +80,3 @@ static inline int INDEX(int ipd_port) else return ipd_port & 3; } - diff --git a/sys/mips/cavium/octe/ethernet-xaui.c b/sys/mips/cavium/octe/ethernet-xaui.c index 6e5a28df138..e4c086e6c29 100644 --- a/sys/mips/cavium/octe/ethernet-xaui.c +++ b/sys/mips/cavium/octe/ethernet-xaui.c @@ -4,7 +4,6 @@ SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2003-2007 Cavium Networks (support@cavium.com). All rights reserved. - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/sys/mips/cavium/octe/ethernet.c b/sys/mips/cavium/octe/ethernet.c index bc6dfb43e4b..50b69a128d7 100644 --- a/sys/mips/cavium/octe/ethernet.c +++ b/sys/mips/cavium/octe/ethernet.c @@ -4,7 +4,6 @@ SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2003-2007 Cavium Networks (support@cavium.com). All rights reserved. - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -251,7 +250,6 @@ static void cvm_oct_configure_common_hw(device_t bus) return; } - #ifdef SMP { cvmx_ciu_intx0_t en; @@ -269,7 +267,6 @@ static void cvm_oct_configure_common_hw(device_t bus) #endif } - /** * Free a work queue entry received in a intercept callback. * @@ -295,7 +292,6 @@ int cvm_oct_free_work(void *work_queue_entry) return 0; } - /** * Module/ driver initialization. Creates the linux network * devices. @@ -379,7 +375,6 @@ int cvm_oct_init_module(device_t bus) TASK_INIT(&priv->link_task, 0, cvm_oct_update_link, priv); switch (priv->imode) { - /* These types don't support ports to IPD/PKO */ case CVMX_HELPER_INTERFACE_MODE_DISABLED: case CVMX_HELPER_INTERFACE_MODE_PCIE: @@ -463,7 +458,6 @@ int cvm_oct_init_module(device_t bus) return 0; } - /** * Module / driver shutdown * diff --git a/sys/mips/cavium/octe/mv88e61xxphy.c b/sys/mips/cavium/octe/mv88e61xxphy.c index 14282a771f6..ff03bb8f0e0 100644 --- a/sys/mips/cavium/octe/mv88e61xxphy.c +++ b/sys/mips/cavium/octe/mv88e61xxphy.c @@ -617,7 +617,6 @@ static device_method_t mv88e61xxphy_methods[] = { DEVMETHOD(device_attach, mv88e61xxphy_attach), DEVMETHOD(device_detach, bus_generic_detach), DEVMETHOD(device_shutdown, bus_generic_shutdown), - { 0, 0 } }; diff --git a/sys/mips/cavium/octe/octe.c b/sys/mips/cavium/octe/octe.c index 05c60e7852d..229b096b8f3 100644 --- a/sys/mips/cavium/octe/octe.c +++ b/sys/mips/cavium/octe/octe.c @@ -112,7 +112,6 @@ static device_method_t octe_methods[] = { /* MII interface */ DEVMETHOD(miibus_readreg, octe_miibus_readreg), DEVMETHOD(miibus_writereg, octe_miibus_writereg), - { 0, 0 } }; @@ -454,7 +453,7 @@ octe_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) } priv->if_flags = ifp->if_flags; return (0); - + case SIOCSIFCAP: /* * Just change the capabilities in software, currently none @@ -483,7 +482,7 @@ octe_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) if (error != 0) return (error); return (0); - + default: error = ether_ioctl(ifp, cmd, data); if (error != 0) diff --git a/sys/mips/cavium/octe/octebus.c b/sys/mips/cavium/octe/octebus.c index 41e6fcd6493..d344593ebee 100644 --- a/sys/mips/cavium/octe/octebus.c +++ b/sys/mips/cavium/octe/octebus.c @@ -66,7 +66,6 @@ static device_method_t octebus_methods[] = { /* Bus interface. */ DEVMETHOD(bus_add_child, bus_generic_add_child), - { 0, 0 } }; diff --git a/sys/mips/cavium/octe/wrapper-cvmx-includes.h b/sys/mips/cavium/octe/wrapper-cvmx-includes.h index 3f5bf7c3361..a103f885446 100644 --- a/sys/mips/cavium/octe/wrapper-cvmx-includes.h +++ b/sys/mips/cavium/octe/wrapper-cvmx-includes.h @@ -4,7 +4,6 @@ SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2003-2007 Cavium Networks (support@cavium.com). All rights reserved. - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/sys/mips/cavium/octeon_ds1337.c b/sys/mips/cavium/octeon_ds1337.c index 349ed7a783d..888730d1835 100644 --- a/sys/mips/cavium/octeon_ds1337.c +++ b/sys/mips/cavium/octeon_ds1337.c @@ -38,11 +38,6 @@ * ***********************license end**************************************/ - - - - - /** * @file * @@ -103,7 +98,6 @@ uint32_t cvmx_rtc_ds1337_read(void) struct clocktime ct; struct timespec ts; - memset(®, 0, sizeof(reg)); memset(&ct, 0, sizeof(ct)); diff --git a/sys/mips/cavium/octeon_ebt3000_cf.c b/sys/mips/cavium/octeon_ebt3000_cf.c index 0faf05ce26b..5f733e99861 100644 --- a/sys/mips/cavium/octeon_ebt3000_cf.c +++ b/sys/mips/cavium/octeon_ebt3000_cf.c @@ -192,7 +192,6 @@ static int cf_send_cmd(uint32_t, uint8_t); /* Miscelenous */ static void cf_swap_ascii(unsigned char[], char[]); - /* ------------------------------------------------------------------- * * cf_access() * * ------------------------------------------------------------------- */ @@ -201,7 +200,6 @@ static int cf_access (struct g_provider *pp, int r, int w, int e) return (0); } - /* ------------------------------------------------------------------- * * cf_start() * * ------------------------------------------------------------------- */ @@ -251,13 +249,11 @@ static void cf_start (struct bio *bp) g_io_deliver(bp, 0); } - static int cf_ioctl (struct g_provider *pp, u_long cmd, void *data, int fflag, struct thread *td) { return (0); } - static uint8_t cf_inb_8(int port) { /* @@ -367,7 +363,6 @@ static int cf_cmd_read (uint32_t nr_sectors, uint32_t start_sector, void *buf) return (0); } - /* ------------------------------------------------------------------- * * cf_cmd_write() * * ------------------------------------------------------------------- * @@ -381,7 +376,7 @@ static int cf_cmd_write (uint32_t nr_sectors, uint32_t start_sector, void *buf) uint16_t *ptr_16; uint8_t *ptr_8; int error; - + lba = start_sector; ptr_8 = (uint8_t*)buf; ptr_16 = (uint16_t*)buf; @@ -419,7 +414,6 @@ static int cf_cmd_write (uint32_t nr_sectors, uint32_t start_sector, void *buf) return (0); } - /* ------------------------------------------------------------------- * * cf_cmd_identify() * * ------------------------------------------------------------------- * @@ -476,7 +470,6 @@ static int cf_cmd_identify(struct cf_priv *cf_priv) return (0); } - /* ------------------------------------------------------------------- * * cf_send_cmd() * * ------------------------------------------------------------------- * @@ -586,7 +579,6 @@ static void cf_swap_ascii (unsigned char str1[], char str2[]) str2[i] = str1[i ^ 1]; } - /* ------------------------------------------------------------------- * * cf_probe() * * ------------------------------------------------------------------- */ @@ -620,7 +612,7 @@ static void cf_identify (driver_t *drv, device_t parent) int count = 0; cvmx_mio_boot_reg_cfgx_t cfg; uint64_t phys_base; - + if (cvmx_sysinfo_get()->board_type == CVMX_BOARD_TYPE_SIM) return; @@ -672,7 +664,6 @@ static void cf_identify (driver_t *drv, device_t parent) BUS_ADD_CHILD(parent, 0, "cf", 0); } - /* ------------------------------------------------------------------- * * cf_attach_geom() * * ------------------------------------------------------------------- */ @@ -718,7 +709,6 @@ static int cf_attach (device_t dev) return 0; } - static device_method_t cf_methods[] = { /* Device interface */ DEVMETHOD(device_probe, cf_probe), @@ -726,7 +716,6 @@ static device_method_t cf_methods[] = { DEVMETHOD(device_attach, cf_attach), DEVMETHOD(device_detach, bus_generic_detach), DEVMETHOD(device_shutdown, bus_generic_shutdown), - { 0, 0 } }; diff --git a/sys/mips/cavium/octeon_gpio.c b/sys/mips/cavium/octeon_gpio.c index 65a990ad7f4..65ce92b99e4 100644 --- a/sys/mips/cavium/octeon_gpio.c +++ b/sys/mips/cavium/octeon_gpio.c @@ -322,7 +322,7 @@ octeon_gpio_filter(void *arg) void **cookie = arg; struct octeon_gpio_softc *sc = *cookie; long int irq = (cookie - sc->gpio_intr_cookies); - + if ((irq < 0) || (irq >= OCTEON_GPIO_IRQS)) return (FILTER_STRAY); @@ -383,7 +383,7 @@ octeon_gpio_attach(device_t dev) struct octeon_gpio_softc *sc = device_get_softc(dev); struct octeon_gpio_pin *pinp; cvmx_gpio_bit_cfgx_t gpio_cfgx; - + int i; KASSERT((device_get_unit(dev) == 0), diff --git a/sys/mips/cavium/octeon_machdep.c b/sys/mips/cavium/octeon_machdep.c index 6fb24aee384..3f9ab64347c 100644 --- a/sys/mips/cavium/octeon_machdep.c +++ b/sys/mips/cavium/octeon_machdep.c @@ -342,7 +342,6 @@ platform_start(__register_t a0, __register_t a1, __register_t a2 __unused, cvmx_sysinfo_get()->mac_addr_base, ":", cvmx_sysinfo_get()->mac_addr_count); - octeon_ciu_reset(); /* * Convert U-Boot 'bootoctlinux' loader command line arguments into diff --git a/sys/mips/cavium/octeon_rnd.c b/sys/mips/cavium/octeon_rnd.c index 9df4539ebba..95b8efa3f28 100644 --- a/sys/mips/cavium/octeon_rnd.c +++ b/sys/mips/cavium/octeon_rnd.c @@ -63,7 +63,6 @@ static device_method_t octeon_rnd_methods[] = { DEVMETHOD(device_probe, octeon_rnd_probe), DEVMETHOD(device_attach, octeon_rnd_attach), DEVMETHOD(device_detach, octeon_rnd_detach), - { 0, 0 } }; diff --git a/sys/mips/cavium/octeon_rtc.c b/sys/mips/cavium/octeon_rtc.c index bd4a9088c5c..052694102f6 100644 --- a/sys/mips/cavium/octeon_rtc.c +++ b/sys/mips/cavium/octeon_rtc.c @@ -58,7 +58,6 @@ static device_method_t octeon_rtc_methods[] = { /* clock interface */ DEVMETHOD(clock_gettime, octeon_rtc_gettime), DEVMETHOD(clock_settime, octeon_rtc_settime), - { 0, 0 } }; diff --git a/sys/mips/cavium/octopci.c b/sys/mips/cavium/octopci.c index e2b1e5cfd31..570f1682cca 100644 --- a/sys/mips/cavium/octopci.c +++ b/sys/mips/cavium/octopci.c @@ -216,7 +216,7 @@ static int octopci_read_ivar(device_t dev, device_t child, int which, uintptr_t *result) { struct octopci_softc *sc; - + sc = device_get_softc(dev); switch (which) { diff --git a/sys/mips/cavium/octopci_bus_space.c b/sys/mips/cavium/octopci_bus_space.c index 3fc54978012..c6bdc384cfb 100644 --- a/sys/mips/cavium/octopci_bus_space.c +++ b/sys/mips/cavium/octopci_bus_space.c @@ -258,7 +258,6 @@ octopci_bs_r_4(void *t, bus_space_handle_t handle, return (rd32(handle + offset)); } - void octopci_bs_rm_1(void *t, bus_space_handle_t bsh, bus_size_t offset, uint8_t *addr, size_t count) @@ -288,7 +287,6 @@ octopci_bs_rm_4(void *t, bus_space_handle_t bsh, *addr++ = rd32(baddr); } - /* * Read `count' 1, 2, 4, or 8 byte quantities from bus space * described by tag/handle and starting at `offset' and copy into diff --git a/sys/mips/cavium/octopcireg.h b/sys/mips/cavium/octopcireg.h index e053ef80c20..5cfe2e4a27f 100644 --- a/sys/mips/cavium/octopcireg.h +++ b/sys/mips/cavium/octopcireg.h @@ -90,7 +90,6 @@ typedef union } s; } octeon_pci_io_space_address_t; - #define CVMX_OCT_SUBDID_PCI_CFG 1 #define CVMX_OCT_SUBDID_PCI_IO 2 #define CVMX_OCT_SUBDID_PCI_MEM1 3 diff --git a/sys/mips/cavium/uart_dev_oct16550.c b/sys/mips/cavium/uart_dev_oct16550.c index 2c3772a3ede..c95706a907f 100644 --- a/sys/mips/cavium/uart_dev_oct16550.c +++ b/sys/mips/cavium/uart_dev_oct16550.c @@ -55,7 +55,6 @@ * */ - #include __FBSDID("$FreeBSD$"); @@ -121,7 +120,7 @@ oct16550_delay (struct uart_bas *bas) uart_barrier(bas); uart_setreg(bas, REG_LCR, lcr); uart_barrier(bas); - + if(!bas->rclk) return 10; /* return an approx delay value */ @@ -598,7 +597,6 @@ oct16550_bus_ioctl (struct uart_softc *sc, int request, intptr_t data) return (error); } - static int oct16550_bus_ipend(struct uart_softc *sc) { @@ -611,7 +609,6 @@ oct16550_bus_ipend(struct uart_softc *sc) iir = uart_getreg(bas, REG_IIR) & IIR_IMASK; if (iir != IIR_NOPEND) { - if (iir == IIR_RLS) { lsr = uart_getreg(bas, REG_LSR); if (lsr & LSR_OE) @@ -699,7 +696,6 @@ oct16550_bus_probe (struct uart_softc *sc) sc->sc_txfifosz = 1; #endif - #if 0 /* * XXX there are some issues related to hardware flow control and diff --git a/sys/mips/cavium/usb/octusb.c b/sys/mips/cavium/usb/octusb.c index c17fc46fe9d..5c9d123facc 100644 --- a/sys/mips/cavium/usb/octusb.c +++ b/sys/mips/cavium/usb/octusb.c @@ -293,7 +293,6 @@ octusb_host_control_header_tx(struct octusb_td *td) } /* do control IN request */ if (td->qh->fixup_buf[0] & UE_DIR_IN) { - struct octusb_softc *sc; /* get softc */ @@ -401,7 +400,6 @@ octusb_host_control_status_tx(struct octusb_td *td) } /* do control IN request */ if (!(td->qh->fixup_buf[0] & UE_DIR_IN)) { - struct octusb_softc *sc; /* get softc */ @@ -547,7 +545,6 @@ octusb_non_control_data_rx(struct octusb_td *td) got_short = 0; if (td->qh->fixup_complete != 0) { - /* invalidate data */ usb_pc_cpu_invalidate(td->qh->fixup_pc); @@ -769,7 +766,6 @@ octusb_standard_done(struct usb_xfer *xfer) xfer->td_transfer_cache = xfer->td_transfer_first; if (xfer->flags_int.control_xfr) { - if (xfer->flags_int.control_hdr) error = octusb_standard_done_sub(xfer); @@ -779,7 +775,6 @@ octusb_standard_done(struct usb_xfer *xfer) goto done; } while (xfer->aframes != xfer->nframes) { - error = octusb_standard_done_sub(xfer); xfer->aframes++; @@ -832,7 +827,6 @@ octusb_start_standard_chain(struct usb_xfer *xfer) /* poll one time */ if (octusb_xfer_do_fifo(xfer)) { - /* put transfer on interrupt queue */ usbd_transfer_enqueue(&xfer->xroot->bus->intr_q, xfer); @@ -1019,9 +1013,7 @@ octusb_setup_standard_chain(struct usb_xfer *xfer) /* check if we should prepend a setup message */ if (xfer->flags_int.control_xfr) { - if (xfer->flags_int.control_hdr) { - temp.func = &octusb_host_control_header_tx; temp.len = xfer->frlengths[0]; temp.pc = xfer->frbuffers + 0; @@ -1060,7 +1052,6 @@ octusb_setup_standard_chain(struct usb_xfer *xfer) temp.pc = xfer->frbuffers + x; } while (x != xfer->nframes) { - /* DATA0 or DATA1 message */ temp.len = xfer->frlengths[x]; @@ -1077,13 +1068,11 @@ octusb_setup_standard_chain(struct usb_xfer *xfer) } } if (temp.len == 0) { - /* make sure that we send an USB packet */ temp.short_pkt = 0; } else { - /* regular data transfer */ temp.short_pkt = (xfer->flags.force_short_xfer) ? 0 : 1; @@ -1104,7 +1093,6 @@ octusb_setup_standard_chain(struct usb_xfer *xfer) if (xfer->flags_int.control_xfr && !xfer->flags_int.control_act) { - temp.func = &octusb_host_control_status_tx; temp.len = 0; temp.pc = NULL; diff --git a/sys/mips/cavium/usb/octusb.h b/sys/mips/cavium/usb/octusb.h index b5846536bf4..4844d03fdc1 100644 --- a/sys/mips/cavium/usb/octusb.h +++ b/sys/mips/cavium/usb/octusb.h @@ -58,7 +58,6 @@ struct octusb_td { }; struct octusb_qh { - uint64_t fixup_phys; struct octusb_softc *sc; @@ -110,7 +109,6 @@ struct octusb_port { }; struct octusb_softc { - struct usb_bus sc_bus; /* base device */ union octusb_hub_desc sc_hub_desc; diff --git a/sys/mips/cavium/usb/octusb_octeon.c b/sys/mips/cavium/usb/octusb_octeon.c index 13370bb6c28..41d02e6dcad 100644 --- a/sys/mips/cavium/usb/octusb_octeon.c +++ b/sys/mips/cavium/usb/octusb_octeon.c @@ -143,7 +143,6 @@ octusb_octeon_attach(device_t dev) } device_set_ivars(sc->sc_dci.sc_bus.bdev, &sc->sc_dci.sc_bus); - err = octusb_init(&sc->sc_dci); if (!err) { err = device_probe_and_attach(sc->sc_dci.sc_bus.bdev); diff --git a/sys/mips/include/bus.h b/sys/mips/include/bus.h index 9a3de385f9e..b1b9cb819ae 100644 --- a/sys/mips/include/bus.h +++ b/sys/mips/include/bus.h @@ -236,7 +236,6 @@ struct bus_space { bus_size_t, const u_int64_t *, bus_size_t); }; - /* * Utility macros; INTERNAL USE ONLY. */ @@ -262,7 +261,6 @@ struct bus_space { #define __bs_nonsingle_s(type, sz, t, h, o, a, c) \ (*(t)->__bs_opname_s(type,sz))((t)->bs_cookie, h, o, a, c) - /* * Mapping and unmapping operations. */ @@ -273,7 +271,6 @@ struct bus_space { #define bus_space_subregion(t, h, o, s, hp) \ (*(t)->bs_subregion)((t)->bs_cookie, (h), (o), (s), (hp)) - /* * Allocation and deallocation operations. */ @@ -326,7 +323,6 @@ struct bus_space { #define bus_space_read_multi_stream_8(t, h, o, a, c) \ __bs_nonsingle_s(rm,8,(t),(h),(o),(a),(c)) - /* * Bus read region operations. */ @@ -348,7 +344,6 @@ struct bus_space { #define bus_space_read_region_stream_8(t, h, o, a, c) \ __bs_nonsingle_s(rr,8,(t),(h),(o),(a),(c)) - /* * Bus write (single) operations. */ @@ -362,7 +357,6 @@ struct bus_space { #define bus_space_write_stream_4(t, h, o, v) __bs_ws_s(4,(t),(h),(o),(v)) #define bus_space_write_stream_8(t, h, o, v) __bs_ws_s(8,(t),(h),(o),(v)) - /* * Bus write multiple operations. */ @@ -384,7 +378,6 @@ struct bus_space { #define bus_space_write_multi_stream_8(t, h, o, a, c) \ __bs_nonsingle_s(wm,8,(t),(h),(o),(a),(c)) - /* * Bus write region operations. */ @@ -406,7 +399,6 @@ struct bus_space { #define bus_space_write_region_stream_8(t, h, o, a, c) \ __bs_nonsingle_s(wr,8,(t),(h),(o),(a),(c)) - /* * Set multiple operations. */ @@ -419,7 +411,6 @@ struct bus_space { #define bus_space_set_multi_8(t, h, o, v, c) \ __bs_set(sm,8,(t),(h),(o),(v),(c)) - /* * Set region operations. */ @@ -432,7 +423,6 @@ struct bus_space { #define bus_space_set_region_8(t, h, o, v, c) \ __bs_set(sr,8,(t),(h),(o),(v),(c)) - /* * Copy operations. */ @@ -715,7 +705,6 @@ void __bs_c(f,_bs_c_8) (void *t, bus_space_handle_t bsh1, \ #define BUS_SPACE_MAXSIZE 0xFFFFFFFFUL #endif - #define BUS_SPACE_UNRESTRICTED (~0) /* diff --git a/sys/mips/include/cpufunc.h b/sys/mips/include/cpufunc.h index eb432e55210..a254fda2bb5 100644 --- a/sys/mips/include/cpufunc.h +++ b/sys/mips/include/cpufunc.h @@ -379,7 +379,7 @@ get_intr_mask(void) #if !defined(__mips_o32) #define readq(a) (*(volatile uint64_t *)(a)) #endif - + #define writeb(va, d) (*(volatile uint8_t *) (va) = (d)) #define writew(va, d) (*(volatile uint16_t *) (va) = (d)) #define writel(va, d) (*(volatile uint32_t *) (va) = (d)) diff --git a/sys/mips/include/cpuregs.h b/sys/mips/include/cpuregs.h index 096f322d672..c61724564a5 100644 --- a/sys/mips/include/cpuregs.h +++ b/sys/mips/include/cpuregs.h @@ -421,7 +421,6 @@ #define _(n) n #endif - #define MIPS_COP_0_TLB_INDEX _(0) #define MIPS_COP_0_TLB_RANDOM _(1) /* Name and meaning of TLB bits for $2 differ on r3k and r4k. */ @@ -498,7 +497,7 @@ #define MIPS_CONFIG0_MT_SHIFT 7 #define MIPS_CONFIG0_BE 0x00008000 /* data is big-endian */ #define MIPS_CONFIG0_VI 0x00000008 /* inst cache is virtual */ - + /* * Config1 Register Fields * (See "MIPS Architecture for Programmers Volume III", MD00091, Table 9-1) @@ -620,7 +619,6 @@ #define MIPS_FPU_FLUSH_BIT 0x01000000 /* r4k, MBZ on r3k */ #define MIPS_FPC_MBZ_BITS 0xfe7c0000 - /* * Constants to determine if have a floating point instruction. */ diff --git a/sys/mips/include/db_machdep.h b/sys/mips/include/db_machdep.h index fd11569d4b9..26e34c5ad12 100644 --- a/sys/mips/include/db_machdep.h +++ b/sys/mips/include/db_machdep.h @@ -68,7 +68,6 @@ db_addr_t next_instr_address(db_addr_t, boolean_t); } \ } while (0); - /* * Test of instructions to see class. */ diff --git a/sys/mips/include/mips_opcode.h b/sys/mips/include/mips_opcode.h index e722af81207..0a1bc726847 100644 --- a/sys/mips/include/mips_opcode.h +++ b/sys/mips/include/mips_opcode.h @@ -138,7 +138,6 @@ typedef union { #define MIPS_OPCODE(r, c) (((r & 0x07) << 3) | (c & 0x07)) - /* * Values for the 'op' field. */ diff --git a/sys/mips/include/regnum.h b/sys/mips/include/regnum.h index 20ce3c0094c..e88fe2d061e 100644 --- a/sys/mips/include/regnum.h +++ b/sys/mips/include/regnum.h @@ -126,7 +126,6 @@ #define TA3 15 #endif - /* * Index of FP registers in 'struct frame', counting from the beginning * of the frame (i.e., including the general registers). diff --git a/sys/mips/ingenic/jz4780_clk_gen.c b/sys/mips/ingenic/jz4780_clk_gen.c index 94ecd61b993..1cab3b2c539 100644 --- a/sys/mips/ingenic/jz4780_clk_gen.c +++ b/sys/mips/ingenic/jz4780_clk_gen.c @@ -290,7 +290,6 @@ jz4780_clk_gen_set_gate(struct clknode *clk, bool enable) return (0); } - int jz4780_clk_gen_register(struct clkdom *clkdom, const struct jz4780_clk_descr *descr, struct mtx *dev_mtx, struct resource *mem_res) diff --git a/sys/mips/ingenic/jz4780_clock.c b/sys/mips/ingenic/jz4780_clock.c index b4e24d4d8d5..7a6a989d5e9 100644 --- a/sys/mips/ingenic/jz4780_clock.c +++ b/sys/mips/ingenic/jz4780_clock.c @@ -451,7 +451,6 @@ jz4780_clock_register(struct jz4780_clock_softc *sc) ret = clknode_gate_register(sc->clkdom, &gatedef); if (ret != 0) return (ret); - } return (0); diff --git a/sys/mips/ingenic/jz4780_machdep.c b/sys/mips/ingenic/jz4780_machdep.c index 184e988737b..0fbaa379fdd 100644 --- a/sys/mips/ingenic/jz4780_machdep.c +++ b/sys/mips/ingenic/jz4780_machdep.c @@ -141,7 +141,6 @@ mips_init(void) #ifdef FDT if (fdt_get_mem_regions(mr, &mr_cnt, &val) == 0) { - physmem = realmem = btoc(val); KASSERT((phys_avail[0] >= mr[0].mr_start) && \ diff --git a/sys/mips/ingenic/jz4780_pdma.c b/sys/mips/ingenic/jz4780_pdma.c index 5637db93a16..874dd0f5d6a 100644 --- a/sys/mips/ingenic/jz4780_pdma.c +++ b/sys/mips/ingenic/jz4780_pdma.c @@ -451,7 +451,7 @@ pdma_channel_request(device_t dev, struct xdma_channel *xchan, struct xdma_reque chan->flags = CHAN_DESCR_RELINK; chan->cur_desc = 0; chan->req = req; - + for (i = 0; i < req->block_num; i++) { desc = &chan->desc_ring[i]; diff --git a/sys/mips/ingenic/jz4780_pinctrl.c b/sys/mips/ingenic/jz4780_pinctrl.c index c98bed08bb7..2aba95b6e86 100644 --- a/sys/mips/ingenic/jz4780_pinctrl.c +++ b/sys/mips/ingenic/jz4780_pinctrl.c @@ -240,7 +240,6 @@ done: return (result); } - static device_method_t jz4780_pinctrl_methods[] = { /* Device interface */ DEVMETHOD(device_probe, jz4780_pinctrl_probe), diff --git a/sys/mips/ingenic/jz4780_pinctrl.h b/sys/mips/ingenic/jz4780_pinctrl.h index 4aaa96e0001..b13f07e8bc1 100644 --- a/sys/mips/ingenic/jz4780_pinctrl.h +++ b/sys/mips/ingenic/jz4780_pinctrl.h @@ -29,5 +29,4 @@ #ifndef _MIPS_INGENIC_JZ4780_PINCTRL_H #define _MIPS_INGENIC_JZ4780_PINCTRL_H - #endif /* _MIPS_INGENIC_JZ4780_PINCTRL_H */ diff --git a/sys/mips/ingenic/jz4780_timer.c b/sys/mips/ingenic/jz4780_timer.c index f1d30a9a610..75f9bb2fe34 100644 --- a/sys/mips/ingenic/jz4780_timer.c +++ b/sys/mips/ingenic/jz4780_timer.c @@ -336,4 +336,3 @@ platform_initclocks(void) { } - diff --git a/sys/mips/malta/gt.c b/sys/mips/malta/gt.c index e56df251c84..fb6b0f5b344 100644 --- a/sys/mips/malta/gt.c +++ b/sys/mips/malta/gt.c @@ -72,7 +72,6 @@ gt_attach(device_t dev) bus_generic_probe(dev); bus_generic_attach(dev); - return (0); } @@ -82,7 +81,7 @@ gt_alloc_resource(device_t dev, device_t child, int type, int *rid, { return (BUS_ALLOC_RESOURCE(device_get_parent(dev), child, type, rid, start, end, count, flags)); - + } static int diff --git a/sys/mips/malta/gt_pci.c b/sys/mips/malta/gt_pci.c index a294661943b..59eeb176f3a 100644 --- a/sys/mips/malta/gt_pci.c +++ b/sys/mips/malta/gt_pci.c @@ -317,7 +317,6 @@ gt_pci_attach(device_t dev) sc->sc_ioh_icu2 = MIPS_PHYS_TO_KSEG1(sc->sc_io + IO_ICU2); #endif - /* All interrupts default to "masked off". */ sc->sc_imask = 0xffff; @@ -680,7 +679,7 @@ gt_pci_activate_resource(device_t bus, device_t child, int type, int rid, { bus_space_handle_t p; int error; - + if ((type == SYS_RES_MEMORY) || (type == SYS_RES_IOPORT)) { error = bus_space_map(rman_get_bustag(r), rman_get_bushandle(r), rman_get_size(r), 0, &p); diff --git a/sys/mips/malta/gtreg.h b/sys/mips/malta/gtreg.h index 5237409a3bb..40d4d25300a 100644 --- a/sys/mips/malta/gtreg.h +++ b/sys/mips/malta/gtreg.h @@ -34,8 +34,6 @@ * $FreeBSD$ */ - - #define GT_REGVAL(x) *((volatile u_int32_t *) \ (MIPS_PHYS_TO_KSEG1(MALTA_CORECTRL_BASE + (x)))) diff --git a/sys/mips/malta/malta_machdep.c b/sys/mips/malta/malta_machdep.c index fa750b7c056..5a3b4433230 100644 --- a/sys/mips/malta/malta_machdep.c +++ b/sys/mips/malta/malta_machdep.c @@ -134,7 +134,7 @@ static void malta_lcd_print(char *str) { int i; - + if (str == NULL) return; diff --git a/sys/mips/malta/maltareg.h b/sys/mips/malta/maltareg.h index 6b97af346bf..1b008e5891d 100644 --- a/sys/mips/malta/maltareg.h +++ b/sys/mips/malta/maltareg.h @@ -228,7 +228,6 @@ #define MALTA_SMSC_MOUSE_ADR MALTA_SMSC_KYBD_ADR #define MALTA_MOUSEADR MALTA_KYBDADR - #define MALTA_DMA_PCI_PCIBASE 0x00000000UL #define MALTA_DMA_PCI_PHYSBASE 0x00000000UL #define MALTA_DMA_PCI_SIZE (256 * 1024 * 1024) diff --git a/sys/mips/malta/obio.c b/sys/mips/malta/obio.c index 89169a86d8b..00871bb8430 100644 --- a/sys/mips/malta/obio.c +++ b/sys/mips/malta/obio.c @@ -137,7 +137,6 @@ obio_alloc_resource(device_t bus, device_t child, int type, int *rid, return (NULL); } - rv = rman_reserve_resource(rm, start, end, count, flags, child); if (rv == NULL) return (NULL); @@ -146,7 +145,7 @@ obio_alloc_resource(device_t bus, device_t child, int type, int *rid, rman_set_rid(rv, *rid); rman_set_bustag(rv, bt); rman_set_bushandle(rv, bh); - + if (0) { if (bus_activate_resource(child, type, *rid, rv)) { rman_release_resource(rv); diff --git a/sys/mips/malta/obiovar.h b/sys/mips/malta/obiovar.h index cf8ccb920d1..9f99c893d29 100644 --- a/sys/mips/malta/obiovar.h +++ b/sys/mips/malta/obiovar.h @@ -53,7 +53,7 @@ struct obio_softc { int oba_irq; /* XINT interrupt bit # */ struct rman oba_rman; struct rman oba_irq_rman; - + }; extern struct bus_space obio_bs_tag; diff --git a/sys/mips/mediatek/fdt_reset.c b/sys/mips/mediatek/fdt_reset.c index 4b99813721d..d6674e2f4d6 100644 --- a/sys/mips/mediatek/fdt_reset.c +++ b/sys/mips/mediatek/fdt_reset.c @@ -122,4 +122,3 @@ fdt_reset_unregister_provider(device_t provider) OF_device_register_xref(OF_xref_from_device(provider), NULL); } - diff --git a/sys/mips/mediatek/fdt_reset.h b/sys/mips/mediatek/fdt_reset.h index 195beaaf058..0ff1a866424 100644 --- a/sys/mips/mediatek/fdt_reset.h +++ b/sys/mips/mediatek/fdt_reset.h @@ -46,4 +46,3 @@ void fdt_reset_register_provider(device_t provider); void fdt_reset_unregister_provider(device_t provider); #endif /* DEV_FDT_RESET_H */ - diff --git a/sys/mips/mediatek/mtk_gpio_v1.c b/sys/mips/mediatek/mtk_gpio_v1.c index 632c7a744ab..2771c6610d3 100644 --- a/sys/mips/mediatek/mtk_gpio_v1.c +++ b/sys/mips/mediatek/mtk_gpio_v1.c @@ -687,7 +687,7 @@ mtk_gpio_pic_setup_intr(device_t dev, struct intr_irqsrc *isrc, if (error != 0) return (error); - + MTK_GPIO_LOCK(sc); if (mode == GPIO_INTR_EDGE_BOTH || mode == GPIO_INTR_EDGE_RISING) { val = MTK_READ_4(sc, GPIO_PIORENA) | (1u << irq); diff --git a/sys/mips/mediatek/mtk_machdep.c b/sys/mips/mediatek/mtk_machdep.c index 1c1916e4a4c..97f9f027037 100644 --- a/sys/mips/mediatek/mtk_machdep.c +++ b/sys/mips/mediatek/mtk_machdep.c @@ -297,7 +297,6 @@ platform_start(__register_t a0 __unused, __register_t a1 __unused, kern_setenv(n, arg); } - mips_init(); mips_timer_init_params(timer_clk, 0); } diff --git a/sys/mips/mediatek/mtk_pcie.c b/sys/mips/mediatek/mtk_pcie.c index 6d3aa3e2550..e6f6d3d99bf 100644 --- a/sys/mips/mediatek/mtk_pcie.c +++ b/sys/mips/mediatek/mtk_pcie.c @@ -583,7 +583,6 @@ mtk_pci_teardown_intr(device_t dev, device_t child, struct resource *ires, result = intr_event_remove_handler(cookie); if (!result) sc->sc_eventstab[irqidx] = NULL; - return (result); } diff --git a/sys/mips/mediatek/mtk_pinctrl.h b/sys/mips/mediatek/mtk_pinctrl.h index b5e3cfae28c..955de4643b1 100644 --- a/sys/mips/mediatek/mtk_pinctrl.h +++ b/sys/mips/mediatek/mtk_pinctrl.h @@ -50,7 +50,6 @@ struct mtk_pin_group { #define GROUP(_name, _reg, _off, _mask, _funcs) \ { .name = (_name), .sysc_reg = (_reg), .offset = (_off), \ .mask = (_mask), .functions = (_funcs), .funcnum = nitems(_funcs) } - #define GROUP_END { NULL, 0, 0, 0, NULL, 0 } #define DECL_FUNC(_name) \ diff --git a/sys/mips/mediatek/mtk_spi_v1.c b/sys/mips/mediatek/mtk_spi_v1.c index d27beb11e83..2c428b39481 100644 --- a/sys/mips/mediatek/mtk_spi_v1.c +++ b/sys/mips/mediatek/mtk_spi_v1.c @@ -355,11 +355,11 @@ mtk_spi_transfer(device_t dev, device_t child, struct spi_command *cmd) buf[i] = byte; } } - + /* * Transfer/Receive data */ - + if (cmd->tx_data_sz + cmd->rx_data_sz) { write = (cmd->tx_data_sz > 0)?1:0; buf = (uint8_t *)(write ? cmd->tx_data : cmd->rx_data); diff --git a/sys/mips/mediatek/mtk_spi_v2.c b/sys/mips/mediatek/mtk_spi_v2.c index 02fbd770476..8e9086343aa 100644 --- a/sys/mips/mediatek/mtk_spi_v2.c +++ b/sys/mips/mediatek/mtk_spi_v2.c @@ -297,11 +297,11 @@ mtk_spi_transfer(device_t dev, device_t child, struct spi_command *cmd) buf[i] = byte; } } - + /* * Transfer/Receive data */ - + if (cmd->tx_data_sz + cmd->rx_data_sz) { write = (cmd->tx_data_sz > 0)?1:0; buf = (uint8_t *)(write ? cmd->tx_data : cmd->rx_data); diff --git a/sys/mips/mediatek/uart_dev_mtk.c b/sys/mips/mediatek/uart_dev_mtk.c index 5993cb60777..8fcfb952c74 100644 --- a/sys/mips/mediatek/uart_dev_mtk.c +++ b/sys/mips/mediatek/uart_dev_mtk.c @@ -240,7 +240,6 @@ static struct ofw_compat_data compat_data[] = { }; UART_FDT_CLASS_AND_DEVICE(compat_data); - #define SIGCHG(c, i, s, d) \ if (c) { \ i |= (i & s) ? s : s | d; \ diff --git a/sys/mips/mips/busdma_machdep.c b/sys/mips/mips/busdma_machdep.c index 5f3a31a7343..242321f1e67 100644 --- a/sys/mips/mips/busdma_machdep.c +++ b/sys/mips/mips/busdma_machdep.c @@ -605,7 +605,6 @@ bus_dmamap_create(bus_dma_tag_t dmat, int flags, bus_dmamap_t *mapp) * an active address boundary. */ if (dmat->flags & BUS_DMA_COULD_BOUNCE) { - /* Must bounce */ struct bounce_zone *bz; int maxpages; @@ -1018,7 +1017,6 @@ _bus_dmamap_load_buffer(bus_dma_tag_t dmat, bus_dmamap_t map, void *buf, vm_offset_t vaddr = (vm_offset_t)buf; int error = 0; - if (segs == NULL) segs = dmat->segments; if ((flags & BUS_DMA_LOAD_MBUF) != 0) diff --git a/sys/mips/mips/cache_mipsNN.c b/sys/mips/mips/cache_mipsNN.c index 305b3c61c6c..2f924ed5c3c 100644 --- a/sys/mips/mips/cache_mipsNN.c +++ b/sys/mips/mips/cache_mipsNN.c @@ -699,7 +699,7 @@ mipsNN_pdcache_wbinv_range_index_64(vm_offset_t va, vm_size_t size) va += 64; } } - + void mipsNN_pdcache_inv_range_16(vm_offset_t va, vm_size_t size) { @@ -845,13 +845,11 @@ mipsNN_icache_sync_range_index_128(vm_offset_t va, vm_size_t size) { } - void mipsNN_pdcache_wbinv_all_128(void) { } - void mipsNN_pdcache_wbinv_range_128(vm_offset_t va, vm_size_t size) { @@ -987,7 +985,6 @@ mipsNN_pdcache_wbinv_all_128(void) SYNC; } - void mipsNN_pdcache_wbinv_range_128(vm_offset_t va, vm_size_t size) { diff --git a/sys/mips/mips/cpu.c b/sys/mips/mips/cpu.c index c6da1329ddb..64450d24b6f 100644 --- a/sys/mips/mips/cpu.c +++ b/sys/mips/mips/cpu.c @@ -156,7 +156,6 @@ mips_get_identity(struct mips_cpuinfo *cpuinfo) remove_userlocal_code((uint32_t *)cpu_switch_set_userlocal); } - #if defined(CPU_NLM) /* Account for Extended TLB entries in XLP */ tmp = mips_rd_config6(); @@ -496,7 +495,6 @@ static device_method_t cpu_methods[] = { DEVMETHOD(bus_alloc_resource, cpu_alloc_resource), DEVMETHOD(bus_setup_intr, cpu_setup_intr), DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), - { 0, 0 } }; diff --git a/sys/mips/mips/db_interface.c b/sys/mips/mips/db_interface.c index a9c84e30467..318dae82c7e 100644 --- a/sys/mips/mips/db_interface.c +++ b/sys/mips/mips/db_interface.c @@ -244,7 +244,6 @@ next_instr_address(db_addr_t pc, boolean_t bd) return (next); } - /* * Decode instruction and figure out type. */ diff --git a/sys/mips/mips/db_trace.c b/sys/mips/mips/db_trace.c index aad45642b9a..2bbe8494483 100644 --- a/sys/mips/mips/db_trace.c +++ b/sys/mips/mips/db_trace.c @@ -385,7 +385,6 @@ done: } } - int db_md_set_watchpoint(db_expr_t addr, db_expr_t size) { @@ -393,7 +392,6 @@ db_md_set_watchpoint(db_expr_t addr, db_expr_t size) return(0); } - int db_md_clr_watchpoint(db_expr_t addr, db_expr_t size) { @@ -401,7 +399,6 @@ db_md_clr_watchpoint(db_expr_t addr, db_expr_t size) return(0); } - void db_md_list_watchpoints() { diff --git a/sys/mips/mips/elf_trampoline.c b/sys/mips/mips/elf_trampoline.c index bd68de935fe..0794de6713d 100644 --- a/sys/mips/mips/elf_trampoline.c +++ b/sys/mips/mips/elf_trampoline.c @@ -120,7 +120,7 @@ load_kernel(void * kstart) int symtabindex = -1; int symstrindex = -1; Elf_Size tmp; - + #if ELFSIZE == 64 eh = (Elf64_Ehdr *)kstart; #else diff --git a/sys/mips/mips/gdb_machdep.c b/sys/mips/mips/gdb_machdep.c index 63ae2159151..130a78f9eb8 100644 --- a/sys/mips/mips/gdb_machdep.c +++ b/sys/mips/mips/gdb_machdep.c @@ -115,7 +115,7 @@ gdb_cpu_getreg(int regnum, size_t *regsz) register_t *zero_ptr = &kdb_frame->zero; return zero_ptr + regnum; } - + switch (regnum) { /* * S0..S7 diff --git a/sys/mips/mips/mips_pic.c b/sys/mips/mips/mips_pic.c index b53613c4018..defe29531f5 100644 --- a/sys/mips/mips/mips_pic.c +++ b/sys/mips/mips/mips_pic.c @@ -390,7 +390,6 @@ static device_method_t mips_pic_methods[] = { DEVMETHOD(pic_pre_ithread, mips_pic_pre_ithread), DEVMETHOD(pic_post_ithread, mips_pic_post_ithread), DEVMETHOD(pic_post_filter, mips_pic_post_filter), - { 0, 0 } }; @@ -610,7 +609,7 @@ mips_pic_deactivate_intr(device_t child, struct resource *r) } } intr->consumers--; - + mtx_unlock(&mips_pic_mtx); return (0); } @@ -672,7 +671,7 @@ cpu_establish_intr(struct mips_pic_softc *sc, const char *name, res = intr->res; mtx_unlock(&mips_pic_mtx); } - + if (res == NULL) { panic("Unable to allocate IRQ %d->%u resource", irq, intr->intr_irq); @@ -711,4 +710,3 @@ cpu_establish_softintr(const char *name, driver_filter_t *filt, cpu_establish_intr(pic_sc, name, filt, handler, arg, irq, flags, cookiep); } - diff --git a/sys/mips/mips/nexus.c b/sys/mips/mips/nexus.c index 3503e6d1a23..43b94e239e4 100644 --- a/sys/mips/mips/nexus.c +++ b/sys/mips/mips/nexus.c @@ -163,7 +163,6 @@ static device_method_t nexus_methods[] = { DEVMETHOD(ofw_bus_map_intr, nexus_ofw_map_intr), #endif #endif - { 0, 0 } }; diff --git a/sys/mips/mips/pm_machdep.c b/sys/mips/mips/pm_machdep.c index d211be33c0a..8d8cf4e1023 100644 --- a/sys/mips/mips/pm_machdep.c +++ b/sys/mips/mips/pm_machdep.c @@ -295,7 +295,6 @@ out: return (error); } - void makectx(struct trapframe *tf, struct pcb *pcb) { @@ -400,7 +399,6 @@ set_fpregs(struct thread *td, struct fpreg *fpregs) return 0; } - /* * Clear registers on exec * $sp is set to the stack pointer passed in. $pc is set to the entry diff --git a/sys/mips/mips/pmap.c b/sys/mips/mips/pmap.c index 14cab3a4f37..2f856783664 100644 --- a/sys/mips/mips/pmap.c +++ b/sys/mips/mips/pmap.c @@ -209,7 +209,7 @@ pmap_init_reserved_pages(void) struct pcpu *pc; vm_offset_t pages; int i; - + if (need_local_mappings == 0) return; @@ -1261,7 +1261,6 @@ retry: return (m); } - /*************************************************** * Pmap allocation/deallocation routines. ***************************************************/ @@ -1898,7 +1897,6 @@ pmap_remove(pmap_t pmap, vm_offset_t sva, vm_offset_t eva) va_fini = va_next; for (pte = pmap_pde_to_pte(pde, sva); sva != va_next; pte++, sva += PAGE_SIZE) { - /* Skip over invalid entries; no need to shootdown */ if (!pte_test(pte, PTE_V)) { /* @@ -3640,7 +3638,6 @@ pmap_kextract(vm_offset_t va) panic("%s for unknown address space %p.", __func__, (void *)va); } - void pmap_flush_pvcache(vm_page_t m) { diff --git a/sys/mips/mips/tick.c b/sys/mips/mips/tick.c index b1b6b68fce7..cdeb479e735 100644 --- a/sys/mips/mips/tick.c +++ b/sys/mips/mips/tick.c @@ -284,14 +284,13 @@ clock_intr(void *arg) DPCPU_SET(counter_lower_last, count); if (cycles_per_tick > 0) { - /* * Account for the "lost time" between when the timer interrupt * fired and when 'clock_intr' actually started executing. */ lost_ticks = DPCPU_GET(lost_ticks); lost_ticks += count - compare_last; - + /* * If the COUNT and COMPARE registers are no longer in sync * then make up some reasonable value for the 'lost_ticks'. @@ -388,7 +387,6 @@ static device_method_t clock_methods[] = { DEVMETHOD(device_attach, clock_attach), DEVMETHOD(device_detach, bus_generic_detach), DEVMETHOD(device_shutdown, bus_generic_shutdown), - {0, 0} }; diff --git a/sys/mips/mips/trap.c b/sys/mips/mips/trap.c index 6ada543577c..fcd0214e0d3 100644 --- a/sys/mips/mips/trap.c +++ b/sys/mips/mips/trap.c @@ -345,7 +345,7 @@ cpu_fetch_syscall_args(struct thread *td) locr0 = td->td_frame; sa = &td->td_sa; - + bzero(sa->args, sizeof(sa->args)); /* compute next PC after syscall instruction */ @@ -1150,7 +1150,6 @@ trapDump(char *msg) } #endif - /* * Return the resulting PC as if the branch was executed. */ @@ -1166,7 +1165,6 @@ MipsEmulateBranch(struct trapframe *framePtr, uintptr_t instPC, int fpcCSR, #define GetBranchDest(InstPtr, inst) \ (InstPtr + 4 + ((short)inst.IType.imm << 2)) - if (instptr) { if (instptr < MIPS_KSEG0_START) inst.word = fuword32((void *)instptr); @@ -1378,7 +1376,6 @@ trap_frame_dump(struct trapframe *frame) #endif - static void get_mapping_info(vm_offset_t va, pd_entry_t **pdepp, pt_entry_t **ptepp) { @@ -1519,7 +1516,6 @@ log_bad_page_fault(char *msg, struct trapframe *frame, int trap_type) (intmax_t)frame->badvaddr, (void *)(intptr_t)*pdep, (uintmax_t)(ptep ? *ptep : 0)); } - /* * Unaligned load/store emulation */ @@ -1639,7 +1635,6 @@ mips_unaligned_load_store(struct trapframe *frame, int mode, register_t addr, re panic("%s: should not be reached.", __func__); } - /* * XXX TODO: SMP? */ @@ -1666,7 +1661,6 @@ emulate_unaligned_access(struct trapframe *frame, int mode) * Fall through if it's instruction fetch exception */ if (!((pc & 3) || (pc == frame->badvaddr))) { - /* * Handle unaligned load and store */ diff --git a/sys/mips/mips/vm_machdep.c b/sys/mips/mips/vm_machdep.c index 752e77318b1..a635bace4a0 100644 --- a/sys/mips/mips/vm_machdep.c +++ b/sys/mips/mips/vm_machdep.c @@ -560,7 +560,7 @@ DB_SHOW_COMMAND(pcb, ddb_dump_pcb) td = db_lookup_thread(addr, true); else td = curthread; - + pcb = td->td_pcb; db_printf("Thread %d at %p\n", td->td_tid, td); @@ -601,7 +601,7 @@ DB_SHOW_COMMAND(pcb, ddb_dump_pcb) */ DB_SHOW_COMMAND(trapframe, ddb_dump_trapframe) { - + if (!have_addr) return; diff --git a/sys/mips/nlm/board.c b/sys/mips/nlm/board.c index bf42bca48d2..145676dd579 100644 --- a/sys/mips/nlm/board.c +++ b/sys/mips/nlm/board.c @@ -321,7 +321,6 @@ nlm_board_get_phyaddr(int block, int port, int *phyaddr) } } - static void nlm_print_processor_info(void) { diff --git a/sys/mips/nlm/bus_space_rmi.c b/sys/mips/nlm/bus_space_rmi.c index 87e0594b55e..6c194fc11ed 100644 --- a/sys/mips/nlm/bus_space_rmi.c +++ b/sys/mips/nlm/bus_space_rmi.c @@ -164,7 +164,6 @@ rmi_bus_space_write_region_4(void *t, const u_int32_t *addr, size_t count); - static void rmi_bus_space_set_region_2(void *t, bus_space_handle_t bsh, @@ -420,7 +419,6 @@ rmi_bus_space_read_4(void *tag, bus_space_handle_t handle, return (*(volatile u_int32_t *)(handle + offset)); } - /* * Read `count' 1, 2, 4, or 8 byte quantities from bus space * described by tag/handle/offset and copy into buffer provided. @@ -472,13 +470,11 @@ rmi_bus_space_write_4(void *tag, bus_space_handle_t handle, *(volatile u_int32_t *)(handle + offset) = value; } - /* * Write `count' 1, 2, 4, or 8 byte quantities from the buffer * provided to bus space described by tag/handle/offset. */ - static void rmi_bus_space_write_multi_1(void *tag, bus_space_handle_t handle, bus_size_t offset, const u_int8_t *addr, size_t count) @@ -525,7 +521,6 @@ rmi_bus_space_set_region_4(void *t, bus_space_handle_t bsh, (*(volatile u_int32_t *)(addr)) = value; } - /* * Copy `count' 1, 2, 4, or 8 byte values from bus space starting * at tag/bsh1/off1 to bus space starting at tag/bsh2/off2. @@ -551,7 +546,6 @@ rmi_bus_space_read_stream_1(void *t, bus_space_handle_t handle, return *((volatile u_int8_t *)(handle + offset)); } - static u_int16_t rmi_bus_space_read_stream_2(void *t, bus_space_handle_t handle, bus_size_t offset) @@ -559,7 +553,6 @@ rmi_bus_space_read_stream_2(void *t, bus_space_handle_t handle, return *(volatile u_int16_t *)(handle + offset); } - static u_int32_t rmi_bus_space_read_stream_4(void *t, bus_space_handle_t handle, bus_size_t offset) @@ -567,7 +560,6 @@ rmi_bus_space_read_stream_4(void *t, bus_space_handle_t handle, return (*(volatile u_int32_t *)(handle + offset)); } - static void rmi_bus_space_read_multi_stream_1(void *tag, bus_space_handle_t handle, bus_size_t offset, u_int8_t *addr, size_t count) @@ -589,7 +581,6 @@ rmi_bus_space_read_multi_stream_4(void *tag, bus_space_handle_t handle, TODO(); } - /* * Read `count' 1, 2, 4, or 8 byte quantities from bus space * described by tag/handle and starting at `offset' and copy into @@ -628,7 +619,6 @@ rmi_bus_space_write_stream_1(void *t, bus_space_handle_t handle, TODO(); } - static void rmi_bus_space_write_stream_2(void *t, bus_space_handle_t handle, bus_size_t offset, u_int16_t value) @@ -636,7 +626,6 @@ rmi_bus_space_write_stream_2(void *t, bus_space_handle_t handle, TODO(); } - static void rmi_bus_space_write_stream_4(void *t, bus_space_handle_t handle, bus_size_t offset, u_int32_t value) @@ -644,7 +633,6 @@ rmi_bus_space_write_stream_4(void *t, bus_space_handle_t handle, TODO(); } - static void rmi_bus_space_write_multi_stream_1(void *tag, bus_space_handle_t handle, bus_size_t offset, const u_int8_t *addr, size_t count) diff --git a/sys/mips/nlm/bus_space_rmi_pci.c b/sys/mips/nlm/bus_space_rmi_pci.c index 7b5f487a53c..d98b0ba5d36 100644 --- a/sys/mips/nlm/bus_space_rmi_pci.c +++ b/sys/mips/nlm/bus_space_rmi_pci.c @@ -487,7 +487,6 @@ rmi_pci_bus_space_write_2(void *tag, bus_space_handle_t handle, *(volatile u_int16_t *)(handle + offset) = bswap16(value); } - static void rmi_pci_bus_space_write_4(void *tag, bus_space_handle_t handle, bus_size_t offset, u_int32_t value) @@ -501,7 +500,6 @@ rmi_pci_bus_space_write_4(void *tag, bus_space_handle_t handle, * provided to bus space described by tag/handle/offset. */ - static void rmi_pci_bus_space_write_multi_1(void *tag, bus_space_handle_t handle, bus_size_t offset, const u_int8_t * addr, size_t count) @@ -560,7 +558,6 @@ rmi_pci_bus_space_set_region_4(void *t, bus_space_handle_t bsh, (*(volatile u_int32_t *)(addr)) = value; } - /* * Copy `count' 1, 2, 4, or 8 byte values from bus space starting * at tag/bsh1/off1 to bus space starting at tag/bsh2/off2. @@ -586,7 +583,6 @@ rmi_pci_bus_space_read_stream_1(void *t, bus_space_handle_t handle, return *((volatile u_int8_t *)(handle + offset)); } - static u_int16_t rmi_pci_bus_space_read_stream_2(void *t, bus_space_handle_t handle, bus_size_t offset) @@ -594,7 +590,6 @@ rmi_pci_bus_space_read_stream_2(void *t, bus_space_handle_t handle, return *(volatile u_int16_t *)(handle + offset); } - static u_int32_t rmi_pci_bus_space_read_stream_4(void *t, bus_space_handle_t handle, bus_size_t offset) @@ -602,7 +597,6 @@ rmi_pci_bus_space_read_stream_4(void *t, bus_space_handle_t handle, return (*(volatile u_int32_t *)(handle + offset)); } - static void rmi_pci_bus_space_read_multi_stream_1(void *tag, bus_space_handle_t handle, bus_size_t offset, u_int8_t * addr, size_t count) @@ -633,8 +627,6 @@ rmi_pci_bus_space_read_multi_stream_4(void *tag, bus_space_handle_t handle, } } - - /* * Read `count' 1, 2, 4, or 8 byte quantities from bus space * described by tag/handle and starting at `offset' and copy into @@ -676,7 +668,6 @@ rmi_pci_bus_space_read_region_4(void *t, bus_space_handle_t bsh, } } - void rmi_pci_bus_space_write_stream_1(void *t, bus_space_handle_t handle, bus_size_t offset, u_int8_t value) @@ -693,7 +684,6 @@ rmi_pci_bus_space_write_stream_2(void *t, bus_space_handle_t handle, *(volatile u_int16_t *)(handle + offset) = value; } - static void rmi_pci_bus_space_write_stream_4(void *t, bus_space_handle_t handle, bus_size_t offset, u_int32_t value) @@ -702,7 +692,6 @@ rmi_pci_bus_space_write_stream_4(void *t, bus_space_handle_t handle, *(volatile u_int32_t *)(handle + offset) = value; } - static void rmi_pci_bus_space_write_multi_stream_1(void *tag, bus_space_handle_t handle, bus_size_t offset, const u_int8_t * addr, size_t count) diff --git a/sys/mips/nlm/cms.c b/sys/mips/nlm/cms.c index 46052cd6d7e..32ee6e1c954 100644 --- a/sys/mips/nlm/cms.c +++ b/sys/mips/nlm/cms.c @@ -296,7 +296,6 @@ msgring_process_fast_intr(void *arg) msgring_wakeup_nosleep[cpu]++; } - return (FILTER_HANDLED); } diff --git a/sys/mips/nlm/dev/net/ucore/ucore.h b/sys/mips/nlm/dev/net/ucore/ucore.h index 6826656bb91..aa3512a2c12 100644 --- a/sys/mips/nlm/dev/net/ucore/ucore.h +++ b/sys/mips/nlm/dev/net/ucore/ucore.h @@ -100,7 +100,6 @@ nlm_write_ucore_##name(unsigned int v) \ nlm_write_ucore_reg(reg, v); \ } struct __hack - NLM_DEFINE_UCORE(obufdone, UCORE_OUTBUF_DONE); NLM_DEFINE_UCORE(rxpktrdy, UCORE_RX_PKT_RDY); NLM_DEFINE_UCORE(rxpktinfo, UCORE_RX_PKT_INFO); diff --git a/sys/mips/nlm/dev/net/ucore/ucore_app.c b/sys/mips/nlm/dev/net/ucore/ucore_app.c index 14ae7a32bfc..17e1e3e8b2c 100644 --- a/sys/mips/nlm/dev/net/ucore/ucore_app.c +++ b/sys/mips/nlm/dev/net/ucore/ucore_app.c @@ -36,7 +36,6 @@ int main(void) { int num_cachelines = 1518 / 64 ; /* pktsize / L3 cacheline size */ - /* Spray packets to using distribution vector */ while (1) { (void)nlm_read_ucore_rxpktrdy(); diff --git a/sys/mips/nlm/dev/net/xaui.c b/sys/mips/nlm/dev/net/xaui.c index aaf65e7483a..ac51c4cd2f4 100644 --- a/sys/mips/nlm/dev/net/xaui.c +++ b/sys/mips/nlm/dev/net/xaui.c @@ -117,7 +117,6 @@ nlm_xaui_pcs_init(uint64_t nae_base, int xaui_cplx_mask) for (lane_ctrl = PHY_LANE_0_CTRL; lane_ctrl <= PHY_LANE_3_CTRL; lane_ctrl++) { - reg = NAE_REG(block, PHY, lane_ctrl - 4); /* Wait for TX clock to be set */ do { diff --git a/sys/mips/nlm/dev/net/xlpge.c b/sys/mips/nlm/dev/net/xlpge.c index f25a9464040..e9dadf83c7e 100644 --- a/sys/mips/nlm/dev/net/xlpge.c +++ b/sys/mips/nlm/dev/net/xlpge.c @@ -903,7 +903,6 @@ fail: return (err); } - static int nlm_xlpge_gmac_config_speed(struct nlm_xlpge_softc *sc) { @@ -1005,7 +1004,6 @@ xlpge_read_mac_addr(struct nlm_xlpge_softc *sc) sc->port, sc->type, sc->dev_addr); } - static int xlpge_mediachange(struct ifnet *ifp) { diff --git a/sys/mips/nlm/dev/sec/nlmseclib.h b/sys/mips/nlm/dev/sec/nlmseclib.h index 2bbabd28066..6f4d4d487e9 100644 --- a/sys/mips/nlm/dev/sec/nlmseclib.h +++ b/sys/mips/nlm/dev/sec/nlmseclib.h @@ -47,7 +47,6 @@ #define XLP_SEC_KASUMI_F8_KEY_LENGTH 16 /* Bytes */ #define XLP_SEC_MAX_CRYPT_KEY_LENGTH XLP_SEC_AES256F8_KEY_LENGTH - #define XLP_SEC_DES_IV_LENGTH 8 /* Bytes */ #define XLP_SEC_AES_IV_LENGTH 16 /* Bytes */ #define XLP_SEC_ARC4_IV_LENGTH 0 /* Bytes */ diff --git a/sys/mips/nlm/hal/cpucontrol.h b/sys/mips/nlm/hal/cpucontrol.h index 2328bad3c2c..501b80db5fa 100644 --- a/sys/mips/nlm/hal/cpucontrol.h +++ b/sys/mips/nlm/hal/cpucontrol.h @@ -81,7 +81,6 @@ #define MMU_PGWKR_PTESHFT 0x418 #define MMU_PGWKR_PTEMASK 0x419 - #if !defined(LOCORE) && !defined(__ASSEMBLY__) #if defined(__mips_n64) || defined(__mips_n32) static __inline uint64_t diff --git a/sys/mips/nlm/hal/mmu.h b/sys/mips/nlm/hal/mmu.h index 7c72d0579f8..1173eb48a6b 100644 --- a/sys/mips/nlm/hal/mmu.h +++ b/sys/mips/nlm/hal/mmu.h @@ -108,7 +108,6 @@ nlm_write_c0_config7(uint32_t value) * (G) = Global mode */ - /* en = 1 to enable * en = 0 to disable */ diff --git a/sys/mips/nlm/hal/usb.h b/sys/mips/nlm/hal/usb.h index 3101a2e498b..170d8423202 100644 --- a/sys/mips/nlm/hal/usb.h +++ b/sys/mips/nlm/hal/usb.h @@ -48,7 +48,6 @@ #define USB_OHCI_INTERRUPT2_EN 0x08 #define USB_CTRL_INTERRUPT_EN 0x10 - #if !defined(LOCORE) && !defined(__ASSEMBLY__) #define nlm_read_usb_reg(b, r) nlm_read_reg(b,r) diff --git a/sys/mips/nlm/tick.c b/sys/mips/nlm/tick.c index 01b3d671512..c80567b7187 100644 --- a/sys/mips/nlm/tick.c +++ b/sys/mips/nlm/tick.c @@ -285,7 +285,6 @@ clock_intr(void *arg) DPCPU_SET(counter_lower_last, count); if (cycles_per_tick > 0) { - /* * Account for the "lost time" between when the timer interrupt * fired and when 'clock_intr' actually started executing. @@ -373,7 +372,6 @@ static device_method_t clock_methods[] = { DEVMETHOD(device_attach, clock_attach), DEVMETHOD(device_detach, bus_generic_detach), DEVMETHOD(device_shutdown, bus_generic_shutdown), - {0, 0} }; diff --git a/sys/mips/nlm/usb_init.c b/sys/mips/nlm/usb_init.c index f9966335cd9..4c389e9f88b 100644 --- a/sys/mips/nlm/usb_init.c +++ b/sys/mips/nlm/usb_init.c @@ -42,7 +42,6 @@ __FBSDID("$FreeBSD$"); #include - static void nlm_usb_intr_en(int node, int port) {