summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/compat/ndis/kern_ndis.c8
-rw-r--r--sys/compat/ndis/ndis_var.h2
-rw-r--r--sys/dev/cas/if_cas.c7
-rw-r--r--sys/dev/cxgbe/t4_sge.c4
-rw-r--r--sys/dev/hatm/if_hatm_intr.c6
-rw-r--r--sys/dev/iscsi_initiator/isc_soc.c3
-rw-r--r--sys/dev/lge/if_lge.c6
-rw-r--r--sys/dev/mwl/if_mwl.c3
-rw-r--r--sys/dev/wb/if_wb.c6
-rw-r--r--sys/kern/subr_mbpool.c5
-rw-r--r--sys/kern/uipc_mbuf.c4
-rw-r--r--sys/kern/uipc_syscalls.c10
-rw-r--r--sys/sys/mbpool.h2
-rw-r--r--sys/sys/mbuf.h11
-rw-r--r--sys/sys/sf_buf.h2
15 files changed, 28 insertions, 51 deletions
diff --git a/sys/compat/ndis/kern_ndis.c b/sys/compat/ndis/kern_ndis.c
index f1e4cd8..21e010f 100644
--- a/sys/compat/ndis/kern_ndis.c
+++ b/sys/compat/ndis/kern_ndis.c
@@ -483,14 +483,14 @@ ndis_return(dobj, arg)
KeReleaseSpinLock(&block->nmb_returnlock, irql);
}
-int
+void
ndis_return_packet(struct mbuf *m, void *buf, void *arg)
{
ndis_packet *p;
ndis_miniport_block *block;
if (arg == NULL)
- return (EXT_FREE_OK);
+ return;
p = arg;
@@ -499,7 +499,7 @@ ndis_return_packet(struct mbuf *m, void *buf, void *arg)
/* Release packet when refcount hits zero, otherwise return. */
if (p->np_refcnt)
- return (EXT_FREE_OK);
+ return;
block = ((struct ndis_softc *)p->np_softc)->ndis_block;
@@ -511,8 +511,6 @@ ndis_return_packet(struct mbuf *m, void *buf, void *arg)
IoQueueWorkItem(block->nmb_returnitem,
(io_workitem_func)kernndis_functbl[7].ipt_wrap,
WORKQUEUE_CRITICAL, block);
-
- return (EXT_FREE_OK);
}
void
diff --git a/sys/compat/ndis/ndis_var.h b/sys/compat/ndis/ndis_var.h
index 823cfc9..e837dc1 100644
--- a/sys/compat/ndis/ndis_var.h
+++ b/sys/compat/ndis/ndis_var.h
@@ -1743,7 +1743,7 @@ extern int ndis_halt_nic(void *);
extern int ndis_shutdown_nic(void *);
extern int ndis_pnpevent_nic(void *, int);
extern int ndis_init_nic(void *);
-extern int ndis_return_packet(struct mbuf *, void *, void *);
+extern void ndis_return_packet(struct mbuf *, void *, void *);
extern int ndis_init_dma(void *);
extern int ndis_destroy_dma(void *);
extern int ndis_create_sysctls(void *);
diff --git a/sys/dev/cas/if_cas.c b/sys/dev/cas/if_cas.c
index 08d615f..0c69880 100644
--- a/sys/dev/cas/if_cas.c
+++ b/sys/dev/cas/if_cas.c
@@ -133,7 +133,7 @@ static void cas_detach(struct cas_softc *sc);
static int cas_disable_rx(struct cas_softc *sc);
static int cas_disable_tx(struct cas_softc *sc);
static void cas_eint(struct cas_softc *sc, u_int status);
-static int cas_free(struct mbuf *m, void *arg1, void* arg2);
+static void cas_free(struct mbuf *m, void *arg1, void* arg2);
static void cas_init(void *xsc);
static void cas_init_locked(struct cas_softc *sc);
static void cas_init_regs(struct cas_softc *sc);
@@ -1888,7 +1888,7 @@ cas_rint(struct cas_softc *sc)
#endif
}
-static int
+static void
cas_free(struct mbuf *m, void *arg1, void *arg2)
{
struct cas_rxdsoft *rxds;
@@ -1905,7 +1905,7 @@ cas_free(struct mbuf *m, void *arg1, void *arg2)
rxds = &sc->sc_rxdsoft[idx];
#endif
if (refcount_release(&rxds->rxds_refcount) == 0)
- return (EXT_FREE_OK);
+ return;
/*
* NB: this function can be called via m_freem(9) within
@@ -1916,7 +1916,6 @@ cas_free(struct mbuf *m, void *arg1, void *arg2)
cas_add_rxdesc(sc, idx);
if (locked == 0)
CAS_UNLOCK(sc);
- return (EXT_FREE_OK);
}
static inline void
diff --git a/sys/dev/cxgbe/t4_sge.c b/sys/dev/cxgbe/t4_sge.c
index 3e3b7ed..c4ac619 100644
--- a/sys/dev/cxgbe/t4_sge.c
+++ b/sys/dev/cxgbe/t4_sge.c
@@ -1506,15 +1506,13 @@ cl_metadata(struct adapter *sc, struct sge_fl *fl, struct cluster_layout *cll,
return (NULL);
}
-static int
+static void
rxb_free(struct mbuf *m, void *arg1, void *arg2)
{
uma_zone_t zone = arg1;
caddr_t cl = arg2;
uma_zfree(zone, cl);
-
- return (EXT_FREE_OK);
}
/*
diff --git a/sys/dev/hatm/if_hatm_intr.c b/sys/dev/hatm/if_hatm_intr.c
index 5220fe5..87e0532 100644
--- a/sys/dev/hatm/if_hatm_intr.c
+++ b/sys/dev/hatm/if_hatm_intr.c
@@ -261,7 +261,7 @@ hatm_mbuf_page_alloc(struct hatm_softc *sc, u_int group)
/*
* Free an mbuf and put it onto the free list.
*/
-static int
+static void
hatm_mbuf0_free(struct mbuf *m, void *buf, void *args)
{
struct hatm_softc *sc = args;
@@ -271,9 +271,8 @@ hatm_mbuf0_free(struct mbuf *m, void *buf, void *args)
("freeing unused mbuf %x", c->hdr.flags));
c->hdr.flags &= ~MBUF_USED;
hatm_ext_free(&sc->mbuf_list[0], (struct mbufx_free *)c);
- return (EXT_FREE_OK);
}
-static int
+static void
hatm_mbuf1_free(struct mbuf *m, void *buf, void *args)
{
struct hatm_softc *sc = args;
@@ -283,7 +282,6 @@ hatm_mbuf1_free(struct mbuf *m, void *buf, void *args)
("freeing unused mbuf %x", c->hdr.flags));
c->hdr.flags &= ~MBUF_USED;
hatm_ext_free(&sc->mbuf_list[1], (struct mbufx_free *)c);
- return (EXT_FREE_OK);
}
static void
diff --git a/sys/dev/iscsi_initiator/isc_soc.c b/sys/dev/iscsi_initiator/isc_soc.c
index a08ecfa..6507236 100644
--- a/sys/dev/iscsi_initiator/isc_soc.c
+++ b/sys/dev/iscsi_initiator/isc_soc.c
@@ -68,7 +68,7 @@ static int ou_refcnt = 0;
/*
| function for freeing external storage for mbuf
*/
-static int
+static void
ext_free(struct mbuf *m, void *a, void *b)
{
pduq_t *pq = b;
@@ -78,7 +78,6 @@ ext_free(struct mbuf *m, void *a, void *b)
free(pq->buf, M_ISCSIBUF);
pq->buf = NULL;
}
- return (EXT_FREE_OK);
}
int
diff --git a/sys/dev/lge/if_lge.c b/sys/dev/lge/if_lge.c
index 7f03e8b..94f326f 100644
--- a/sys/dev/lge/if_lge.c
+++ b/sys/dev/lge/if_lge.c
@@ -123,7 +123,7 @@ static int lge_detach(device_t);
static int lge_alloc_jumbo_mem(struct lge_softc *);
static void lge_free_jumbo_mem(struct lge_softc *);
static void *lge_jalloc(struct lge_softc *);
-static int lge_jfree(struct mbuf *, void *, void *);
+static void lge_jfree(struct mbuf *, void *, void *);
static int lge_newbuf(struct lge_softc *, struct lge_rx_desc *, struct mbuf *);
static int lge_encap(struct lge_softc *, struct mbuf *, u_int32_t *);
@@ -847,7 +847,7 @@ lge_jalloc(sc)
/*
* Release a jumbo buffer.
*/
-static int
+static void
lge_jfree(struct mbuf *m, void *buf, void *args)
{
struct lge_softc *sc;
@@ -873,8 +873,6 @@ lge_jfree(struct mbuf *m, void *buf, void *args)
entry->slot = i;
SLIST_REMOVE_HEAD(&sc->lge_jinuse_listhead, jpool_entries);
SLIST_INSERT_HEAD(&sc->lge_jfree_listhead, entry, jpool_entries);
-
- return (EXT_FREE_OK);
}
/*
diff --git a/sys/dev/mwl/if_mwl.c b/sys/dev/mwl/if_mwl.c
index b5bd9bd..7b33088 100644
--- a/sys/dev/mwl/if_mwl.c
+++ b/sys/dev/mwl/if_mwl.c
@@ -2605,7 +2605,7 @@ mwl_rxbuf_init(struct mwl_softc *sc, struct mwl_rxbuf *bf)
return 0;
}
-static int
+static void
mwl_ext_free(struct mbuf *m, void *data, void *arg)
{
struct mwl_softc *sc = arg;
@@ -2621,7 +2621,6 @@ mwl_ext_free(struct mbuf *m, void *data, void *arg)
sc->sc_rxblocked = 0;
mwl_hal_intrset(sc->sc_mh, sc->sc_imask);
}
- return (EXT_FREE_OK);
}
struct mwl_frame_bar {
diff --git a/sys/dev/wb/if_wb.c b/sys/dev/wb/if_wb.c
index a126d4a..dd087a9 100644
--- a/sys/dev/wb/if_wb.c
+++ b/sys/dev/wb/if_wb.c
@@ -143,7 +143,7 @@ static int wb_probe(device_t);
static int wb_attach(device_t);
static int wb_detach(device_t);
-static int wb_bfree(struct mbuf *, void *addr, void *args);
+static void wb_bfree(struct mbuf *, void *addr, void *args);
static int wb_newbuf(struct wb_softc *, struct wb_chain_onefrag *,
struct mbuf *);
static int wb_encap(struct wb_softc *, struct wb_chain *, struct mbuf *);
@@ -823,11 +823,9 @@ wb_list_rx_init(sc)
return(0);
}
-static int
+static void
wb_bfree(struct mbuf *m, void *buf, void *args)
{
-
- return (EXT_FREE_OK);
}
/*
diff --git a/sys/kern/subr_mbpool.c b/sys/kern/subr_mbpool.c
index 0b8cda6..bf52d85 100644
--- a/sys/kern/subr_mbpool.c
+++ b/sys/kern/subr_mbpool.c
@@ -283,12 +283,11 @@ mbp_free(struct mbpool *p, void *ptr)
/*
* Mbuf system external mbuf free routine
*/
-int
+void
mbp_ext_free(struct mbuf *m, void *buf, void *arg)
{
- mbp_free(arg, buf);
- return (EXT_FREE_OK);
+ mbp_free(arg, buf);
}
/*
diff --git a/sys/kern/uipc_mbuf.c b/sys/kern/uipc_mbuf.c
index 61ef083..512f48d 100644
--- a/sys/kern/uipc_mbuf.c
+++ b/sys/kern/uipc_mbuf.c
@@ -255,7 +255,7 @@ m_freem(struct mbuf *mb)
*/
int
m_extadd(struct mbuf *mb, caddr_t buf, u_int size,
- int (*freef)(struct mbuf *, void *, void *), void *arg1, void *arg2,
+ void (*freef)(struct mbuf *, void *, void *), void *arg1, void *arg2,
int flags, int type, int wait)
{
KASSERT(type != EXT_CLUSTER, ("%s: EXT_CLUSTER not allowed", __func__));
@@ -329,7 +329,7 @@ mb_free_ext(struct mbuf *m)
case EXT_EXTREF:
KASSERT(m->m_ext.ext_free != NULL,
("%s: ext_free not set", __func__));
- (void)(*(m->m_ext.ext_free))(m, m->m_ext.ext_arg1,
+ (*(m->m_ext.ext_free))(m, m->m_ext.ext_arg1,
m->m_ext.ext_arg2);
break;
default:
diff --git a/sys/kern/uipc_syscalls.c b/sys/kern/uipc_syscalls.c
index f00d77f..2581d2c 100644
--- a/sys/kern/uipc_syscalls.c
+++ b/sys/kern/uipc_syscalls.c
@@ -1987,7 +1987,7 @@ filt_sfsync(struct knote *kn, long hint)
/*
* Detach mapped page and release resources back to the system.
*/
-int
+void
sf_buf_mext(struct mbuf *mb, void *addr, void *args)
{
vm_page_t m;
@@ -2009,10 +2009,6 @@ sf_buf_mext(struct mbuf *mb, void *addr, void *args)
sfs = addr;
sf_sync_deref(sfs);
}
- /*
- * sfs may be invalid at this point, don't use it!
- */
- return (EXT_FREE_OK);
}
/*
@@ -3066,14 +3062,14 @@ retry_space:
m0 = m_get((mnw ? M_NOWAIT : M_WAITOK), MT_DATA);
if (m0 == NULL) {
error = (mnw ? EAGAIN : ENOBUFS);
- (void)sf_buf_mext(NULL, NULL, sf);
+ sf_buf_mext(NULL, NULL, sf);
break;
}
if (m_extadd(m0, (caddr_t )sf_buf_kva(sf), PAGE_SIZE,
sf_buf_mext, sfs, sf, M_RDONLY, EXT_SFBUF,
(mnw ? M_NOWAIT : M_WAITOK)) != 0) {
error = (mnw ? EAGAIN : ENOBUFS);
- (void)sf_buf_mext(NULL, NULL, sf);
+ sf_buf_mext(NULL, NULL, sf);
m_freem(m0);
break;
}
diff --git a/sys/sys/mbpool.h b/sys/sys/mbpool.h
index 585b66d..48fd89e 100644
--- a/sys/sys/mbpool.h
+++ b/sys/sys/mbpool.h
@@ -69,7 +69,7 @@ void *mbp_alloc(struct mbpool *, bus_addr_t *, uint32_t *);
void mbp_free(struct mbpool *, void *);
/* free a chunk that is an external mbuf */
-int mbp_ext_free(struct mbuf *, void *, void *);
+void mbp_ext_free(struct mbuf *, void *, void *);
/* free all buffers that are marked to be on the card */
void mbp_card_free(struct mbpool *);
diff --git a/sys/sys/mbuf.h b/sys/sys/mbuf.h
index e056bc7..8990ccb 100644
--- a/sys/sys/mbuf.h
+++ b/sys/sys/mbuf.h
@@ -173,7 +173,7 @@ struct m_ext {
uint32_t ext_size; /* size of buffer, for ext_free */
uint32_t ext_type:8, /* type of external storage */
ext_flags:24; /* external storage mbuf flags */
- int (*ext_free) /* free routine if not the usual */
+ void (*ext_free) /* free routine if not the usual */
(struct mbuf *, void *, void *);
void *ext_arg1; /* optional argument pointer */
void *ext_arg2; /* optional argument pointer */
@@ -374,11 +374,6 @@ struct mbuf {
"\30EXT_FLAG_EXP4"
/*
- * Return values for (*ext_free).
- */
-#define EXT_FREE_OK 0 /* Normal return */
-
-/*
* Flags indicating checksum, segmentation and other offload work to be
* done, or already done, by hardware or lower layers. It is split into
* separate inbound and outbound flags.
@@ -543,7 +538,7 @@ m_gettype(int size)
*/
static __inline void
m_extaddref(struct mbuf *m, caddr_t buf, u_int size, u_int *ref_cnt,
- int (*freef)(struct mbuf *, void *, void *), void *arg1, void *arg2)
+ void (*freef)(struct mbuf *, void *, void *), void *arg1, void *arg2)
{
KASSERT(ref_cnt != NULL, ("%s: ref_cnt not provided", __func__));
@@ -910,7 +905,7 @@ int m_apply(struct mbuf *, int, int,
int m_append(struct mbuf *, int, c_caddr_t);
void m_cat(struct mbuf *, struct mbuf *);
int m_extadd(struct mbuf *, caddr_t, u_int,
- int (*)(struct mbuf *, void *, void *), void *, void *,
+ void (*)(struct mbuf *, void *, void *), void *, void *,
int, int, int);
struct mbuf *m_collapse(struct mbuf *, int, int);
void m_copyback(struct mbuf *, int, int, c_caddr_t);
diff --git a/sys/sys/sf_buf.h b/sys/sys/sf_buf.h
index c30c7c0..58e3bcb 100644
--- a/sys/sys/sf_buf.h
+++ b/sys/sys/sf_buf.h
@@ -61,6 +61,6 @@ extern counter_u64_t sfstat[sizeof(struct sfstat) / sizeof(uint64_t)];
#define SFSTAT_INC(name) SFSTAT_ADD(name, 1)
#endif /* _KERNEL */
-int sf_buf_mext(struct mbuf *mb, void *addr, void *args);
+void sf_buf_mext(struct mbuf *mb, void *addr, void *args);
#endif /* !_SYS_SF_BUF_H_ */
OpenPOWER on IntegriCloud