summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
authorToomas Soome <tsoome@me.com>2019-01-20 20:18:41 +0200
committerToomas Soome <tsoome@me.com>2019-04-24 15:51:34 +0300
commit4da99751f967c5f8f04e17d8881a68c2940f3b06 (patch)
tree7329bd3039a6a640435a1a6132f12f2a4422e20d /usr/src
parent36f99a58464a4c3e25e881cab429881edb09951b (diff)
downloadillumos-joyent-4da99751f967c5f8f04e17d8881a68c2940f3b06.tar.gz
10790 i86pc: NULL pointer errors
Reviewed by: Andy Stormont <astormont@racktopsystems.com> Reviewed by: Patrick Mooney <patrick.mooney@joyent.com> Approved by: Dan McDonald <danmcd@joyent.com>
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/uts/common/io/avintr.c24
-rw-r--r--usr/src/uts/common/krtld/kobj.c4
-rw-r--r--usr/src/uts/common/os/brand.c16
-rw-r--r--usr/src/uts/common/os/panic.c4
-rw-r--r--usr/src/uts/i86pc/dboot/dboot_startkern.c8
-rw-r--r--usr/src/uts/i86pc/io/amd_iommu/amd_iommu_impl.c6
-rw-r--r--usr/src/uts/i86pc/io/cbe.c4
-rw-r--r--usr/src/uts/i86pc/os/cmi.c2
-rw-r--r--usr/src/uts/i86pc/os/cmi_hw.c8
-rw-r--r--usr/src/uts/i86pc/os/cms.c2
-rw-r--r--usr/src/uts/i86pc/os/cpupm/cpupm_throttle.c4
-rw-r--r--usr/src/uts/i86pc/os/cpupm/pwrnow.c2
-rw-r--r--usr/src/uts/i86pc/os/cpupm/speedstep.c2
-rw-r--r--usr/src/uts/i86pc/os/fakebop.c2
-rw-r--r--usr/src/uts/i86pc/os/fastboot.c10
-rw-r--r--usr/src/uts/i86pc/os/graphics.c2
-rw-r--r--usr/src/uts/i86pc/os/intr.c2
-rw-r--r--usr/src/uts/i86pc/os/machdep.c4
-rw-r--r--usr/src/uts/i86pc/os/mp_implfuncs.c8
-rw-r--r--usr/src/uts/i86pc/os/pci_cfgacc_x86.c2
-rw-r--r--usr/src/uts/i86pc/os/startup.c10
-rw-r--r--usr/src/uts/intel/amd64/krtld/kobj_boot.c4
22 files changed, 64 insertions, 66 deletions
diff --git a/usr/src/uts/common/io/avintr.c b/usr/src/uts/common/io/avintr.c
index 71c2ce6dfb..05afc12055 100644
--- a/usr/src/uts/common/io/avintr.c
+++ b/usr/src/uts/common/io/avintr.c
@@ -91,19 +91,19 @@ kmutex_t av_lock;
* must not be used there.
*/
ddi_softint_hdl_impl_t softlevel_hdl[DDI_IPL_10] = {
- {0, NULL, NULL, NULL, 0, NULL, NULL, NULL}, /* level 1 */
- {0, NULL, NULL, NULL, 0, NULL, NULL, NULL}, /* level 2 */
- {0, NULL, NULL, NULL, 0, NULL, NULL, NULL}, /* level 3 */
- {0, NULL, NULL, NULL, 0, NULL, NULL, NULL}, /* level 4 */
- {0, NULL, NULL, NULL, 0, NULL, NULL, NULL}, /* level 5 */
- {0, NULL, NULL, NULL, 0, NULL, NULL, NULL}, /* level 6 */
- {0, NULL, NULL, NULL, 0, NULL, NULL, NULL}, /* level 7 */
- {0, NULL, NULL, NULL, 0, NULL, NULL, NULL}, /* level 8 */
- {0, NULL, NULL, NULL, 0, NULL, NULL, NULL}, /* level 9 */
- {0, NULL, NULL, NULL, 0, NULL, NULL, NULL}, /* level 10 */
+ {0, 0, NULL, NULL, 0, NULL, NULL, NULL}, /* level 1 */
+ {0, 0, NULL, NULL, 0, NULL, NULL, NULL}, /* level 2 */
+ {0, 0, NULL, NULL, 0, NULL, NULL, NULL}, /* level 3 */
+ {0, 0, NULL, NULL, 0, NULL, NULL, NULL}, /* level 4 */
+ {0, 0, NULL, NULL, 0, NULL, NULL, NULL}, /* level 5 */
+ {0, 0, NULL, NULL, 0, NULL, NULL, NULL}, /* level 6 */
+ {0, 0, NULL, NULL, 0, NULL, NULL, NULL}, /* level 7 */
+ {0, 0, NULL, NULL, 0, NULL, NULL, NULL}, /* level 8 */
+ {0, 0, NULL, NULL, 0, NULL, NULL, NULL}, /* level 9 */
+ {0, 0, NULL, NULL, 0, NULL, NULL, NULL}, /* level 10 */
};
ddi_softint_hdl_impl_t softlevel1_hdl =
- {0, NULL, NULL, NULL, 0, NULL, NULL, NULL};
+ {0, 0, NULL, NULL, 0, NULL, NULL, NULL};
/*
* clear/check softint pending flag corresponding for
@@ -541,7 +541,7 @@ static uint64_t dummy_tick;
/* remove an interrupt vector from the chain */
static void
remove_av(void *intr_id, struct av_head *vectp, avfunc f, int pri_level,
- int vect)
+ int vect)
{
struct autovec *p, *target;
int lo_pri, hi_pri;
diff --git a/usr/src/uts/common/krtld/kobj.c b/usr/src/uts/common/krtld/kobj.c
index 32c61e5c64..62eaabfb03 100644
--- a/usr/src/uts/common/krtld/kobj.c
+++ b/usr/src/uts/common/krtld/kobj.c
@@ -3082,7 +3082,7 @@ do_symbols(struct module *mp, Elf64_Addr bss_base)
}
if (err)
return (err);
- if (assign == 0 && mp->bss == NULL) {
+ if (assign == 0 && mp->bss == 0) {
mp->bss_align = bss_align;
mp->bss_size = bss_ptr;
} else if (resolved) {
@@ -4135,7 +4135,7 @@ kobj_segbrk(caddr_t *spp, size_t size, size_t align, caddr_t limit)
npva = (uintptr_t)BOP_ALLOC(ops, (caddr_t)pva,
alloc_size, alloc_align);
- if (npva == NULL) {
+ if (npva == 0) {
_kobj_printf(ops, "BOP_ALLOC failed, 0x%lx bytes",
alloc_size);
_kobj_printf(ops, " aligned %lx", alloc_align);
diff --git a/usr/src/uts/common/os/brand.c b/usr/src/uts/common/os/brand.c
index 0af67f5d98..773ecc9c6a 100644
--- a/usr/src/uts/common/os/brand.c
+++ b/usr/src/uts/common/os/brand.c
@@ -834,19 +834,19 @@ brand_solaris_elfexec(vnode_t *vp, execa_t *uap, uarg_t *args,
*/
sedp->sed_ldentry = ehdr.e_entry;
sedp->sed_entry = ehdr.e_entry;
- sedp->sed_lddata = NULL;
- sedp->sed_base = NULL;
+ sedp->sed_lddata = 0;
+ sedp->sed_base = 0;
} else {
/*
* A shared object with no interpreter, we use
* the calculated address from above.
*/
sedp->sed_ldentry = sedp->sed_entry;
- sedp->sed_entry = NULL;
- sedp->sed_phdr = NULL;
- sedp->sed_phent = NULL;
- sedp->sed_phnum = NULL;
- sedp->sed_lddata = NULL;
+ sedp->sed_entry = 0;
+ sedp->sed_phdr = 0;
+ sedp->sed_phent = 0;
+ sedp->sed_phnum = 0;
+ sedp->sed_lddata = 0;
sedp->sed_base = voffset;
if (ehdr.e_type == ET_DYN) {
@@ -980,7 +980,7 @@ brand_solaris_elfexec(vnode_t *vp, execa_t *uap, uarg_t *args,
}
up->u_auxv[i].a_un.a_val = val;
- if (val == NULL) {
+ if (val == 0) {
/* Hide the entry for static binaries */
up->u_auxv[i].a_type = AT_IGNORE;
}
diff --git a/usr/src/uts/common/os/panic.c b/usr/src/uts/common/os/panic.c
index 09dc058fd8..62be47e843 100644
--- a/usr/src/uts/common/os/panic.c
+++ b/usr/src/uts/common/os/panic.c
@@ -178,7 +178,7 @@ char panic_preempt; /* t_preempt for panic_thread */
*/
char *panic_bootstr = NULL; /* mdboot string to use after panic */
int panic_bootfcn = AD_BOOT; /* mdboot function to use after panic */
-int halt_on_panic = 0; /* halt after dump instead of reboot? */
+int halt_on_panic = 0; /* halt after dump instead of reboot? */
int nopanicdebug = 0; /* reboot instead of call debugger? */
int in_sync = 0; /* skip vfs_syncall() and just dump? */
@@ -311,7 +311,7 @@ panicsys(const char *format, va_list alist, struct regs *rp, int on_panic_stack)
splx(ipltospl(CLOCK_LEVEL));
panic_quiesce_hw(pdp);
(void) FTRACE_STOP();
- (void) callb_execute_class(CB_CL_PANIC, NULL);
+ (void) callb_execute_class(CB_CL_PANIC, 0);
if (log_intrq != NULL)
log_flushq(log_intrq);
diff --git a/usr/src/uts/i86pc/dboot/dboot_startkern.c b/usr/src/uts/i86pc/dboot/dboot_startkern.c
index ff1358a9d7..f4d9dbd0f9 100644
--- a/usr/src/uts/i86pc/dboot/dboot_startkern.c
+++ b/usr/src/uts/i86pc/dboot/dboot_startkern.c
@@ -1665,7 +1665,7 @@ process_efi32(EFI_SYSTEM_TABLE32 *efi)
bi->bi_smbios = (native_ptr_t)(uintptr_t)
config[i].VendorTable;
}
- if (bi->bi_smbios == NULL &&
+ if (bi->bi_smbios == 0 &&
dboot_same_guids(&config[i].VendorGuid, &smbios)) {
bi->bi_smbios = (native_ptr_t)(uintptr_t)
config[i].VendorTable;
@@ -1674,7 +1674,7 @@ process_efi32(EFI_SYSTEM_TABLE32 *efi)
bi->bi_acpi_rsdp = (native_ptr_t)(uintptr_t)
config[i].VendorTable;
}
- if (bi->bi_acpi_rsdp == NULL &&
+ if (bi->bi_acpi_rsdp == 0 &&
dboot_same_guids(&config[i].VendorGuid, &acpi1)) {
bi->bi_acpi_rsdp = (native_ptr_t)(uintptr_t)
config[i].VendorTable;
@@ -1698,7 +1698,7 @@ process_efi64(EFI_SYSTEM_TABLE64 *efi)
bi->bi_smbios = (native_ptr_t)(uintptr_t)
config[i].VendorTable;
}
- if (bi->bi_smbios == NULL &&
+ if (bi->bi_smbios == 0 &&
dboot_same_guids(&config[i].VendorGuid, &smbios)) {
bi->bi_smbios = (native_ptr_t)(uintptr_t)
config[i].VendorTable;
@@ -1708,7 +1708,7 @@ process_efi64(EFI_SYSTEM_TABLE64 *efi)
bi->bi_acpi_rsdp = (native_ptr_t)(uintptr_t)
config[i].VendorTable;
}
- if (bi->bi_acpi_rsdp == NULL &&
+ if (bi->bi_acpi_rsdp == 0 &&
dboot_same_guids(&config[i].VendorGuid, &acpi1)) {
bi->bi_acpi_rsdp = (native_ptr_t)(uintptr_t)
config[i].VendorTable;
diff --git a/usr/src/uts/i86pc/io/amd_iommu/amd_iommu_impl.c b/usr/src/uts/i86pc/io/amd_iommu/amd_iommu_impl.c
index b5ab7d9cf6..4287c37bb6 100644
--- a/usr/src/uts/i86pc/io/amd_iommu/amd_iommu_impl.c
+++ b/usr/src/uts/i86pc/io/amd_iommu/amd_iommu_impl.c
@@ -1211,13 +1211,13 @@ amd_iommu_fini(amd_iommu_t *iommu, int type)
if (type == AMD_IOMMU_QUIESCE)
return (DDI_SUCCESS);
- if (iommu->aiomt_va != NULL) {
+ if (iommu->aiomt_va != 0) {
hat_unload(kas.a_hat, (void *)(uintptr_t)iommu->aiomt_va,
iommu->aiomt_reg_size, HAT_UNLOAD_UNLOCK);
device_arena_free((void *)(uintptr_t)iommu->aiomt_va,
ptob(iommu->aiomt_reg_pages));
- iommu->aiomt_va = NULL;
- iommu->aiomt_reg_va = NULL;
+ iommu->aiomt_va = 0;
+ iommu->aiomt_reg_va = 0;
}
mutex_destroy(&iommu->aiomt_eventlock);
mutex_destroy(&iommu->aiomt_cmdlock);
diff --git a/usr/src/uts/i86pc/io/cbe.c b/usr/src/uts/i86pc/io/cbe.c
index 87ec248717..030f667925 100644
--- a/usr/src/uts/i86pc/io/cbe.c
+++ b/usr/src/uts/i86pc/io/cbe.c
@@ -56,9 +56,9 @@ static void *cbe_xcall_farg;
static cpuset_t cbe_enabled;
static ddi_softint_hdl_impl_t cbe_low_hdl =
- {0, NULL, NULL, NULL, 0, NULL, NULL, NULL};
+ {0, 0, NULL, NULL, 0, NULL, NULL, NULL};
static ddi_softint_hdl_impl_t cbe_clock_hdl =
- {0, NULL, NULL, NULL, 0, NULL, NULL, NULL};
+ {0, 0, NULL, NULL, 0, NULL, NULL, NULL};
cyclic_id_t cbe_hres_cyclic;
int cbe_psm_timer_mode = TIMER_ONESHOT;
diff --git a/usr/src/uts/i86pc/os/cmi.c b/usr/src/uts/i86pc/os/cmi.c
index b3d52c1726..6433407eee 100644
--- a/usr/src/uts/i86pc/os/cmi.c
+++ b/usr/src/uts/i86pc/os/cmi.c
@@ -216,7 +216,7 @@ cmi_load_modctl(modctl_t *modp)
return (cmi);
}
- if ((ver = modlookup_by_modctl(modp, "_cmi_api_version")) == NULL) {
+ if ((ver = modlookup_by_modctl(modp, "_cmi_api_version")) == 0) {
/*
* Apparently a cpu module before versioning was introduced -
* we call this version 0.
diff --git a/usr/src/uts/i86pc/os/cmi_hw.c b/usr/src/uts/i86pc/os/cmi_hw.c
index 290231b487..aa549569b0 100644
--- a/usr/src/uts/i86pc/os/cmi_hw.c
+++ b/usr/src/uts/i86pc/os/cmi_hw.c
@@ -717,7 +717,7 @@ ntv_getcr4(cmi_hdl_impl_t *hdl)
cpu_t *cp = HDLPRIV(hdl);
ulong_t val;
- (void) call_func_ntv(cp->cpu_id, ntv_getcr4_xc, (xc_arg_t)&val, NULL);
+ (void) call_func_ntv(cp->cpu_id, ntv_getcr4_xc, (xc_arg_t)&val, 0);
return (val);
}
@@ -740,7 +740,7 @@ ntv_setcr4(cmi_hdl_impl_t *hdl, ulong_t val)
{
cpu_t *cp = HDLPRIV(hdl);
- (void) call_func_ntv(cp->cpu_id, ntv_setcr4_xc, (xc_arg_t)val, NULL);
+ (void) call_func_ntv(cp->cpu_id, ntv_setcr4_xc, (xc_arg_t)val, 0);
}
volatile uint32_t cmi_trapped_rdmsr;
@@ -847,7 +847,7 @@ ntv_int(cmi_hdl_impl_t *hdl, int int_no)
{
cpu_t *cp = HDLPRIV(hdl);
- (void) call_func_ntv(cp->cpu_id, ntv_int_xc, (xc_arg_t)int_no, NULL);
+ (void) call_func_ntv(cp->cpu_id, ntv_int_xc, (xc_arg_t)int_no, 0);
}
static int
@@ -1728,7 +1728,7 @@ cmi_ntv_hwdisable_mce(cmi_hdl_t hdl)
cmi_ntv_hwdisable_mce_xc();
} else {
CPUSET_ONLY(set, cp->cpu_id);
- xc_call(NULL, NULL, NULL, CPUSET2BV(set),
+ xc_call(0, 0, 0, CPUSET2BV(set),
(xc_func_t)cmi_ntv_hwdisable_mce_xc);
}
}
diff --git a/usr/src/uts/i86pc/os/cms.c b/usr/src/uts/i86pc/os/cms.c
index 0433aeabfd..cb686c27d2 100644
--- a/usr/src/uts/i86pc/os/cms.c
+++ b/usr/src/uts/i86pc/os/cms.c
@@ -209,7 +209,7 @@ cms_load_modctl(modctl_t *modp)
return (cms);
}
- if ((ver = modlookup_by_modctl(modp, "_cms_api_version")) == NULL) {
+ if ((ver = modlookup_by_modctl(modp, "_cms_api_version")) == 0) {
cmn_err(CE_WARN, "cpu model-specific module '%s' is invalid: "
"no _cms_api_version", modp->mod_modname);
return (NULL);
diff --git a/usr/src/uts/i86pc/os/cpupm/cpupm_throttle.c b/usr/src/uts/i86pc/os/cpupm/cpupm_throttle.c
index 63ced2b9b1..b8c37a22c2 100644
--- a/usr/src/uts/i86pc/os/cpupm/cpupm_throttle.c
+++ b/usr/src/uts/i86pc/os/cpupm/cpupm_throttle.c
@@ -213,7 +213,7 @@ cpupm_throttle(cpuset_t set, uint32_t throtl_lvl)
CPUSET_DEL(set, CPU->cpu_id);
}
if (!CPUSET_ISNULL(set)) {
- xc_call((xc_arg_t)throtl_lvl, NULL, NULL,
+ xc_call((xc_arg_t)throtl_lvl, 0, 0,
CPUSET2BV(set), (xc_func_t)cpupm_tstate_transition);
}
kpreempt_enable();
@@ -290,7 +290,7 @@ static int
cpupm_throttle_get_max(processorid_t cpu_id)
{
cpu_t *cp = cpu[cpu_id];
- cpupm_mach_state_t *mach_state =
+ cpupm_mach_state_t *mach_state =
(cpupm_mach_state_t *)(cp->cpu_m.mcpu_pm_mach_state);
cpu_acpi_handle_t handle;
int throtl_level;
diff --git a/usr/src/uts/i86pc/os/cpupm/pwrnow.c b/usr/src/uts/i86pc/os/cpupm/pwrnow.c
index a58e85256a..437019542a 100644
--- a/usr/src/uts/i86pc/os/cpupm/pwrnow.c
+++ b/usr/src/uts/i86pc/os/cpupm/pwrnow.c
@@ -153,7 +153,7 @@ pwrnow_power(cpuset_t set, uint32_t req_state)
CPUSET_DEL(set, CPU->cpu_id);
}
if (!CPUSET_ISNULL(set)) {
- xc_call((xc_arg_t)req_state, NULL, NULL,
+ xc_call((xc_arg_t)req_state, 0, 0,
CPUSET2BV(set), (xc_func_t)pwrnow_pstate_transition);
}
kpreempt_enable();
diff --git a/usr/src/uts/i86pc/os/cpupm/speedstep.c b/usr/src/uts/i86pc/os/cpupm/speedstep.c
index 021eab7e41..6f3dfab61c 100644
--- a/usr/src/uts/i86pc/os/cpupm/speedstep.c
+++ b/usr/src/uts/i86pc/os/cpupm/speedstep.c
@@ -168,7 +168,7 @@ speedstep_power(cpuset_t set, uint32_t req_state)
CPUSET_DEL(set, CPU->cpu_id);
}
if (!CPUSET_ISNULL(set)) {
- xc_call((xc_arg_t)req_state, NULL, NULL, CPUSET2BV(set),
+ xc_call((xc_arg_t)req_state, 0, 0, CPUSET2BV(set),
(xc_func_t)speedstep_pstate_transition);
}
kpreempt_enable();
diff --git a/usr/src/uts/i86pc/os/fakebop.c b/usr/src/uts/i86pc/os/fakebop.c
index 85ad7bd9b9..eb615a1f36 100644
--- a/usr/src/uts/i86pc/os/fakebop.c
+++ b/usr/src/uts/i86pc/os/fakebop.c
@@ -1259,7 +1259,7 @@ save_boot_info(struct xboot_info *xbi)
}
} else {
saved_mbi.drives_length = 0;
- saved_mbi.drives_addr = NULL;
+ saved_mbi.drives_addr = 0;
}
/*
diff --git a/usr/src/uts/i86pc/os/fastboot.c b/usr/src/uts/i86pc/os/fastboot.c
index 1520a6653c..9dbcd456df 100644
--- a/usr/src/uts/i86pc/os/fastboot.c
+++ b/usr/src/uts/i86pc/os/fastboot.c
@@ -497,7 +497,7 @@ fastboot_build_mbi(char *mdep, fastboot_info_t *nk)
if (nk->fi_mbi_size == 0) {
if ((nk->fi_new_mbi_va =
(uintptr_t)contig_alloc(size, &fastboot_below_1G_dma_attr,
- PAGESIZE, 0)) == NULL) {
+ PAGESIZE, 0)) == 0) {
cmn_err(CE_NOTE, fastboot_enomem_msg,
(uint64_t)size, "1G");
return (-1);
@@ -705,7 +705,7 @@ fastboot_reserve_mem(fastboot_info_t *nk)
*/
if ((nk->fi_pagetable_va =
(uintptr_t)contig_alloc(fastboot_pagetable_size,
- &fastboot_below_1G_dma_attr, PAGESIZE, 0)) == NULL) {
+ &fastboot_below_1G_dma_attr, PAGESIZE, 0)) == 0) {
return;
}
nk->fi_pagetable_size = fastboot_pagetable_size;
@@ -714,7 +714,7 @@ fastboot_reserve_mem(fastboot_info_t *nk)
* Reserve memory under PA 1G for multiboot structure.
*/
if ((nk->fi_new_mbi_va = (uintptr_t)contig_alloc(fastboot_mbi_size,
- &fastboot_below_1G_dma_attr, PAGESIZE, 0)) == NULL) {
+ &fastboot_below_1G_dma_attr, PAGESIZE, 0)) == 0) {
return;
}
nk->fi_mbi_size = fastboot_mbi_size;
@@ -745,7 +745,7 @@ fastboot_free_file(fastboot_file_t *fb)
fsize_roundup = P2ROUNDUP_TYPED(fb->fb_size, PAGESIZE, size_t);
if (fsize_roundup) {
contig_free((void *)fb->fb_va, fsize_roundup);
- fb->fb_va = NULL;
+ fb->fb_va = 0;
fb->fb_size = 0;
}
}
@@ -1243,7 +1243,7 @@ load_kernel_retry:
if (newkernel.fi_pagetable_size == 0) {
if ((newkernel.fi_pagetable_va = (uintptr_t)
contig_alloc(size, &fastboot_below_1G_dma_attr,
- MMU_PAGESIZE, 0)) == NULL) {
+ MMU_PAGESIZE, 0)) == 0) {
cmn_err(CE_NOTE, fastboot_enomem_msg,
(uint64_t)size, "1G");
goto err_out;
diff --git a/usr/src/uts/i86pc/os/graphics.c b/usr/src/uts/i86pc/os/graphics.c
index 03e3199ff4..9fbbc38fb5 100644
--- a/usr/src/uts/i86pc/os/graphics.c
+++ b/usr/src/uts/i86pc/os/graphics.c
@@ -219,7 +219,7 @@ progressbar_key_abort(ldi_ident_t li)
!= 0)
cmn_err(CE_NOTE,
"!ldi_ioctl for KD_RESETTEXT failed");
- (void) ldi_close(hdl, NULL, kcred);
+ (void) ldi_close(hdl, 0, kcred);
}
#endif
}
diff --git a/usr/src/uts/i86pc/os/intr.c b/usr/src/uts/i86pc/os/intr.c
index 29fa78109c..25b22f727e 100644
--- a/usr/src/uts/i86pc/os/intr.c
+++ b/usr/src/uts/i86pc/os/intr.c
@@ -1155,7 +1155,7 @@ cpu_create_intrstat(cpu_t *cp)
zoneid = ALL_ZONES;
intr_ksp = kstat_create_zone("cpu", cp->cpu_id, "intrstat", "misc",
- KSTAT_TYPE_NAMED, PIL_MAX * 2, NULL, zoneid);
+ KSTAT_TYPE_NAMED, PIL_MAX * 2, 0, zoneid);
/*
* Initialize each PIL's named kstat
diff --git a/usr/src/uts/i86pc/os/machdep.c b/usr/src/uts/i86pc/os/machdep.c
index 41b5c7a7f6..ec4cce7b80 100644
--- a/usr/src/uts/i86pc/os/machdep.c
+++ b/usr/src/uts/i86pc/os/machdep.c
@@ -256,7 +256,7 @@ mdboot(int cmd, int fcn, char *mdep, boolean_t invoke_cb)
devtree_freeze();
if (invoke_cb)
- (void) callb_execute_class(CB_CL_MDBOOT, NULL);
+ (void) callb_execute_class(CB_CL_MDBOOT, 0);
/*
* Clear any unresolved UEs from memory.
@@ -1411,7 +1411,7 @@ dtrace_linear_pc(struct regs *rp, proc_t *p, caddr_t *linearp)
* and posts the softint for x86.
*/
static ddi_softint_hdl_impl_t lbolt_softint_hdl =
- {0, NULL, NULL, NULL, 0, NULL, NULL, NULL};
+ {0, 0, NULL, NULL, 0, NULL, NULL, NULL};
void
lbolt_softint_add(void)
diff --git a/usr/src/uts/i86pc/os/mp_implfuncs.c b/usr/src/uts/i86pc/os/mp_implfuncs.c
index 3bded8f124..2d0bd3eb53 100644
--- a/usr/src/uts/i86pc/os/mp_implfuncs.c
+++ b/usr/src/uts/i86pc/os/mp_implfuncs.c
@@ -70,11 +70,11 @@ struct mod_ops mod_psmops = {
};
static struct psm_sw psm_swtab = {
- &psm_swtab, &psm_swtab, NULL, NULL
+ &psm_swtab, &psm_swtab, NULL, 0
};
-kmutex_t psmsw_lock; /* lock accesses to psmsw */
-struct psm_sw *psmsw = &psm_swtab; /* start of all psm_sw */
+kmutex_t psmsw_lock; /* lock accesses to psmsw */
+struct psm_sw *psmsw = &psm_swtab; /* start of all psm_sw */
static struct modlinkage *
psm_modlinkage_alloc(struct psm_info *infop)
@@ -167,7 +167,7 @@ psm_mod_info(void **handlepp, struct psm_info *infop, struct modinfo *modinfop)
if (!*modlpp) {
mlinkp = psm_modlinkage_alloc(infop);
if (!mlinkp)
- return ((int)NULL);
+ return (0);
} else
mlinkp = *modlpp;
diff --git a/usr/src/uts/i86pc/os/pci_cfgacc_x86.c b/usr/src/uts/i86pc/os/pci_cfgacc_x86.c
index b48a4c0703..8fc919f484 100644
--- a/usr/src/uts/i86pc/os/pci_cfgacc_x86.c
+++ b/usr/src/uts/i86pc/os/pci_cfgacc_x86.c
@@ -217,7 +217,7 @@ pci_cfgacc_check_io(pci_cfgacc_req_t *req)
bus = PCI_BDF_BUS(req->bdf);
- if (pci_cfgacc_force_io || (mcfg_mem_base == NULL) ||
+ if (pci_cfgacc_force_io || (mcfg_mem_base == 0) ||
(bus < mcfg_bus_start) || (bus > mcfg_bus_end) ||
pci_cfgacc_find_workaround(req->bdf))
req->ioacc = B_TRUE;
diff --git a/usr/src/uts/i86pc/os/startup.c b/usr/src/uts/i86pc/os/startup.c
index 8c1d4e0697..7ea4989268 100644
--- a/usr/src/uts/i86pc/os/startup.c
+++ b/usr/src/uts/i86pc/os/startup.c
@@ -630,9 +630,9 @@ static char *prm_dbg_str[] = {
int prom_debug;
-#define PRM_DEBUG(q) if (prom_debug) \
+#define PRM_DEBUG(q) if (prom_debug) \
prom_printf(prm_dbg_str[sizeof (q) >> 3], "startup.c", __LINE__, #q, q);
-#define PRM_POINT(q) if (prom_debug) \
+#define PRM_POINT(q) if (prom_debug) \
prom_printf("%s:%d: %s\n", "startup.c", __LINE__, q);
/*
@@ -650,13 +650,13 @@ size_t valloc_sz = 0;
uintptr_t valloc_base;
#define ADD_TO_ALLOCATIONS(ptr, size) { \
- size = ROUND_UP_PAGE(size); \
+ size = ROUND_UP_PAGE(size); \
if (num_allocations == NUM_ALLOCATIONS) \
panic("too many ADD_TO_ALLOCATIONS()"); \
allocations[num_allocations].al_ptr = (void**)&ptr; \
allocations[num_allocations].al_size = size; \
valloc_sz += size; \
- ++num_allocations; \
+ ++num_allocations; \
}
/*
@@ -3113,7 +3113,7 @@ get_system_configuration(void)
if (BOP_GETPROPLEN(bootops, "kernelbase") > sizeof (prop) ||
BOP_GETPROP(bootops, "kernelbase", prop) < 0 ||
kobj_getvalue(prop, &lvalue) == -1)
- eprom_kernelbase = NULL;
+ eprom_kernelbase = 0;
else
eprom_kernelbase = (uintptr_t)lvalue;
diff --git a/usr/src/uts/intel/amd64/krtld/kobj_boot.c b/usr/src/uts/intel/amd64/krtld/kobj_boot.c
index b63486fd69..524b6632b4 100644
--- a/usr/src/uts/intel/amd64/krtld/kobj_boot.c
+++ b/usr/src/uts/intel/amd64/krtld/kobj_boot.c
@@ -23,8 +23,6 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* Bootstrap the linker/loader.
*/
@@ -59,7 +57,7 @@ _kobj_boot(
int i;
for (i = 0; i < BA_NUM; i++)
- bootaux[i].ba_val = NULL;
+ bootaux[i].ba_val = 0;
bootaux[BA_ENTRY].ba_ptr = (void *)_locore_start;
bootaux[BA_PAGESZ].ba_val = PAGESIZE;