diff options
author | Toomas Soome <tsoome@me.com> | 2019-03-12 12:43:22 +0200 |
---|---|---|
committer | Toomas Soome <tsoome@me.com> | 2019-03-21 18:23:49 +0200 |
commit | a484bfa2079bc90573ca9a036def78c0cc8aa809 (patch) | |
tree | 9a320f6c6fe5f505a69ce4f023fc0f67b3ee3936 | |
parent | 1ef1b39822f02981cf693197a94ee81aa30c1c26 (diff) | |
download | illumos-joyent-a484bfa2079bc90573ca9a036def78c0cc8aa809.tar.gz |
10537 softmac: cast between incompatible function types
Reviewed by: Andy Stormont <astormont@racktopsystems.com>
Reviewed by: Andy Fiddaman <andy@omniosce.org>
Approved by: Dan McDonald <danmcd@joyent.com>
-rw-r--r-- | usr/src/uts/common/io/softmac/softmac_dev.c | 45 |
1 files changed, 25 insertions, 20 deletions
diff --git a/usr/src/uts/common/io/softmac/softmac_dev.c b/usr/src/uts/common/io/softmac/softmac_dev.c index bbb3e9ad3e..3b9c76a7e2 100644 --- a/usr/src/uts/common/io/softmac/softmac_dev.c +++ b/usr/src/uts/common/io/softmac/softmac_dev.c @@ -45,9 +45,9 @@ static int softmac_cmn_open(queue_t *, dev_t *, int, int, cred_t *); * the softmac module. */ static int softmac_mod_close(queue_t *, int, cred_t *); -static void softmac_mod_rput(queue_t *, mblk_t *); -static void softmac_mod_wput(queue_t *, mblk_t *); -static void softmac_mod_wsrv(queue_t *); +static int softmac_mod_rput(queue_t *, mblk_t *); +static int softmac_mod_wput(queue_t *, mblk_t *); +static int softmac_mod_wsrv(queue_t *); /* * The following softmac_drv_xxx() functions are (9E) entry point functions for @@ -55,8 +55,8 @@ static void softmac_mod_wsrv(queue_t *); */ static int softmac_drv_open(queue_t *, dev_t *, int, int, cred_t *); static int softmac_drv_close(queue_t *, int, cred_t *); -static void softmac_drv_wput(queue_t *, mblk_t *); -static void softmac_drv_wsrv(queue_t *); +static int softmac_drv_wput(queue_t *, mblk_t *); +static int softmac_drv_wsrv(queue_t *); static int softmac_attach(dev_info_t *, ddi_attach_cmd_t); static int softmac_detach(dev_info_t *, ddi_detach_cmd_t); @@ -85,8 +85,8 @@ static struct module_info softmac_dld_modinfo = { }; static struct qinit softmac_urinit = { - (pfi_t)softmac_mod_rput, /* qi_putp */ - (pfi_t)NULL, /* qi_srvp */ + softmac_mod_rput, /* qi_putp */ + NULL, /* qi_srvp */ softmac_cmn_open, /* qi_qopen */ softmac_mod_close, /* qi_qclose */ NULL, /* qi_qadmin */ @@ -94,8 +94,8 @@ static struct qinit softmac_urinit = { }; static struct qinit softmac_uwinit = { - (pfi_t)softmac_mod_wput, /* qi_putp */ - (pfi_t)softmac_mod_wsrv, /* qi_srvp */ + softmac_mod_wput, /* qi_putp */ + softmac_mod_wsrv, /* qi_srvp */ NULL, /* qi_qopen */ NULL, /* qi_qclose */ NULL, /* qi_qadmin */ @@ -117,7 +117,7 @@ static struct qinit softmac_dld_r_qinit = { }; static struct qinit softmac_dld_w_qinit = { - (pfi_t)softmac_drv_wput, (pfi_t)softmac_drv_wsrv, NULL, NULL, NULL, + softmac_drv_wput, softmac_drv_wsrv, NULL, NULL, NULL, &softmac_dld_modinfo }; @@ -304,7 +304,7 @@ softmac_mod_close(queue_t *rq, int flags __unused, cred_t *credp __unused) return (0); } -static void +static int softmac_mod_rput(queue_t *rq, mblk_t *mp) { softmac_lower_t *slp = rq->q_ptr; @@ -336,7 +336,7 @@ softmac_mod_rput(queue_t *rq, mblk_t *mp) */ if (slp->sl_softmac == NULL) { freemsg(mp); - return; + return (0); } /* @@ -346,7 +346,7 @@ softmac_mod_rput(queue_t *rq, mblk_t *mp) */ if (mp->b_flag & MSGNOLOOP) { freemsg(mp); - return; + return (0); } /* @@ -355,7 +355,7 @@ softmac_mod_rput(queue_t *rq, mblk_t *mp) if (DB_REF(mp) == 1) { ASSERT(slp->sl_softmac != NULL); mac_rx(slp->sl_softmac->smac_mh, NULL, mp); - return; + return (0); } else { softmac_rput_process_data(slp, mp); } @@ -386,9 +386,10 @@ softmac_mod_rput(queue_t *rq, mblk_t *mp) softmac_rput_process_notdata(rq, slp->sl_sup, mp); break; } + return (0); } -static void +static int softmac_mod_wput(queue_t *wq, mblk_t *mp) { /* @@ -430,9 +431,10 @@ softmac_mod_wput(queue_t *wq, mblk_t *mp) freemsg(mp); break; } + return (0); } -static void +static int softmac_mod_wsrv(queue_t *wq) { softmac_lower_t *slp = wq->q_ptr; @@ -450,6 +452,7 @@ softmac_mod_wsrv(queue_t *wq) qenable(slp->sl_sup->su_wq); else if (slp->sl_softmac != NULL) mac_tx_update(slp->sl_softmac->smac_mh); + return (0); } static int @@ -609,7 +612,7 @@ softmac_drv_close(queue_t *rq, int flags __unused, cred_t *credp __unused) return (dld_str_close(rq)); } -static void +static int softmac_drv_wput(queue_t *wq, mblk_t *mp) { softmac_upper_t *sup = dld_str_private(wq); @@ -627,13 +630,13 @@ softmac_drv_wput(queue_t *wq, mblk_t *mp) if (MBLKL(mp) < sizeof (t_uscalar_t)) { freemsg(mp); - return; + return (0); } prim = ((union DL_primitives *)mp->b_rptr)->dl_primitive; if (prim == DL_UNITDATA_REQ) { softmac_wput_data(sup, mp); - return; + return (0); } softmac_wput_nondata(sup, mp); @@ -642,9 +645,10 @@ softmac_drv_wput(queue_t *wq, mblk_t *mp) softmac_wput_nondata(sup, mp); break; } + return (0); } -static void +static int softmac_drv_wsrv(queue_t *wq) { softmac_upper_t *sup = dld_str_private(wq); @@ -684,4 +688,5 @@ softmac_drv_wsrv(queue_t *wq) sup->su_tx_busy = B_FALSE; } mutex_exit(&sup->su_mutex); + return (0); } |