diff --git a/sys/dev/etherswitch/arswitch/arswitch.c b/sys/dev/etherswitch/arswitch/arswitch.c index 1f3d05611f0f..4703a73818a7 100644 --- a/sys/dev/etherswitch/arswitch/arswitch.c +++ b/sys/dev/etherswitch/arswitch/arswitch.c @@ -85,8 +85,8 @@ static int led_pattern_table[] = { static inline int arswitch_portforphy(int phy); static void arswitch_tick(void *arg); -static int arswitch_ifmedia_upd(if_t ); -static void arswitch_ifmedia_sts(if_t , struct ifmediareq *); +static int arswitch_ifmedia_upd(if_t); +static void arswitch_ifmedia_sts(if_t, struct ifmediareq *); static int ar8xxx_port_vlan_setup(struct arswitch_softc *sc, etherswitch_port_t *p); static int ar8xxx_port_vlan_get(struct arswitch_softc *sc, diff --git a/sys/dev/etherswitch/e6000sw/e6000sw.c b/sys/dev/etherswitch/e6000sw/e6000sw.c index 812c004a37c3..cb2d56e64812 100644 --- a/sys/dev/etherswitch/e6000sw/e6000sw.c +++ b/sys/dev/etherswitch/e6000sw/e6000sw.c @@ -136,8 +136,8 @@ static int e6000sw_vtu_flush(e6000sw_softc_t *); static int e6000sw_vtu_update(e6000sw_softc_t *, int, int, int, int, int); static __inline void e6000sw_writereg(e6000sw_softc_t *, int, int, int); static __inline uint32_t e6000sw_readreg(e6000sw_softc_t *, int, int); -static int e6000sw_ifmedia_upd(if_t ); -static void e6000sw_ifmedia_sts(if_t , struct ifmediareq *); +static int e6000sw_ifmedia_upd(if_t); +static void e6000sw_ifmedia_sts(if_t, struct ifmediareq *); static int e6000sw_atu_mac_table(device_t, e6000sw_softc_t *, struct atu_opt *, int); static int e6000sw_get_pvid(e6000sw_softc_t *, int, int *); diff --git a/sys/dev/etherswitch/e6000sw/e6060sw.c b/sys/dev/etherswitch/e6000sw/e6060sw.c index f53cca80c0a0..f21b7d2c24d0 100644 --- a/sys/dev/etherswitch/e6000sw/e6060sw.c +++ b/sys/dev/etherswitch/e6000sw/e6060sw.c @@ -150,8 +150,8 @@ struct e6060sw_softc { static inline int e6060sw_portforphy(struct e6060sw_softc *, int); static void e6060sw_tick(void *); -static int e6060sw_ifmedia_upd(if_t ); -static void e6060sw_ifmedia_sts(if_t , struct ifmediareq *); +static int e6060sw_ifmedia_upd(if_t); +static void e6060sw_ifmedia_sts(if_t, struct ifmediareq *); static void e6060sw_setup(device_t dev); static int e6060sw_read_vtu(device_t dev, int num, int *data1, int *data2); @@ -300,7 +300,7 @@ e6060sw_attach(device_t dev) e6060sw_setup(dev); - sc->ifp = malloc(sizeof(if_t ) * sc->numports, M_E6060SW, + sc->ifp = malloc(sizeof(if_t) * sc->numports, M_E6060SW, M_WAITOK | M_ZERO); sc->ifname = malloc(sizeof(char *) * sc->numports, M_E6060SW, M_WAITOK | M_ZERO); diff --git a/sys/dev/etherswitch/felix/felix.c b/sys/dev/etherswitch/felix/felix.c index fc846da32aa2..5a08da8fb1ff 100644 --- a/sys/dev/etherswitch/felix/felix.c +++ b/sys/dev/etherswitch/felix/felix.c @@ -88,8 +88,8 @@ static int felix_setup(felix_softc_t); static void felix_setup_port(felix_softc_t, int); static void felix_tick(void *); -static int felix_ifmedia_upd(if_t ); -static void felix_ifmedia_sts(if_t , struct ifmediareq *); +static int felix_ifmedia_upd(if_t); +static void felix_ifmedia_sts(if_t, struct ifmediareq *); static void felix_get_port_cfg(felix_softc_t, etherswitch_port_t *); static void felix_set_port_cfg(felix_softc_t, etherswitch_port_t *); diff --git a/sys/dev/etherswitch/infineon/adm6996fc.c b/sys/dev/etherswitch/infineon/adm6996fc.c index ec6f7c98b015..7b3c97a99303 100644 --- a/sys/dev/etherswitch/infineon/adm6996fc.c +++ b/sys/dev/etherswitch/infineon/adm6996fc.c @@ -122,8 +122,8 @@ struct adm6996fc_softc { static inline int adm6996fc_portforphy(struct adm6996fc_softc *, int); static void adm6996fc_tick(void *); -static int adm6996fc_ifmedia_upd(if_t ); -static void adm6996fc_ifmedia_sts(if_t , struct ifmediareq *); +static int adm6996fc_ifmedia_upd(if_t); +static void adm6996fc_ifmedia_sts(if_t, struct ifmediareq *); #define ADM6996FC_READREG(dev, x) \ MDIO_READREG(dev, ((x) >> 5), ((x) & 0x1f)); @@ -254,7 +254,7 @@ adm6996fc_attach(device_t dev) sc->info.es_nvlangroups = 16; sc->info.es_vlan_caps = ETHERSWITCH_VLAN_PORT | ETHERSWITCH_VLAN_DOT1Q; - sc->ifp = malloc(sizeof(if_t ) * sc->numports, M_ADM6996FC, + sc->ifp = malloc(sizeof(if_t) * sc->numports, M_ADM6996FC, M_WAITOK | M_ZERO); sc->ifname = malloc(sizeof(char *) * sc->numports, M_ADM6996FC, M_WAITOK | M_ZERO); diff --git a/sys/dev/etherswitch/ip17x/ip17x.c b/sys/dev/etherswitch/ip17x/ip17x.c index 7c6d253e7964..9bc3ca66da04 100644 --- a/sys/dev/etherswitch/ip17x/ip17x.c +++ b/sys/dev/etherswitch/ip17x/ip17x.c @@ -79,8 +79,8 @@ MALLOC_DECLARE(M_IP17X); MALLOC_DEFINE(M_IP17X, "ip17x", "ip17x data structures"); static void ip17x_tick(void *); -static int ip17x_ifmedia_upd(if_t ); -static void ip17x_ifmedia_sts(if_t , struct ifmediareq *); +static int ip17x_ifmedia_upd(if_t); +static void ip17x_ifmedia_sts(if_t, struct ifmediareq *); static void ip17x_identify(driver_t *driver, device_t parent) @@ -240,7 +240,7 @@ ip17x_attach(device_t dev) /* Always attach the cpu port. */ sc->phymask |= (1 << sc->cpuport); - sc->ifp = malloc(sizeof(if_t ) * sc->numports, M_IP17X, + sc->ifp = malloc(sizeof(if_t) * sc->numports, M_IP17X, M_WAITOK | M_ZERO); sc->pvid = malloc(sizeof(uint32_t) * sc->numports, M_IP17X, M_WAITOK | M_ZERO); diff --git a/sys/dev/etherswitch/micrel/ksz8995ma.c b/sys/dev/etherswitch/micrel/ksz8995ma.c index c7d3806fb558..6b7bbb3da767 100644 --- a/sys/dev/etherswitch/micrel/ksz8995ma.c +++ b/sys/dev/etherswitch/micrel/ksz8995ma.c @@ -173,8 +173,8 @@ struct ksz8995ma_softc { static inline int ksz8995ma_portforphy(struct ksz8995ma_softc *, int); static void ksz8995ma_tick(void *); -static int ksz8995ma_ifmedia_upd(if_t ); -static void ksz8995ma_ifmedia_sts(if_t , struct ifmediareq *); +static int ksz8995ma_ifmedia_upd(if_t); +static void ksz8995ma_ifmedia_sts(if_t, struct ifmediareq *); static int ksz8995ma_readreg(device_t dev, int addr); static int ksz8995ma_writereg(device_t dev, int addr, int value); static void ksz8995ma_portvlanreset(device_t dev); @@ -304,7 +304,7 @@ ksz8995ma_attach(device_t dev) sc->info.es_nvlangroups = 16; sc->info.es_vlan_caps = ETHERSWITCH_VLAN_PORT | ETHERSWITCH_VLAN_DOT1Q; - sc->ifp = malloc(sizeof(if_t ) * sc->numports, M_KSZ8995MA, + sc->ifp = malloc(sizeof(if_t) * sc->numports, M_KSZ8995MA, M_WAITOK | M_ZERO); sc->ifname = malloc(sizeof(char *) * sc->numports, M_KSZ8995MA, M_WAITOK | M_ZERO); diff --git a/sys/dev/etherswitch/rtl8366/rtl8366rb.c b/sys/dev/etherswitch/rtl8366/rtl8366rb.c index f171bbe25e31..7e64bc62bcca 100644 --- a/sys/dev/etherswitch/rtl8366/rtl8366rb.c +++ b/sys/dev/etherswitch/rtl8366/rtl8366rb.c @@ -126,8 +126,8 @@ static int smi_read(device_t dev, uint16_t addr, uint16_t *data, int sleep); static int smi_write(device_t dev, uint16_t addr, uint16_t data, int sleep); static int smi_rmw(device_t dev, uint16_t addr, uint16_t mask, uint16_t data, int sleep); static void rtl8366rb_tick(void *arg); -static int rtl8366rb_ifmedia_upd(if_t ); -static void rtl8366rb_ifmedia_sts(if_t , struct ifmediareq *); +static int rtl8366rb_ifmedia_upd(if_t); +static void rtl8366rb_ifmedia_sts(if_t, struct ifmediareq *); static void rtl8366rb_identify(driver_t *driver, device_t parent) diff --git a/sys/dev/etherswitch/ukswitch/ukswitch.c b/sys/dev/etherswitch/ukswitch/ukswitch.c index 5ec3a0db0d1e..7d4ab80b6667 100644 --- a/sys/dev/etherswitch/ukswitch/ukswitch.c +++ b/sys/dev/etherswitch/ukswitch/ukswitch.c @@ -97,8 +97,8 @@ struct ukswitch_softc { static inline int ukswitch_portforphy(struct ukswitch_softc *, int); static void ukswitch_tick(void *); -static int ukswitch_ifmedia_upd(if_t ); -static void ukswitch_ifmedia_sts(if_t , struct ifmediareq *); +static int ukswitch_ifmedia_upd(if_t); +static void ukswitch_ifmedia_sts(if_t, struct ifmediareq *); static int ukswitch_probe(device_t dev) @@ -201,7 +201,7 @@ ukswitch_attach(device_t dev) /* We do not support any vlan groups. */ sc->info.es_nvlangroups = 0; - sc->ifp = malloc(sizeof(if_t ) * sc->numports, M_UKSWITCH, + sc->ifp = malloc(sizeof(if_t) * sc->numports, M_UKSWITCH, M_WAITOK | M_ZERO); sc->ifname = malloc(sizeof(char *) * sc->numports, M_UKSWITCH, M_WAITOK | M_ZERO);