summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJerry Jelinek <jerry.jelinek@joyent.com>2019-04-10 12:02:07 +0000
committerJerry Jelinek <jerry.jelinek@joyent.com>2019-04-10 12:02:07 +0000
commitd8075b7816cce899d8e5b43d151dd0e44f758855 (patch)
treef71120151f80d35258c72ffb14964ec75548ecee
parent859ebfe200b305925f31fe30e4fc87ab9b8ca79a (diff)
parent1aa5f89221657a92fc85060db4d7cc17b91007e1 (diff)
downloadillumos-joyent-d8075b7816cce899d8e5b43d151dd0e44f758855.tar.gz
[illumos-gate merge]
commit 1aa5f89221657a92fc85060db4d7cc17b91007e1 10674 profile: NULL pointer errors commit afac708dc1fa673063127e6091e0f29b33739e9e 10673 ixgbe: NULL pointer errors commit 87f90db88e11450dae14066aad4712c4798415c2 10671 bnxe: NULL pointer errors commit ae6f9789e23baaa0d8a3f14c37c068824b33f5e6 10670 i40e: NULL pointer errors commit f52680fe552c1a5f149342ab191a00a072db59c5 10668 e1000g: NULL pointer errors commit 40a733010c7e8c82a55807f59f6e912e51355d2a 10664 vmxnet3s: NULL pointer errors commit e59325b74ca0760391c4b4d3acd8d3294ffc521a 10663 stmf_sbd: NULL pointer errors commit 1f99504ab52e6927794513144ed20e8c0ba5ea6e 10662 iscsit: NULL pointer errors commit 64a6bd963243a20fc11b593b7bec96ea000f8bf6 10660 swrand: NULL pointer errors commit d659c726b2a72b51ac2dc9a7f6878463fc070c87 10659 sha2: NULL pointer errors commit 2667222682da9a362b1246a1e39cdaf1f38cb56e 10658 kiconv_ja: NULL pointer errors commit 986667e8344d0f6a3e45df8c7ddcc62f747e3793 10650 timerfd: NULL pointer errors commit 0f36d2f14c16f2aa8dbbd72241001f534f1ca1b2 10666 amd8111s: NULL pointer errors commit 4dae08142020c6a787edca246244aa744a986710 10667 ipmi: NULL pointer errors commit 4138d84ec424020fc615b6aa351408e1efb98a38 10646 softmac: NULL pointer errors commit 95369d7b997316a0170a6c243bfbfc61d1258fb5 10634 qlge: NULL pointer errors commit 3aedb073327854aba1e08f2cd606208552e0ea55 10632 pm: NULL pointer errors commit 490f8d7888f182c08d8e83e38cd281c8f867b0a3 10682 strftime(3c): Replace (char *)0 by NULL commit 12e9eaaed8879c4b56117e0ea40df0a2d2e16b0e 10625 physmem: NULL pointer error commit d5f5d51371113b7fe3bc52690ff232a5b6719bfd 10672 igb: NULL pointer issues commit 5edb9b5616c939f80239ac527226023f79962708 10693 mmp test profiles incorrectly include mmp_write_distribution test commit 03d81b69f83828ec5d3e0fe05c00d07699706d2e 10681 udp.c: udp_reuseaddr commit 9c3cf8b30473a1ce5e6f5e1b75844daf78ae0309 10702 loader: console.c inconsistent indenting
-rw-r--r--usr/src/boot/sys/boot/common/console.c6
-rw-r--r--usr/src/man/man3c/strftime.3c5
-rw-r--r--usr/src/test/zfs-tests/runfiles/delphix.run2
-rw-r--r--usr/src/test/zfs-tests/runfiles/omnios.run2
-rw-r--r--usr/src/test/zfs-tests/runfiles/openindiana.run2
-rw-r--r--usr/src/uts/common/crypto/io/sha2_mod.c2
-rw-r--r--usr/src/uts/common/crypto/io/swrand.c2
-rw-r--r--usr/src/uts/common/dtrace/profile.c8
-rw-r--r--usr/src/uts/common/inet/udp/udp.c4
-rw-r--r--usr/src/uts/common/io/bnxe/bnxe_fcoe.c2
-rw-r--r--usr/src/uts/common/io/comstar/lu/stmf_sbd/sbd.c4
-rw-r--r--usr/src/uts/common/io/comstar/lu/stmf_sbd/sbd_scsi.c8
-rw-r--r--usr/src/uts/common/io/comstar/port/iscsit/iscsit.c22
-rw-r--r--usr/src/uts/common/io/comstar/port/iscsit/iscsit_tgt.c22
-rw-r--r--usr/src/uts/common/io/e1000g/e1000g_alloc.c6
-rw-r--r--usr/src/uts/common/io/e1000g/e1000g_tx.c4
-rw-r--r--usr/src/uts/common/io/fibre-channel/fca/qlge/qlge.c21
-rw-r--r--usr/src/uts/common/io/i40e/i40e_osdep.c2
-rw-r--r--usr/src/uts/common/io/i40e/i40e_transceiver.c6
-rw-r--r--usr/src/uts/common/io/igb/igb_buf.c12
-rw-r--r--usr/src/uts/common/io/igb/igb_main.c2
-rw-r--r--usr/src/uts/common/io/igb/igb_tx.c2
-rw-r--r--usr/src/uts/common/io/ixgbe/ixgbe_buf.c12
-rw-r--r--usr/src/uts/common/io/ixgbe/ixgbe_main.c7
-rw-r--r--usr/src/uts/common/io/ixgbe/ixgbe_tx.c2
-rw-r--r--usr/src/uts/common/io/physmem.c4
-rw-r--r--usr/src/uts/common/io/pm.c6
-rw-r--r--usr/src/uts/common/io/softmac/softmac_fp.c4
-rw-r--r--usr/src/uts/common/io/timerfd.c8
-rw-r--r--usr/src/uts/common/kiconv/kiconv_ja/kiconv_ja.c68
-rw-r--r--usr/src/uts/intel/io/amd8111s/amd8111s_main.c15
-rw-r--r--usr/src/uts/intel/io/ipmi/ipmi_main.c2
-rw-r--r--usr/src/uts/intel/io/vmxnet3s/vmxnet3_utils.c4
33 files changed, 135 insertions, 143 deletions
diff --git a/usr/src/boot/sys/boot/common/console.c b/usr/src/boot/sys/boot/common/console.c
index 923ab5e5ab..99aa62b817 100644
--- a/usr/src/boot/sys/boot/common/console.c
+++ b/usr/src/boot/sys/boot/common/console.c
@@ -299,10 +299,10 @@ cons_change(const char *string)
(C_ACTIVEIN | C_ACTIVEOUT)) ==
(C_ACTIVEIN | C_ACTIVEOUT))
active++;
- }
+ }
- if (active == 0)
- return (CMD_ERROR); /* Recovery failed. */
+ if (active == 0)
+ return (CMD_ERROR); /* Recovery failed. */
}
return (CMD_OK);
diff --git a/usr/src/man/man3c/strftime.3c b/usr/src/man/man3c/strftime.3c
index 4ee905324b..269213fed4 100644
--- a/usr/src/man/man3c/strftime.3c
+++ b/usr/src/man/man3c/strftime.3c
@@ -46,7 +46,7 @@
.\" Copyright (c) 2014 Gary Mills
.\" Copyright 2014 Garrett D'Amore <garrett@damore.org>
.\"
-.TH STRFTIME 3C "Jun 24, 2014"
+.TH STRFTIME 3C "Mar 30, 2019"
.SH NAME
strftime, strftime_l cftime, ascftime \- convert date and time to string
.SH SYNOPSIS
@@ -75,7 +75,6 @@ strftime, strftime_l cftime, ascftime \- convert date and time to string
.fi
.SH DESCRIPTION
-.sp
.LP
The \fBstrftime()\fR, \fBstrftime_l()\fR, \fBascftime()\fR, and \fBcftime()\fR
functions place
@@ -91,7 +90,7 @@ that overlap, the behavior is undefined. For \fBstrftime()\fR, no more than
behaves identically to \fBstrftime()\fR function, but instead of operating in
the current locale, it operates in the locale specified by \fIloc\fR.
.LP
-If \fIformat\fR is \fB(char *)0\fR, then the locale's default format is used.
+If \fIformat\fR is \fBNULL\fR, then the locale's default format is used.
For \fBstrftime()\fR the default format is the same as \fB%c\fR; for
\fBcftime()\fR and \fBascftime()\fR the default format is the same as \fB%+\fR.
\fBcftime()\fR and \fBascftime()\fR first try to use the value of the
diff --git a/usr/src/test/zfs-tests/runfiles/delphix.run b/usr/src/test/zfs-tests/runfiles/delphix.run
index 41e6d30e8b..322b5cd961 100644
--- a/usr/src/test/zfs-tests/runfiles/delphix.run
+++ b/usr/src/test/zfs-tests/runfiles/delphix.run
@@ -466,7 +466,7 @@ tests = ['mmap_read_001_pos', 'mmap_write_001_pos']
tests = ['mmp_on_thread', 'mmp_on_uberblocks', 'mmp_on_off', 'mmp_interval',
'mmp_active_import', 'mmp_inactive_import', 'mmp_exported_import',
'mmp_write_uberblocks', 'mmp_reset_interval', 'multihost_history',
- 'mmp_on_zdb', 'mmp_write_distribution']
+ 'mmp_on_zdb']
[/opt/zfs-tests/tests/functional/mount]
tests = ['umount_001', 'umountall_001']
diff --git a/usr/src/test/zfs-tests/runfiles/omnios.run b/usr/src/test/zfs-tests/runfiles/omnios.run
index e46c59416e..56e0657e7a 100644
--- a/usr/src/test/zfs-tests/runfiles/omnios.run
+++ b/usr/src/test/zfs-tests/runfiles/omnios.run
@@ -435,7 +435,7 @@ tests = ['mmap_read_001_pos', 'mmap_write_001_pos']
tests = ['mmp_on_thread', 'mmp_on_uberblocks', 'mmp_on_off', 'mmp_interval',
'mmp_active_import', 'mmp_inactive_import', 'mmp_exported_import',
'mmp_write_uberblocks', 'mmp_reset_interval', 'multihost_history',
- 'mmp_on_zdb', 'mmp_write_distribution']
+ 'mmp_on_zdb']
[/opt/zfs-tests/tests/functional/mount]
tests = ['umount_001', 'umountall_001']
diff --git a/usr/src/test/zfs-tests/runfiles/openindiana.run b/usr/src/test/zfs-tests/runfiles/openindiana.run
index 188f9b24c2..a8d6859267 100644
--- a/usr/src/test/zfs-tests/runfiles/openindiana.run
+++ b/usr/src/test/zfs-tests/runfiles/openindiana.run
@@ -435,7 +435,7 @@ tests = ['mmap_read_001_pos', 'mmap_write_001_pos']
tests = ['mmp_on_thread', 'mmp_on_uberblocks', 'mmp_on_off', 'mmp_interval',
'mmp_active_import', 'mmp_inactive_import', 'mmp_exported_import',
'mmp_write_uberblocks', 'mmp_reset_interval', 'multihost_history',
- 'mmp_on_zdb', 'mmp_write_distribution']
+ 'mmp_on_zdb']
[/opt/zfs-tests/tests/functional/mount]
tests = ['umount_001', 'umountall_001']
diff --git a/usr/src/uts/common/crypto/io/sha2_mod.c b/usr/src/uts/common/crypto/io/sha2_mod.c
index 208b823f93..186c0c3240 100644
--- a/usr/src/uts/common/crypto/io/sha2_mod.c
+++ b/usr/src/uts/common/crypto/io/sha2_mod.c
@@ -228,7 +228,7 @@ static crypto_provider_info_t sha2_prov_info = {
sha2_mech_info_tab
};
-static crypto_kcf_provider_handle_t sha2_prov_handle = NULL;
+static crypto_kcf_provider_handle_t sha2_prov_handle = 0;
int
_init()
diff --git a/usr/src/uts/common/crypto/io/swrand.c b/usr/src/uts/common/crypto/io/swrand.c
index dec74a9d8f..c5e5942398 100644
--- a/usr/src/uts/common/crypto/io/swrand.c
+++ b/usr/src/uts/common/crypto/io/swrand.c
@@ -101,7 +101,7 @@ static uint32_t previous_bytes[HASHSIZE/BYTES_IN_WORD]; /* prev random bytes */
static physmem_entsrc_t entsrc; /* Physical mem as an entropy source */
static timeout_id_t rnd_timeout_id;
static int snum_waiters;
-static crypto_kcf_provider_handle_t swrand_prov_handle = NULL;
+static crypto_kcf_provider_handle_t swrand_prov_handle = 0;
swrand_stats_t swrand_stats;
static int physmem_ent_init(physmem_entsrc_t *);
diff --git a/usr/src/uts/common/dtrace/profile.c b/usr/src/uts/common/dtrace/profile.c
index 106fb735df..1a6e8d85cc 100644
--- a/usr/src/uts/common/dtrace/profile.c
+++ b/usr/src/uts/common/dtrace/profile.c
@@ -61,7 +61,7 @@ static dtrace_provider_id_t profile_id;
* On SPARC, the picture is further complicated because the compiler
* optimizes away tail-calls -- so the following frames are optimized away:
*
- * profile_fire
+ * profile_fire
* cyclic_expire
*
* This gives three frames. However, on DEBUG kernels, the cyclic_expire
@@ -200,14 +200,14 @@ profile_provide(void *arg, const dtrace_probedesc_t *desc)
} types[] = {
{ PROF_PREFIX_PROFILE, PROF_PROFILE },
{ PROF_PREFIX_TICK, PROF_TICK },
- { NULL, NULL }
+ { NULL, 0 }
};
const struct {
char *name;
hrtime_t mult;
} suffixes[] = {
- { "ns", NANOSEC / NANOSEC },
+ { "ns", NANOSEC / NANOSEC },
{ "nsec", NANOSEC / NANOSEC },
{ "us", NANOSEC / MICROSEC },
{ "usec", NANOSEC / MICROSEC },
@@ -466,7 +466,7 @@ profile_attach(dev_info_t *devi, ddi_attach_cmd_t cmd)
}
if (ddi_create_minor_node(devi, "profile", S_IFCHR, 0,
- DDI_PSEUDO, NULL) == DDI_FAILURE ||
+ DDI_PSEUDO, 0) == DDI_FAILURE ||
dtrace_register("profile", &profile_attr,
DTRACE_PRIV_KERNEL | DTRACE_PRIV_USER, NULL,
&profile_pops, NULL, &profile_id) != 0) {
diff --git a/usr/src/uts/common/inet/udp/udp.c b/usr/src/uts/common/inet/udp/udp.c
index d847b9b6ce..165adcb852 100644
--- a/usr/src/uts/common/inet/udp/udp.c
+++ b/usr/src/uts/common/inet/udp/udp.c
@@ -5135,10 +5135,10 @@ udp_do_bind(conn_t *connp, struct sockaddr *sa, socklen_t len, cred_t *cr,
* another stream. If another stream is already using the
* requested IP address and port, the behavior depends on
* "bind_to_req_port_only". If set the bind fails; otherwise we
- * search for any an unused port to bind to the stream.
+ * search for any unused port to bind to the stream.
*
* As per the BSD semantics, as modified by the Deering multicast
- * changes, if udp_reuseaddr is set, then we allow multiple binds
+ * changes, if conn_reuseaddr is set, then we allow multiple binds
* to the same port independent of the local IP address.
*
* This is slightly different than in SunOS 4.X which did not
diff --git a/usr/src/uts/common/io/bnxe/bnxe_fcoe.c b/usr/src/uts/common/io/bnxe/bnxe_fcoe.c
index 08780cdec4..87a0c670ca 100644
--- a/usr/src/uts/common/io/bnxe/bnxe_fcoe.c
+++ b/usr/src/uts/common/io/bnxe/bnxe_fcoe.c
@@ -1351,7 +1351,7 @@ boolean_t BnxeFcoePrvPoll(dev_info_t * pDev)
if (pRxQ->inPollMode == B_FALSE)
{
BnxeLogWarn(pUM, "Polling on FCoE ring %d when NOT in poll mode!", idx);
- return NULL;
+ return B_FALSE;
}
pRxQ->pollCnt++;
diff --git a/usr/src/uts/common/io/comstar/lu/stmf_sbd/sbd.c b/usr/src/uts/common/io/comstar/lu/stmf_sbd/sbd.c
index d2dca92dfc..2d1f443dda 100644
--- a/usr/src/uts/common/io/comstar/lu/stmf_sbd/sbd.c
+++ b/usr/src/uts/common/io/comstar/lu/stmf_sbd/sbd.c
@@ -888,7 +888,7 @@ sbd_load_section_hdr(sbd_lu_t *sl, sm_section_hdr_t *sms)
{
sm_section_hdr_t h;
uint64_t st;
- sbd_status_t ret;
+ sbd_status_t ret;
for (st = sl->sl_meta_offset + sizeof (sbd_meta_start_t);
st < sl->sl_meta_size_used; st += h.sms_size) {
@@ -3502,7 +3502,7 @@ sbd_update_zfs_prop(sbd_lu_t *sl)
num = (*dp) & 0xF;
*ah_meta++ = (num < 10) ? (num + '0') : (num + ('a' - 10));
}
- *ah_meta = NULL;
+ *ah_meta = '\0';
file = sbd_get_zvol_name(sl);
if (sbd_zvolset(file, (char *)ptr)) {
ret = SBD_META_CORRUPTED;
diff --git a/usr/src/uts/common/io/comstar/lu/stmf_sbd/sbd_scsi.c b/usr/src/uts/common/io/comstar/lu/stmf_sbd/sbd_scsi.c
index 0ca48aed9d..a2e6fe74fa 100644
--- a/usr/src/uts/common/io/comstar/lu/stmf_sbd/sbd_scsi.c
+++ b/usr/src/uts/common/io/comstar/lu/stmf_sbd/sbd_scsi.c
@@ -3392,8 +3392,8 @@ sbd_new_task(struct scsi_task *task, struct stmf_data_buf *initial_dbuf)
return;
/*
* } else if (cdb1 == SSVC_ACTION_READ_LONG_G4) {
- * sbd_handle_read(task, initial_dbuf);
- * return;
+ * sbd_handle_read(task, initial_dbuf);
+ * return;
*/
}
}
@@ -3402,7 +3402,7 @@ sbd_new_task(struct scsi_task *task, struct stmf_data_buf *initial_dbuf)
* if (cdb0 == SCMD_SVC_ACTION_OUT_G4) {
* if (cdb1 == SSVC_ACTION_WRITE_LONG_G4) {
* sbd_handle_write(task, initial_dbuf);
- * return;
+ * return;
* }
* }
*/
@@ -3703,7 +3703,7 @@ sbd_flush_data_cache(sbd_lu_t *sl, int fsync_done)
over_fsync:
if (((sl->sl_data_vtype == VCHR) || (sl->sl_data_vtype == VBLK)) &&
((sl->sl_flags & SL_NO_DATA_DKIOFLUSH) == 0)) {
- ret = VOP_IOCTL(sl->sl_data_vp, DKIOCFLUSHWRITECACHE, NULL,
+ ret = VOP_IOCTL(sl->sl_data_vp, DKIOCFLUSHWRITECACHE, 0,
FKIOCTL, kcred, &r, NULL);
if ((ret == ENOTTY) || (ret == ENOTSUP)) {
mutex_enter(&sl->sl_lock);
diff --git a/usr/src/uts/common/io/comstar/port/iscsit/iscsit.c b/usr/src/uts/common/io/comstar/port/iscsit/iscsit.c
index b8d31d00c2..3fd198a135 100644
--- a/usr/src/uts/common/io/comstar/port/iscsit/iscsit.c
+++ b/usr/src/uts/common/io/comstar/port/iscsit/iscsit.c
@@ -912,7 +912,7 @@ iscsit_rx_pdu(idm_conn_t *ic, idm_pdu_t *rx_pdu)
* now we treat it as a protocol error.
*/
idm_pdu_complete(rx_pdu, IDM_STATUS_SUCCESS);
- idm_conn_event(ic, CE_TRANSPORT_FAIL, NULL);
+ idm_conn_event(ic, CE_TRANSPORT_FAIL, 0);
break;
case ISCSI_OP_SCSI_TASK_MGT_MSG:
if (iscsit_check_cmdsn_and_queue(rx_pdu)) {
@@ -933,7 +933,7 @@ iscsit_rx_pdu(idm_conn_t *ic, idm_pdu_t *rx_pdu)
default:
/* Protocol error */
idm_pdu_complete(rx_pdu, IDM_STATUS_SUCCESS);
- idm_conn_event(ic, CE_TRANSPORT_FAIL, NULL);
+ idm_conn_event(ic, CE_TRANSPORT_FAIL, 0);
break;
}
}
@@ -958,7 +958,7 @@ void
iscsit_rx_scsi_rsp(idm_conn_t *ic, idm_pdu_t *rx_pdu)
{
idm_pdu_complete(rx_pdu, IDM_STATUS_SUCCESS);
- idm_conn_event(ic, CE_TRANSPORT_FAIL, NULL);
+ idm_conn_event(ic, CE_TRANSPORT_FAIL, 0);
}
void
@@ -1427,7 +1427,7 @@ iscsit_conn_logout(iscsit_conn_t *ict)
*/
mutex_enter(&ict->ict_mutex);
if (ict->ict_lost == B_FALSE && ict->ict_destroyed == B_FALSE) {
- idm_conn_event(ict->ict_ic, CE_LOGOUT_SESSION_SUCCESS, NULL);
+ idm_conn_event(ict->ict_ic, CE_LOGOUT_SESSION_SUCCESS, 0);
}
mutex_exit(&ict->ict_mutex);
}
@@ -1442,7 +1442,7 @@ iscsit_conn_logout(iscsit_conn_t *ict)
* Target
* Target portal (group?) == local port (really but we're not going to do this)
* iscsit needs to map connections to local ports (whatever we decide
- * they are)
+ * they are)
* Target == ?
*/
@@ -2349,9 +2349,9 @@ iscsit_op_scsi_task_mgmt(iscsit_conn_t *ict, idm_pdu_t *rx_pdu)
iscsit_task_t *itask;
iscsit_task_t *tm_itask;
scsi_task_t *task;
- iscsi_scsi_task_mgt_hdr_t *iscsi_tm =
+ iscsi_scsi_task_mgt_hdr_t *iscsi_tm =
(iscsi_scsi_task_mgt_hdr_t *)rx_pdu->isp_hdr;
- iscsi_scsi_task_mgt_rsp_hdr_t *iscsi_tm_rsp =
+ iscsi_scsi_task_mgt_rsp_hdr_t *iscsi_tm_rsp =
(iscsi_scsi_task_mgt_rsp_hdr_t *)rx_pdu->isp_hdr;
uint32_t rtt, cmdsn, refcmdsn;
uint8_t tm_func;
@@ -2598,7 +2598,7 @@ iscsit_pdu_op_login_cmd(iscsit_conn_t *ict, idm_pdu_t *rx_pdu)
void
iscsit_pdu_op_logout_cmd(iscsit_conn_t *ict, idm_pdu_t *rx_pdu)
{
- iscsi_logout_hdr_t *logout_req =
+ iscsi_logout_hdr_t *logout_req =
(iscsi_logout_hdr_t *)rx_pdu->isp_hdr;
iscsi_logout_rsp_hdr_t *logout_rsp;
idm_pdu_t *resp;
@@ -2712,7 +2712,7 @@ iscsit_send_async_event(iscsit_conn_t *ict, uint8_t event)
*/
abt = idm_pdu_alloc(sizeof (iscsi_hdr_t), 0);
if (abt == NULL) {
- idm_conn_event(ict->ict_ic, CE_TRANSPORT_FAIL, NULL);
+ idm_conn_event(ict->ict_ic, CE_TRANSPORT_FAIL, 0);
return;
}
@@ -2762,7 +2762,7 @@ iscsit_send_reject(iscsit_conn_t *ict, idm_pdu_t *rejected_pdu, uint8_t reason)
reject_pdu = idm_pdu_alloc(sizeof (iscsi_hdr_t),
rejected_pdu->isp_hdrlen);
if (reject_pdu == NULL) {
- idm_conn_event(ict->ict_ic, CE_TRANSPORT_FAIL, NULL);
+ idm_conn_event(ict->ict_ic, CE_TRANSPORT_FAIL, 0);
return;
}
idm_pdu_init(reject_pdu, ict->ict_ic, NULL, NULL);
@@ -3188,7 +3188,7 @@ static void
iscsit_add_pdu_to_queue(iscsit_sess_t *ist, idm_pdu_t *rx_pdu)
{
iscsit_cbuf_t *cbuf = ist->ist_rxpdu_queue;
- iscsit_conn_t *ict = rx_pdu->isp_ic->ic_handle;
+ iscsit_conn_t *ict = rx_pdu->isp_ic->ic_handle;
uint32_t cmdsn =
((iscsi_scsi_cmd_hdr_t *)rx_pdu->isp_hdr)->cmdsn;
uint32_t index;
diff --git a/usr/src/uts/common/io/comstar/port/iscsit/iscsit_tgt.c b/usr/src/uts/common/io/comstar/port/iscsit/iscsit_tgt.c
index 97a1909ca0..5d551804a8 100644
--- a/usr/src/uts/common/io/comstar/port/iscsit/iscsit_tgt.c
+++ b/usr/src/uts/common/io/comstar/port/iscsit/iscsit_tgt.c
@@ -1084,7 +1084,7 @@ iscsit_tgt_avl_compare(const void *void_tgt1, const void *void_tgt2)
{
const iscsit_tgt_t *tgt1 = void_tgt1;
const iscsit_tgt_t *tgt2 = void_tgt2;
- int result;
+ int result;
/*
* Sort by ISID first then TSIH
@@ -1132,7 +1132,7 @@ iscsit_portal_t *
iscsit_tgt_lookup_portal(iscsit_tgt_t *tgt, struct sockaddr_storage *sa,
iscsit_tpgt_t **output_tpgt)
{
- iscsit_tpgt_t *tpgt;
+ iscsit_tpgt_t *tpgt;
iscsit_portal_t *portal;
/* Caller holds tgt->target_mutex */
@@ -1189,7 +1189,7 @@ iscsit_tgt_unbind_sess(iscsit_tgt_t *tgt, iscsit_sess_t *sess)
}
}
-#define LOCK_FOR_SESS_LOOKUP(lookup_tgt) { \
+#define LOCK_FOR_SESS_LOOKUP(lookup_tgt) { \
if ((lookup_tgt) == NULL) { \
ISCSIT_GLOBAL_LOCK(RW_READER); \
} else { \
@@ -1197,11 +1197,11 @@ iscsit_tgt_unbind_sess(iscsit_tgt_t *tgt, iscsit_sess_t *sess)
} \
}
-#define UNLOCK_FOR_SESS_LOOKUP(lookup_tgt) { \
+#define UNLOCK_FOR_SESS_LOOKUP(lookup_tgt) { \
if ((lookup_tgt) == NULL) { \
ISCSIT_GLOBAL_UNLOCK(); \
- } else { \
- mutex_exit(&(lookup_tgt)->target_mutex); \
+ } else { \
+ mutex_exit(&(lookup_tgt)->target_mutex); \
} \
}
@@ -1224,7 +1224,7 @@ iscsit_tgt_lookup_sess(iscsit_tgt_t *tgt, char *initiator_name,
}
LOCK_FOR_SESS_LOOKUP(tgt);
- if (avl_numnodes(sess_avl) == NULL) {
+ if (avl_numnodes(sess_avl) == 0) {
UNLOCK_FOR_SESS_LOOKUP(tgt);
return (NULL);
}
@@ -1419,7 +1419,7 @@ iscsit_tpgt_avl_compare(const void *void_tpgt1, const void *void_tpgt2)
static idm_status_t
iscsit_tgt_online(iscsit_tgt_t *tgt)
{
- iscsit_tpgt_t *tpgt, *tpgt_fail;
+ iscsit_tpgt_t *tpgt, *tpgt_fail;
idm_status_t rc;
mutex_enter(&tgt->target_mutex);
@@ -1468,7 +1468,7 @@ iscsit_tgt_offline_cb(void *tgt_void)
static void
iscsit_tgt_offline(iscsit_tgt_t *tgt)
{
- iscsit_tpgt_t *tpgt;
+ iscsit_tpgt_t *tpgt;
iscsit_sess_t *ist;
mutex_enter(&tgt->target_mutex);
@@ -1741,7 +1741,7 @@ iscsit_tpg_avl_compare(const void *void_tpg1, const void *void_tpg2)
{
const iscsit_tpg_t *tpg1 = void_tpg1;
const iscsit_tpg_t *tpg2 = void_tpg2;
- int result;
+ int result;
/*
* Sort by ISID first then TSIH
@@ -2077,7 +2077,7 @@ iscsit_ini_avl_compare(const void *void_ini1, const void *void_ini2)
{
const iscsit_ini_t *ini1 = void_ini1;
const iscsit_ini_t *ini2 = void_ini2;
- int result;
+ int result;
/*
* Sort by ISID first then TSIH
diff --git a/usr/src/uts/common/io/e1000g/e1000g_alloc.c b/usr/src/uts/common/io/e1000g/e1000g_alloc.c
index 754d5a962c..c7496cd164 100644
--- a/usr/src/uts/common/io/e1000g/e1000g_alloc.c
+++ b/usr/src/uts/common/io/e1000g/e1000g_alloc.c
@@ -663,7 +663,7 @@ e1000g_free_rx_descriptors(e1000g_rx_data_t *rx_data)
ddi_dma_free_handle(&rx_data->rbd_dma_handle);
rx_data->rbd_dma_handle = NULL;
}
- rx_data->rbd_dma_addr = NULL;
+ rx_data->rbd_dma_addr = 0;
rx_data->rbd_first = NULL;
rx_data->rbd_last = NULL;
}
@@ -683,7 +683,7 @@ e1000g_free_tx_descriptors(e1000g_tx_ring_t *tx_ring)
ddi_dma_free_handle(&tx_ring->tbd_dma_handle);
tx_ring->tbd_dma_handle = NULL;
}
- tx_ring->tbd_dma_addr = NULL;
+ tx_ring->tbd_dma_addr = 0;
tx_ring->tbd_first = NULL;
tx_ring->tbd_last = NULL;
}
@@ -1103,7 +1103,7 @@ e1000g_free_dma_buffer(dma_buffer_t *buf)
return;
}
- buf->dma_address = NULL;
+ buf->dma_address = 0;
if (buf->acc_handle != NULL) {
ddi_dma_mem_free(&buf->acc_handle);
diff --git a/usr/src/uts/common/io/e1000g/e1000g_tx.c b/usr/src/uts/common/io/e1000g/e1000g_tx.c
index 80ba93aef9..7c64403070 100644
--- a/usr/src/uts/common/io/e1000g/e1000g_tx.c
+++ b/usr/src/uts/common/io/e1000g/e1000g_tx.c
@@ -299,7 +299,7 @@ e1000g_send(struct e1000g *Adapter, mblk_t *mp)
* expect to bcopy into pre-allocated page-aligned
* buffer
*/
- new_mp = allocb(hdr_frag_len, NULL);
+ new_mp = allocb(hdr_frag_len, 0);
if (!new_mp)
return (B_FALSE);
bcopy(next_mp->b_rptr, new_mp->b_rptr, hdr_frag_len);
@@ -1196,7 +1196,7 @@ e1000g_recycle(e1000g_tx_ring_t *tx_ring)
* agents which fully-optimize the inter-transaction turn-around (zero
* additional initiator latency when pre-granted bus ownership).
*
- * This issue does not exist in PCI bus mode, when any agent is operating
+ * This issue does not exist in PCI bus mode, when any agent is operating
* in 32 bit only mode or on chipsets that do not do 32 bit split
* completions for 64 bit read requests (Serverworks chipsets). P64H2 does
* 32 bit split completions for any read request that has bit 2 set to 1
diff --git a/usr/src/uts/common/io/fibre-channel/fca/qlge/qlge.c b/usr/src/uts/common/io/fibre-channel/fca/qlge/qlge.c
index 213dbc51b0..cf20b75a66 100644
--- a/usr/src/uts/common/io/fibre-channel/fca/qlge/qlge.c
+++ b/usr/src/uts/common/io/fibre-channel/fca/qlge/qlge.c
@@ -1159,9 +1159,9 @@ ql_refill_sbuf_free_list(struct bq_desc *sbq_desc, boolean_t alloc_memory)
/*
* If we are freeing the buffers as a result of adapter unload, get out
*/
- if ((sbq_desc->free_buf != NULL) ||
+ if ((sbq_desc->free_buf != 0) ||
(qlge->mac_flags == QL_MAC_DETACH)) {
- if (sbq_desc->free_buf == NULL)
+ if (sbq_desc->free_buf == 0)
atomic_dec_32(&rx_ring->rx_indicate);
mutex_exit(&rx_ring->sbq_lock);
return;
@@ -1272,9 +1272,9 @@ ql_refill_lbuf_free_list(struct bq_desc *lbq_desc, boolean_t alloc_memory)
/*
* If we are freeing the buffers as a result of adapter unload, get out
*/
- if ((lbq_desc->free_buf != NULL) ||
+ if ((lbq_desc->free_buf != 0) ||
(qlge->mac_flags == QL_MAC_DETACH)) {
- if (lbq_desc->free_buf == NULL)
+ if (lbq_desc->free_buf == 0)
atomic_dec_32(&rx_ring->rx_indicate);
mutex_exit(&rx_ring->lbq_lock);
return;
@@ -5022,12 +5022,9 @@ typedef uint8_t ub1;
}
ub4
-hash(k, length, initval)
-register ub1 *k; /* the key */
-register ub4 length; /* the length of the key */
-register ub4 initval; /* the previous hash, or an arbitrary value */
+hash(ub1 *k, ub4 length, ub4 initval)
{
- register ub4 a, b, c, len;
+ ub4 a, b, c, len;
/* Set up the internal state */
len = length;
@@ -5199,7 +5196,7 @@ ql_hw_lso_setup(qlge_t *qlge, uint32_t mss, caddr_t bp,
if (IPH_HDR_VERSION((ipha_t *)(void *)(bp + mac_hdr_len)) ==
IPV4_VERSION) {
if (etherType == ETHERTYPE_IP /* 0800 */) {
- iphdr = (struct ip *)(void *)(bp+mac_hdr_len);
+ iphdr = (struct ip *)(void *)(bp+mac_hdr_len);
} else {
/* EMPTY */
QL_PRINT(DBG_TX, ("%s(%d) : IPv4 None IP packet"
@@ -5353,7 +5350,7 @@ ql_send_common(struct tx_ring *tx_ring, mblk_t *mp)
cmn_err(CE_NOTE, "%s: quit, packet oversize %d\n",
__func__, (int)total_len);
#endif
- return (NULL);
+ return (0);
}
bp = (caddr_t)mp->b_rptr;
@@ -8034,7 +8031,7 @@ static struct modldrv modldrv = {
};
static struct modlinkage modlinkage = {
- MODREV_1, &modldrv, NULL
+ MODREV_1, &modldrv, NULL
};
/*
diff --git a/usr/src/uts/common/io/i40e/i40e_osdep.c b/usr/src/uts/common/io/i40e/i40e_osdep.c
index 44a2c99ab6..5d3a550ec5 100644
--- a/usr/src/uts/common/io/i40e/i40e_osdep.c
+++ b/usr/src/uts/common/io/i40e/i40e_osdep.c
@@ -97,7 +97,7 @@ i40e_allocate_dma_mem(struct i40e_hw *hw, struct i40e_dma_mem *mem,
DDI_DMA_RDWR | DDI_DMA_STREAMING, DDI_DMA_DONTWAIT, NULL,
&cookie, &cookie_num);
if (rc != DDI_DMA_MAPPED) {
- mem->pa = NULL;
+ mem->pa = 0;
ASSERT(mem->idm_acc_handle != NULL);
ddi_dma_mem_free(&mem->idm_acc_handle);
mem->idm_acc_handle = NULL;
diff --git a/usr/src/uts/common/io/i40e/i40e_transceiver.c b/usr/src/uts/common/io/i40e/i40e_transceiver.c
index dbb8ae2f67..40b2433607 100644
--- a/usr/src/uts/common/io/i40e/i40e_transceiver.c
+++ b/usr/src/uts/common/io/i40e/i40e_transceiver.c
@@ -564,10 +564,10 @@ i40e_prev_desc(int base, int count, int size)
static void
i40e_free_dma_buffer(i40e_dma_buffer_t *dmap)
{
- if (dmap->dmab_dma_address != NULL) {
+ if (dmap->dmab_dma_address != 0) {
VERIFY(dmap->dmab_dma_handle != NULL);
(void) ddi_dma_unbind_handle(dmap->dmab_dma_handle);
- dmap->dmab_dma_address = NULL;
+ dmap->dmab_dma_address = 0;
dmap->dmab_size = 0;
}
@@ -587,7 +587,7 @@ i40e_free_dma_buffer(i40e_dma_buffer_t *dmap)
* therefore should always be NULLed out due to the above code. This
* is here to catch us acting sloppy.
*/
- ASSERT(dmap->dmab_dma_address == NULL);
+ ASSERT(dmap->dmab_dma_address == 0);
ASSERT(dmap->dmab_address == NULL);
ASSERT(dmap->dmab_size == 0);
dmap->dmab_len = 0;
diff --git a/usr/src/uts/common/io/igb/igb_buf.c b/usr/src/uts/common/io/igb/igb_buf.c
index 1987fe6cfc..5c0c2479e4 100644
--- a/usr/src/uts/common/io/igb/igb_buf.c
+++ b/usr/src/uts/common/io/igb/igb_buf.c
@@ -278,7 +278,7 @@ igb_alloc_tbd_ring(igb_tx_ring_t *tx_ring)
if (ret != DDI_DMA_MAPPED) {
igb_log(igb, IGB_LOG_ERROR,
"Could not bind tbd dma resource: %x", ret);
- tx_ring->tbd_area.dma_address = NULL;
+ tx_ring->tbd_area.dma_address = 0;
if (tx_ring->tbd_area.acc_handle != NULL) {
ddi_dma_mem_free(&tx_ring->tbd_area.acc_handle);
tx_ring->tbd_area.acc_handle = NULL;
@@ -320,7 +320,7 @@ igb_free_tbd_ring(igb_tx_ring_t *tx_ring)
tx_ring->tbd_area.dma_handle = NULL;
}
tx_ring->tbd_area.address = NULL;
- tx_ring->tbd_area.dma_address = NULL;
+ tx_ring->tbd_area.dma_address = 0;
tx_ring->tbd_area.size = 0;
tx_ring->tbd_ring = NULL;
@@ -506,7 +506,7 @@ igb_alloc_rbd_ring(igb_rx_data_t *rx_data)
if (ret != DDI_DMA_MAPPED) {
igb_log(igb, IGB_LOG_ERROR,
"Could not bind rbd dma resource: %x", ret);
- rx_data->rbd_area.dma_address = NULL;
+ rx_data->rbd_area.dma_address = 0;
if (rx_data->rbd_area.acc_handle != NULL) {
ddi_dma_mem_free(&rx_data->rbd_area.acc_handle);
rx_data->rbd_area.acc_handle = NULL;
@@ -548,7 +548,7 @@ igb_free_rbd_ring(igb_rx_data_t *rx_data)
rx_data->rbd_area.dma_handle = NULL;
}
rx_data->rbd_area.address = NULL;
- rx_data->rbd_area.dma_address = NULL;
+ rx_data->rbd_area.dma_address = 0;
rx_data->rbd_area.size = 0;
rx_data->rbd_ring = NULL;
@@ -602,7 +602,7 @@ igb_alloc_dma_buffer(igb_t *igb,
DDI_DMA_DONTWAIT, NULL, &cookie, &cookie_num);
if (ret != DDI_DMA_MAPPED) {
- buf->dma_address = NULL;
+ buf->dma_address = 0;
if (buf->acc_handle != NULL) {
ddi_dma_mem_free(&buf->acc_handle);
buf->acc_handle = NULL;
@@ -634,7 +634,7 @@ igb_free_dma_buffer(dma_buffer_t *buf)
{
if (buf->dma_handle != NULL) {
(void) ddi_dma_unbind_handle(buf->dma_handle);
- buf->dma_address = NULL;
+ buf->dma_address = 0;
} else {
return;
}
diff --git a/usr/src/uts/common/io/igb/igb_main.c b/usr/src/uts/common/io/igb/igb_main.c
index a2f9622a85..db74846f5c 100644
--- a/usr/src/uts/common/io/igb/igb_main.c
+++ b/usr/src/uts/common/io/igb/igb_main.c
@@ -2113,7 +2113,7 @@ igb_setup_rx_ring(igb_rx_ring_t *rx_ring)
rbd = &rx_data->rbd_ring[i];
rbd->read.pkt_addr = rcb->rx_buf.dma_address;
- rbd->read.hdr_addr = NULL;
+ rbd->read.hdr_addr = 0;
}
/*
diff --git a/usr/src/uts/common/io/igb/igb_tx.c b/usr/src/uts/common/io/igb/igb_tx.c
index 0a23288a01..0496bf59fe 100644
--- a/usr/src/uts/common/io/igb/igb_tx.c
+++ b/usr/src/uts/common/io/igb/igb_tx.c
@@ -218,7 +218,7 @@ igb_tx(igb_tx_ring_t *tx_ring, mblk_t *mp)
* expect it to be copied into pre-allocated
* page-aligned buffer
*/
- hdr_new_mp = allocb(hdr_frag_len, NULL);
+ hdr_new_mp = allocb(hdr_frag_len, 0);
if (!hdr_new_mp) {
return (B_FALSE);
}
diff --git a/usr/src/uts/common/io/ixgbe/ixgbe_buf.c b/usr/src/uts/common/io/ixgbe/ixgbe_buf.c
index 21f9d1ab8b..5f731bfe88 100644
--- a/usr/src/uts/common/io/ixgbe/ixgbe_buf.c
+++ b/usr/src/uts/common/io/ixgbe/ixgbe_buf.c
@@ -383,7 +383,7 @@ ixgbe_alloc_tbd_ring(ixgbe_tx_ring_t *tx_ring)
if (ret != DDI_DMA_MAPPED) {
ixgbe_error(ixgbe,
"Could not bind tbd dma resource: %x", ret);
- tx_ring->tbd_area.dma_address = NULL;
+ tx_ring->tbd_area.dma_address = 0;
if (tx_ring->tbd_area.acc_handle != NULL) {
ddi_dma_mem_free(&tx_ring->tbd_area.acc_handle);
tx_ring->tbd_area.acc_handle = NULL;
@@ -425,7 +425,7 @@ ixgbe_free_tbd_ring(ixgbe_tx_ring_t *tx_ring)
tx_ring->tbd_area.dma_handle = NULL;
}
tx_ring->tbd_area.address = NULL;
- tx_ring->tbd_area.dma_address = NULL;
+ tx_ring->tbd_area.dma_address = 0;
tx_ring->tbd_area.size = 0;
tx_ring->tbd_ring = NULL;
@@ -502,7 +502,7 @@ ixgbe_alloc_rbd_ring(ixgbe_rx_data_t *rx_data)
if (ret != DDI_DMA_MAPPED) {
ixgbe_error(ixgbe,
"Could not bind rbd dma resource: %x", ret);
- rx_data->rbd_area.dma_address = NULL;
+ rx_data->rbd_area.dma_address = 0;
if (rx_data->rbd_area.acc_handle != NULL) {
ddi_dma_mem_free(&rx_data->rbd_area.acc_handle);
rx_data->rbd_area.acc_handle = NULL;
@@ -544,7 +544,7 @@ ixgbe_free_rbd_ring(ixgbe_rx_data_t *rx_data)
rx_data->rbd_area.dma_handle = NULL;
}
rx_data->rbd_area.address = NULL;
- rx_data->rbd_area.dma_address = NULL;
+ rx_data->rbd_area.dma_address = 0;
rx_data->rbd_area.size = 0;
rx_data->rbd_ring = NULL;
@@ -596,7 +596,7 @@ ixgbe_alloc_dma_buffer(ixgbe_t *ixgbe, dma_buffer_t *buf, size_t size)
DDI_DMA_DONTWAIT, NULL, &cookie, &cookie_num);
if (ret != DDI_DMA_MAPPED) {
- buf->dma_address = NULL;
+ buf->dma_address = 0;
if (buf->acc_handle != NULL) {
ddi_dma_mem_free(&buf->acc_handle);
buf->acc_handle = NULL;
@@ -628,7 +628,7 @@ ixgbe_free_dma_buffer(dma_buffer_t *buf)
{
if (buf->dma_handle != NULL) {
(void) ddi_dma_unbind_handle(buf->dma_handle);
- buf->dma_address = NULL;
+ buf->dma_address = 0;
} else {
return;
}
diff --git a/usr/src/uts/common/io/ixgbe/ixgbe_main.c b/usr/src/uts/common/io/ixgbe/ixgbe_main.c
index 82c9bcdc36..1be0c424e4 100644
--- a/usr/src/uts/common/io/ixgbe/ixgbe_main.c
+++ b/usr/src/uts/common/io/ixgbe/ixgbe_main.c
@@ -2383,7 +2383,7 @@ ixgbe_setup_rx_ring(ixgbe_rx_ring_t *rx_ring)
rbd = &rx_data->rbd_ring[i];
rbd->read.pkt_addr = rcb->rx_buf.dma_address;
- rbd->read.hdr_addr = NULL;
+ rbd->read.hdr_addr = 0;
}
/*
@@ -3155,7 +3155,7 @@ ixgbe_init_unicst(ixgbe_t *ixgbe)
for (slot = 0; slot < ixgbe->unicst_total; slot++) {
mac_addr = ixgbe->unicst_addr[slot].mac.addr;
bzero(mac_addr, ETHERADDRL);
- (void) ixgbe_set_rar(hw, slot, mac_addr, NULL, NULL);
+ (void) ixgbe_set_rar(hw, slot, mac_addr, 0, 0);
ixgbe->unicst_addr[slot].mac.set = 0;
}
ixgbe->unicst_init = B_TRUE;
@@ -3169,8 +3169,7 @@ ixgbe_init_unicst(ixgbe_t *ixgbe)
IXGBE_RAH_AV);
} else {
bzero(mac_addr, ETHERADDRL);
- (void) ixgbe_set_rar(hw, slot, mac_addr,
- NULL, NULL);
+ (void) ixgbe_set_rar(hw, slot, mac_addr, 0, 0);
}
}
}
diff --git a/usr/src/uts/common/io/ixgbe/ixgbe_tx.c b/usr/src/uts/common/io/ixgbe/ixgbe_tx.c
index b29448eb26..63cbf6ec23 100644
--- a/usr/src/uts/common/io/ixgbe/ixgbe_tx.c
+++ b/usr/src/uts/common/io/ixgbe/ixgbe_tx.c
@@ -220,7 +220,7 @@ ixgbe_ring_tx(void *arg, mblk_t *mp)
* expect to bcopy into pre-allocated page-aligned
* buffer
*/
- hdr_new_mp = allocb(hdr_frag_len, NULL);
+ hdr_new_mp = allocb(hdr_frag_len, 0);
if (!hdr_new_mp)
return (mp);
bcopy(hdr_nmp->b_rptr, hdr_new_mp->b_rptr,
diff --git a/usr/src/uts/common/io/physmem.c b/usr/src/uts/common/io/physmem.c
index c48fecd133..9aaf58fb7b 100644
--- a/usr/src/uts/common/io/physmem.c
+++ b/usr/src/uts/common/io/physmem.c
@@ -482,7 +482,7 @@ physmem_map_addrs(struct physmem_map_param *pmpp)
pp = page_numtopp_nolock(btop((size_t)req_paddr));
if (pp == NULL) {
- pmpp->ret_va = NULL;
+ pmpp->ret_va = 0;
return (EPERM);
}
@@ -509,7 +509,7 @@ physmem_map_addrs(struct physmem_map_param *pmpp)
ret = page_trycapture(pp, 0, flags | CAPTURE_PHYSMEM, curproc);
if (ret != 0) {
- pmpp->ret_va = NULL;
+ pmpp->ret_va = 0;
return (ret);
} else {
pmpp->ret_va = (uint64_t)(uintptr_t)uvaddr;
diff --git a/usr/src/uts/common/io/pm.c b/usr/src/uts/common/io/pm.c
index b9f146bf2a..7bbc43b915 100644
--- a/usr/src/uts/common/io/pm.c
+++ b/usr/src/uts/common/io/pm.c
@@ -68,7 +68,7 @@
#define PM_IDLEDOWN_TIME 10
#define MAXSMBIOSSTRLEN 64 /* from SMBIOS spec */
-#define MAXCOPYBUF (MAXSMBIOSSTRLEN + 1)
+#define MAXCOPYBUF (MAXSMBIOSSTRLEN + 1)
extern kmutex_t pm_scan_lock; /* protects autopm_enable, pm_scans_disabled */
extern kmutex_t pm_clone_lock; /* protects pm_clones array */
@@ -703,7 +703,7 @@ pm_timeout_idledown(void)
static int
pm_chpoll(dev_t dev, short events, int anyyet, short *reventsp,
- struct pollhead **phpp)
+ struct pollhead **phpp)
{
extern struct pollhead pm_pollhead; /* common/os/sunpm.c */
int clone;
@@ -1085,7 +1085,7 @@ pm_ioctl(dev_t dev, int cmd, intptr_t arg, int mode, cred_t *cr, int *rval_p)
if (pcip->inargs & INDATASTRING) {
ASSERT(!(pcip->inargs & INDATAINT));
ASSERT(pcip->deptype == DEP);
- if (req32.data != NULL) {
+ if (req32.data != 0) {
if (copyinstr((void *)(uintptr_t)
req32.data, dep, deplen, NULL)) {
PMD(PMD_ERROR, ("ioctl: %s: "
diff --git a/usr/src/uts/common/io/softmac/softmac_fp.c b/usr/src/uts/common/io/softmac/softmac_fp.c
index 44f7e94bee..8286ac4013 100644
--- a/usr/src/uts/common/io/softmac/softmac_fp.c
+++ b/usr/src/uts/common/io/softmac/softmac_fp.c
@@ -988,7 +988,7 @@ softmac_wput_data(softmac_upper_t *sup, mblk_t *mp)
if (sup->su_mode != SOFTMAC_FASTPATH)
dld_wput(sup->su_wq, mp);
else
- (void) softmac_fastpath_wput_data(sup, mp, NULL, 0);
+ (void) softmac_fastpath_wput_data(sup, mp, (uintptr_t)NULL, 0);
}
/*ARGSUSED*/
@@ -1019,7 +1019,7 @@ softmac_fastpath_wput_data(softmac_upper_t *sup, mblk_t *mp, uintptr_t f_hint,
*/
if (SOFTMAC_CANPUTNEXT(wq)) {
putnext(wq, mp);
- return (NULL);
+ return ((mac_tx_cookie_t)NULL);
}
if (sup->su_tx_busy) {
diff --git a/usr/src/uts/common/io/timerfd.c b/usr/src/uts/common/io/timerfd.c
index 29eea9b24a..333373b91a 100644
--- a/usr/src/uts/common/io/timerfd.c
+++ b/usr/src/uts/common/io/timerfd.c
@@ -122,7 +122,7 @@ timerfd_open(dev_t *devp, int flag, int otyp, cred_t *cred_p)
if (ddi_soft_state_zalloc(timerfd_softstate, minor) != DDI_SUCCESS) {
vmem_free(timerfd_minor, (void *)(uintptr_t)minor, 1);
mutex_exit(&timerfd_lock);
- return (NULL);
+ return (ENXIO);
}
state = ddi_get_soft_state(timerfd_softstate, minor);
@@ -331,7 +331,7 @@ timerfd_ioctl(dev_t dev, int cmd, intptr_t arg, int md, cred_t *cr, int *rv)
return (ENODEV);
}
- if (st.tfd_settime_ovalue != NULL) {
+ if (st.tfd_settime_ovalue != 0) {
err = it->it_backend->clk_timer_gettime(it, &oval);
if (err != 0) {
@@ -373,7 +373,7 @@ timerfd_ioctl(dev_t dev, int cmd, intptr_t arg, int md, cred_t *cr, int *rv)
TIMER_ABSTIME : TIMER_RELTIME, &when);
timerfd_itimer_unlock(state, it);
- if (err != 0 || st.tfd_settime_ovalue == NULL)
+ if (err != 0 || st.tfd_settime_ovalue == 0)
return (err);
if ((err = timerfd_copyout(&oval, st.tfd_settime_ovalue)) != 0)
@@ -455,7 +455,7 @@ timerfd_attach(dev_info_t *devi, ddi_attach_cmd_t cmd)
}
if (ddi_create_minor_node(devi, "timerfd", S_IFCHR,
- TIMERFDMNRN_TIMERFD, DDI_PSEUDO, NULL) == DDI_FAILURE) {
+ TIMERFDMNRN_TIMERFD, DDI_PSEUDO, 0) == DDI_FAILURE) {
cmn_err(CE_NOTE, "/dev/timerfd couldn't create minor node");
ddi_soft_state_fini(&timerfd_softstate);
mutex_exit(&timerfd_lock);
diff --git a/usr/src/uts/common/kiconv/kiconv_ja/kiconv_ja.c b/usr/src/uts/common/kiconv/kiconv_ja/kiconv_ja.c
index 0f6ee79ff1..6e0a3dad2b 100644
--- a/usr/src/uts/common/kiconv/kiconv_ja/kiconv_ja.c
+++ b/usr/src/uts/common/kiconv/kiconv_ja/kiconv_ja.c
@@ -24,8 +24,6 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include <sys/types.h>
#include <sys/param.h>
#include <sys/sysmacros.h>
@@ -85,7 +83,7 @@ utf8_ucs(uint_t *p, uchar_t **pip, size_t *pileft, int *errno)
uchar_t ic1; /* 1st byte */
uchar_t *ip = *pip; /* next byte to read */
size_t ileft = *pileft; /* number of bytes available */
- size_t rv = 0; /* return value of this function */
+ size_t rv = 0; /* return value of this function */
int remaining_bytes;
int u8_size;
@@ -151,11 +149,11 @@ utf8_ucs_replace(uint_t *p, uchar_t **pip, size_t *pileft, size_t *repnum)
uchar_t ic1; /* 1st byte */
uchar_t *ip = *pip; /* next byte to read */
size_t ileft = *pileft; /* number of bytes available */
- size_t rv = 0; /* return value of this function */
+ size_t rv = 0; /* return value of this function */
int remaining_bytes;
int u8_size;
- KICONV_JA_NGET_REP_TO_MB(ic1); /* read 1st byte */
+ KICONV_JA_NGET_REP_TO_MB(ic1); /* read 1st byte */
if (ic1 < 0x80) {
/* successfully converted */
@@ -323,7 +321,7 @@ close_ja(void *kcd)
static size_t
_do_kiconv_fr_eucjp(void *kcd, char **inbuf, size_t *inbytesleft,
- char **outbuf, size_t *outbytesleft, int *errno)
+ char **outbuf, size_t *outbytesleft, int *errno)
{
uint_t u32; /* UTF-32 */
uint_t index; /* index for table lookup */
@@ -346,9 +344,9 @@ _do_kiconv_fr_eucjp(void *kcd, char **inbuf, size_t *inbytesleft,
oleft = *outbytesleft;
while (ileft != 0) {
- KICONV_JA_NGET(ic1); /* get 1st byte */
+ KICONV_JA_NGET(ic1); /* get 1st byte */
- if (KICONV_JA_ISASC(ic1)) { /* ASCII; 1 byte */
+ if (KICONV_JA_ISASC(ic1)) { /* ASCII; 1 byte */
u32 = kiconv_ja_jisx0201roman_to_ucs2[ic1];
KICONV_JA_PUTU(u32);
} else if (KICONV_JA_ISCS1(ic1)) { /* 0208 or UDC; 2 bytes */
@@ -425,7 +423,7 @@ ret:
static size_t
_do_kiconv_to_eucjp(void *kcd, char **inbuf, size_t *inbytesleft,
- char **outbuf, size_t *outbytesleft, int *errno)
+ char **outbuf, size_t *outbytesleft, int *errno)
{
uchar_t ic;
size_t rv = 0;
@@ -512,7 +510,7 @@ ret:
static size_t
_do_kiconvstr_fr_eucjp(char *inbuf, size_t *inbytesleft, char *outbuf,
- size_t *outbytesleft, int flag, int *errno, uint8_t id)
+ size_t *outbytesleft, int flag, int *errno, uint8_t id)
{
uint_t u32; /* UTF-32 */
uint_t index; /* index for table lookup */
@@ -526,7 +524,7 @@ _do_kiconvstr_fr_eucjp(char *inbuf, size_t *inbytesleft, char *outbuf,
boolean_t do_not_ignore_null;
- if ((inbuf == NULL) || (*inbuf == NULL)) {
+ if ((inbuf == NULL) || (*inbuf == '\0')) {
return (0);
}
@@ -538,9 +536,9 @@ _do_kiconvstr_fr_eucjp(char *inbuf, size_t *inbytesleft, char *outbuf,
do_not_ignore_null = ((flag & KICONV_IGNORE_NULL) == 0);
while (ileft != 0) {
- KICONV_JA_NGET(ic1); /* get 1st byte */
+ KICONV_JA_NGET(ic1); /* get 1st byte */
- if (KICONV_JA_ISASC(ic1)) { /* ASCII; 1 byte */
+ if (KICONV_JA_ISASC(ic1)) { /* ASCII; 1 byte */
if (ic1 == '\0' && do_not_ignore_null) {
return (0);
}
@@ -661,7 +659,7 @@ ret:
static size_t
_do_kiconvstr_to_eucjp(char *inbuf, size_t *inbytesleft, char *outbuf,
- size_t *outbytesleft, int flag, int *errno, uint8_t id)
+ size_t *outbytesleft, int flag, int *errno, uint8_t id)
{
uchar_t ic;
size_t rv = 0;
@@ -676,7 +674,7 @@ _do_kiconvstr_to_eucjp(char *inbuf, size_t *inbytesleft, char *outbuf,
boolean_t do_not_ignore_null;
- if ((inbuf == NULL) || (*inbuf == NULL)) {
+ if ((inbuf == NULL) || (*inbuf == '\0')) {
return (0);
}
@@ -752,7 +750,7 @@ ret:
static size_t
kiconv_fr_eucjp(void *kcd, char **inbuf, size_t *inbytesleft,
- char **outbuf, size_t *outbytesleft, int *errno)
+ char **outbuf, size_t *outbytesleft, int *errno)
{
if (! kcd || kcd == (void *)-1) {
*errno = EBADF;
@@ -765,7 +763,7 @@ kiconv_fr_eucjp(void *kcd, char **inbuf, size_t *inbytesleft,
static size_t
kiconv_to_eucjp(void *kcd, char **inbuf, size_t *inbytesleft,
- char **outbuf, size_t *outbytesleft, int *errno)
+ char **outbuf, size_t *outbytesleft, int *errno)
{
if (! kcd || kcd == (void *)-1) {
*errno = EBADF;
@@ -778,7 +776,7 @@ kiconv_to_eucjp(void *kcd, char **inbuf, size_t *inbytesleft,
static size_t
kiconvstr_fr_eucjp(char *inbuf, size_t *inbytesleft, char *outbuf,
- size_t *outbytesleft, int flag, int *errno)
+ size_t *outbytesleft, int flag, int *errno)
{
return (_do_kiconvstr_fr_eucjp(inbuf, inbytesleft, outbuf,
outbytesleft, flag, errno, KICONV_JA_TBLID_EUCJP));
@@ -786,7 +784,7 @@ kiconvstr_fr_eucjp(char *inbuf, size_t *inbytesleft, char *outbuf,
static size_t
kiconvstr_to_eucjp(char *inbuf, size_t *inbytesleft, char *outbuf,
- size_t *outbytesleft, int flag, int *errno)
+ size_t *outbytesleft, int flag, int *errno)
{
return (_do_kiconvstr_to_eucjp(inbuf, inbytesleft, outbuf,
outbytesleft, flag, errno, KICONV_JA_TBLID_EUCJP));
@@ -794,7 +792,7 @@ kiconvstr_to_eucjp(char *inbuf, size_t *inbytesleft, char *outbuf,
static size_t
kiconvstr_fr_eucjpms(char *inbuf, size_t *inbytesleft, char *outbuf,
- size_t *outbytesleft, int flag, int *errno)
+ size_t *outbytesleft, int flag, int *errno)
{
return (_do_kiconvstr_fr_eucjp(inbuf, inbytesleft, outbuf,
outbytesleft, flag, errno, KICONV_JA_TBLID_EUCJP_MS));
@@ -802,7 +800,7 @@ kiconvstr_fr_eucjpms(char *inbuf, size_t *inbytesleft, char *outbuf,
static size_t
kiconvstr_to_eucjpms(char *inbuf, size_t *inbytesleft, char *outbuf,
- size_t *outbytesleft, int flag, int *errno)
+ size_t *outbytesleft, int flag, int *errno)
{
return (_do_kiconvstr_to_eucjp(inbuf, inbytesleft, outbuf,
outbytesleft, flag, errno, KICONV_JA_TBLID_EUCJP_MS));
@@ -810,7 +808,7 @@ kiconvstr_to_eucjpms(char *inbuf, size_t *inbytesleft, char *outbuf,
static size_t
_do_kiconv_fr_sjis(void *kcd, char **inbuf, size_t *inbytesleft,
- char **outbuf, size_t *outbytesleft, int *errno)
+ char **outbuf, size_t *outbytesleft, int *errno)
{
uint_t uni; /* UTF-32 */
uint_t index; /* index for table lookup */
@@ -833,7 +831,7 @@ _do_kiconv_fr_sjis(void *kcd, char **inbuf, size_t *inbytesleft,
oleft = *outbytesleft;
while (ileft != 0) {
- KICONV_JA_NGET(ic1); /* get 1st byte */
+ KICONV_JA_NGET(ic1); /* get 1st byte */
if (KICONV_JA_ISASC((int)ic1)) { /* ASCII; 1 byte */
uni = kiconv_ja_jisx0201roman_to_ucs2[ic1];
@@ -999,7 +997,7 @@ _kiconv_ja_lookuptbl(ushort_t dest)
static size_t
_do_kiconv_to_sjis(void *kcd, char **inbuf, size_t *inbytesleft,
- char **outbuf, size_t *outbytesleft, int *errno)
+ char **outbuf, size_t *outbytesleft, int *errno)
{
uchar_t ic;
size_t rv = 0;
@@ -1121,7 +1119,7 @@ ret:
static size_t
_do_kiconvstr_fr_sjis(char *inbuf, size_t *inbytesleft, char *outbuf,
- size_t *outbytesleft, int flag, int *errno, uint8_t id)
+ size_t *outbytesleft, int flag, int *errno, uint8_t id)
{
uint_t uni; /* UTF-32 */
uint_t index; /* index for table lookup */
@@ -1135,7 +1133,7 @@ _do_kiconvstr_fr_sjis(char *inbuf, size_t *inbytesleft, char *outbuf,
boolean_t do_not_ignore_null;
- if ((inbuf == NULL) || (*inbuf == NULL)) {
+ if ((inbuf == NULL) || (*inbuf == '\0')) {
return (0);
}
@@ -1147,7 +1145,7 @@ _do_kiconvstr_fr_sjis(char *inbuf, size_t *inbytesleft, char *outbuf,
do_not_ignore_null = ((flag & KICONV_IGNORE_NULL) == 0);
while (ileft != 0) {
- KICONV_JA_NGET(ic1); /* get 1st byte */
+ KICONV_JA_NGET(ic1); /* get 1st byte */
if (KICONV_JA_ISASC((int)ic1)) { /* ASCII; 1 byte */
if (ic1 == '\0' && do_not_ignore_null) {
@@ -1353,7 +1351,7 @@ ret:
static size_t
_do_kiconvstr_to_sjis(char *inbuf, size_t *inbytesleft, char *outbuf,
- size_t *outbytesleft, int flag, int *errno, uint8_t id)
+ size_t *outbytesleft, int flag, int *errno, uint8_t id)
{
uchar_t ic;
size_t rv = 0;
@@ -1369,7 +1367,7 @@ _do_kiconvstr_to_sjis(char *inbuf, size_t *inbytesleft, char *outbuf,
boolean_t do_not_ignore_null;
- if ((inbuf == NULL) || (*inbuf == NULL)) {
+ if ((inbuf == NULL) || (*inbuf == '\0')) {
return (0);
}
@@ -1479,7 +1477,7 @@ ret:
static size_t
kiconv_fr_sjis(void *kcd, char **inbuf, size_t *inbytesleft,
- char **outbuf, size_t *outbytesleft, int *errno)
+ char **outbuf, size_t *outbytesleft, int *errno)
{
if (! kcd || kcd == (void *)-1) {
*errno = EBADF;
@@ -1492,7 +1490,7 @@ kiconv_fr_sjis(void *kcd, char **inbuf, size_t *inbytesleft,
static size_t
kiconv_to_sjis(void *kcd, char **inbuf, size_t *inbytesleft,
- char **outbuf, size_t *outbytesleft, int *errno)
+ char **outbuf, size_t *outbytesleft, int *errno)
{
if (! kcd || kcd == (void *)-1) {
*errno = EBADF;
@@ -1505,7 +1503,7 @@ kiconv_to_sjis(void *kcd, char **inbuf, size_t *inbytesleft,
static size_t
kiconvstr_fr_sjis(char *inbuf, size_t *inbytesleft, char *outbuf,
- size_t *outbytesleft, int flag, int *errno)
+ size_t *outbytesleft, int flag, int *errno)
{
return (_do_kiconvstr_fr_sjis(inbuf, inbytesleft, outbuf,
outbytesleft, flag, errno, KICONV_JA_TBLID_SJIS));
@@ -1513,7 +1511,7 @@ kiconvstr_fr_sjis(char *inbuf, size_t *inbytesleft, char *outbuf,
static size_t
kiconvstr_to_sjis(char *inbuf, size_t *inbytesleft, char *outbuf,
- size_t *outbytesleft, int flag, int *errno)
+ size_t *outbytesleft, int flag, int *errno)
{
return (_do_kiconvstr_to_sjis(inbuf, inbytesleft, outbuf,
outbytesleft, flag, errno, KICONV_JA_TBLID_SJIS));
@@ -1521,7 +1519,7 @@ kiconvstr_to_sjis(char *inbuf, size_t *inbytesleft, char *outbuf,
static size_t
kiconvstr_fr_cp932(char *inbuf, size_t *inbytesleft, char *outbuf,
- size_t *outbytesleft, int flag, int *errno)
+ size_t *outbytesleft, int flag, int *errno)
{
return (_do_kiconvstr_fr_sjis(inbuf, inbytesleft, outbuf,
outbytesleft, flag, errno, KICONV_JA_TBLID_CP932));
@@ -1529,7 +1527,7 @@ kiconvstr_fr_cp932(char *inbuf, size_t *inbytesleft, char *outbuf,
static size_t
kiconvstr_to_cp932(char *inbuf, size_t *inbytesleft, char *outbuf,
- size_t *outbytesleft, int flag, int *errno)
+ size_t *outbytesleft, int flag, int *errno)
{
return (_do_kiconvstr_to_sjis(inbuf, inbytesleft, outbuf,
outbytesleft, flag, errno, KICONV_JA_TBLID_CP932));
diff --git a/usr/src/uts/intel/io/amd8111s/amd8111s_main.c b/usr/src/uts/intel/io/amd8111s/amd8111s_main.c
index 317e55b22a..bb4357ff01 100644
--- a/usr/src/uts/intel/io/amd8111s/amd8111s_main.c
+++ b/usr/src/uts/intel/io/amd8111s/amd8111s_main.c
@@ -705,7 +705,7 @@ amd8111s_odlInit(struct LayerPointers *pLayerPointers)
pmem_set_array++;
*(pmem_set_array) = (unsigned long) kmem_zalloc(
*(pmem_req_array), KM_NOSLEEP);
- if (*pmem_set_array == NULL)
+ if (*pmem_set_array == 0)
goto odl_init_failure;
break;
}
@@ -720,7 +720,7 @@ amd8111s_odlInit(struct LayerPointers *pLayerPointers)
/* Allocate Rx/Tx descriptors */
if (amd8111s_allocate_descriptors(pLayerPointers) != B_TRUE) {
- *pmem_set_array = NULL;
+ *pmem_set_array = 0;
goto odl_init_failure;
}
@@ -730,7 +730,7 @@ amd8111s_odlInit(struct LayerPointers *pLayerPointers)
*/
if (amd8111s_allocate_buffers(pLayerPointers) == B_FALSE) {
amd8111s_free_descriptors(pLayerPointers);
- *pmem_set_array = NULL;
+ *pmem_set_array = 0;
goto odl_init_failure;
}
milInitGlbds(pLayerPointers);
@@ -920,8 +920,7 @@ amd8111s_free_descriptors(struct LayerPointers *pLayerPointers)
*/
static boolean_t
amd8111s_alloc_dma_ringbuf(struct LayerPointers *pLayerPointers,
- struct amd8111s_dma_ringbuf *pRing,
- uint32_t ring_size, uint32_t msg_size)
+ struct amd8111s_dma_ringbuf *pRing, uint32_t ring_size, uint32_t msg_size)
{
uint32_t idx, msg_idx = 0, msg_acc;
dev_info_t *devinfo = pLayerPointers->pOdl->devinfo;
@@ -1658,7 +1657,7 @@ amd8111s_reset(struct LayerPointers *pLayerPointers)
*
* Called once for each board after successfully probed.
* will do
- * a. creating minor device node for the instance.
+ * a. creating minor device node for the instance.
* b. allocate & Initilize four layers (call odlInit)
* c. get MAC address
* d. initilize pLayerPointers to gld private pointer
@@ -1813,7 +1812,7 @@ attach_failure:
* It is called for each device instance when the system is preparing to
* unload a dynamically unloadable driver.
* will Do
- * a. check if any driver buffers are held by OS.
+ * a. check if any driver buffers are held by OS.
* b. do clean up of all allocated memory if it is not in use by OS.
* c. un register with GLD
* d. return DDI_SUCCESS on succes full free & unregister
@@ -1904,7 +1903,7 @@ amd8111s_m_stat(void *arg, uint_t stat, uint64_t *val)
* Current Status
*/
case MAC_STAT_IFSPEED:
- *val = pLayerPointers->pMdl->Speed * 1000000;
+ *val = pLayerPointers->pMdl->Speed * 1000000;
break;
case ETHER_STAT_LINK_DUPLEX:
diff --git a/usr/src/uts/intel/io/ipmi/ipmi_main.c b/usr/src/uts/intel/io/ipmi/ipmi_main.c
index 1879564149..8b25829d2b 100644
--- a/usr/src/uts/intel/io/ipmi/ipmi_main.c
+++ b/usr/src/uts/intel/io/ipmi/ipmi_main.c
@@ -89,7 +89,7 @@ get_smbios_ipmi_info(void)
* it is not installed. In this case we see 0x0 as the base address.
* If we see this address, assume the device is not really present.
*/
- if (ipmi.smbip_addr == NULL) {
+ if (ipmi.smbip_addr == 0) {
cmn_err(CE_WARN, "!SMBIOS: Invalid base address");
return (DDI_FAILURE);
}
diff --git a/usr/src/uts/intel/io/vmxnet3s/vmxnet3_utils.c b/usr/src/uts/intel/io/vmxnet3s/vmxnet3_utils.c
index bec73524f7..040b8eb364 100644
--- a/usr/src/uts/intel/io/vmxnet3s/vmxnet3_utils.c
+++ b/usr/src/uts/intel/io/vmxnet3s/vmxnet3_utils.c
@@ -156,7 +156,7 @@ error_dma_handle:
ddi_dma_free_handle(&dma->dmaHandle);
error:
dma->buf = NULL;
- dma->bufPA = NULL;
+ dma->bufPA = 0;
dma->bufLen = 0;
return (err);
}
@@ -196,7 +196,7 @@ vmxnet3_free_dma_mem(vmxnet3_dmabuf_t *dma)
ddi_dma_free_handle(&dma->dmaHandle);
dma->buf = NULL;
- dma->bufPA = NULL;
+ dma->bufPA = 0;
dma->bufLen = 0;
}