summaryrefslogtreecommitdiff
path: root/usr/src/uts/common/io
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/uts/common/io')
-rw-r--r--usr/src/uts/common/io/dld/dld_str.c8
-rw-r--r--usr/src/uts/common/io/dls/dls_mgmt.c6
-rw-r--r--usr/src/uts/common/io/dr_sas/dr_sas.c17
-rw-r--r--usr/src/uts/common/io/dr_sas/dr_sas.h9
-rw-r--r--usr/src/uts/common/io/inotify.c6
-rw-r--r--usr/src/uts/common/io/mac/mac.c2
-rw-r--r--usr/src/uts/common/io/vnd/frameio.c4
-rw-r--r--usr/src/uts/common/io/vnd/vnd.c12
8 files changed, 34 insertions, 30 deletions
diff --git a/usr/src/uts/common/io/dld/dld_str.c b/usr/src/uts/common/io/dld/dld_str.c
index 5efbe0576d..e9e98441b5 100644
--- a/usr/src/uts/common/io/dld/dld_str.c
+++ b/usr/src/uts/common/io/dld/dld_str.c
@@ -23,6 +23,10 @@
*/
/*
+ * Copyright 2019 Joyent, Inc.
+ */
+
+/*
* Data-Link Driver
*/
@@ -916,14 +920,14 @@ str_mdata_raw_fastpath_put(dld_str_t *dsp, mblk_t *mp, uintptr_t f_hint,
goto discard;
}
- if ((cookie = DLD_TX(dsp, mp, f_hint, flag)) != NULL) {
+ if ((cookie = DLD_TX(dsp, mp, f_hint, flag)) != (mac_tx_cookie_t)NULL) {
DLD_SETQFULL(dsp);
}
return (cookie);
discard:
/* TODO: bump kstat? */
freemsg(mp);
- return (NULL);
+ return ((mac_tx_cookie_t)NULL);
}
diff --git a/usr/src/uts/common/io/dls/dls_mgmt.c b/usr/src/uts/common/io/dls/dls_mgmt.c
index dba205b7a2..90b65ab36a 100644
--- a/usr/src/uts/common/io/dls/dls_mgmt.c
+++ b/usr/src/uts/common/io/dls/dls_mgmt.c
@@ -21,7 +21,7 @@
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
- * Copyright (c) 2017 Joyent, Inc.
+ * Copyright 2019 Joyent, Inc.
*/
/*
* Copyright (c) 2016 by Delphix. All rights reserved.
@@ -986,8 +986,8 @@ done:
*ddpp = ddp;
mutex_enter(&ddp->dd_mutex);
- if (linkid != DATALINK_INVALID_LINKID &&
- !ddp->dd_prop_loaded && ddp->dd_prop_taskid == NULL) {
+ if (linkid != DATALINK_INVALID_LINKID && !ddp->dd_prop_loaded &&
+ ddp->dd_prop_taskid == TASKQID_INVALID) {
ddp->dd_prop_taskid = taskq_dispatch(system_taskq,
dls_devnet_prop_task, ddp, TQ_SLEEP);
}
diff --git a/usr/src/uts/common/io/dr_sas/dr_sas.c b/usr/src/uts/common/io/dr_sas/dr_sas.c
index 3f7be11abf..0d277ada42 100644
--- a/usr/src/uts/common/io/dr_sas/dr_sas.c
+++ b/usr/src/uts/common/io/dr_sas/dr_sas.c
@@ -2585,7 +2585,7 @@ service_mfi_aen(struct drsas_instance *instance, struct drsas_cmd *cmd)
for (tgt = 0; tgt < MRDRV_MAX_LD; tgt++) {
if (instance->dr_ld_list[tgt].dip != NULL) {
rval = drsas_service_evt(instance, tgt, 0,
- DRSAS_EVT_UNCONFIG_TGT, NULL);
+ DRSAS_EVT_UNCONFIG_TGT);
con_log(CL_ANN1, (CE_WARN,
"dr_sas: CFG CLEARED AEN rval = %d "
"tgt id = %d", rval, tgt));
@@ -2597,7 +2597,7 @@ service_mfi_aen(struct drsas_instance *instance, struct drsas_cmd *cmd)
case DR_EVT_LD_DELETED: {
rval = drsas_service_evt(instance,
ddi_get16(acc_handle, &evt_detail->args.ld.target_id), 0,
- DRSAS_EVT_UNCONFIG_TGT, NULL);
+ DRSAS_EVT_UNCONFIG_TGT);
con_log(CL_ANN1, (CE_WARN, "dr_sas: LD DELETED AEN rval = %d "
"tgt id = %d index = %d", rval,
ddi_get16(acc_handle, &evt_detail->args.ld.target_id),
@@ -2608,7 +2608,7 @@ service_mfi_aen(struct drsas_instance *instance, struct drsas_cmd *cmd)
case DR_EVT_LD_CREATED: {
rval = drsas_service_evt(instance,
ddi_get16(acc_handle, &evt_detail->args.ld.target_id), 0,
- DRSAS_EVT_CONFIG_TGT, NULL);
+ DRSAS_EVT_CONFIG_TGT);
con_log(CL_ANN1, (CE_WARN, "dr_sas: LD CREATED AEN rval = %d "
"tgt id = %d index = %d", rval,
ddi_get16(acc_handle, &evt_detail->args.ld.target_id),
@@ -3442,7 +3442,7 @@ build_cmd(struct drsas_instance *instance, struct scsi_address *ap,
switch (page_code) {
case 0x3:
case 0x4:
- (void) drsas_mode_sense_build(pkt);
+ drsas_mode_sense_build(pkt);
return_mfi_pkt(instance, cmd);
*cmd_done = 1;
return (NULL);
@@ -5352,10 +5352,8 @@ finish:
return (rval);
}
-/*ARGSUSED*/
static int
-drsas_service_evt(struct drsas_instance *instance, int tgt, int lun, int event,
- uint64_t wwn)
+drsas_service_evt(struct drsas_instance *instance, int tgt, int lun, int event)
{
struct drsas_eventinfo *mrevt = NULL;
@@ -5454,7 +5452,7 @@ drsas_issue_evt_taskq(struct drsas_eventinfo *mrevt)
ndi_devi_exit(instance->dip, circ1);
}
-static int
+static void
drsas_mode_sense_build(struct scsi_pkt *pkt)
{
union scsi_cdb *cdbp;
@@ -5470,7 +5468,7 @@ drsas_mode_sense_build(struct scsi_pkt *pkt)
if ((!bp) && bp->b_un.b_addr && bp->b_bcount && acmd->cmd_dmacount) {
con_log(CL_ANN1, (CE_WARN, "Failing MODESENSE Command"));
/* ADD pkt statistics as Command failed. */
- return (NULL);
+ return;
}
bp_mapin(bp);
@@ -5508,5 +5506,4 @@ drsas_mode_sense_build(struct scsi_pkt *pkt)
default:
break;
}
- return (NULL);
}
diff --git a/usr/src/uts/common/io/dr_sas/dr_sas.h b/usr/src/uts/common/io/dr_sas/dr_sas.h
index 8f78658edf..aa95aa3d08 100644
--- a/usr/src/uts/common/io/dr_sas/dr_sas.h
+++ b/usr/src/uts/common/io/dr_sas/dr_sas.h
@@ -38,6 +38,10 @@
* Use is subject to license terms.
*/
+/*
+ * Copyright 2019 Joyent, Inc.
+ */
+
#ifndef _DR_SAS_H_
#define _DR_SAS_H_
@@ -1755,9 +1759,8 @@ static dev_info_t *drsas_find_child(struct drsas_instance *, uint16_t,
uint8_t);
static int drsas_name_node(dev_info_t *, char *, int);
static void drsas_issue_evt_taskq(struct drsas_eventinfo *);
-static int drsas_service_evt(struct drsas_instance *, int, int, int,
- uint64_t);
-static int drsas_mode_sense_build(struct scsi_pkt *);
+static int drsas_service_evt(struct drsas_instance *, int, int, int);
+static void drsas_mode_sense_build(struct scsi_pkt *);
#ifdef __cplusplus
}
diff --git a/usr/src/uts/common/io/inotify.c b/usr/src/uts/common/io/inotify.c
index eaa0c33f0f..b20c63481f 100644
--- a/usr/src/uts/common/io/inotify.c
+++ b/usr/src/uts/common/io/inotify.c
@@ -10,7 +10,7 @@
*/
/*
- * Copyright 2017 Joyent, Inc.
+ * Copyright 2019 Joyent, Inc.
* Copyright (c) 2015 The MathWorks, Inc. All rights reserved.
*/
@@ -1121,7 +1121,7 @@ inotify_open(dev_t *devp, int flag, int otyp, cred_t *cred_p)
if (ddi_soft_state_zalloc(inotify_softstate, minor) != DDI_SUCCESS) {
vmem_free(inotify_minor, (void *)(uintptr_t)minor, 1);
mutex_exit(&inotify_lock);
- return (NULL);
+ return (EINVAL);
}
state = ddi_get_soft_state(inotify_softstate, minor);
@@ -1414,7 +1414,7 @@ inotify_attach(dev_info_t *devi, ddi_attach_cmd_t cmd)
}
if (ddi_create_minor_node(devi, "inotify", S_IFCHR,
- INOTIFYMNRN_INOTIFY, DDI_PSEUDO, NULL) == DDI_FAILURE) {
+ INOTIFYMNRN_INOTIFY, DDI_PSEUDO, 0) == DDI_FAILURE) {
cmn_err(CE_NOTE, "/dev/inotify couldn't create minor node");
ddi_soft_state_fini(&inotify_softstate);
mutex_exit(&inotify_lock);
diff --git a/usr/src/uts/common/io/mac/mac.c b/usr/src/uts/common/io/mac/mac.c
index e748e6d57b..6b966b65f3 100644
--- a/usr/src/uts/common/io/mac/mac.c
+++ b/usr/src/uts/common/io/mac/mac.c
@@ -6847,7 +6847,7 @@ i_mac_clients_hw(mac_group_t *grp, uint32_t mask)
for (mgcip = grp->mrg_clients; mgcip != NULL; mgcip = mgcip->mgc_next) {
mcip = mgcip->mgc_client;
mrp = MCIP_RESOURCE_PROPS(mcip);
- if (mcip->mci_share != NULL || (mrp->mrp_mask & mask) != 0)
+ if (mcip->mci_share != 0 || (mrp->mrp_mask & mask) != 0)
return (B_TRUE);
}
diff --git a/usr/src/uts/common/io/vnd/frameio.c b/usr/src/uts/common/io/vnd/frameio.c
index 198c14d4be..d36608efcd 100644
--- a/usr/src/uts/common/io/vnd/frameio.c
+++ b/usr/src/uts/common/io/vnd/frameio.c
@@ -10,7 +10,7 @@
*/
/*
- * Copyright 2017 Joyent, Inc.
+ * Copyright 2019 Joyent, Inc.
*/
/*
@@ -286,7 +286,7 @@ failed:
if (error == EAGAIN) {
if (frame != 0)
error = 0;
- if (*nvecs != NULL)
+ if (nvecs != NULL)
*nvecs = frame;
ASSERT(*mpp != NULL);
} else {
diff --git a/usr/src/uts/common/io/vnd/vnd.c b/usr/src/uts/common/io/vnd/vnd.c
index ac60fe678b..9ed57f30c4 100644
--- a/usr/src/uts/common/io/vnd/vnd.c
+++ b/usr/src/uts/common/io/vnd/vnd.c
@@ -2246,7 +2246,7 @@ vnd_mac_flow_control(void *arg, vnd_mac_cookie_t cookie)
ASSERT(vsp->vns_flags & VNS_F_FLOW_CONTROLLED);
ASSERT(vsp->vns_caps.vsc_fc_cookie == cookie);
vsp->vns_flags &= ~VNS_F_FLOW_CONTROLLED;
- vsp->vns_caps.vsc_fc_cookie = NULL;
+ vsp->vns_caps.vsc_fc_cookie = (vnd_mac_cookie_t)NULL;
vsp->vns_fclatch = 0;
DTRACE_VND3(flow__resumed, vnd_str_t *, vsp, uint64_t,
vsp->vns_dq_write.vdq_cur, uintptr_t, cookie);
@@ -3656,18 +3656,18 @@ vnd_squeue_tx_one(vnd_str_t *vsp, mblk_t *mp)
* punch (txtime > vns_fcupdate), then we know that it's safe to wait
* for a notification.
*/
- if (vc != NULL) {
+ if (vc != (vnd_mac_cookie_t)NULL) {
hrtime_t diff;
if (vsp->vns_caps.vsc_is_fc_f(vsp->vns_caps.vsc_is_fc_hdl,
vc) == 0)
- return (NULL);
+ return ((vnd_mac_cookie_t)NULL);
mutex_enter(&vsp->vns_lock);
diff = vsp->vns_fcupdate - txtime;
if (diff > 0) {
mutex_exit(&vsp->vns_lock);
vnd_mac_flow_control_stat(vsp, diff);
- return (NULL);
+ return ((vnd_mac_cookie_t)NULL);
}
vsp->vns_flags |= VNS_F_FLOW_CONTROLLED;
vsp->vns_caps.vsc_fc_cookie = vc;
@@ -3737,7 +3737,7 @@ vnd_squeue_tx_drain(void *arg, mblk_t *drain_mp, gsqueue_t *gsp, void *dummy)
nmps++;
mptot += msgsize(mp);
- if (vnd_squeue_tx_one(vsp, mp) != NULL) {
+ if (vnd_squeue_tx_one(vsp, mp) != (vnd_mac_cookie_t)NULL) {
blocked = B_TRUE;
break;
}
@@ -5588,7 +5588,7 @@ vnd_attach(dev_info_t *dip, ddi_attach_cmd_t cmd)
vnd_sdev_hdl = sdev_plugin_register(VND_SDEV_NAME, &vnd_sdev_ops,
&errp);
- if (vnd_sdev_hdl == NULL) {
+ if (vnd_sdev_hdl == (sdev_plugin_hdl_t)NULL) {
ddi_remove_minor_node(vnd_dip, NULL);
ddi_prop_remove_all(vnd_dip);
vnd_dip = NULL;