diff options
Diffstat (limited to 'usr/src/uts/sun4u')
72 files changed, 336 insertions, 899 deletions
diff --git a/usr/src/uts/sun4u/adm1026/Makefile b/usr/src/uts/sun4u/adm1026/Makefile index f3d51c0215..abe50e2bda 100755 --- a/usr/src/uts/sun4u/adm1026/Makefile +++ b/usr/src/uts/sun4u/adm1026/Makefile @@ -22,8 +22,6 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -#pragma ident "%Z%%M% %I% %E% SMI" -# # This makefile drives the production of the adm1026 driver kernel module # # sun4u implementation architecture dependent @@ -37,9 +35,8 @@ UTSBASE = ../.. # # Define the module and object file sets. # -MODULE = adm1026 +MODULE = adm1026 OBJECTS = $(ADM1026_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(ADM1026_OBJS:%.o=$(LINTS_DIR)/%.ln) ROOTMODULE = $(ROOT_PSM_DRV_DIR)/$(MODULE) # @@ -47,25 +44,16 @@ ROOTMODULE = $(ROOT_PSM_DRV_DIR)/$(MODULE) # include $(UTSBASE)/sun4u/Makefile.sun4u -# -# lint pass one enforcement -# -CFLAGS += $(CCVERBOSE) LDFLAGS += -dy -N misc/i2c_svc -# compile time debug flag - - # # Define targets # ALL_TARGET = $(BINARY) -LINT_TARGET = $(MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) .KEEP_STATE: - all: $(ALL_DEPS) def: $(DEF_DEPS) @@ -74,12 +62,6 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - install: $(INSTALL_DEPS) # Include common targets. diff --git a/usr/src/uts/sun4u/boston/Makefile b/usr/src/uts/sun4u/boston/Makefile index 77a8dbdc0a..417eb3a663 100644 --- a/usr/src/uts/sun4u/boston/Makefile +++ b/usr/src/uts/sun4u/boston/Makefile @@ -46,12 +46,8 @@ install := TARGET= install install_h := TARGET= install_h clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint -lintlib := TARGET= lintlib -modlintlib := TARGET= modlintlib modlist := TARGET= modlist modlist := NO_STATE= -K $$MODSTATE$$$$ -clean.lint := TARGET= clean.lint check := TARGET= check # @@ -59,9 +55,7 @@ check := TARGET= check # .KEEP_STATE: -def all clean clean.lint clobber modlist: $(BOSTON_KMODS) - -modlintlib: $(BOSTON_KMODS) +def all clean clobber modlist: $(BOSTON_KMODS) install: $(ROOT_BOSTON_DIR) \ $(USR_BOSTON_DIR) \ @@ -74,24 +68,6 @@ install: $(ROOT_BOSTON_DIR) \ check install_h: -lint: modlintlib - -# -# The 'lint.platmod' target lints the boston platform module against the sun4u -# kernel. This ends up doing all the kernel cross-checks, so it takes a couple -# of minutes. Due to the low ROI, it's not run by default, but it's a good -# idea to run this if you change os/boston.c. -# -LINT_LIBS = $(LINT_LIB) \ - -L$(BOSTON_LINT_LIB_DIR) \ - -L$(LINT_LIB_DIR) $(LINT_KMODS:%=-l%) \ - $(CLOSED_LINT_KMODS:%=-l%) \ - -L$(SPARC_LIB_DIR) $(SPARC_LINTS:%=-l%) - -lint.platmod: modlintlib - @-$(ECHO) "\nBoston Platform-dependent module: global crosschecks:" - @-$(LINT) $(LINTFLAGS) $(LINT_LIBS) 2>&1 | $(LGREP.2) - $(BOSTON_KMODS): FRC @cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET) diff --git a/usr/src/uts/sun4u/boston/os/boston.c b/usr/src/uts/sun4u/boston/os/boston.c index 119e5d2f7b..2862266b10 100644 --- a/usr/src/uts/sun4u/boston/os/boston.c +++ b/usr/src/uts/sun4u/boston/os/boston.c @@ -51,7 +51,7 @@ int (*rmc_req_now)(rmc_comm_msg_t *, uint8_t) = NULL; void startup_platform(void) { - mutex_init(&mi2cv_mutex, NULL, NULL, NULL); + mutex_init(&mi2cv_mutex, NULL, MUTEX_ADAPTIVE, NULL); } int diff --git a/usr/src/uts/sun4u/cheetah/Makefile b/usr/src/uts/sun4u/cheetah/Makefile index d9a17fd409..cd92def8df 100644 --- a/usr/src/uts/sun4u/cheetah/Makefile +++ b/usr/src/uts/sun4u/cheetah/Makefile @@ -41,7 +41,6 @@ UTSBASE = ../.. # MODULE = SUNW,UltraSPARC-III OBJECTS = $(CHEETAH_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(CHEETAH_OBJS:%.o=$(LINTS_DIR)/%.ln) ROOTMODULE = $(ROOT_PSM_CPU_DIR)/$(MODULE) ROOTSOFTLINKS = $(SOFTLINKS:%=$(ROOT_PSM_CPU_DIR)/%) @@ -62,15 +61,9 @@ CLEANFILES += $(CPULIB) $(SYM_MOD) # Define targets # ALL_TARGET = $(SYM_MOD) -LINT_TARGET = $(MODULE).lint INSTALL_TARGET = def $(BINARY) $(ROOTMODULE) $(ROOTSOFTLINKS) # -# lint pass one enforcement -# -CFLAGS += $(CCVERBOSE) - -# # cpu-module-specific flags # CPPFLAGS += -DCPU_MODULE -DCHEETAH @@ -89,12 +82,6 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - install: $(INSTALL_DEPS) $(CPULIB): $(OBJECTS) @@ -112,17 +99,6 @@ $(ROOTSOFTLINKS): $(ROOTMODULE) # include $(UTSBASE)/sun4u/Makefile.targ -# -# For now, disable these lint checks; maintainers should endeavor -# to investigate and remove these for maximum lint coverage. -# Please do not carry these forward to new Makefiles. -# -LINTTAGS += -erroff=E_SUSPICIOUS_COMPARISON -LINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN -LINTTAGS += -erroff=E_STATIC_UNUSED -LINTTAGS += -erroff=E_PTRDIFF_OVERFLOW -LINTTAGS += -erroff=E_ASSIGN_NARROW_CONV - CERRWARN += -_gcc=-Wno-parentheses CERRWARN += $(CNOWARN_UNINIT) CERRWARN += -_gcc=-Wno-type-limits diff --git a/usr/src/uts/sun4u/cherrystone/Makefile b/usr/src/uts/sun4u/cherrystone/Makefile index 415c9b4021..1fdf3597a7 100644 --- a/usr/src/uts/sun4u/cherrystone/Makefile +++ b/usr/src/uts/sun4u/cherrystone/Makefile @@ -23,8 +23,6 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -#ident "%Z%%M% %I% %E% SMI" -# # This makefile drives the production of all Cherrystone system # dependent modules for the sun4u architecture. # @@ -45,12 +43,8 @@ install := TARGET= install install_h := TARGET= install_h clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint -lintlib := TARGET= lintlib -modlintlib := TARGET= modlintlib modlist := TARGET= modlist modlist := NO_STATE= -K $$MODSTATE$$$$ -clean.lint := TARGET= clean.lint check := TARGET= check # @@ -58,15 +52,13 @@ check := TARGET= check # .KEEP_STATE: -def all clean.lint clean clobber modlist: $(CHERRYSTONE_KMODS) - -modlintlib: $(CHERRYSTONE_KMODS) +def all clean clobber modlist: $(CHERRYSTONE_KMODS) IMPLEMENTED_PLATFORM = SUNW,Sun-Fire-480R LINKED_PLATFORMS = SUNW,Sun-Fire-V490 -install: $(ROOT_CHERRYSTONE_DIR) $(USR_CHERRYSTONE_DIR) \ +install: $(ROOT_CHERRYSTONE_DIR) $(USR_CHERRYSTONE_DIR) \ $(USR_CHERRYSTONE_INC_DIR) \ $(USR_CHERRYSTONE_SBIN_DIR) \ $(USR_CHERRYSTONE_LIB_DIR) \ @@ -85,18 +77,6 @@ $(CHERRYSTONE_CRYPTO_LINKS): $(ROOT_CHERRYSTONE_CRYPTO_DIR_64) $(SYMLINK) $(ROOT_US3_CRYPTO_LINK)/$@ \ $(ROOT_CHERRYSTONE_CRYPTO_DIR_64)/$@ -lint: modlintlib - -LINT_LIBS = $(LINT_LIB) \ - -L$(CHERRYSTONE_LINT_LIB_DIR) \ - -L$(LINT_LIB_DIR) $(LINT_KMODS:%=-l%) \ - $(CLOSED_LINT_KMODS:%=-l%) \ - -L$(SPARC_LIB_DIR) $(SPARC_LINTS:%=-l%) - -lint.platmod: modlintlib - @-$(ECHO) "\nCherrystone Platform-dependent module: global crosschecks:" - @-$(LINT) $(LINTFLAGS) $(LINT_LIBS) 2>&1 | $(LGREP.2) - $(CHERRYSTONE_KMODS): FRC @cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET) diff --git a/usr/src/uts/sun4u/cherrystone/os/cherrystone.c b/usr/src/uts/sun4u/cherrystone/os/cherrystone.c index 5b24d1a3da..1baeda6b35 100644 --- a/usr/src/uts/sun4u/cherrystone/os/cherrystone.c +++ b/usr/src/uts/sun4u/cherrystone/os/cherrystone.c @@ -101,7 +101,7 @@ startup_platform(void) extern int disable_watchdog_on_exit; disable_watchdog_on_exit = 1; - mutex_init(&cherry_pcf8584_mutex, NULL, NULL, NULL); + mutex_init(&cherry_pcf8584_mutex, NULL, MUTEX_ADAPTIVE, NULL); } #pragma weak mmu_init_large_pages @@ -295,14 +295,15 @@ plat_discover_slice(pfn_t pfn, pfn_t *first, pfn_t *last) /*ARGSUSED*/ void plat_freelist_process(int mnode) -{} +{ +} /* * Called for each board/cpu/PA range detected in plat_fill_mc(). */ static void update_mem_bounds(int boardid, int cpuid, int bankid, - uint64_t base, uint64_t size) + uint64_t base, uint64_t size) { uint64_t end; int mnode; diff --git a/usr/src/uts/sun4u/chicago/Makefile b/usr/src/uts/sun4u/chicago/Makefile index 683b077445..8795f4f948 100644 --- a/usr/src/uts/sun4u/chicago/Makefile +++ b/usr/src/uts/sun4u/chicago/Makefile @@ -22,8 +22,6 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" -# # uts/sun4u/chicago/Makefile # # This makefile drives the production of the sun4u chicago platform @@ -48,12 +46,8 @@ install := TARGET= install install_h := TARGET= install_h clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint -lintlib := TARGET= lintlib -modlintlib := TARGET= modlintlib modlist := TARGET= modlist modlist := NO_STATE= -K $$MODSTATE$$$$ -clean.lint := TARGET= clean.lint check := TARGET= check # @@ -61,9 +55,7 @@ check := TARGET= check # .KEEP_STATE: -def all clean clean.lint clobber modlist: $(CHICAGO_KMODS) - -modlintlib: $(CHICAGO_KMODS) +def all clean clobber modlist: $(CHICAGO_KMODS) install: $(ROOT_CHICAGO_DIR) \ $(USR_CHICAGO_DIR) \ @@ -75,24 +67,6 @@ install: $(ROOT_CHICAGO_DIR) \ check install_h: -lint: modlintlib - -# -# The 'lint.platmod' target lints the chicago platform module against the sun4u -# kernel. This ends up doing all the kernel cross-checks, so it takes a couple -# of minutes. Due to the low ROI, it's not run by default, but it's a good -# idea to run this if you change os/chicago.c. -# -LINT_LIBS = $(LINT_LIB) \ - -L$(CHICAGO_LINT_LIB_DIR) \ - -L$(LINT_LIB_DIR) $(LINT_KMODS:%=-l%) \ - $(CLOSED_LINT_KMODS:%=-l%) \ - -L$(SPARC_LIB_DIR) $(SPARC_LINTS:%=-l%) - -lint.platmod: modlintlib - @-$(ECHO) "\nChicago Platform-dependent module: global crosschecks:" - @-$(LINT) $(LINTFLAGS) $(LINT_LIBS) 2>&1 | $(LGREP.2) - $(CHICAGO_KMODS): FRC @cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET) diff --git a/usr/src/uts/sun4u/chicago/io/fpc/fpc-impl-4u.c b/usr/src/uts/sun4u/chicago/io/fpc/fpc-impl-4u.c index 850501397a..aa96f19079 100644 --- a/usr/src/uts/sun4u/chicago/io/fpc/fpc-impl-4u.c +++ b/usr/src/uts/sun4u/chicago/io/fpc/fpc-impl-4u.c @@ -24,8 +24,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/file.h> #include <sys/sunndi.h> #include <sys/sunddi.h> @@ -189,8 +187,7 @@ bad_regs_length: if (regs_p) kmem_free(regs_p, regs_length); bad_regs_p: - if (platform_specific_data) - kmem_free(platform_specific_data, sizeof (fire4u_specific_t)); + kmem_free(platform_specific_data, sizeof (fire4u_specific_t)); if (nodename) kmem_free(nodename, nodename_size); diff --git a/usr/src/uts/sun4u/chicago/os/chicago.c b/usr/src/uts/sun4u/chicago/os/chicago.c index f1cfc84bfe..205e940eba 100644 --- a/usr/src/uts/sun4u/chicago/os/chicago.c +++ b/usr/src/uts/sun4u/chicago/os/chicago.c @@ -23,8 +23,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/param.h> #include <sys/systm.h> #include <sys/sysmacros.h> @@ -53,7 +51,7 @@ static void get_ebus_rtc_vaddr(void); void startup_platform(void) { - mutex_init(&chicago_mi2cv_mutex, NULL, NULL, NULL); + mutex_init(&chicago_mi2cv_mutex, NULL, MUTEX_ADAPTIVE, NULL); } int diff --git a/usr/src/uts/sun4u/cpr/Makefile b/usr/src/uts/sun4u/cpr/Makefile index af9b3a9635..69438cd16a 100644 --- a/usr/src/uts/sun4u/cpr/Makefile +++ b/usr/src/uts/sun4u/cpr/Makefile @@ -47,10 +47,6 @@ OBJECTS = $(CPR_FIRST_OBJS:%=$(OBJS_DIR)/%) \ $(CPR_IMPL_OBJS:%=$(OBJS_DIR)/%) \ $(CPR_OBJS:%=$(OBJS_DIR)/%) \ $(CPR_SPARC_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(CPR_FIRST_OBJS:%.o=$(LINTS_DIR)/%.ln) \ - $(CPR_OBJS:%.o=$(LINTS_DIR)/%.ln) \ - $(CPR_IMPL_OBJS:%.o=$(LINTS_DIR)/%.ln) \ - $(CPR_SPARC_OBJS:%.o=$(LINTS_DIR)/%.ln) ROOTMODULE = $(ROOT_PSM_MISC_DIR)/$(MODULE) # @@ -66,29 +62,13 @@ include $(UTSBASE)/sun4u/Makefile.sun4u # Define targets # ALL_TARGET = $(BINARY) -LINT_TARGET = $(MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) # -# lint pass one enforcement -# -CFLAGS += $(CCVERBOSE) - -# # Depends on bootdev # LDFLAGS += -dy -N misc/bootdev -# -# For now, disable these lint checks; maintainers should endeavor -# to investigate and remove these for maximum lint coverage. -# Please do not carry these forward to new Makefiles. -# -LINTTAGS += -erroff=E_PTRDIFF_OVERFLOW -LINTTAGS += -erroff=E_ASSIGN_NARROW_CONV -LINTTAGS += -erroff=E_SUSPICIOUS_COMPARISON -LINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN - CERRWARN += -_gcc=-Wno-unused-variable CERRWARN += -_gcc=-Wno-unused-label CERRWARN += $(CNOWARN_UNINIT) @@ -108,12 +88,6 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - install: $(INSTALL_DEPS) # diff --git a/usr/src/uts/sun4u/cpu/us3_common.c b/usr/src/uts/sun4u/cpu/us3_common.c index 22477e2a4c..38a06c2731 100644 --- a/usr/src/uts/sun4u/cpu/us3_common.c +++ b/usr/src/uts/sun4u/cpu/us3_common.c @@ -1418,7 +1418,8 @@ cpu_log_fast_ecc_error(caddr_t tpc, int priv, int tl, uint64_t ceen, */ if ((t_afsr_errs & (C_AFSR_UCU | C_AFSR_L3_UCU)) && aflt->flt_panic == 0 && aflt->flt_priv != 0 && - curthread->t_ontrap == NULL && curthread->t_lofault == NULL) { + curthread->t_ontrap == NULL && + curthread->t_lofault == (uintptr_t)NULL) { get_cpu_error_state(&cpu_error_regs); if (IS_PANTHER(cpunodes[CPU->cpu_id].implementation)) { aflt->flt_panic |= @@ -4549,7 +4550,7 @@ cpu_error_to_resource_type(struct async_flt *aflt) */ static void cpu_payload_add_aflt(struct async_flt *aflt, nvlist_t *payload, - nvlist_t *resource, int *afar_status, int *synd_status) + nvlist_t *resource, int *afar_status, int *synd_status) { ch_async_flt_t *ch_flt = (ch_async_flt_t *)aflt; *synd_status = AFLT_STAT_INVALID; @@ -5351,7 +5352,7 @@ afsr_to_synd_status(uint_t cpuid, uint64_t afsr, uint64_t afsr_bit) void sticksync_slave(void) { - int i; + int i; int tries = 0; int64_t tskew; int64_t av_tskew; @@ -5494,7 +5495,7 @@ cpu_uninit_private(struct cpu *cp) ASSERT(chprp); cpu_uninit_ecache_scrub_dr(cp); CPU_PRIVATE(cp) = NULL; - ch_err_tl1_paddrs[cp->cpu_id] = NULL; + ch_err_tl1_paddrs[cp->cpu_id] = 0; kmem_cache_free(ch_private_cache, chprp); cmp_delete_cpu(cp->cpu_id); @@ -6175,8 +6176,8 @@ cpu_check_ce_errors(void *arg) * * flag == SCRUBBER_CEEN_CHECK * called from memscrubber, just check/scrub, no reset - * paddr physical addr. for start of scrub pages - * vaddr virtual addr. for scrub area + * paddr physical addr. for start of scrub pages + * vaddr virtual addr. for scrub area * psz page size of area to be scrubbed * * flag == TIMEOUT_CEEN_CHECK @@ -6316,9 +6317,9 @@ cpu_ce_delayed_ec_logout(uint64_t afar) void cpu_ce_detected(ch_cpu_errors_t *cpu_error_regs, int flag) { - ch_async_flt_t ch_flt; + ch_async_flt_t ch_flt; struct async_flt *aflt; - char pr_reason[MAX_REASON_STRING]; + char pr_reason[MAX_REASON_STRING]; bzero(&ch_flt, sizeof (ch_async_flt_t)); ch_flt.flt_trapped_ce = flag; @@ -6356,8 +6357,8 @@ cpu_log_and_clear_ce(ch_async_flt_t *ch_flt) struct async_flt *aflt; uint64_t afsr, afsr_errs; ch_cpu_logout_t *clop; - char pr_reason[MAX_REASON_STRING]; - on_trap_data_t *otp = curthread->t_ontrap; + char pr_reason[MAX_REASON_STRING]; + on_trap_data_t *otp = curthread->t_ontrap; aflt = (struct async_flt *)ch_flt; afsr = aflt->flt_stat; @@ -7017,7 +7018,7 @@ fpras_failure(int op, int how) * ie, don't panic for copyin, copyout, kcopy and bcopy called * under on_fault and do panic for unprotected bcopy and hwblkpagecopy. */ - aflt->flt_panic = (curthread->t_lofault == NULL); + aflt->flt_panic = (curthread->t_lofault == (uintptr_t)NULL); /* * XOR the source instruction block with the copied instruction diff --git a/usr/src/uts/sun4u/daktari/Makefile b/usr/src/uts/sun4u/daktari/Makefile index 2e5a318a1f..9a2a3f02c0 100644 --- a/usr/src/uts/sun4u/daktari/Makefile +++ b/usr/src/uts/sun4u/daktari/Makefile @@ -23,9 +23,6 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# -#ident "%Z%%M% %I% %E% SMI" -# # This makefile drives the production of all Daktari system # dependent modules for the sun4u architecture. # @@ -47,12 +44,8 @@ install := TARGET= install install_h := TARGET= install_h clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint -lintlib := TARGET= lintlib -modlintlib := TARGET= modlintlib modlist := TARGET= modlist modlist := NO_STATE= -K $$MODSTATE$$$$ -clean.lint := TARGET= clean.lint check := TARGET= check # @@ -60,15 +53,13 @@ check := TARGET= check # .KEEP_STATE: -def all clean.lint clean clobber modlist: $(DAKTARI_KMODS) - -modlintlib: $(DAKTARI_KMODS) +def all clean clobber modlist: $(DAKTARI_KMODS) IMPLEMENTED_PLATFORM = SUNW,Sun-Fire-880 LINKED_PLATFORMS = SUNW,Sun-Fire-V890 -install: $(ROOT_DAKTARI_DIR) $(USR_DAKTARI_DIR) \ +install: $(ROOT_DAKTARI_DIR) $(USR_DAKTARI_DIR) \ $(USR_DAKTARI_INC_DIR) \ $(USR_DAKTARI_SBIN_DIR) \ $(USR_DAKTARI_LIB_DIR) \ @@ -86,25 +77,6 @@ $(DAKTARI_CRYPTO_LINKS): $(ROOT_DAKTARI_CRYPTO_DIR_64) install_h check: FRC @cd sys; pwd; $(MAKE) $(TARGET) - -lint: modlintlib - -# -# The 'lint.platmod' target lints the daktari platform module against the sun4u -# kernel. This ends up doing all the kernel cross-checks, so it takes a couple -# of minutes. Due to the low ROI, it's not run by default, but it's a good -# idea to run this if you change os/daktari.c. -# -LINT_LIBS = $(LINT_LIB) \ - -L$(DAKTARI_LINT_LIB_DIR) \ - -L$(LINT_LIB_DIR) $(LINT_KMODS:%=-l%) \ - $(CLOSED_LINT_KMODS:%=-l%) \ - -L$(SPARC_LIB_DIR) $(SPARC_LINTS:%=-l%) - -lint.platmod: modlintlib - @-$(ECHO) "\nDaktari Platform-dependent module: global crosschecks:" - @-$(LINT) $(LINTFLAGS) $(LINT_LIBS) 2>&1 | $(LGREP.2) - $(DAKTARI_KMODS): FRC @cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET) diff --git a/usr/src/uts/sun4u/daktari/io/hpc3130_dak.c b/usr/src/uts/sun4u/daktari/io/hpc3130_dak.c index a0247ea880..47e9b8ac2b 100644 --- a/usr/src/uts/sun4u/daktari/io/hpc3130_dak.c +++ b/usr/src/uts/sun4u/daktari/io/hpc3130_dak.c @@ -336,7 +336,7 @@ hpc3130_get(intptr_t arg, int reg, hpc3130_unit_t *unitp, int mode) i2c_transfer_t *i2c_tran_pointer; int err = DDI_SUCCESS; - if (arg == NULL) { + if (arg == (intptr_t)NULL) { D2CMN_ERR((CE_WARN, "ioctl: arg passed in to " "ioctl = NULL")); return (EINVAL); @@ -380,7 +380,7 @@ hpc3130_set(intptr_t arg, int reg, hpc3130_unit_t *unitp, int mode) int err = DDI_SUCCESS; uint8_t passin_byte; - if (arg == NULL) { + if (arg == (intptr_t)NULL) { D2CMN_ERR((CE_WARN, "ioctl: arg passed in to " "ioctl = NULL")); return (EINVAL); @@ -413,11 +413,11 @@ hpc3130_set(intptr_t arg, int reg, hpc3130_unit_t *unitp, int mode) static int hpc3130_ioctl(dev_t dev, int cmd, intptr_t arg, int mode, cred_t *credp, - int *rvalp) + int *rvalp) { _NOTE(ARGUNUSED(credp, rvalp)) hpc3130_unit_t *unitp; - int err = DDI_SUCCESS; + int err = DDI_SUCCESS; i2c_transfer_t *i2c_tran_pointer; i2c_reg_t ioctl_reg; int port = MINOR_TO_PORT(getminor(dev)); @@ -522,7 +522,7 @@ hpc3130_ioctl(dev_t dev, int cmd, intptr_t arg, int mode, cred_t *credp, break; case I2C_GET_REG: - if (arg == NULL) { + if (arg == (intptr_t)NULL) { D2CMN_ERR((CE_WARN, "ioctl: arg passed in to " "ioctl = NULL")); err = EINVAL; @@ -566,7 +566,7 @@ hpc3130_ioctl(dev_t dev, int cmd, intptr_t arg, int mode, cred_t *credp, break; case I2C_SET_REG: - if (arg == NULL) { + if (arg == (intptr_t)NULL) { D2CMN_ERR((CE_WARN, "ioctl: arg passed in to " "ioctl = NULL")); err = EINVAL; @@ -581,7 +581,7 @@ hpc3130_ioctl(dev_t dev, int cmd, intptr_t arg, int mode, cred_t *credp, } (void) i2c_transfer_alloc(unitp->hpc3130_hdl, &i2c_tran_pointer, 2, 0, I2C_SLEEP); - if (i2c_tran_pointer == NULL) { + if (i2c_tran_pointer == NULL) { D2CMN_ERR((CE_WARN, "Failed in I2C_GET_REG " "i2c_tran_pointer not allocated")); err = ENOMEM; @@ -685,11 +685,11 @@ hpc3130_ioctl(dev_t dev, int cmd, intptr_t arg, int mode, cred_t *credp, } static int -hpc3130_poll(dev_t dev, short events, int anyyet, short - *reventsp, struct pollhead **phpp) +hpc3130_poll(dev_t dev, short events, int anyyet, short *reventsp, + struct pollhead **phpp) { _NOTE(ARGUNUSED(events)) - hpc3130_unit_t *unitp; + hpc3130_unit_t *unitp; int port = MINOR_TO_PORT(getminor(dev)); int instance = MINOR_TO_INST(getminor(dev)); @@ -983,7 +983,7 @@ hpc3130_do_attach(dev_info_t *dip) minor_number = INST_TO_MINOR(instance) | PORT_TO_MINOR(I2C_PORT(i)); if (ddi_create_minor_node(dip, name, S_IFCHR, minor_number, - "ddi_i2c:controller", NULL) == DDI_FAILURE) { + "ddi_i2c:controller", 0) == DDI_FAILURE) { D1CMN_ERR((CE_WARN, "ddi_create_minor_node failed " "for %s", name)); ddi_remove_intr(dip, 0u, @@ -1112,7 +1112,7 @@ hpc3130_set_led(hpc3130_unit_t *unitp, int slot, int led, uint8_t value) int hpc3130_get_led(i2c_client_hdl_t handle, int slot, - int led, uint8_t *value) + int led, uint8_t *value) { uint8_t temp; @@ -1126,7 +1126,7 @@ hpc3130_get_led(i2c_client_hdl_t handle, int slot, static int hpc3130_write(i2c_client_hdl_t handle, uint8_t offset, - uint8_t port, uint8_t data) + uint8_t port, uint8_t data) { ASSERT(port < HPC3130_MAX_SLOT); ASSERT(handle); @@ -1137,7 +1137,7 @@ hpc3130_write(i2c_client_hdl_t handle, uint8_t offset, static int hpc3130_read(i2c_client_hdl_t handle, uint8_t offset, - uint8_t port, uint8_t *data) + uint8_t port, uint8_t *data) { ASSERT(port < HPC3130_MAX_SLOT); ASSERT(handle); @@ -1148,7 +1148,7 @@ hpc3130_read(i2c_client_hdl_t handle, uint8_t offset, static int hpc3130_rw(i2c_client_hdl_t handle, uint8_t reg, - boolean_t write, uint8_t *data) + boolean_t write, uint8_t *data) { i2c_transfer_t *i2c_tran_pointer; int err; @@ -1201,7 +1201,7 @@ hpc3130_rw(i2c_client_hdl_t handle, uint8_t reg, */ static int hpc3130_init(dev_info_t *dip, - struct tuple *init_sequence) + struct tuple *init_sequence) { int slot; @@ -1445,7 +1445,7 @@ out: static int hpc3130_debounce_status(i2c_client_hdl_t handle, - int slot, uint8_t *status) + int slot, uint8_t *status) { int count, limit; uint8_t old; @@ -1484,7 +1484,7 @@ hpc3130_debounce_status(i2c_client_hdl_t handle, static int hpc3130_slot_connect(caddr_t ops_arg, hpc_slot_t slot_hdl, - void *data, uint_t flags) + void *data, uint_t flags) { _NOTE(ARGUNUSED(slot_hdl, data, flags)) uint8_t control; @@ -1673,7 +1673,7 @@ out: static int hpc3130_slot_disconnect(caddr_t ops_arg, hpc_slot_t slot_hdl, - void *data, uint_t flags) + void *data, uint_t flags) { _NOTE(ARGUNUSED(slot_hdl, data, flags)) uint8_t control; @@ -1800,7 +1800,7 @@ out: static int hpc3130_verify_slot_power(hpc3130_unit_t *hpc3130_p, i2c_client_hdl_t handle, - uint8_t offset, char *phys_slot, boolean_t slot_target_state) + uint8_t offset, char *phys_slot, boolean_t slot_target_state) { uint8_t tries = 0; uint8_t status; @@ -1870,7 +1870,7 @@ hpc3130_verify_slot_power(hpc3130_unit_t *hpc3130_p, i2c_client_hdl_t handle, static int hpc3130_slot_insert(caddr_t ops_arg, hpc_slot_t slot_hdl, - void *data, uint_t flags) + void *data, uint_t flags) { _NOTE(ARGUNUSED(ops_arg, slot_hdl, data, flags)) return (HPC_ERR_NOTSUPPORTED); @@ -1878,7 +1878,7 @@ hpc3130_slot_insert(caddr_t ops_arg, hpc_slot_t slot_hdl, static int hpc3130_slot_remove(caddr_t ops_arg, hpc_slot_t slot_hdl, - void *data, uint_t flags) + void *data, uint_t flags) { _NOTE(ARGUNUSED(ops_arg, slot_hdl, data, flags)) return (HPC_ERR_NOTSUPPORTED); @@ -1886,7 +1886,7 @@ hpc3130_slot_remove(caddr_t ops_arg, hpc_slot_t slot_hdl, static int hpc3130_slot_control(caddr_t ops_arg, hpc_slot_t slot_hdl, - int request, caddr_t arg) + int request, caddr_t arg) { _NOTE(ARGUNUSED(slot_hdl)) i2c_client_hdl_t handle; @@ -2049,9 +2049,9 @@ hpc3130_lookup_slot(char *nexus, int pcidev) { int i = 0; - while ((slot_translate[i].pcidev != pcidev || - strcmp(nexus, slot_translate[i].nexus) != 0) && - i < HPC3130_LOOKUP_SLOTS) + while (i < HPC3130_LOOKUP_SLOTS && + (slot_translate[i].pcidev != pcidev || + strcmp(nexus, slot_translate[i].nexus) != 0)) i++; ASSERT(i != HPC3130_LOOKUP_SLOTS); return (i); diff --git a/usr/src/uts/sun4u/db21554/Makefile b/usr/src/uts/sun4u/db21554/Makefile index ef3d37f0f3..79b523ba96 100644 --- a/usr/src/uts/sun4u/db21554/Makefile +++ b/usr/src/uts/sun4u/db21554/Makefile @@ -41,7 +41,6 @@ UTSBASE = ../.. # MODULE = db21554 OBJECTS = $(DB21554_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(DB21554_OBJS:%.o=$(LINTS_DIR)/%.ln) ROOTMODULE = $(ROOT_PSM_DRV_DIR)/$(MODULE) # @@ -53,18 +52,12 @@ include $(UTSBASE)/sun4u/Makefile.sun4u # Define targets # ALL_TARGET = $(BINARY) -LINT_TARGET = $(MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) # Turn this on once compiler understands v9 in it's backend #INLINES += $(UTSBASE)/sun4u/io/pci.il # -# lint pass one enforcement -# -CFLAGS += $(CCVERBOSE) - -# # Turn on doubleword alignment for 64 bit registers # CFLAGS += -dalign @@ -79,13 +72,6 @@ CFLAGS += -DPCI_HOTPLUG # LDFLAGS += -dy -Nmisc/pcihp -# -# For now, disable these lint checks; maintainers should endeavor -# to investigate and remove these for maximum lint coverage. -# Please do not carry these forward to new Makefiles. -# -LINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN - CERRWARN += -_gcc=-Wno-parentheses CERRWARN += $(CNOWARN_UNINIT) CERRWARN += -_gcc=-Wno-type-limits @@ -102,12 +88,6 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - install: $(INSTALL_DEPS) # diff --git a/usr/src/uts/sun4u/excalibur/Makefile b/usr/src/uts/sun4u/excalibur/Makefile index 9c110d7809..ea5b6dc325 100644 --- a/usr/src/uts/sun4u/excalibur/Makefile +++ b/usr/src/uts/sun4u/excalibur/Makefile @@ -24,8 +24,6 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -#pragma ident "%Z%%M% %I% %E% SMI" -# # This makefile drives the production of the sun4u excalibur platform # module. # @@ -48,12 +46,8 @@ install := TARGET= install install_h := TARGET= install_h clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint -lintlib := TARGET= lintlib -modlintlib := TARGET= modlintlib modlist := TARGET= modlist modlist := NO_STATE= -K $$MODSTATE$$$$ -clean.lint := TARGET= clean.lint check := TARGET= check # @@ -61,9 +55,7 @@ check := TARGET= check # .KEEP_STATE: -def all clean clean.lint clobber modlist: $(EXCALIBUR_KMODS) - -modlintlib: $(EXCALIBUR_KMODS) +def all clean clobber modlist: $(EXCALIBUR_KMODS) install: $(ROOT_EXCALIBUR_DIR) \ $(USR_EXCALIBUR_DIR) \ @@ -75,24 +67,6 @@ install: $(ROOT_EXCALIBUR_DIR) \ check install_h: -lint: modlintlib - -# -# The 'lint.platmod' target lints the excalibur platform module against the sun4u -# kernel. This ends up doing all the kernel cross-checks, so it takes a couple -# of minutes. Due to the low ROI, it's not run by default, but it's a good -# idea to run this if you change os/excalibur.c. -# -LINT_LIBS = $(LINT_LIB) \ - -L$(EXCALIBUR_LINT_LIB_DIR) \ - -L$(LINT_LIB_DIR) $(LINT_KMODS:%=-l%) \ - $(CLOSED_LINT_KMODS:%=-l%) \ - -L$(SPARC_LIB_DIR) $(SPARC_LINTS:%=-l%) - -lint.platmod: modlintlib - @-$(ECHO) "\nExcalibur Platform-dependent module: global crosschecks:" - @-$(LINT) $(LINTFLAGS) $(LINT_LIBS) 2>&1 | $(LGREP.2) - $(EXCALIBUR_KMODS): FRC @cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET) diff --git a/usr/src/uts/sun4u/excalibur/io/xcalwd.c b/usr/src/uts/sun4u/excalibur/io/xcalwd.c index a712ae5102..62cb0aaa70 100644 --- a/usr/src/uts/sun4u/excalibur/io/xcalwd.c +++ b/usr/src/uts/sun4u/excalibur/io/xcalwd.c @@ -196,7 +196,7 @@ _info(struct modinfo *modinfop) /*ARGSUSED*/ static int xcalwd_getinfo(dev_info_t *dip, ddi_info_cmd_t cmd, - void *arg, void **resultp) + void *arg, void **resultp) { int retval; dev_t dev = (dev_t)arg; @@ -255,7 +255,7 @@ xcalwd_attach(dev_info_t *dip, ddi_attach_cmd_t cmd) } if (ddi_create_minor_node(dip, MINOR_DEVICE_NAME, - S_IFCHR, instance, DDI_PSEUDO, NULL) == DDI_FAILURE) { + S_IFCHR, instance, DDI_PSEUDO, 0) == DDI_FAILURE) { cmn_err(CE_WARN, "create minor node failed\n"); return (DDI_FAILURE); } @@ -396,7 +396,7 @@ xcalwd_close(dev_t dev, int flag, int otyp, cred_t *credp) /*ARGSUSED*/ static int xcalwd_ioctl(dev_t dev, int cmd, intptr_t arg, int flag, - cred_t *cred_p, int *rvalp) + cred_t *cred_p, int *rvalp) { int instance; xcalwd_state_t *tsp; diff --git a/usr/src/uts/sun4u/excalibur/os/excalibur.c b/usr/src/uts/sun4u/excalibur/os/excalibur.c index 2727e25ac3..9dd7b33a13 100644 --- a/usr/src/uts/sun4u/excalibur/os/excalibur.c +++ b/usr/src/uts/sun4u/excalibur/os/excalibur.c @@ -24,8 +24,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/param.h> #include <sys/systm.h> #include <sys/sysmacros.h> @@ -66,7 +64,7 @@ static xcalfan_info_t xcalfans[] = { void startup_platform(void) { - mutex_init(&excal_pcf8584_mutex, NULL, NULL, NULL); + mutex_init(&excal_pcf8584_mutex, NULL, MUTEX_ADAPTIVE, NULL); } int @@ -185,7 +183,7 @@ plat_get_mem_unum(int synd_code, uint64_t flt_addr, int flt_bus_id, { if (flt_in_memory && (p2get_mem_unum != NULL)) return (p2get_mem_unum(synd_code, P2ALIGN(flt_addr, 8), - buf, buflen, lenp)); + buf, buflen, lenp)); else return (ENOTSUP); } diff --git a/usr/src/uts/sun4u/gpio_87317/Makefile b/usr/src/uts/sun4u/gpio_87317/Makefile index 86374e2b13..a0962484f3 100644 --- a/usr/src/uts/sun4u/gpio_87317/Makefile +++ b/usr/src/uts/sun4u/gpio_87317/Makefile @@ -39,9 +39,8 @@ UTSBASE = ../.. # # Define the module and object file sets. # -MODULE = gpio_87317 +MODULE = gpio_87317 OBJECTS = $(GPIO_87317_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(GPIO_87317_OBJS:%.o=$(LINTS_DIR)/%.ln) ROOTMODULE = $(ROOT_PSM_DRV_DIR)/$(MODULE) # @@ -52,14 +51,9 @@ include $(UTSBASE)/sun4u/Makefile.sun4u # # Define targets # -ALL_TARGET = $(BINARY) -LINT_TARGET = $(MODULE).lint +ALL_TARGET = $(BINARY) INSTALL_TARGET = $(BINARY) $(ROOTMODULE) -# -# lint pass one enforcement -# -CFLAGS += $(CCVERBOSE) CERRWARN += -_gcc=-Wno-parentheses # @@ -75,16 +69,9 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - install: $(INSTALL_DEPS) # # Include common targets. # include $(UTSBASE)/sun4u/Makefile.targ - diff --git a/usr/src/uts/sun4u/grover/io/grfans.c b/usr/src/uts/sun4u/grover/io/grfans.c index 73219668da..0f8e397b4a 100644 --- a/usr/src/uts/sun4u/grover/io/grfans.c +++ b/usr/src/uts/sun4u/grover/io/grfans.c @@ -215,7 +215,7 @@ grfans_do_attach(dev_info_t *dip) if (ddi_create_minor_node(dip, "cpu_fan", S_IFCHR, DEVINST_TO_MINOR(instance) | CHANNEL_TO_MINOR(CPU_FAN_CHANNEL), - FANS_NODE_TYPE, NULL) == DDI_FAILURE) { + FANS_NODE_TYPE, 0) == DDI_FAILURE) { cmn_err(CE_WARN, "%s ddi_create_minor_node failed" " for cpu fan", name); ddi_regs_map_free(&unitp->cpufan_rhandle); @@ -228,7 +228,7 @@ grfans_do_attach(dev_info_t *dip) if (ddi_create_minor_node(dip, "sys_fan", S_IFCHR, DEVINST_TO_MINOR(instance) | CHANNEL_TO_MINOR(SYSTEM_FAN_CHANNEL), - FANS_NODE_TYPE, NULL) == DDI_FAILURE) { + FANS_NODE_TYPE, 0) == DDI_FAILURE) { cmn_err(CE_WARN, "%s ddi_create_minor_node failed" " for system fan", name); ddi_regs_map_free(&unitp->cpufan_rhandle); diff --git a/usr/src/uts/sun4u/grover/os/grover.c b/usr/src/uts/sun4u/grover/os/grover.c index 6a84c726e1..3cb4cc58c3 100644 --- a/usr/src/uts/sun4u/grover/os/grover.c +++ b/usr/src/uts/sun4u/grover/os/grover.c @@ -24,8 +24,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/param.h> #include <sys/systm.h> #include <sys/sunddi.h> @@ -57,12 +55,12 @@ set_platform_defaults(void) * of Southbridge. */ #define GROVER_ISA_PATHNAME "/pci@1f,0/isa@7" -ddi_acc_handle_t grover_isa_handle; /* handle for isa pci space */ +ddi_acc_handle_t grover_isa_handle; /* handle for isa pci space */ void load_platform_drivers(void) { - dev_info_t *dip; /* dip of the isa driver */ + dev_info_t *dip; /* dip of the isa driver */ if (i_ddi_attach_hw_nodes("power") != DDI_SUCCESS) @@ -88,12 +86,10 @@ load_platform_drivers(void) dip = e_ddi_hold_devi_by_path(GROVER_ISA_PATHNAME, 0); if (dip == NULL) { cmn_err(CE_PANIC, "Could not install the isa driver\n"); - return; } if (pci_config_setup(dip, &grover_isa_handle) != DDI_SUCCESS) { cmn_err(CE_PANIC, "Could not get the config space of isa\n"); - return; } } diff --git a/usr/src/uts/sun4u/grover/platmod/Makefile b/usr/src/uts/sun4u/grover/platmod/Makefile index c217de09a7..7962801ce2 100644 --- a/usr/src/uts/sun4u/grover/platmod/Makefile +++ b/usr/src/uts/sun4u/grover/platmod/Makefile @@ -40,7 +40,6 @@ UTSBASE = ../../.. # MODULE = platmod OBJECTS = $(GROVER_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(GROVER_OBJS:%.o=$(LINTS_DIR)/%.ln) ROOTMODULE = $(ROOT_GROVER_MISC_DIR)/$(MODULE) PLAT_DIR = . @@ -60,7 +59,6 @@ CLEANFILES += $(PLATLIB) $(SYM_MOD) # Define targets # ALL_TARGET = $(SYM_MOD) -LINT_TARGET = $(MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) # @@ -81,18 +79,10 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - install: $(INSTALL_DEPS) check: -LINT_LIB_DIR = $(GROVER_LINT_LIB_DIR) - $(PLATLIB): $(OBJECTS) $(BUILD.SO) $(OBJECTS) diff --git a/usr/src/uts/sun4u/io/gpio_87317.c b/usr/src/uts/sun4u/io/gpio_87317.c index 450425e407..3c218b58b5 100644 --- a/usr/src/uts/sun4u/io/gpio_87317.c +++ b/usr/src/uts/sun4u/io/gpio_87317.c @@ -213,7 +213,7 @@ gpio_attach(dev_info_t *dip, ddi_attach_cmd_t cmd) instance = ddi_get_instance(dip); DBG(dip, "attach: instance is %d", instance, 0, 0, 0, 0); if (ddi_soft_state_zalloc(statep, instance) != DDI_SUCCESS) - goto attach_failed; + goto attach_failed; softc = getsoftc(instance); softc->gp_dip = dip; softc->gp_state = 0; @@ -226,7 +226,7 @@ gpio_attach(dev_info_t *dip, ddi_attach_cmd_t cmd) dev_attr.devacc_attr_dataorder = DDI_STRICTORDER_ACC; if (ddi_regs_map_setup(dip, 0, (caddr_t *)&softc->gp_regs, 0, 0, &dev_attr, &softc->gp_handle) != DDI_SUCCESS) - goto attach_failed; + goto attach_failed; DBG(dip, "attach: regs=0x%p", (uintptr_t)softc->gp_regs, 0, 0, 0, 0); DBG(dip, "attach: port 1 data is %x", @@ -254,10 +254,10 @@ gpio_attach(dev_info_t *dip, ddi_attach_cmd_t cmd) (uintptr_t)ddi_get8(softc->gp_handle, &softc->gp_regs[7]), 0, 0, 0, 0); - /* Create device minor nodes. */ + /* Create device minor nodes. */ if (ddi_create_minor_node(dip, "gpio", S_IFCHR, - instance, NULL, NULL) == DDI_FAILURE) { + instance, NULL, 0) == DDI_FAILURE) { ddi_regs_map_free(&softc->gp_handle); goto attach_failed; } @@ -267,7 +267,7 @@ gpio_attach(dev_info_t *dip, ddi_attach_cmd_t cmd) case DDI_RESUME: - /* Nothing to do for a resume. */ + /* Nothing to do for a resume. */ return (DDI_SUCCESS); @@ -340,7 +340,7 @@ gpio_close(dev_t dev, int flag, int otyp, cred_t *credp) /* ARGSUSED */ static int gpio_ioctl(dev_t dev, int cmd, intptr_t arg, int mode, cred_t *credp, - int *rvalp) + int *rvalp) { int instance = getminor(dev); struct gpio_softc *softc = getsoftc(instance); @@ -423,7 +423,7 @@ gpio_ioctl(dev_t dev, int cmd, intptr_t arg, int mode, cred_t *credp, #ifdef DEBUG void gpio_debug(dev_info_t *dip, char *format, uint_t arg1, uint_t arg2, uint_t arg3, - uint_t arg4, uint_t arg5) + uint_t arg4, uint_t arg5) { if (gpio_debug_flag == 0) { return; diff --git a/usr/src/uts/sun4u/io/i2c/clients/adm1026.c b/usr/src/uts/sun4u/io/i2c/clients/adm1026.c index 7ab697104c..4e8340d642 100644 --- a/usr/src/uts/sun4u/io/i2c/clients/adm1026.c +++ b/usr/src/uts/sun4u/io/i2c/clients/adm1026.c @@ -312,7 +312,7 @@ adm1026_do_attach(dev_info_t *dip) D2CMN_ERR((CE_WARN, "adm1026_do_attach: ddi_create_minor_node")); if (ddi_create_minor_node(dip, "adm1026", S_IFCHR, instance, - "ddi_i2c:led_control", NULL) == DDI_FAILURE) { + "ddi_i2c:led_control", 0) == DDI_FAILURE) { cmn_err(CE_WARN, "adm1026_do_attach: ddi_create_minor_node failed"); ddi_soft_state_free(adm1026soft_statep, instance); @@ -438,7 +438,7 @@ adm1026_put8(adm1026_unit_t *unitp, uint8_t reg, uint8_t val) */ static int adm1026_send8(adm1026_unit_t *unitp, uint8_t reg, uint8_t reg_val, - uint8_t reg_mask) + uint8_t reg_mask) { uint8_t val = 0; int err; @@ -593,7 +593,7 @@ adm1026_get_config(adm1026_unit_t *unitp, int cmd, uint32_t mask, uint32_t *val) static int adm1026_ioctl(dev_t dev, int cmd, intptr_t arg, int mode, cred_t *credp, - int *rvalp) + int *rvalp) { _NOTE(ARGUNUSED(credp, rvalp)) diff --git a/usr/src/uts/sun4u/io/i2c/clients/pic16f819.c b/usr/src/uts/sun4u/io/i2c/clients/pic16f819.c index 0f093c72d5..71cfcde9b3 100644 --- a/usr/src/uts/sun4u/io/i2c/clients/pic16f819.c +++ b/usr/src/uts/sun4u/io/i2c/clients/pic16f819.c @@ -275,17 +275,17 @@ pic16f819_close(dev_t dev, int flags, int otyp, cred_t *credp) static int pic16f819_ioctl(dev_t dev, int cmd, intptr_t arg, int mode, - cred_t *credp, int *rvalp) + cred_t *credp, int *rvalp) { _NOTE(ARGUNUSED(credp, rvalp)) - struct pic16f819_unit *unitp; - int instance; - int err = 0; + struct pic16f819_unit *unitp; + int instance; + int err = 0; i2c_reg_t ioctl_reg; - uchar_t val8; + uchar_t val8; - if (arg == NULL) { + if (arg == (intptr_t)NULL) { D2CMN_ERR((CE_WARN, "PIC16F819: ioctl: arg passed in to ioctl " "= NULL\n")); err = EINVAL; @@ -389,7 +389,7 @@ pic16f819_do_attach(dev_info_t *dip) "%s%d", ddi_node_name(dip), instance); if (ddi_create_minor_node(dip, "fan_1", S_IFCHR, instance, - "ddi_i2c:pic", NULL) == DDI_FAILURE) { + "ddi_i2c:pic", 0) == DDI_FAILURE) { cmn_err(CE_WARN, "%s ddi_create_minor_node failed for " "%s\n", unitp->pic16f819_name, "pic16f819"); ddi_soft_state_free(pic16f819soft_statep, instance); diff --git a/usr/src/uts/sun4u/io/i2c/clients/ssc050.c b/usr/src/uts/sun4u/io/i2c/clients/ssc050.c index 1cf46a0574..1a79a14f4f 100644 --- a/usr/src/uts/sun4u/io/i2c/clients/ssc050.c +++ b/usr/src/uts/sun4u/io/i2c/clients/ssc050.c @@ -306,7 +306,7 @@ ssc050_set(struct ssc050_unit *unitp, int reg, uchar_t byte) static int ssc050_ioctl(dev_t dev, int cmd, intptr_t arg, int mode, cred_t *credp, - int *rvalp) + int *rvalp) { _NOTE(ARGUNUSED(credp, rvalp)) @@ -317,14 +317,14 @@ ssc050_ioctl(dev_t dev, int cmd, intptr_t arg, int mode, cred_t *credp, i2c_reg_t ioctl_reg; int port = MINOR_TO_PORT(getminor(dev)); int instance = MINOR_TO_INST(getminor(dev)); - uchar_t reg, val8; - uchar_t control; + uchar_t reg, val8; + uchar_t control; uchar_t fan_count; int divisor; int32_t fan_speed; uint8_t inverted_mask; - if (arg == NULL) { + if (arg == (intptr_t)NULL) { D2CMN_ERR((CE_WARN, "SSC050: ioctl: arg passed in to ioctl " "= NULL")); return (EINVAL); @@ -498,10 +498,10 @@ ssc050_ioctl(dev_t dev, int cmd, intptr_t arg, int mode, cred_t *credp, val8)); err = ssc050_set(unitp, reg, val8 | SSC050_DATADIRECTION_BIT); - if (err != I2C_SUCCESS) { - break; - } - delay(10); + if (err != I2C_SUCCESS) { + break; + } + delay(10); } } @@ -647,7 +647,7 @@ ssc050_do_attach(dev_info_t *dip) PORT_TO_MINOR(I2C_PORT(i)); if (ddi_create_minor_node(dip, name, S_IFCHR, minor_number, - "ddi_i2c:ioexp", NULL) == DDI_FAILURE) { + "ddi_i2c:ioexp", 0) == DDI_FAILURE) { cmn_err(CE_WARN, "%s: failed to create node for %s", unitp->name, name); ddi_soft_state_free(ssc050soft_statep, instance); @@ -684,7 +684,7 @@ ssc050_do_detach(dev_info_t *dip) int ssc050_get_port_bit(dev_info_t *dip, int port, int bit, uchar_t *rval, - int flags) + int flags) { struct ssc050_unit *unitp; int instance; diff --git a/usr/src/uts/sun4u/io/i2c/clients/ssc100.c b/usr/src/uts/sun4u/io/i2c/clients/ssc100.c index 9ebc3eabc8..0c92f7b977 100644 --- a/usr/src/uts/sun4u/io/i2c/clients/ssc100.c +++ b/usr/src/uts/sun4u/io/i2c/clients/ssc100.c @@ -294,7 +294,7 @@ ssc100_set(struct ssc100_unit *unitp, uchar_t byte) static int ssc100_ioctl(dev_t dev, int cmd, intptr_t arg, int mode, - cred_t *credp, int *rvalp) + cred_t *credp, int *rvalp) { _NOTE(ARGUNUSED(credp, rvalp)) @@ -306,7 +306,7 @@ ssc100_ioctl(dev_t dev, int cmd, intptr_t arg, int mode, i2c_reg_t ioctl_reg; uchar_t byte; - if (arg == NULL) { + if (arg == (intptr_t)NULL) { D2CMN_ERR((CE_WARN, "SSC100: ioctl: arg passed in to ioctl " "= NULL")); err = EINVAL; @@ -529,7 +529,7 @@ ssc100_do_attach(dev_info_t *dip) "%s%d", ddi_node_name(dip), instance); if (ddi_create_minor_node(dip, "ssc100", S_IFCHR, instance, - "ddi_i2c:ioexp", NULL) == DDI_FAILURE) { + "ddi_i2c:ioexp", 0) == DDI_FAILURE) { cmn_err(CE_WARN, "%s ddi_create_minor_node failed for " "%s", unitp->ssc100_name, "ssc100"); ddi_soft_state_free(ssc100soft_statep, instance); diff --git a/usr/src/uts/sun4u/io/pci/db21554.c b/usr/src/uts/sun4u/io/pci/db21554.c index f51ad8c0e6..fc1e83fd19 100644 --- a/usr/src/uts/sun4u/io/pci/db21554.c +++ b/usr/src/uts/sun4u/io/pci/db21554.c @@ -321,7 +321,7 @@ static void db_pci_get_conf_regs(ddi_acc_handle_t config_handle, #ifdef DEBUG static void db_debug(uint64_t func_id, dev_info_t *dip, char *fmt, - uintptr_t a1, uintptr_t a2, uintptr_t a3, uintptr_t a4, uintptr_t a5); + uintptr_t a1, uintptr_t a2, uintptr_t a3, uintptr_t a4, uintptr_t a5); #endif static int db_prop_op(dev_t dev, dev_info_t *dip, ddi_prop_op_t prop_op, @@ -348,34 +348,34 @@ static struct cb_ops db_cb_ops = { nodev /* int (*cb_awrite)() */ }; -static uint8_t db_ddi_get8(ddi_acc_impl_t *handle, uint8_t *addr); +static uint8_t db_ddi_get8(ddi_acc_impl_t *handle, uint8_t *addr); static uint16_t db_ddi_get16(ddi_acc_impl_t *handle, uint16_t *addr); static uint32_t db_ddi_get32(ddi_acc_impl_t *handle, uint32_t *addr); static uint64_t db_ddi_get64(ddi_acc_impl_t *handle, uint64_t *addr); -static void db_ddi_put8(ddi_acc_impl_t *handle, uint8_t *addr, - uint8_t data); -static void db_ddi_put16(ddi_acc_impl_t *handle, uint16_t *addr, - uint16_t data); -static void db_ddi_put32(ddi_acc_impl_t *handle, uint32_t *addr, - uint32_t data); -static void db_ddi_put64(ddi_acc_impl_t *handle, uint64_t *addr, - uint64_t data); -static void db_ddi_rep_get8(ddi_acc_impl_t *handle, uint8_t *host_addr, - uint8_t *dev_addr, size_t repcount, uint_t flags); -static void db_ddi_rep_get16(ddi_acc_impl_t *handle, uint16_t *host_addr, - uint16_t *dev_addr, size_t repcount, uint_t flags); -static void db_ddi_rep_get32(ddi_acc_impl_t *handle, uint32_t *host_addr, - uint32_t *dev_addr, size_t repcount, uint_t flags); -static void db_ddi_rep_get64(ddi_acc_impl_t *handle, uint64_t *host_addr, - uint64_t *dev_addr, size_t repcount, uint_t flags); -static void db_ddi_rep_put8(ddi_acc_impl_t *handle, uint8_t *host_addr, - uint8_t *dev_addr, size_t repcount, uint_t flags); -static void db_ddi_rep_put16(ddi_acc_impl_t *handle, uint16_t *host_addr, - uint16_t *dev_addr, size_t repcount, uint_t flags); -static void db_ddi_rep_put32(ddi_acc_impl_t *handle, uint32_t *host_addr, - uint32_t *dev_addr, size_t repcount, uint_t flags); -static void db_ddi_rep_put64(ddi_acc_impl_t *handle, uint64_t *host_addr, - uint64_t *dev_addr, size_t repcount, uint_t flags); +static void db_ddi_put8(ddi_acc_impl_t *handle, uint8_t *addr, + uint8_t data); +static void db_ddi_put16(ddi_acc_impl_t *handle, uint16_t *addr, + uint16_t data); +static void db_ddi_put32(ddi_acc_impl_t *handle, uint32_t *addr, + uint32_t data); +static void db_ddi_put64(ddi_acc_impl_t *handle, uint64_t *addr, + uint64_t data); +static void db_ddi_rep_get8(ddi_acc_impl_t *handle, uint8_t *host_addr, + uint8_t *dev_addr, size_t repcount, uint_t flags); +static void db_ddi_rep_get16(ddi_acc_impl_t *handle, uint16_t *host_addr, + uint16_t *dev_addr, size_t repcount, uint_t flags); +static void db_ddi_rep_get32(ddi_acc_impl_t *handle, uint32_t *host_addr, + uint32_t *dev_addr, size_t repcount, uint_t flags); +static void db_ddi_rep_get64(ddi_acc_impl_t *handle, uint64_t *host_addr, + uint64_t *dev_addr, size_t repcount, uint_t flags); +static void db_ddi_rep_put8(ddi_acc_impl_t *handle, uint8_t *host_addr, + uint8_t *dev_addr, size_t repcount, uint_t flags); +static void db_ddi_rep_put16(ddi_acc_impl_t *handle, uint16_t *host_addr, + uint16_t *dev_addr, size_t repcount, uint_t flags); +static void db_ddi_rep_put32(ddi_acc_impl_t *handle, uint32_t *host_addr, + uint32_t *dev_addr, size_t repcount, uint_t flags); +static void db_ddi_rep_put64(ddi_acc_impl_t *handle, uint64_t *host_addr, + uint64_t *dev_addr, size_t repcount, uint_t flags); static struct dev_ops db_dev_ops = { DEVO_REV, /* devo_rev */ @@ -410,16 +410,16 @@ static struct modlinkage modlinkage = { }; /* soft state pointer and structure template. */ -static void *db_state; +static void *db_state; /* * forward function declarations: */ static void db_uninitchild(dev_info_t *); -static int db_initchild(dev_info_t *child); -static int db_create_pci_prop(dev_info_t *child); -static int db_save_config_regs(db_ctrl_t *dbp); -static int db_restore_config_regs(db_ctrl_t *dbp); +static int db_initchild(dev_info_t *child); +static int db_create_pci_prop(dev_info_t *child); +static int db_save_config_regs(db_ctrl_t *dbp); +static int db_restore_config_regs(db_ctrl_t *dbp); /* * FMA error callback @@ -675,7 +675,7 @@ db_attach(dev_info_t *dip, ddi_attach_cmd_t cmd) if (ddi_create_minor_node(dip, name, S_IFCHR, PCIHP_AP_MINOR_NUM(instance, PCIHP_DEBUG_MINOR), - NULL, NULL) == DDI_FAILURE) { + NULL, 0) == DDI_FAILURE) { cmn_err(CE_NOTE, "%s#%d: node creation failure", ddi_driver_name(dbp->dip), instance); } @@ -1443,7 +1443,7 @@ db_close(dev_t dev, int flag, int otyp, cred_t *cred_p) /*ARGSUSED*/ static int db_ioctl(dev_t dev, int cmd, intptr_t arg, int mode, cred_t *cred_p, - int *rval_p) + int *rval_p) { int rc = DDI_SUCCESS; #ifdef DB_DEBUG @@ -1698,15 +1698,15 @@ db_pci_get_conf_regs(ddi_acc_handle_t config_handle, db_conf_regs_t *cr) /* * Function: db_pci_map * - * Note: Only memory accesses are direct. IO could be direct - * or indirect. Config accesses are always indirect. - * The question here is, does the "assigned-addresses" - * property entry represents the addresses in the - * local domain or the host domain itself. - * Strictly speaking, the assumption should be that - * it is in the local domain, as the transactions - * upstream or downstream are automatically - * translated by the bridge chip anyway. + * Note: Only memory accesses are direct. IO could be direct + * or indirect. Config accesses are always indirect. + * The question here is, does the "assigned-addresses" + * property entry represents the addresses in the + * local domain or the host domain itself. + * Strictly speaking, the assumption should be that + * it is in the local domain, as the transactions + * upstream or downstream are automatically + * translated by the bridge chip anyway. * * Return values: * DDI_SUCCESS: map call by child device success @@ -1715,7 +1715,7 @@ db_pci_get_conf_regs(ddi_acc_handle_t config_handle, db_conf_regs_t *cr) static int db_pci_map(dev_info_t *dip, dev_info_t *rdip, ddi_map_req_t *mp, - off_t offset, off_t len, caddr_t *addrp) + off_t offset, off_t len, caddr_t *addrp) { register dev_info_t *pdip; int reg_proplen, num_regs, rnumber; @@ -2088,7 +2088,7 @@ char *db_ctlop_name[] = { static int db_ctlops(dev_info_t *dip, dev_info_t *rdip, - ddi_ctl_enum_t ctlop, void *arg, void *result) + ddi_ctl_enum_t ctlop, void *arg, void *result) { if ((ctlop >= DDI_CTLOPS_DMAPMAPC) && @@ -2865,7 +2865,7 @@ db_ddi_put64(ddi_acc_impl_t *handle, uint64_t *addr, uint64_t data) */ static void db_ddi_rep_get8(ddi_acc_impl_t *handle, uint8_t *host_addr, - uint8_t *dev_addr, size_t repcount, uint_t flags) + uint8_t *dev_addr, size_t repcount, uint_t flags) { if (flags == DDI_DEV_AUTOINCR) for (; repcount; repcount--) @@ -2881,7 +2881,7 @@ db_ddi_rep_get8(ddi_acc_impl_t *handle, uint8_t *host_addr, */ static void db_ddi_rep_get16(ddi_acc_impl_t *handle, uint16_t *host_addr, - uint16_t *dev_addr, size_t repcount, uint_t flags) + uint16_t *dev_addr, size_t repcount, uint_t flags) { if (flags == DDI_DEV_AUTOINCR) for (; repcount; repcount--) @@ -2897,7 +2897,7 @@ db_ddi_rep_get16(ddi_acc_impl_t *handle, uint16_t *host_addr, */ static void db_ddi_rep_get32(ddi_acc_impl_t *handle, uint32_t *host_addr, - uint32_t *dev_addr, size_t repcount, uint_t flags) + uint32_t *dev_addr, size_t repcount, uint_t flags) { if (flags == DDI_DEV_AUTOINCR) for (; repcount; repcount--) @@ -2913,7 +2913,7 @@ db_ddi_rep_get32(ddi_acc_impl_t *handle, uint32_t *host_addr, */ static void db_ddi_rep_get64(ddi_acc_impl_t *handle, uint64_t *host_addr, - uint64_t *dev_addr, size_t repcount, uint_t flags) + uint64_t *dev_addr, size_t repcount, uint_t flags) { if (flags == DDI_DEV_AUTOINCR) for (; repcount; repcount--) @@ -2929,7 +2929,7 @@ db_ddi_rep_get64(ddi_acc_impl_t *handle, uint64_t *host_addr, */ static void db_ddi_rep_put8(ddi_acc_impl_t *handle, uint8_t *host_addr, - uint8_t *dev_addr, size_t repcount, uint_t flags) + uint8_t *dev_addr, size_t repcount, uint_t flags) { if (flags == DDI_DEV_AUTOINCR) for (; repcount; repcount--) @@ -2945,7 +2945,7 @@ db_ddi_rep_put8(ddi_acc_impl_t *handle, uint8_t *host_addr, */ static void db_ddi_rep_put16(ddi_acc_impl_t *handle, uint16_t *host_addr, - uint16_t *dev_addr, size_t repcount, uint_t flags) + uint16_t *dev_addr, size_t repcount, uint_t flags) { if (flags == DDI_DEV_AUTOINCR) for (; repcount; repcount--) @@ -2961,7 +2961,7 @@ db_ddi_rep_put16(ddi_acc_impl_t *handle, uint16_t *host_addr, */ static void db_ddi_rep_put32(ddi_acc_impl_t *handle, uint32_t *host_addr, - uint32_t *dev_addr, size_t repcount, uint_t flags) + uint32_t *dev_addr, size_t repcount, uint_t flags) { if (flags == DDI_DEV_AUTOINCR) for (; repcount; repcount--) @@ -2977,7 +2977,7 @@ db_ddi_rep_put32(ddi_acc_impl_t *handle, uint32_t *host_addr, */ static void db_ddi_rep_put64(ddi_acc_impl_t *handle, uint64_t *host_addr, - uint64_t *dev_addr, size_t repcount, uint_t flags) + uint64_t *dev_addr, size_t repcount, uint_t flags) { if (flags == DDI_DEV_AUTOINCR) for (; repcount; repcount--) @@ -2991,7 +2991,7 @@ db_ddi_rep_put64(ddi_acc_impl_t *handle, uint64_t *host_addr, static void db_debug(uint64_t func_id, dev_info_t *dip, char *fmt, - uintptr_t a1, uintptr_t a2, uintptr_t a3, uintptr_t a4, uintptr_t a5) + uintptr_t a1, uintptr_t a2, uintptr_t a3, uintptr_t a4, uintptr_t a5) { char *s = NULL; uint_t dip_no_disp = 0; @@ -3097,7 +3097,7 @@ db_fm_fini(db_ctrl_t *db_p) /*ARGSUSED*/ static int db_fm_init_child(dev_info_t *dip, dev_info_t *tdip, int cap, - ddi_iblock_cookie_t *ibc) + ddi_iblock_cookie_t *ibc) { db_ctrl_t *db_p = (db_ctrl_t *)ddi_get_soft_state(db_state, ddi_get_instance(dip)); diff --git a/usr/src/uts/sun4u/io/pic16f747.c b/usr/src/uts/sun4u/io/pic16f747.c index 011a8974d0..0a8a4d398c 100644 --- a/usr/src/uts/sun4u/io/pic16f747.c +++ b/usr/src/uts/sun4u/io/pic16f747.c @@ -220,7 +220,7 @@ pic_attach(dev_info_t *dip, ddi_attach_cmd_t cmd) (void) sprintf(name, "env-monitor%d", inst); minor = PIC_INST_TO_MINOR(inst) | PIC_UNIT_TO_MINOR(0); if (ddi_create_minor_node(dip, name, S_IFCHR, minor, - DDI_PSEUDO, NULL) == DDI_FAILURE) { + DDI_PSEUDO, 0) == DDI_FAILURE) { cmn_err(CE_WARN, "ddi_create_minor_node() failed for inst %d\n", inst); @@ -261,7 +261,7 @@ pic_attach(dev_info_t *dip, ddi_attach_cmd_t cmd) minor_name = pic_nodes[i].minor_name; minor = PIC_INST_TO_MINOR(inst) | PIC_UNIT_TO_MINOR(i); if (ddi_create_minor_node(dip, minor_name, S_IFCHR, - minor, PICDEV_NODE_TYPE, NULL) == DDI_FAILURE) { + minor, PICDEV_NODE_TYPE, 0) == DDI_FAILURE) { cmn_err(CE_WARN, "%s:%d ddi_create_minor_node failed", ddi_driver_name(dip), inst); diff --git a/usr/src/uts/sun4u/io/rmc_comm_drvintf.c b/usr/src/uts/sun4u/io/rmc_comm_drvintf.c index 6c173379e0..58fd2db8eb 100644 --- a/usr/src/uts/sun4u/io/rmc_comm_drvintf.c +++ b/usr/src/uts/sun4u/io/rmc_comm_drvintf.c @@ -360,13 +360,13 @@ rmc_comm_send_req_resp(struct rmc_comm_state *rcs, rmc_comm_msg_t *request, if (response != NULL) { exp_resp->msg_type = response->msg_type; exp_resp->msg_buf = (uint8_t *)response->msg_buf; - exp_resp->msg_msglen = (uint16_t)response->msg_bytes; - exp_resp->msg_bufsiz = (uint16_t)response->msg_len; + exp_resp->msg_msglen = response->msg_bytes; + exp_resp->msg_bufsiz = response->msg_len; } else { exp_resp->msg_type = DP_NULL_MSG; - exp_resp->msg_buf = (uint8_t)NULL; - exp_resp->msg_bufsiz = (uint16_t)0; - exp_resp->msg_msglen = (uint16_t)0; + exp_resp->msg_buf = NULL; + exp_resp->msg_bufsiz = 0; + exp_resp->msg_msglen = 0; } /* @@ -374,7 +374,7 @@ rmc_comm_send_req_resp(struct rmc_comm_state *rcs, rmc_comm_msg_t *request, */ req.msg_type = request->msg_type; req.msg_buf = (uint8_t *)request->msg_buf; - req.msg_msglen = (uint16_t)request->msg_len; + req.msg_msglen = request->msg_len; /* * send the message and wait for the reply or ACKnowledgment @@ -636,7 +636,7 @@ int rmc_comm_reg_intr(uint8_t msg_type, rmc_comm_intrfunc_t intr_handler, rmc_comm_msg_t *msgbuf, uint_t *state, kmutex_t *lock) { - struct rmc_comm_state *rcs; + struct rmc_comm_state *rcs; dp_msg_intr_t *msgintr; int err = RCNOERR; diff --git a/usr/src/uts/sun4u/io/rmcadm.c b/usr/src/uts/sun4u/io/rmcadm.c index 2ad9a87c23..ed4da3a286 100644 --- a/usr/src/uts/sun4u/io/rmcadm.c +++ b/usr/src/uts/sun4u/io/rmcadm.c @@ -233,7 +233,7 @@ rmcadm_attach(dev_info_t *dip, ddi_attach_cmd_t cmd) return (DDI_FAILURE); err = ddi_create_minor_node(dip, "rmcadm", S_IFCHR, - instance, DDI_PSEUDO, NULL); + instance, DDI_PSEUDO, 0); if (err != DDI_SUCCESS) return (DDI_FAILURE); diff --git a/usr/src/uts/sun4u/io/rmclomv.c b/usr/src/uts/sun4u/io/rmclomv.c index 13c10e3a01..9d00fdd6fb 100644 --- a/usr/src/uts/sun4u/io/rmclomv.c +++ b/usr/src/uts/sun4u/io/rmclomv.c @@ -399,7 +399,7 @@ rmclomv_attach(dev_info_t *dip, ddi_attach_cmd_t cmd) return (DDI_FAILURE); err = ddi_create_minor_node(dip, "rmclomv", S_IFCHR, - instance, DDI_PSEUDO, NULL); + instance, DDI_PSEUDO, 0); if (err != DDI_SUCCESS) return (DDI_FAILURE); @@ -1621,7 +1621,7 @@ refresh_name_cache(int force_fail) if (retval == 0) { retval = rmclomv_do_cmd(DP_GET_SYSINFO, DP_GET_SYSINFO_R, - sizeof (sysinfo), NULL, (intptr_t)&sysinfo); + sizeof (sysinfo), (intptr_t)NULL, (intptr_t)&sysinfo); } if (retval == 0) { fru_cmd.handle = DP_NULL_HANDLE; @@ -2896,7 +2896,7 @@ rmclomv_ioctl(dev_t dev, int cmd, intptr_t arg, int mode, cred_t *cred_p, case ENVMONIOCCHASSISSERIALNUM: retval = rmclomv_do_cmd(DP_GET_SDP_VERSION, DP_GET_SDP_VERSION_R, sizeof (rmc_sdpver_r), - NULL, (intptr_t)&rmc_sdpver_r); + (intptr_t)NULL, (intptr_t)&rmc_sdpver_r); if (retval != 0) { cmn_err(CE_WARN, "DP_GET_SDP_VERSION failed, ret=%d\n", @@ -2908,7 +2908,7 @@ rmclomv_ioctl(dev_t dev, int cmd, intptr_t arg, int mode, cred_t *cred_p, } retval = rmclomv_do_cmd(DP_GET_CHASSIS_SERIALNUM, DP_GET_CHASSIS_SERIALNUM_R, sizeof (rmc_serialnum_r), - NULL, (intptr_t)&rmc_serialnum_r); + (intptr_t)NULL, (intptr_t)&rmc_serialnum_r); if (retval != 0) { break; @@ -2940,7 +2940,7 @@ rmclomv_checkrmc(caddr_t arg) int err; int retries; int state; - dp_get_sysinfo_r_t sysinfo; + dp_get_sysinfo_r_t sysinfo; CALLB_CPR_INIT(&cprinfo, &rmclomv_checkrmc_lock, callb_generic_cpr, "rmclomv_checkrmc"); @@ -3005,7 +3005,7 @@ rmclomv_checkrmc(caddr_t arg) mutex_exit(&rmclomv_checkrmc_lock); err = rmclomv_do_cmd(DP_GET_SYSINFO, DP_GET_SYSINFO_R, - sizeof (sysinfo), NULL, (intptr_t)&sysinfo); + sizeof (sysinfo), (intptr_t)NULL, (intptr_t)&sysinfo); if (err == 0) { mutex_enter(&rmclomv_state_lock); state = rmclomv_rmc_state; @@ -3393,7 +3393,7 @@ plat_timesync(void *arg) if (arg != NULL) { /* Request the time from the RMC clock. */ retval = rmclomv_do_cmd(DP_GET_DATE_TIME, DP_GET_DATE_TIME_R, - DATE_TIME_MSG_SIZE, NULL, (intptr_t)&buffer); + DATE_TIME_MSG_SIZE, (intptr_t)NULL, (intptr_t)&buffer); /* * If we were able to get the time lets set the local clock. diff --git a/usr/src/uts/sun4u/io/sbbc.c b/usr/src/uts/sun4u/io/sbbc.c index 615ea8549e..10117ae4dd 100644 --- a/usr/src/uts/sun4u/io/sbbc.c +++ b/usr/src/uts/sun4u/io/sbbc.c @@ -172,15 +172,15 @@ static struct bus_ops sbbc_bus_ops = { 0, 0, 0, - NULL, /* (*bus_map_fault)() */ + NULL, /* (*bus_map_fault)() */ ddi_no_dma_map, ddi_no_dma_allochdl, - ddi_no_dma_freehdl, /* (*bus_dma_freehdl)() */ - ddi_no_dma_bindhdl, /* (*bus_dma_bindhdl)() */ - ddi_no_dma_unbindhdl, /* (*bus_dma_unbindhdl)() */ - ddi_no_dma_flush, /* (*bus_dma_flush)() */ - ddi_no_dma_win, /* (*bus_dma_win)() */ - ddi_no_dma_mctl, /* (*bus_dma_ctl)() */ + ddi_no_dma_freehdl, /* (*bus_dma_freehdl)() */ + ddi_no_dma_bindhdl, /* (*bus_dma_bindhdl)() */ + ddi_no_dma_unbindhdl, /* (*bus_dma_unbindhdl)() */ + ddi_no_dma_flush, /* (*bus_dma_flush)() */ + ddi_no_dma_win, /* (*bus_dma_win)() */ + ddi_no_dma_mctl, /* (*bus_dma_ctl)() */ sbbc_ctlops, ddi_bus_prop_op, 0, /* (*bus_get_eventcookie)(); */ @@ -425,7 +425,7 @@ sbbc_attach(dev_info_t *dip, ddi_attach_cmd_t cmd) (void) sprintf(name, "sbbc%d", instance); if (ddi_create_minor_node(dip, name, S_IFCHR, instance, NULL, - NULL) == DDI_FAILURE) { + 0) == DDI_FAILURE) { ddi_remove_minor_node(dip, NULL); goto failed; } @@ -510,7 +510,7 @@ sbbc_detach(dev_info_t *dip, ddi_detach_cmd_t cmd) */ static int sbbc_busmap(dev_info_t *dip, dev_info_t *rdip, ddi_map_req_t *mp, - off_t off, off_t len, caddr_t *addrp) + off_t off, off_t len, caddr_t *addrp) { struct sbbcsoft *sbbcsoftp; sbbc_child_regspec_t *child_rp, *child_regs; @@ -690,7 +690,7 @@ sbbc_add_intr_impl(dev_info_t *dip, dev_info_t *rdip, ddi_intr_op_t intr_op, childintr->status = SBBC_INTR_STATE_DISABLE; for (i = 0; i < MAX_SBBC_DEVICES; i++) { - if (sbbcsoftp->child_intr[i] == 0) { + if (sbbcsoftp->child_intr[i] == NULL) { sbbcsoftp->child_intr[i] = childintr; break; } @@ -705,7 +705,8 @@ sbbc_add_intr_impl(dev_info_t *dip, dev_info_t *rdip, ddi_intr_op_t intr_op, cmn_err(CE_WARN, "sbbc%d: failed to add intr for %s", instance, ddi_get_name(rdip)); kmem_free(childintr, sizeof (struct sbbc_child_intr)); - sbbcsoftp->child_intr[i] = NULL; + if (i < MAX_SBBC_DEVICES) + sbbcsoftp->child_intr[i] = NULL; } /* @@ -817,7 +818,7 @@ sbbc_update_intr_state(dev_info_t *dip, dev_info_t *rdip, ddi_intr_op_t intr_op, */ static int sbbc_ctlops(dev_info_t *dip, dev_info_t *rdip, ddi_ctl_enum_t op, - void *arg, void *result) + void *arg, void *result) { sbbc_child_regspec_t *child_rp; int i, n; @@ -1121,7 +1122,7 @@ sbbc_close(dev_t dev, int flag, int otype, cred_t *credp) /*ARGSUSED2*/ static int sbbc_ioctl(dev_t dev, int cmd, intptr_t arg, int mode, cred_t *credp, - int *rvalp) + int *rvalp) { struct sbbcsoft *sbbcsoftp; @@ -1144,7 +1145,7 @@ sbbc_ioctl(dev_t dev, int cmd, intptr_t arg, int mode, cred_t *credp, return (EINVAL); } - if (arg == NULL) { + if (arg == (intptr_t)NULL) { return (ENXIO); } @@ -1184,7 +1185,7 @@ sbbc_ioctl(dev_t dev, int cmd, intptr_t arg, int mode, cred_t *credp, return (EINVAL); } - if (arg == NULL) { + if (arg == (intptr_t)NULL) { return (ENXIO); } @@ -1372,7 +1373,8 @@ sbbc_intr_wrapper(caddr_t arg) * used to crash the system. */ static int -sbbc_offset_valid(uint32_t offset) { +sbbc_offset_valid(uint32_t offset) +{ /* * Check for proper alignment first. */ @@ -1415,7 +1417,7 @@ sbbc_offset_valid(uint32_t offset) { #ifdef DEBUG void sbbc_dbg(uint32_t flag, dev_info_t *dip, char *fmt, - uintptr_t a1, uintptr_t a2, uintptr_t a3, uintptr_t a4, uintptr_t a5) + uintptr_t a1, uintptr_t a2, uintptr_t a3, uintptr_t a4, uintptr_t a5) { char *s = NULL; diff --git a/usr/src/uts/sun4u/io/todds1287.c b/usr/src/uts/sun4u/io/todds1287.c index 35dc7ad8fc..bf9cb8bd42 100644 --- a/usr/src/uts/sun4u/io/todds1287.c +++ b/usr/src/uts/sun4u/io/todds1287.c @@ -176,7 +176,7 @@ static ddi_softintr_t ds1287_softintr_id; static kmutex_t ds1287_reg_mutex; /* Protects ds1287 Registers */ static struct modldrv modldrv = { - &mod_driverops, /* Type of module. This one is a driver */ + &mod_driverops, /* Type of module. This one is a driver */ "ds1287 clock driver", /* Name of the module. */ &ds1287_ops, /* driver ops */ }; @@ -354,7 +354,7 @@ ds1287_attach(dev_info_t *dip, ddi_attach_cmd_t cmd) * creating the minor node. */ if (ddi_create_minor_node(dip, "power_button", S_IFCHR, - (instance << 8) + 0, "ddi_power_button", NULL) == DDI_FAILURE) { + (instance << 8) + 0, "ddi_power_button", 0) == DDI_FAILURE) { cmn_err(CE_WARN, "ds1287_attach: Failed to create minor node"); goto error3; } @@ -453,7 +453,7 @@ ds1287_close(dev_t dev, int flags, int otyp, cred_t *credp) /*ARGSUSED4*/ static int ds1287_ioctl(dev_t dev, int cmd, intptr_t arg, int mode, - cred_t *credp, int *rvalp) + cred_t *credp, int *rvalp) { struct ds1287 *softsp; int clone; diff --git a/usr/src/uts/sun4u/io/todds1337.c b/usr/src/uts/sun4u/io/todds1337.c index 319928bde7..4688467769 100644 --- a/usr/src/uts/sun4u/io/todds1337.c +++ b/usr/src/uts/sun4u/io/todds1337.c @@ -67,8 +67,8 @@ static uint_t todds1337_set_watchdog_timer(uint_t); static uint_t todds1337_clear_watchdog_timer(void); static void todds1337_set_power_alarm(timestruc_t); static void todds1337_clear_power_alarm(void); -static int todds1337_setup_prom(); -static void todds1337_rele_prom(); +static int todds1337_setup_prom(void); +static void todds1337_rele_prom(void); static int todds1337_prom_getdate(struct rtc_t *rtc); static int todds1337_prom_setdate(struct rtc_t *rtc); @@ -90,7 +90,7 @@ static ihandle_t todds1337_ihandle = 0; #define I2C_CYCLIC_TIMEOUT 1000000000 uint_t i2c_cyclic_timeout = I2C_CYCLIC_TIMEOUT; static int sync_clock_once = 1; -static struct rtc_t soft_rtc; +static struct rtc_t soft_rtc; /* * cp_ops structure @@ -898,7 +898,7 @@ todds1337_getinfo(dev_info_t *dip, ddi_info_cmd_t infocmd, void *arg, * execute the get-time method */ static int -todds1337_setup_prom() +todds1337_setup_prom(void) { pnode_t todnode; char tod1337_devpath[MAXNAMELEN]; @@ -920,7 +920,7 @@ todds1337_setup_prom() /* * Now open the node and store it's ihandle */ - if ((todds1337_ihandle = prom_open(tod1337_devpath)) == NULL) { + if ((todds1337_ihandle = prom_open(tod1337_devpath)) == 0) { cmn_err(CE_WARN, "prom_open failed"); return (DDI_FAILURE); } @@ -932,7 +932,7 @@ todds1337_setup_prom() * Closes the prom interface */ static void -todds1337_rele_prom() +todds1337_rele_prom(void) { (void) prom_close(todds1337_ihandle); } @@ -958,7 +958,7 @@ todds1337_prom_getdate(struct rtc_t *rtc) (void) p1275_cif_handler(&ci); promif_postprom(); - year = p1275_cell2int(ci[6]); + year = p1275_cell2int(ci[6]); rtc->rtc_mon = p1275_cell2int(ci[7]); rtc->rtc_dom = p1275_cell2int(ci[8]); rtc->rtc_dow = 0; diff --git a/usr/src/uts/sun4u/littleneck/Makefile b/usr/src/uts/sun4u/littleneck/Makefile index 134c28b1d8..c6c7ba37e0 100644 --- a/usr/src/uts/sun4u/littleneck/Makefile +++ b/usr/src/uts/sun4u/littleneck/Makefile @@ -23,8 +23,6 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -#ident "%Z%%M% %I% %E% SMI" -# # This makefile drives the production of all Littleneck system # dependent modules for the sun4u architecture. # @@ -45,12 +43,8 @@ install := TARGET= install install_h := TARGET= install_h clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint -lintlib := TARGET= lintlib -modlintlib := TARGET= modlintlib modlist := TARGET= modlist modlist := NO_STATE= -K $$MODSTATE$$$$ -clean.lint := TARGET= clean.lint check := TARGET= check # @@ -58,11 +52,9 @@ check := TARGET= check # .KEEP_STATE: -def all clean.lint clean clobber modlist: $(LITTLENECK_KMODS) - -modlintlib: $(LITTLENECK_KMODS) +def all clean clobber modlist: $(LITTLENECK_KMODS) -install: $(ROOT_LITTLENECK_DIR) $(USR_LITTLENECK_DIR) \ +install: $(ROOT_LITTLENECK_DIR) $(USR_LITTLENECK_DIR) \ $(USR_LITTLENECK_INC_DIR) \ $(USR_LITTLENECK_SBIN_DIR) \ $(USR_LITTLENECK_LIB_DIR) \ @@ -71,18 +63,6 @@ install: $(ROOT_LITTLENECK_DIR) $(USR_LITTLENECK_DIR) \ install_h check: -lint: modlintlib - -LINT_LIBS = $(LINT_LIB) \ - -L$(LITTLENECK_LINT_LIB_DIR) \ - -L$(LINT_LIB_DIR) $(LINT_KMODS:%=-l%) \ - $(CLOSED_LINT_KMODS:%=-l%) \ - -L$(SPARC_LIB_DIR) $(SPARC_LINTS:%=-l%) - -lint.platmod: modlintlib - @-$(ECHO) "\nLittleneck Platform-dependent module: global crosschecks:" - @-$(LINT) $(LINTFLAGS) $(LINT_LIBS) 2>&1 | $(LGREP.2) - $(LITTLENECK_KMODS): FRC @cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET) diff --git a/usr/src/uts/sun4u/littleneck/io/pcf8574_lneck.c b/usr/src/uts/sun4u/littleneck/io/pcf8574_lneck.c index 8b0bcd007e..767d2a4f24 100644 --- a/usr/src/uts/sun4u/littleneck/io/pcf8574_lneck.c +++ b/usr/src/uts/sun4u/littleneck/io/pcf8574_lneck.c @@ -229,18 +229,18 @@ pcf8574_close(dev_t dev, int flags, int otyp, cred_t *credp) } static int -pcf8574_get(struct pcf8574_unit *unitp, uchar_t *byte) { +pcf8574_get(struct pcf8574_unit *unitp, uchar_t *byte) +{ i2c_transfer_t *i2c_tran_pointer; int err = I2C_SUCCESS; D1CMN_ERR((CE_WARN, "Entered the pcf8574_get routine\n")); (void) i2c_transfer_alloc(unitp->pcf8574_hdl, &i2c_tran_pointer, - 0, 1, I2C_SLEEP); + 0, 1, I2C_SLEEP); if (i2c_tran_pointer == NULL) { D2CMN_ERR((CE_WARN, "%s: Failed in pcf8574_get " - "i2c_tran_pointer not allocated\n", - unitp->pcf8574_name)); + "i2c_tran_pointer not allocated\n", unitp->pcf8574_name)); return (ENOMEM); } @@ -249,13 +249,13 @@ pcf8574_get(struct pcf8574_unit *unitp, uchar_t *byte) { err = i2c_transfer(unitp->pcf8574_hdl, i2c_tran_pointer); if (err) { D2CMN_ERR((CE_WARN, "%s: Failed in the i2c_transfer routine\n", - unitp->pcf8574_name)); + unitp->pcf8574_name)); i2c_transfer_free(unitp->pcf8574_hdl, i2c_tran_pointer); return (err); } D1CMN_ERR((CE_WARN, "Back from a transfer value is %x\n", - i2c_tran_pointer->i2c_rbuf[0])); + i2c_tran_pointer->i2c_rbuf[0])); *byte = i2c_tran_pointer->i2c_rbuf[0]; i2c_transfer_free(unitp->pcf8574_hdl, i2c_tran_pointer); @@ -263,16 +263,17 @@ pcf8574_get(struct pcf8574_unit *unitp, uchar_t *byte) { } static int -pcf8574_set(struct pcf8574_unit *unitp, uchar_t byte) { +pcf8574_set(struct pcf8574_unit *unitp, uchar_t byte) +{ i2c_transfer_t *i2c_tran_pointer; int err = I2C_SUCCESS; (void) i2c_transfer_alloc(unitp->pcf8574_hdl, &i2c_tran_pointer, - 1, 0, I2C_SLEEP); + 1, 0, I2C_SLEEP); if (i2c_tran_pointer == NULL) { D2CMN_ERR((CE_WARN, "%s: Failed in pcf8574_set " - "i2c_tran_pointer not allocated\n", - unitp->pcf8574_name)); + "i2c_tran_pointer not allocated\n", + unitp->pcf8574_name)); return (ENOMEM); } @@ -280,13 +281,12 @@ pcf8574_set(struct pcf8574_unit *unitp, uchar_t byte) { i2c_tran_pointer->i2c_wbuf[0] = byte; D1CMN_ERR((CE_NOTE, "%s: contains %x\n", unitp->pcf8574_name, - i2c_tran_pointer->i2c_wbuf[0])); + i2c_tran_pointer->i2c_wbuf[0])); err = i2c_transfer(unitp->pcf8574_hdl, i2c_tran_pointer); if (err) { D2CMN_ERR((CE_WARN, "%s: Failed in the pcf8574_set" - " i2c_transfer routine\n", - unitp->pcf8574_name)); + " i2c_transfer routine\n", unitp->pcf8574_name)); i2c_transfer_free(unitp->pcf8574_hdl, i2c_tran_pointer); return (err); } @@ -296,7 +296,7 @@ pcf8574_set(struct pcf8574_unit *unitp, uchar_t byte) { static int pcf8574_ioctl(dev_t dev, int cmd, intptr_t arg, int mode, - cred_t *credp, int *rvalp) + cred_t *credp, int *rvalp) { _NOTE(ARGUNUSED(credp, rvalp)) struct pcf8574_unit *unitp; @@ -306,7 +306,7 @@ pcf8574_ioctl(dev_t dev, int cmd, intptr_t arg, int mode, i2c_port_t ioctl_port; uchar_t byte; - if (arg == NULL) { + if (arg == (intptr_t)NULL) { D2CMN_ERR((CE_WARN, "PCF8574: ioctl: arg passed in to ioctl " "= NULL\n")); err = EINVAL; @@ -523,7 +523,7 @@ pcf8574_do_attach(dev_info_t *dip) if (ddi_create_minor_node(dip, "pcf8574", S_IFCHR, instance, - "ddi_i2c:ioexp", NULL) == DDI_FAILURE) { + "ddi_i2c:ioexp", 0) == DDI_FAILURE) { cmn_err(CE_WARN, "%s ddi_create_minor_node failed for " "%s\n", unitp->pcf8574_name, "pcf8574"); ddi_soft_state_free(pcf8574soft_statep, instance); diff --git a/usr/src/uts/sun4u/littleneck/os/littleneck.c b/usr/src/uts/sun4u/littleneck/os/littleneck.c index cb299c8117..9a048efc20 100644 --- a/usr/src/uts/sun4u/littleneck/os/littleneck.c +++ b/usr/src/uts/sun4u/littleneck/os/littleneck.c @@ -24,8 +24,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/param.h> #include <sys/systm.h> #include <sys/sunddi.h> @@ -51,7 +49,7 @@ int (*p2get_mem_unum)(int, uint64_t, char *, int, int *); void startup_platform(void) { - mutex_init(&lneck_pcf8584_mutex, NULL, NULL, NULL); + mutex_init(&lneck_pcf8584_mutex, NULL, MUTEX_ADAPTIVE, NULL); } int @@ -149,7 +147,7 @@ plat_get_mem_unum(int synd_code, uint64_t flt_addr, int flt_bus_id, { if (flt_in_memory && (p2get_mem_unum != NULL)) return (p2get_mem_unum(synd_code, P2ALIGN(flt_addr, 8), - buf, buflen, lenp)); + buf, buflen, lenp)); else return (ENOTSUP); } diff --git a/usr/src/uts/sun4u/lw8/io/lw8.c b/usr/src/uts/sun4u/lw8/io/lw8.c index 37703042cb..7daf8a2df3 100644 --- a/usr/src/uts/sun4u/lw8/io/lw8.c +++ b/usr/src/uts/sun4u/lw8/io/lw8.c @@ -163,7 +163,7 @@ static struct modlinkage modlinkage = { struct led_info { char id[MAX_ID_LEN]; int position; - int status; + int status; char color[MAX_COLOR_LEN]; }; @@ -367,7 +367,7 @@ lw8_attach(dev_info_t *dip, ddi_attach_cmd_t cmd) return (DDI_FAILURE); err = ddi_create_minor_node(dip, "lw8", S_IFCHR, - instance, DDI_PSEUDO, NULL); + instance, DDI_PSEUDO, 0); if (err != DDI_SUCCESS) return (DDI_FAILURE); diff --git a/usr/src/uts/sun4u/lw8/io/ntwdt.c b/usr/src/uts/sun4u/lw8/io/ntwdt.c index d399486f8d..c2ae0575c9 100644 --- a/usr/src/uts/sun4u/lw8/io/ntwdt.c +++ b/usr/src/uts/sun4u/lw8/io/ntwdt.c @@ -484,7 +484,7 @@ static struct dev_ops ntwdt_ops = { }; static struct modldrv modldrv = { - &mod_driverops, /* This one is a driver */ + &mod_driverops, /* This one is a driver */ "ntwdt-Netra-T12", /* Name of the module. */ &ntwdt_ops, /* Driver ops */ }; @@ -675,7 +675,7 @@ ntwdt_attach(dev_info_t *dip, ddi_attach_cmd_t cmd) * is initialized. */ if (ddi_create_minor_node(dip, NTWDT_MINOR_NODE, S_IFCHR, 0, - DDI_PSEUDO, NULL) == DDI_FAILURE) { + DDI_PSEUDO, 0) == DDI_FAILURE) { cmn_err(CE_WARN, "failed to create Minor Node: %s", NTWDT_MINOR_NODE); goto err4; @@ -1791,8 +1791,8 @@ ntwdt_set_awdt_state(ntwdt_wdog_t *rstatep) static int ntwdt_set_cfgvar(int var, int val) { - int rv; - int mbox_val; + int rv; + int mbox_val; lw8_set_wdt_t set_wdt; switch (var) { diff --git a/usr/src/uts/sun4u/lw8/io/sgenv.c b/usr/src/uts/sun4u/lw8/io/sgenv.c index 7b5971bf57..a9e1de2e43 100644 --- a/usr/src/uts/sun4u/lw8/io/sgenv.c +++ b/usr/src/uts/sun4u/lw8/io/sgenv.c @@ -257,8 +257,8 @@ static boolean_t env_cache_update_needed = B_TRUE; * board_cache won't change between the kstat_update and the kstat_snapshot * which will cause problems as the update sets the ks_data_size. */ -static sg_board_info_t board_cache[SG_MAX_BDS] = {NULL}; -static sg_board_info_t board_cache_snapshot[SG_MAX_BDS] = {NULL}; +static sg_board_info_t board_cache[SG_MAX_BDS] = { 0 }; +static sg_board_info_t board_cache_snapshot[SG_MAX_BDS] = { 0 }; static int board_cache_updated = FALSE; /* @@ -546,7 +546,7 @@ sgenv_attach(dev_info_t *dip, ddi_attach_cmd_t cmd) } err = ddi_create_minor_node(dip, SGENV_DRV_NAME, S_IFCHR, - instance, DDI_PSEUDO, NULL); + instance, DDI_PSEUDO, 0); if (err != DDI_SUCCESS) { sgenv_remove_kstats(softsp); (void) sgenv_remove_cache_update_threads(); @@ -644,7 +644,7 @@ sgenv_add_kstats(sgenv_soft_state_t *softsp) * Create the 'keyswitch position' named kstat. */ ksp = kstat_create(SGENV_DRV_NAME, inst, SG_KEYSWITCH_KSTAT_NAME, - "misc", KSTAT_TYPE_NAMED, 1, NULL); + "misc", KSTAT_TYPE_NAMED, 1, 0); if (ksp != NULL) { /* initialize the named kstat */ @@ -1451,7 +1451,7 @@ sgenv_board_info_kstat_snapshot(kstat_t *ksp, void *buf, int rw) * This function coordinates reading the env data from the SC. * * ERROR: - * If an error occurs while making a call to the mailbox and we have data + * If an error occurs while making a call to the mailbox and we have data * in the cache from a previous call to the SC, we return an error of 0. * That way the kstat framework will return the old data instead of * returning an error and an empty kstat. @@ -2106,7 +2106,7 @@ sgenv_get_env_data(envresp_key_t key, int key_posn, uint16_t flag, int *status) */ static int sgenv_handle_env_data_error(int err, int status, int key_posn, - envresp_key_t key, char *str) + envresp_key_t key, char *str) { int rv = DDI_SUCCESS; diff --git a/usr/src/uts/sun4u/lw8/io/sgfru.c b/usr/src/uts/sun4u/lw8/io/sgfru.c index 431d9bfda7..c3b4a8ad28 100644 --- a/usr/src/uts/sun4u/lw8/io/sgfru.c +++ b/usr/src/uts/sun4u/lw8/io/sgfru.c @@ -186,7 +186,7 @@ sgfru_attach(dev_info_t *dip, ddi_attach_cmd_t cmd) softsp->instance = instance; error = ddi_create_minor_node(dip, SGFRU_DRV_NAME, S_IFCHR, - instance, DDI_PSEUDO, NULL); + instance, DDI_PSEUDO, 0); if (error == DDI_FAILURE) { ddi_soft_state_free(sgfru_statep, instance); return (DDI_FAILURE); @@ -1525,7 +1525,7 @@ sgfru_copyin_append(const sgfru_init_arg_t *argp, append_info_t *app) */ static int sgfru_copyin_buffer(const sgfru_init_arg_t *argp, const caddr_t data, - const int cnt, char *buffer) + const int cnt, char *buffer) { static fn_t f = "sgfru_copyin_buffer"; diff --git a/usr/src/uts/sun4u/mpxu/Makefile b/usr/src/uts/sun4u/mpxu/Makefile index e7170e8e2d..6014c8761e 100644 --- a/usr/src/uts/sun4u/mpxu/Makefile +++ b/usr/src/uts/sun4u/mpxu/Makefile @@ -45,12 +45,8 @@ install := TARGET= install install_h := TARGET= install_h clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint -lintlib := TARGET= lintlib -modlintlib := TARGET= modlintlib modlist := TARGET= modlist modlist := NO_STATE= -K $$MODSTATE$$$$ -clean.lint := TARGET= clean.lint check := TARGET= check # @@ -58,11 +54,7 @@ check := TARGET= check # .KEEP_STATE: -def all clean clean.lint clobber modlist: $(MPXU_KMODS) $(CLOSED_MPXU_KMODS) - -lintlib: unix - -modlintlib: $(MPXU_KMODS) $(CLOSED_MPXU_KMODS) +def all clean clobber modlist: $(MPXU_KMODS) $(CLOSED_MPXU_KMODS) IMPLEMENTED_PLATFORM = SUNW,Sun-Fire-V240 @@ -95,19 +87,6 @@ $(MPXU_CRYPTO_LINKS): $(ROOT_MPXU_CRYPTO_DIR_64) install_h check: FRC @cd sys; pwd; $(MAKE) $(TARGET) - -lint: modlintlib - -LINT_LIBS = $(LINT_LIB) \ - -L$(MPXU_LINT_LIB_DIR) \ - -L$(LINT_LIB_DIR) $(LINT_KMODS:%=-l%) \ - $(CLOSED_LINT_KMODS:%=-l%) \ - -L$(SPARC_LIB_DIR) $(SPARC_LINTS:%=-l%) - -lint.platmod: modlintlib - @-$(ECHO) "\nMPXU Platform-dependent module: global crosschecks:" - @-$(LINT) $(LINTFLAGS) $(LINT_LIBS) 2>&1 | $(LGREP.2) - # # # Include common targets. diff --git a/usr/src/uts/sun4u/mpxu/io/tsalarm.c b/usr/src/uts/sun4u/mpxu/io/tsalarm.c index 7c56f1d63f..819c44a0a6 100644 --- a/usr/src/uts/sun4u/mpxu/io/tsalarm.c +++ b/usr/src/uts/sun4u/mpxu/io/tsalarm.c @@ -211,7 +211,7 @@ tsalarm_attach(dev_info_t *dip, ddi_attach_cmd_t cmd) * the device's softc, is used to direct peculiar behavior. */ if (ddi_create_minor_node(dip, "lom", S_IFCHR, 0, - DDI_PSEUDO, NULL) == DDI_FAILURE) + DDI_PSEUDO, 0) == DDI_FAILURE) goto attach_failed; ddi_report_dev(dip); @@ -288,7 +288,7 @@ tsalarm_close(dev_t dev, int flag, int otyp, cred_t *credp) /* ARGSUSED */ static int tsalarm_ioctl(dev_t dev, int cmd, intptr_t arg, int mode, - cred_t *credp, int *rvalp) + cred_t *credp, int *rvalp) { int inst = getminor(dev); struct tsalarm_softc *softc; diff --git a/usr/src/uts/sun4u/ngdr/io/dr.c b/usr/src/uts/sun4u/ngdr/io/dr.c index e89ea0b05e..73b1528c7e 100644 --- a/usr/src/uts/sun4u/ngdr/io/dr.c +++ b/usr/src/uts/sun4u/ngdr/io/dr.c @@ -556,7 +556,7 @@ int dr_enable = 1; /*ARGSUSED3*/ static int dr_ioctl(dev_t dev, int cmd, intptr_t arg, int mode, - cred_t *cred_p, int *rval_p) + cred_t *cred_p, int *rval_p) { int rv = 0; int instance; @@ -706,7 +706,7 @@ dr_attach(dev_info_t *dip, ddi_attach_cmd_t cmd) { int rv, rv2; int bd; - int instance; + int instance; sbd_error_t *err; dr_softstate_t *softsp; @@ -768,7 +768,7 @@ dr_attach(dev_info_t *dip, ddi_attach_cmd_t cmd) minor_num = DR_MAKE_MINOR(instance, bd); rv = ddi_create_minor_node(dip, name, S_IFCHR, - minor_num, DDI_NT_SBD_ATTACHMENT_POINT, NULL); + minor_num, DDI_NT_SBD_ATTACHMENT_POINT, 0); if (rv != DDI_SUCCESS) rv = DDI_FAILURE; } @@ -806,7 +806,7 @@ dr_attach(dev_info_t *dip, ddi_attach_cmd_t cmd) static int dr_detach(dev_info_t *dip, ddi_detach_cmd_t cmd) { - int instance; + int instance; dr_softstate_t *softsp; switch (cmd) { @@ -1293,7 +1293,8 @@ dr_test_board(dr_handle_t *hp) * devlists for the board have been initialized. */ static void -dr_make_comp_nodes(dr_board_t *bp) { +dr_make_comp_nodes(dr_board_t *bp) +{ int i; @@ -1580,7 +1581,7 @@ dr_dev_is_target(dr_dev_unit_t *dp, int present_only, uint_t uset) static void dr_dev_make_list(dr_handle_t *hp, sbd_comp_type_t type, int present_only, - dr_common_unit_t ***devlist, int *devnum) + dr_common_unit_t ***devlist, int *devnum) { dr_board_t *bp = hp->h_bd; int unum; @@ -1702,10 +1703,10 @@ dr_dev_clean_up(dr_handle_t *hp, dr_common_unit_t **list, int devnum) static int dr_dev_walk(dr_handle_t *hp, sbd_comp_type_t type, int present_only, - int (*pre_op)(dr_handle_t *, dr_common_unit_t **, int), - void (*op)(dr_handle_t *, dr_common_unit_t *), - int (*post_op)(dr_handle_t *, dr_common_unit_t **, int), - void (*board_op)(dr_handle_t *, dr_common_unit_t **, int)) + int (*pre_op)(dr_handle_t *, dr_common_unit_t **, int), + void (*op)(dr_handle_t *, dr_common_unit_t *), + int (*post_op)(dr_handle_t *, dr_common_unit_t **, int), + void (*board_op)(dr_handle_t *, dr_common_unit_t **, int)) { int devnum, rv; dr_common_unit_t **devlist; @@ -1740,7 +1741,7 @@ dr_dev_noop(dr_handle_t *hp, dr_common_unit_t **devlist, int devnum) static void dr_attach_update_state(dr_handle_t *hp, - dr_common_unit_t **devlist, int devnum) + dr_common_unit_t **devlist, int devnum) { dr_board_t *bp = hp->h_bd; int i; @@ -1841,7 +1842,7 @@ dr_dev_configure(dr_handle_t *hp) static void dr_release_update_state(dr_handle_t *hp, - dr_common_unit_t **devlist, int devnum) + dr_common_unit_t **devlist, int devnum) { _NOTE(ARGUNUSED(devlist)) _NOTE(ARGUNUSED(devnum)) @@ -1965,7 +1966,7 @@ dr_dev_release(dr_handle_t *hp) static void dr_detach_update_state(dr_handle_t *hp, - dr_common_unit_t **devlist, int devnum) + dr_common_unit_t **devlist, int devnum) { dr_board_t *bp = hp->h_bd; int i; @@ -2686,7 +2687,7 @@ dr_nt_to_dev_type(int nt) */ static int dr_check_transition(dr_board_t *bp, dr_devset_t *devsetp, - struct dr_state_trans *transp, int cmd) + struct dr_state_trans *transp, int cmd) { int s, ut; int state_err = 0; diff --git a/usr/src/uts/sun4u/opl/io/dm2s.c b/usr/src/uts/sun4u/opl/io/dm2s.c index 92735d9981..1e6a1f9fc0 100644 --- a/usr/src/uts/sun4u/opl/io/dm2s.c +++ b/usr/src/uts/sun4u/opl/io/dm2s.c @@ -177,8 +177,8 @@ struct streamtab dm2s_streamtab = { NULL }; -DDI_DEFINE_STREAM_OPS(dm2s_ops, nulldev, nulldev, dm2s_attach, \ - dm2s_detach, nodev, dm2s_info, D_NEW | D_MP | D_MTPERMOD, \ +DDI_DEFINE_STREAM_OPS(dm2s_ops, nulldev, nulldev, dm2s_attach, + dm2s_detach, nodev, dm2s_info, D_NEW | D_MP | D_MTPERMOD, &dm2s_streamtab, ddi_quiesce_not_supported); @@ -296,7 +296,7 @@ dm2s_attach(dev_info_t *dip, ddi_attach_cmd_t cmd) (void) sprintf(name, "%s%d", DM2S_MODNAME, instance); if (ddi_create_minor_node(dip, name, S_IFCHR, instance, - DDI_PSEUDO, NULL) == DDI_FAILURE) { + DDI_PSEUDO, 0) == DDI_FAILURE) { ddi_remove_minor_node(dip, NULL); cmn_err(CE_WARN, "Device node creation failed."); goto error; diff --git a/usr/src/uts/sun4u/opl/io/drmach.c b/usr/src/uts/sun4u/opl/io/drmach.c index 0999f18e15..651b60d8ba 100644 --- a/usr/src/uts/sun4u/opl/io/drmach.c +++ b/usr/src/uts/sun4u/opl/io/drmach.c @@ -218,14 +218,14 @@ static int drmach_node_ddi_get_prop(drmach_node_t *np, static int drmach_node_ddi_get_proplen(drmach_node_t *np, char *name, int *len); -static int drmach_get_portid(drmach_node_t *); +static int drmach_get_portid(drmach_node_t *); static sbd_error_t *drmach_i_status(drmachid_t, drmach_status_t *); static int opl_check_dr_status(); static void drmach_io_dispose(drmachid_t); static sbd_error_t *drmach_io_release(drmachid_t); static sbd_error_t *drmach_io_status(drmachid_t, drmach_status_t *); -static int drmach_init(void); -static void drmach_fini(void); +static int drmach_init(void); +static void drmach_fini(void); static void drmach_swap_pa(drmach_mem_t *, drmach_mem_t *); static drmach_board_t *drmach_get_board_by_bnum(int); @@ -457,7 +457,7 @@ struct drmach_hotcpu { drmach_board_t *bp; int bnum; int core_id; - int rv; + int rv; int option; }; @@ -652,7 +652,7 @@ drmach_setup_core_info(drmach_board_t *obj) typedef struct { drmach_node_walk_args_t *nwargs; - int (*cb)(drmach_node_walk_args_t *args); + int (*cb)(drmach_node_walk_args_t *args); int err; } drmach_node_ddi_walk_args_t; @@ -686,7 +686,7 @@ drmach_node_ddi_walk_cb(dev_info_t *dip, void *arg) static int drmach_node_ddi_walk(drmach_node_t *np, void *data, - int (*cb)(drmach_node_walk_args_t *args)) + int (*cb)(drmach_node_walk_args_t *args)) { drmach_node_walk_args_t args; drmach_node_ddi_walk_args_t nargs; @@ -735,7 +735,7 @@ drmach_node_ddi_get_parent(drmach_node_t *np, drmach_node_t *pp) static pnode_t drmach_node_ddi_get_dnode(drmach_node_t *np) { - return ((pnode_t)NULL); + return (0); } static drmach_node_t * @@ -769,7 +769,7 @@ drmach_node_ddi_get_dip(drmach_node_t *np) static int drmach_node_walk(drmach_node_t *np, void *param, - int (*cb)(drmach_node_walk_args_t *args)) + int (*cb)(drmach_node_walk_args_t *args)) { return (np->walk(np, param, cb)); } @@ -977,7 +977,7 @@ drmach_configure(drmachid_t id, int flags) static sbd_error_t * drmach_device_new(drmach_node_t *node, - drmach_board_t *bp, int portid, drmachid_t *idp) + drmach_board_t *bp, int portid, drmachid_t *idp) { int i; int rv; @@ -1541,7 +1541,7 @@ drmach_get_portid(drmach_node_t *np) static int drmach_name2type_idx(char *name) { - int index, ntypes; + int index, ntypes; if (name == NULL) return (-1); @@ -1656,7 +1656,7 @@ drmach_board_find_devices_cb(drmach_node_walk_args_t *args) sbd_error_t * drmach_board_find_devices(drmachid_t id, void *a, - sbd_error_t *(*found)(void *a, const char *, int, drmachid_t)) + sbd_error_t *(*found)(void *a, const char *, int, drmachid_t)) { drmach_board_t *bp = (drmach_board_t *)id; sbd_error_t *err; @@ -2782,7 +2782,7 @@ drmach_cpu_poweron(struct cpu *cp) int drmach_cpu_poweroff(struct cpu *cp) { - int rv = 0; + int rv = 0; processorid_t cpuid = cp->cpu_id; DRMACH_PR("drmach_cpu_poweroff: stopping cpuid %d\n", cp->cpu_id); @@ -2957,7 +2957,7 @@ opl_check_dr_status() static struct memlist * drmach_memlist_add_span(drmach_copy_rename_program_t *p, - struct memlist *mlist, uint64_t base, uint64_t len) + struct memlist *mlist, uint64_t base, uint64_t len) { struct memlist *ml, *tl, *nl; @@ -3072,7 +3072,7 @@ static int fmem_timeout = 17; /* * The empirical data on some OPL system shows that * we can copy 250 MB per second. We set it to - * 80 MB to be conservative. In normal case, + * 80 MB to be conservative. In normal case, * this timeout does not affect anything. */ @@ -3113,7 +3113,7 @@ static int drmach_copy_rename_timeout = 500; static int drmach_copy_rename_prog__relocatable(drmach_copy_rename_program_t *prog, - int cpuid) + int cpuid) { struct memlist *ml; register int rtn; @@ -3412,7 +3412,7 @@ drmach_unlock_critical(caddr_t va) sbd_error_t * drmach_copy_rename_init(drmachid_t t_id, drmachid_t s_id, - struct memlist *c_ml, drmachid_t *pgm_id) + struct memlist *c_ml, drmachid_t *pgm_id) { drmach_mem_t *s_mem; drmach_mem_t *t_mem; @@ -3690,7 +3690,7 @@ drmach_copy_rename_init(drmachid_t t_id, drmachid_t s_id, /* * max_elms - max number of memlist structures that - * may be allocated for the CPU memory list. + * may be allocated for the CPU memory list. * If there are too many memory span (because * of fragmentation) than number of memlist * available, we should return error. @@ -4042,7 +4042,7 @@ drmach_copy_rename(drmachid_t id) prog->critical->scf_reg_base = (*prog->data->scf_get_base_addr)(); if (prog->critical->scf_reg_base == (uint64_t)-1 || - prog->critical->scf_reg_base == NULL) { + prog->critical->scf_reg_base == 0) { prog->data->fmem_status.error = EOPL_FMEM_SCF_ERR; drmach_unlock_critical((caddr_t)prog); return; diff --git a/usr/src/uts/sun4u/opl/io/mc-opl.c b/usr/src/uts/sun4u/opl/io/mc-opl.c index 7d267110da..2ed14e6d22 100644 --- a/usr/src/uts/sun4u/opl/io/mc-opl.c +++ b/usr/src/uts/sun4u/opl/io/mc-opl.c @@ -607,12 +607,12 @@ mc_close(dev_t devp, int flag, int otyp, cred_t *credp) /* ARGSUSED */ static int mc_ioctl(dev_t dev, int cmd, intptr_t arg, int mode, cred_t *credp, - int *rvalp) + int *rvalp) { mc_flt_page_t flt_page; if (cmd == MCIOC_FAULT_PAGE) { - if (arg == NULL) + if (arg == (intptr_t)NULL) return (EINVAL); if (ddi_copyin((const void *)arg, (void *)&flt_page, @@ -1986,7 +1986,7 @@ mc_error_handler_mir(mc_opl_t *mcp, int bank, mc_rsaddr_info_t *rsaddr) } static int mc_process_error(mc_opl_t *mcp, int bank, mc_aflt_t *mc_aflt, - mc_flt_stat_t *flt_stat) + mc_flt_stat_t *flt_stat) { int ptrl_error = mc_aflt->mflt_is_ptrl; int rv = 0; @@ -2981,7 +2981,7 @@ mc_opl_get_physical_board(int sb) /* ARGSUSED */ int mc_get_mem_unum(int synd_code, uint64_t flt_addr, char *buf, int buflen, - int *lenp) + int *lenp) { int i; int j; @@ -4019,7 +4019,7 @@ mc_dump_dimm_info(board_dimm_info_t *bd_dimmp) /* ARGSUSED */ static int mc_ioctl_debug(dev_t dev, int cmd, intptr_t arg, int mode, cred_t *credp, - int *rvalp) + int *rvalp) { caddr_t buf, kbuf; uint64_t pa; diff --git a/usr/src/uts/sun4u/opl/io/oplkmdrv.c b/usr/src/uts/sun4u/opl/io/oplkmdrv.c index be026a7c80..c2dfee332c 100644 --- a/usr/src/uts/sun4u/opl/io/oplkmdrv.c +++ b/usr/src/uts/sun4u/opl/io/oplkmdrv.c @@ -241,7 +241,7 @@ okm_attach(dev_info_t *dip, ddi_attach_cmd_t cmd) */ okmsp->km_clean |= OKM_CLEAN_NODE; if (ddi_create_minor_node(dip, OKM_NODENAME, S_IFCHR, - instance, NULL, NULL) == DDI_FAILURE) { + instance, NULL, 0) == DDI_FAILURE) { cmn_err(CE_WARN, "Device node creation failed"); okm_cleanup(okmsp); return (DDI_FAILURE); diff --git a/usr/src/uts/sun4u/opl/io/oplmsu/oplmsu.c b/usr/src/uts/sun4u/opl/io/oplmsu/oplmsu.c index 4037644c39..dd1ed50fdb 100644 --- a/usr/src/uts/sun4u/opl/io/oplmsu/oplmsu.c +++ b/usr/src/uts/sun4u/opl/io/oplmsu/oplmsu.c @@ -660,7 +660,7 @@ oplmsu_close(queue_t *urq, int flag, cred_t *cred_p) cmn_err(CE_WARN, "oplmsu: close: node_flag = 0x%lx", node_flag); } - ctrl->minor = NULL; + ctrl->minor = 0; ctrl->queue = NULL; wbuf_id = ctrl->wbuf_id; wtout_id = ctrl->wtout_id; diff --git a/usr/src/uts/sun4u/opl/io/pcicmu/pcmu_counters.c b/usr/src/uts/sun4u/opl/io/pcicmu/pcmu_counters.c index baa214a87e..edc92c1228 100644 --- a/usr/src/uts/sun4u/opl/io/pcicmu/pcmu_counters.c +++ b/usr/src/uts/sun4u/opl/io/pcicmu/pcmu_counters.c @@ -23,8 +23,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/types.h> #include <sys/async.h> #include <sys/sunddi.h> @@ -56,7 +54,7 @@ pcmu_create_name_kstat(char *name, pcmu_ksinfo_t *pp, pcmu_kev_mask_t *ev) for (i = 0; i < NUM_OF_PICS; i++) { pp->pic_name_ksp[i] = pcmu_create_picN_kstat(name, - i, pp->pic_shift[i], pp->pic_no_evs, ev); + i, pp->pic_shift[i], pp->pic_no_evs, ev); if (pp->pic_name_ksp[i] == NULL) { cmn_err(CE_WARN, "pci: unable to create name kstat"); @@ -85,7 +83,7 @@ pcmu_delete_name_kstat(pcmu_ksinfo_t *pp) */ static kstat_t * pcmu_create_picN_kstat(char *mod_name, int pic, int pic_shift, - int num_ev, pcmu_kev_mask_t *ev_array) + int num_ev, pcmu_kev_mask_t *ev_array) { struct kstat_named *pic_named_data; int inst = 0; @@ -95,9 +93,9 @@ pcmu_create_picN_kstat(char *mod_name, int pic, int pic_shift, (void) sprintf(pic_name, "pic%d", pic); if ((picN_ksp = kstat_create(mod_name, inst, pic_name, - "bus", KSTAT_TYPE_NAMED, num_ev, NULL)) == NULL) { + "bus", KSTAT_TYPE_NAMED, num_ev, 0)) == NULL) { cmn_err(CE_WARN, "%s %s : kstat create failed", - mod_name, pic_name); + mod_name, pic_name); /* * It is up to the calling function to delete any kstats @@ -158,7 +156,7 @@ kstat_t *pcmu_create_cntr_kstat(pcmu_t *pcmu_p, char *name, "counters", "bus", KSTAT_TYPE_NAMED, num_pics + 1, KSTAT_FLAG_WRITABLE)) == NULL) { cmn_err(CE_WARN, "%s%d counters kstat_create failed", - drv_name, drv_instance); + drv_name, drv_instance); return (NULL); } diff --git a/usr/src/uts/sun4u/os/plat_ecc_unum.c b/usr/src/uts/sun4u/os/plat_ecc_unum.c index e13e121086..b7145b5f5b 100644 --- a/usr/src/uts/sun4u/os/plat_ecc_unum.c +++ b/usr/src/uts/sun4u/os/plat_ecc_unum.c @@ -23,8 +23,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/plat_ecc_unum.h> #include <sys/utsname.h> #include <sys/cmn_err.h> @@ -76,7 +74,7 @@ uint16_t ecc_indictment2_mailbox_flags = PLAT_ECC_SEND_INDICT2_DEFAULT; */ void plat_log_fruid_error(int synd_code, struct async_flt *ecc, char *unum, - uint64_t afsr_bit) + uint64_t afsr_bit) { plat_ecc_error_data_t ecc_error_data; enum plat_ecc_type ecc_type = PLAT_ECC_UNKNOWN; @@ -191,7 +189,7 @@ plat_log_fruid_error(int synd_code, struct async_flt *ecc, char *unum, * cpu id. */ ecc_error_data.proc_num = - plat_make_fru_cpuid(board_num, 0, proc_position); + plat_make_fru_cpuid(board_num, 0, proc_position); /* * Now pull out the Memory Bank number @@ -218,7 +216,7 @@ plat_log_fruid_error(int synd_code, struct async_flt *ecc, char *unum, for (i = PLAT_ECC_JNUMBER_LENGTH; i > 0 && *unum_ptr >= '0' && *unum_ptr <= '9'; i--) *jno_ptr++ = *unum_ptr++; - *jno_ptr = NULL; + *jno_ptr = '\0'; /* * If we get here, we can assume the unum is valid @@ -304,7 +302,7 @@ plat_log_fruid_error(int synd_code, struct async_flt *ecc, char *unum, for (i = PLAT_ECC_JNUMBER_LENGTH; i > 0 && *unum_ptr >= '0' && *unum_ptr <= '9'; i--) *jno_ptr++ = *unum_ptr++; - *jno_ptr = NULL; + *jno_ptr = '\0'; /* * If we get here, we can assume the unum is valid diff --git a/usr/src/uts/sun4u/pcie/Makefile b/usr/src/uts/sun4u/pcie/Makefile index b1ad4eb65f..81f4d70472 100644 --- a/usr/src/uts/sun4u/pcie/Makefile +++ b/usr/src/uts/sun4u/pcie/Makefile @@ -42,8 +42,6 @@ UTSBASE = ../.. MODULE = pcie OBJECTS = $(PCIE_MISC_OBJS:%=$(OBJS_DIR)/%) \ $(PCI_STRING_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(PCIE_MISC_OBJS:%.o=$(LINTS_DIR)/%.ln) \ - $(PCI_STRING_OBJS:%.o=$(LINTS_DIR)/%.ln) ROOTMODULE = $(ROOT_PSM_MISC_DIR)/$(MODULE) # @@ -55,7 +53,6 @@ include $(UTSBASE)/sun4u/Makefile.sun4u # Define targets # ALL_TARGET = $(BINARY) -LINT_TARGET = $(MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) # @@ -81,12 +78,6 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - install: $(INSTALL_DEPS) # diff --git a/usr/src/uts/sun4u/pic16f747/Makefile b/usr/src/uts/sun4u/pic16f747/Makefile index 530a5790a8..2b3a292a69 100644 --- a/usr/src/uts/sun4u/pic16f747/Makefile +++ b/usr/src/uts/sun4u/pic16f747/Makefile @@ -35,7 +35,6 @@ UTSBASE = ../.. # MODULE = pic16f747 OBJECTS = $(PIC16F747_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(PIC16F747_OBJS:%.o=$(LINTS_DIR)/%.ln) ROOTMODULE = $(ROOT_PSM_DRV_DIR)/$(MODULE) # @@ -50,10 +49,6 @@ ALL_TARGET = $(BINARY) LINT_TARGET = $(MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) -# -# lint pass one enforcement -# -CFLAGS += $(CCVERBOSE) CERRWARN += -_gcc=-Wno-parentheses # @@ -69,16 +64,9 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - install: $(INSTALL_DEPS) # # Include common targets. # include $(UTSBASE)/sun4u/Makefile.targ - diff --git a/usr/src/uts/sun4u/pic16f819/Makefile b/usr/src/uts/sun4u/pic16f819/Makefile index 2df7ffa19d..cb0b95b4ed 100644 --- a/usr/src/uts/sun4u/pic16f819/Makefile +++ b/usr/src/uts/sun4u/pic16f819/Makefile @@ -22,10 +22,6 @@ # Copyright 2004 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. -# -#ident "%Z%%M% %I% %E% SMI" -# - # This makefile drives the pic16f819 build. # # Path to the base of the uts directory tree (usually /usr/src/uts). @@ -37,7 +33,6 @@ UTSBASE = ../.. # MODULE = pic16f819 OBJECTS = $(PIC16F819_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(PIC16F819_OBJS:%.o=$(LINTS_DIR)/%.ln) ROOTMODULE = $(ROOT_PSM_DRV_DIR)/$(MODULE) # @@ -45,18 +40,12 @@ ROOTMODULE = $(ROOT_PSM_DRV_DIR)/$(MODULE) # include $(UTSBASE)/sun4u/Makefile.sun4u -# -# lint pass one enforcement -# -CFLAGS += $(CCVERBOSE) - LDFLAGS += -dy -N misc/i2c_svc # # Define targets # ALL_TARGET = $(BINARY) -LINT_TARGET = $(MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) .KEEP_STATE: @@ -69,12 +58,6 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - install: $(INSTALL_DEPS) # diff --git a/usr/src/uts/sun4u/rmc_comm/Makefile b/usr/src/uts/sun4u/rmc_comm/Makefile index ac8785ac2b..4afebe2b65 100644 --- a/usr/src/uts/sun4u/rmc_comm/Makefile +++ b/usr/src/uts/sun4u/rmc_comm/Makefile @@ -23,8 +23,6 @@ # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -#ident "%Z%%M% %I% %E% SMI" -# # This makefile drives the production of the rmc_comm driver kernel # module in the sun4u systems # @@ -39,7 +37,6 @@ UTSBASE = ../.. # MODULE = rmc_comm OBJECTS = $(RMC_COMM_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(RMC_COMM_OBJS:%.o=$(LINTS_DIR)/%.ln) ROOTMODULE = $(ROOT_PSM_DRV_DIR)/$(MODULE) CONF_SRCDIR = $(UTSBASE)/sun4u/io @@ -52,32 +49,14 @@ include $(UTSBASE)/sun4u/Makefile.sun4u # Define targets # ALL_TARGET = $(BINARY) $(SRC_CONFILE) -LINT_TARGET = $(MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE) # -# lint pass one enforcement -# -CFLAGS += $(CCVERBOSE) - -# # Turn on doubleword alignment for 64 bit registers # CFLAGS += -dalign # -# For now, disable these lint checks; maintainers should endeavor -# to investigate and remove these for maximum lint coverage. -# Please do not carry these forward to new Makefiles. -# -LINTTAGS += -erroff=E_SUSPICIOUS_COMPARISON -LINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN -LINTTAGS += -erroff=E_SUPPRESSION_DIRECTIVE_UNUSED -LINTTAGS += -erroff=E_STATIC_UNUSED -LINTTAGS += -erroff=E_PTRDIFF_OVERFLOW -LINTTAGS += -erroff=E_ASSIGN_NARROW_CONV - -# # Default build targets. # .KEEP_STATE: @@ -90,12 +69,6 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - install: $(INSTALL_DEPS) # diff --git a/usr/src/uts/sun4u/rmcadm/Makefile b/usr/src/uts/sun4u/rmcadm/Makefile index baa1fb4883..4ef75a6149 100644 --- a/usr/src/uts/sun4u/rmcadm/Makefile +++ b/usr/src/uts/sun4u/rmcadm/Makefile @@ -23,8 +23,6 @@ # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -#ident "%Z%%M% %I% %E% SMI" -# # This makefile drives the production of the rmcadm driver kernel # module in the sun4u systems # @@ -39,7 +37,6 @@ UTSBASE = ../.. # MODULE = rmcadm OBJECTS = $(RMCADM_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(RMCADM_OBJS:%.o=$(LINTS_DIR)/%.ln) ROOTMODULE = $(ROOT_PSM_DRV_DIR)/$(MODULE) CONF_SRCDIR = $(UTSBASE)/sun4u/io @@ -52,13 +49,8 @@ include $(UTSBASE)/sun4u/Makefile.sun4u # Define targets # ALL_TARGET = $(BINARY) $(SRC_CONFILE) -LINT_TARGET = $(MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE) -# -# lint pass one enforcement -# -CFLAGS += $(CCVERBOSE) LDFLAGS += -dy -Ndrv/rmc_comm -Ndrv/pmugpio # @@ -79,12 +71,6 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - install: $(INSTALL_DEPS) # diff --git a/usr/src/uts/sun4u/rmclomv/Makefile b/usr/src/uts/sun4u/rmclomv/Makefile index 9d77985ad2..8243155cb6 100644 --- a/usr/src/uts/sun4u/rmclomv/Makefile +++ b/usr/src/uts/sun4u/rmclomv/Makefile @@ -39,7 +39,6 @@ UTSBASE = ../.. # MODULE = rmclomv OBJECTS = $(RMCLOMV_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(RMCLOMV_OBJS:%.o=$(LINTS_DIR)/%.ln) ROOTMODULE = $(ROOT_PSM_DRV_DIR)/$(MODULE) CONF_SRCDIR = $(UTSBASE)/sun4u/io @@ -52,13 +51,8 @@ include $(UTSBASE)/sun4u/Makefile.sun4u # Define targets # ALL_TARGET = $(BINARY) $(SRC_CONFILE) -LINT_TARGET = $(MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE) -# -# lint pass one enforcement -# -CFLAGS += $(CCVERBOSE) LDFLAGS += -dy -Ndrv/rmc_comm -Ndrv/pmugpio # @@ -66,14 +60,6 @@ LDFLAGS += -dy -Ndrv/rmc_comm -Ndrv/pmugpio # CFLAGS += -dalign -# -# For now, disable these lint checks; maintainers should endeavor -# to investigate and remove these for maximum lint coverage. -# Please do not carry these forward to new Makefiles. -# -LINTTAGS += -erroff=E_ASSIGN_NARROW_CONV -LINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN - CERRWARN += -_gcc=-Wno-parentheses # @@ -89,12 +75,6 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - install: $(INSTALL_DEPS) # diff --git a/usr/src/uts/sun4u/sbbc/Makefile b/usr/src/uts/sun4u/sbbc/Makefile index fab5fa1d4b..69d3b24876 100644 --- a/usr/src/uts/sun4u/sbbc/Makefile +++ b/usr/src/uts/sun4u/sbbc/Makefile @@ -40,7 +40,6 @@ UTSBASE = ../.. # MODULE = sbbc OBJECTS = $(SBBC_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(SBBC_OBJS:%.o=$(LINTS_DIR)/%.ln) ROOTMODULE = $(ROOT_PSM_DRV_DIR)/$(MODULE) # @@ -52,30 +51,16 @@ include $(UTSBASE)/sun4u/Makefile.sun4u # Define targets # ALL_TARGET = $(BINARY) -LINT_TARGET = $(MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) # Turn this on once compiler understands v9 in it's backend #INLINES += $(UTSBASE)/sun4u/io/sbbc.il # -# lint pass one enforcement -# -CFLAGS += $(CCVERBOSE) - -# # Turn on doubleword alignment for 64 bit registers # CFLAGS += -dalign -# -# For now, disable these lint checks; maintainers should endeavor -# to investigate and remove these for maximum lint coverage. -# Please do not carry these forward to new Makefiles. -# -LINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN -LINTTAGS += -erroff=E_ASSIGN_NARROW_CONV - CERRWARN += -_gcc=-Wno-switch # @@ -91,12 +76,6 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - install: $(INSTALL_DEPS) # diff --git a/usr/src/uts/sun4u/seattle/Makefile b/usr/src/uts/sun4u/seattle/Makefile index 5cb4516a06..e9ff071a63 100644 --- a/usr/src/uts/sun4u/seattle/Makefile +++ b/usr/src/uts/sun4u/seattle/Makefile @@ -46,12 +46,8 @@ install := TARGET= install install_h := TARGET= install_h clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint -lintlib := TARGET= lintlib -modlintlib := TARGET= modlintlib modlist := TARGET= modlist modlist := NO_STATE= -K $$MODSTATE$$$$ -clean.lint := TARGET= clean.lint check := TARGET= check # @@ -59,9 +55,7 @@ check := TARGET= check # .KEEP_STATE: -def all clean clean.lint clobber modlist: $(SEATTLE_KMODS) - -modlintlib: $(SEATTLE_KMODS) +def all clean clobber modlist: $(SEATTLE_KMODS) LINKED_PLATFORMS = SUNW,Sun-Fire-V245 @@ -78,24 +72,6 @@ install: $(ROOT_SEATTLE_DIR) \ check install_h: -lint: modlintlib - -# -# The 'lint.platmod' target lints the seattle platform module against the sun4u -# kernel. This ends up doing all the kernel cross-checks, so it takes a couple -# of minutes. Due to the low ROI, it's not run by default, but it's a good -# idea to run this if you change os/seattle.c. -# -LINT_LIBS = $(LINT_LIB) \ - -L$(SEATTLE_LINT_LIB_DIR) \ - -L$(LINT_LIB_DIR) $(LINT_KMODS:%=-l%) \ - $(CLOSED_LINT_KMODS:%=-l%) \ - -L$(SPARC_LIB_DIR) $(SPARC_LINTS:%=-l%) - -lint.platmod: modlintlib - @-$(ECHO) "\nSeattle Platform-dependent module: global crosschecks:" - @-$(LINT) $(LINTFLAGS) $(LINT_LIBS) 2>&1 | $(LGREP.2) - $(SEATTLE_KMODS): FRC @cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET) diff --git a/usr/src/uts/sun4u/seattle/os/seattle.c b/usr/src/uts/sun4u/seattle/os/seattle.c index 50eeb7ca09..80faf2faa3 100644 --- a/usr/src/uts/sun4u/seattle/os/seattle.c +++ b/usr/src/uts/sun4u/seattle/os/seattle.c @@ -52,7 +52,7 @@ int (*rmc_req_now)(rmc_comm_msg_t *, uint8_t) = NULL; void startup_platform(void) { - mutex_init(&mi2cv_mutex, NULL, NULL, NULL); + mutex_init(&mi2cv_mutex, NULL, MUTEX_ADAPTIVE, NULL); } int diff --git a/usr/src/uts/sun4u/serengeti/io/ssm.c b/usr/src/uts/sun4u/serengeti/io/ssm.c index ccd68ed9b5..4e5e74285c 100644 --- a/usr/src/uts/sun4u/serengeti/io/ssm.c +++ b/usr/src/uts/sun4u/serengeti/io/ssm.c @@ -111,7 +111,7 @@ ssm_err_callback(dev_info_t *dip, ddi_fm_error_t *derr, const void *impl_data); */ static int ssm_fm_init_child(dev_info_t *dip, dev_info_t *tdip, int cap, - ddi_iblock_cookie_t *ibc); + ddi_iblock_cookie_t *ibc); /* * init/fini routines to alloc/dealloc fm structures and @@ -585,7 +585,7 @@ init_child(dev_info_t *child) * Requests handled completely: * DDI_CTLOPS_INITCHILD * DDI_CTLOPS_UNINITCHILD - * DDI_CTLOPS_REPORTDEV + * DDI_CTLOPS_REPORTDEV * All others are passed to the parent. * The name of the ssm node is ssm@nodeid,0. * ssm is the equivalent of rootnex. @@ -687,7 +687,7 @@ ssm_make_nodes(dev_info_t *dip, int instance, int ssm_nodeid) minor_num = (instance << SSM_INSTANCE_SHIFT) | bd; rv = ddi_create_minor_node(dip, filename, S_IFCHR, - minor_num, DDI_NT_SBD_ATTACHMENT_POINT, NULL); + minor_num, DDI_NT_SBD_ATTACHMENT_POINT, 0); if (rv == DDI_FAILURE) { cmn_err(CE_WARN, "ssm_make_nodes:%d: failed to create " @@ -798,7 +798,7 @@ ssm_close(dev_t dev, int flags, int otyp, cred_t *credp) /* ARGSUSED */ static int ssm_ioctl(dev_t dev, int cmd, intptr_t arg, int mode, cred_t *credp, - int *rvalp) + int *rvalp) { struct ssm_soft_state *softsp; char *addr; @@ -1092,7 +1092,7 @@ ssm_fm_fini(struct ssm_soft_state *softsp) /*ARGSUSED*/ static int ssm_fm_init_child(dev_info_t *dip, dev_info_t *tdip, int cap, - ddi_iblock_cookie_t *ibc) + ddi_iblock_cookie_t *ibc) { struct ssm_soft_state *softsp = ddi_get_soft_state(ssm_softstates, ddi_get_instance(dip)); diff --git a/usr/src/uts/sun4u/ssc050/Makefile b/usr/src/uts/sun4u/ssc050/Makefile index 13bfe470b6..7701b0cef3 100644 --- a/usr/src/uts/sun4u/ssc050/Makefile +++ b/usr/src/uts/sun4u/ssc050/Makefile @@ -22,10 +22,6 @@ # Copyright 2004 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. -# -#ident "%Z%%M% %I% %E% SMI" -# - # This makefile drives the ssc050 build. # # Path to the base of the uts directory tree (usually /usr/src/uts). @@ -37,7 +33,6 @@ UTSBASE = ../.. # MODULE = ssc050 OBJECTS = $(SSC050_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(SSC050_OBJS:%.o=$(LINTS_DIR)/%.ln) ROOTMODULE = $(ROOT_PSM_DRV_DIR)/$(MODULE) # @@ -45,18 +40,12 @@ ROOTMODULE = $(ROOT_PSM_DRV_DIR)/$(MODULE) # include $(UTSBASE)/sun4u/Makefile.sun4u -# -# lint pass one enforcement -# -CFLAGS += $(CCVERBOSE) - LDFLAGS += -dy -N misc/i2c_svc # # Define targets # ALL_TARGET = $(BINARY) -LINT_TARGET = $(MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) .KEEP_STATE: @@ -69,12 +58,6 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - install: $(INSTALL_DEPS) # diff --git a/usr/src/uts/sun4u/ssc100/Makefile b/usr/src/uts/sun4u/ssc100/Makefile index 579f19a910..f42fdb1b17 100644 --- a/usr/src/uts/sun4u/ssc100/Makefile +++ b/usr/src/uts/sun4u/ssc100/Makefile @@ -22,10 +22,6 @@ # Copyright 2004 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. -# -#ident "%Z%%M% %I% %E% SMI" -# - # This makefile drives the ssc100 build. # # Path to the base of the uts directory tree (usually /usr/src/uts). @@ -37,7 +33,6 @@ UTSBASE = ../.. # MODULE = ssc100 OBJECTS = $(SSC100_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(SSC100_OBJS:%.o=$(LINTS_DIR)/%.ln) ROOTMODULE = $(ROOT_PSM_DRV_DIR)/$(MODULE) # @@ -45,18 +40,12 @@ ROOTMODULE = $(ROOT_PSM_DRV_DIR)/$(MODULE) # include $(UTSBASE)/sun4u/Makefile.sun4u -# -# lint pass one enforcement -# -CFLAGS += $(CCVERBOSE) - LDFLAGS += -dy -N misc/i2c_svc # # Define targets # ALL_TARGET = $(BINARY) -LINT_TARGET = $(MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) .KEEP_STATE: @@ -69,12 +58,6 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - install: $(INSTALL_DEPS) # diff --git a/usr/src/uts/sun4u/sunfire/Makefile b/usr/src/uts/sun4u/sunfire/Makefile index ee5e425567..d3d0cfc768 100644 --- a/usr/src/uts/sun4u/sunfire/Makefile +++ b/usr/src/uts/sun4u/sunfire/Makefile @@ -23,8 +23,6 @@ # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -#ident "%Z%%M% %I% %E% SMI" -# # This makefile drives the production of the sun4u sunfire platform # module. # @@ -47,12 +45,8 @@ install := TARGET= install install_h := TARGET= install_h clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint -lintlib := TARGET= lintlib -modlintlib := TARGET= modlintlib modlist := TARGET= modlist modlist := NO_STATE= -K $$MODSTATE$$$$ -clean.lint := TARGET= clean.lint check := TARGET= check # @@ -60,11 +54,9 @@ check := TARGET= check # .KEEP_STATE: -def all clean clean.lint clobber modlist: \ +def all clean clobber modlist: \ $(SUNFIRE_KMODS) $(CLOSED_SUNFIRE_KMODS) -modlintlib: $(SUNFIRE_KMODS) $(CLOSED_SUNFIRE_KMODS) - IMPLEMENTED_PLATFORM = SUNW,Ultra-Enterprise install: $(ROOT_SUNFIRE_DIR) $(USR_SUNFIRE_DIR) \ @@ -76,24 +68,6 @@ install: $(ROOT_SUNFIRE_DIR) $(USR_SUNFIRE_DIR) \ install_h check: FRC @cd sys; pwd; $(MAKE) $(TARGET) -lint: modlintlib - -# -# The 'lint.platmod' target lints the sunfire platform module against the sun4u -# kernel. This ends up doing all the kernel cross-checks, so it takes a couple -# of minutes. Due to the low ROI, it's not run by default, but it's a good -# idea to run this if you change os/sunfire.c. -# -LINT_LIBS = $(LINT_LIB) \ - -L$(SUNFIRE_LINT_LIB_DIR) \ - -L$(LINT_LIB_DIR) $(LINT_KMODS:%=-l%) \ - $(CLOSED_LINT_KMODS:%=-l%) \ - -L$(SPARC_LIB_DIR) $(SPARC_LINTS:%=-l%) - -lint.platmod: modlintlib - @-$(ECHO) "\nSunfire Platform-dependent module: global crosschecks:" - @-$(LINT) $(LINTFLAGS) $(LINT_LIBS) 2>&1 | $(LGREP.2) - $(SUNFIRE_KMODS): FRC @cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET) diff --git a/usr/src/uts/sun4u/sunfire/io/ac.c b/usr/src/uts/sun4u/sunfire/io/ac.c index c19cad9264..19cf822093 100644 --- a/usr/src/uts/sun4u/sunfire/io/ac.c +++ b/usr/src/uts/sun4u/sunfire/io/ac.c @@ -905,8 +905,8 @@ ac_add_picN_kstats(dev_info_t *dip) }; struct kstat_named *ac_pic_named_data; - int event, pic; - char pic_name[30]; + int event, pic; + char pic_name[30]; int instance = ddi_get_instance(dip); int pic_shift = 0; @@ -918,7 +918,7 @@ ac_add_picN_kstats(dev_info_t *dip) (void) sprintf(pic_name, "pic%d", pic); /* pic0, pic1 ... */ if ((ac_picN_ksp[pic] = kstat_create("ac", instance, pic_name, "bus", KSTAT_TYPE_NAMED, - AC_NUM_EVENTS + 1, NULL)) == NULL) { + AC_NUM_EVENTS + 1, 0)) == NULL) { cmn_err(CE_WARN, "ac %s: kstat_create failed", pic_name); diff --git a/usr/src/uts/sun4u/sunfire/io/fhc.c b/usr/src/uts/sun4u/sunfire/io/fhc.c index d47130bddc..d89eb3dfb5 100644 --- a/usr/src/uts/sun4u/sunfire/io/fhc.c +++ b/usr/src/uts/sun4u/sunfire/io/fhc.c @@ -245,7 +245,7 @@ short clk_danger_temp = 68; /* Clock Board Danger Temperature */ short dft_warn_temp = 60; /* default warning temp value */ short dft_danger_temp = 68; /* default danger temp value */ -short cpu_warn_temp_4x = 60; /* CPU/Memory warning temp for 400 MHZ */ +short cpu_warn_temp_4x = 60; /* CPU/Memory warning temp for 400 MHZ */ short cpu_danger_temp_4x = 68; /* CPU/Memory danger temp for 400 MHZ */ /* @@ -398,7 +398,7 @@ static struct cb_ops fhc_cb_ops = { nulldev, /* dump */ nulldev, /* read */ nulldev, /* write */ - nulldev, /* ioctl */ + nulldev, /* ioctl */ nodev, /* devmap */ nodev, /* mmap */ nodev, /* segmap */ @@ -1321,7 +1321,7 @@ done: */ static void fhc_remove_intr_impl(dev_info_t *dip, dev_info_t *rdip, - ddi_intr_handle_impl_t *hdlp) + ddi_intr_handle_impl_t *hdlp) { volatile uint_t *mondo_vec_reg; volatile uint_t tmpreg; @@ -1490,7 +1490,7 @@ fhc_intr_ops(dev_info_t *dip, dev_info_t *rdip, ddi_intr_op_t intr_op, */ static int fhc_ctlops(dev_info_t *dip, dev_info_t *rdip, - ddi_ctl_enum_t op, void *arg, void *result) + ddi_ctl_enum_t op, void *arg, void *result) { switch (op) { @@ -1529,7 +1529,6 @@ fhc_ctlops(dev_info_t *dip, dev_info_t *rdip, /* ARGSUSED */ static void fhc_xlate_intrs(ddi_intr_handle_impl_t *hdlp, uint32_t ign) - { uint32_t mondo; @@ -2384,8 +2383,8 @@ cpu_on_board(int board) int upa_a = board << 1; int upa_b = (board << 1) + 1; - if ((cpunodes[upa_a].nodeid != NULL) || - (cpunodes[upa_b].nodeid != NULL)) { + if ((cpunodes[upa_a].nodeid != 0) || + (cpunodes[upa_b].nodeid != 0)) { return (1); } else { return (0); @@ -3385,7 +3384,7 @@ fhc_cpu_poweron(struct cpu *cp) static void os_completes_shutdown(void) { - pfn_t pfn; + pfn_t pfn; tte_t tte; volatile uint_t *src; volatile uint_t *dst; diff --git a/usr/src/uts/sun4u/sunfire/io/sysctrl.c b/usr/src/uts/sun4u/sunfire/io/sysctrl.c index 206829b2a2..16ae450198 100644 --- a/usr/src/uts/sun4u/sunfire/io/sysctrl.c +++ b/usr/src/uts/sun4u/sunfire/io/sysctrl.c @@ -806,7 +806,7 @@ sysctrl_attach(dev_info_t *devi, ddi_attach_cmd_t cmd) * perform initialization to allow setting of powerfail-time */ if ((dip = ddi_find_devinfo("options", -1, 0)) == NULL) - softsp->options_nodeid = (pnode_t)NULL; + softsp->options_nodeid = (pnode_t)0; else softsp->options_nodeid = (pnode_t)ddi_get_nodeid(dip); @@ -1218,7 +1218,7 @@ sysc_pkt_fini(sysc_cfga_pkt_t *pkt, intptr_t arg, int flag) /* ARGSUSED */ static int sysctrl_ioctl(dev_t devt, int cmd, intptr_t arg, int flag, cred_t *cred_p, - int *rval_p) + int *rval_p) { struct sysctrl_soft_state *softsp; sysc_cfga_pkt_t sysc_pkt; diff --git a/usr/src/uts/sun4u/sunfire/io/sysctrl_quiesce.c b/usr/src/uts/sun4u/sunfire/io/sysctrl_quiesce.c index b9b091f759..86f576bf22 100644 --- a/usr/src/uts/sun4u/sunfire/io/sysctrl_quiesce.c +++ b/usr/src/uts/sun4u/sunfire/io/sysctrl_quiesce.c @@ -576,7 +576,7 @@ sysctrl_resume(sysc_cfga_pkt_t *pkt) */ if (sysc_watchdog_suspended) { mutex_enter(&tod_lock); - tod_ops.tod_set_watchdog_timer( + (void) tod_ops.tod_set_watchdog_timer( watchdog_timeout_seconds); mutex_exit(&tod_lock); } @@ -731,7 +731,7 @@ sysctrl_suspend(sysc_cfga_pkt_t *pkt) */ if (watchdog_activated) { mutex_enter(&tod_lock); - tod_ops.tod_clear_watchdog_timer(); + (void) tod_ops.tod_clear_watchdog_timer(); mutex_exit(&tod_lock); sysc_watchdog_suspended = 1; } else { diff --git a/usr/src/uts/sun4u/tazmo/Makefile b/usr/src/uts/sun4u/tazmo/Makefile index 1f69f760e9..53480d8bb5 100644 --- a/usr/src/uts/sun4u/tazmo/Makefile +++ b/usr/src/uts/sun4u/tazmo/Makefile @@ -24,8 +24,6 @@ # Copyright 2005 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -#ident "%Z%%M% %I% %E% SMI" -# # This makefile drives the production of the sun4u tazmo platform # module. # @@ -48,12 +46,8 @@ install := TARGET= install install_h := TARGET= install_h clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint -lintlib := TARGET= lintlib -modlintlib := TARGET= modlintlib modlist := TARGET= modlist modlist := NO_STATE= -K $$MODSTATE$$$$ -clean.lint := TARGET= clean.lint check := TARGET= check # @@ -61,9 +55,7 @@ check := TARGET= check # .KEEP_STATE: -def all clean clean.lint clobber modlist: $(TAZMO_KMODS) $(CLOSED_TAZMO_KMODS) - -modlintlib: $(TAZMO_KMODS) $(CLOSED_TAZMO_KMODS) +def all clean clobber modlist: $(TAZMO_KMODS) $(CLOSED_TAZMO_KMODS) install: $(ROOT_TAZMO_DIR) $(USR_TAZMO_DIR) \ $(USR_TAZMO_INC_DIR) \ @@ -73,24 +65,6 @@ install: $(ROOT_TAZMO_DIR) $(USR_TAZMO_DIR) \ check install_h: -lint: modlintlib - -# -# The 'lint.platmod' target lints the tazmo platform module against the sun4u -# kernel. This ends up doing all the kernel cross-checks, so it takes a couple -# of minutes. Due to the low ROI, it's not run by default, but it's a good -# idea to run this if you change os/tazmo.c. -# -LINT_LIBS = $(LINT_LIB) \ - -L$(TAZMO_LINT_LIB_DIR) \ - -L$(LINT_LIB_DIR) $(LINT_KMODS:%=-l%) \ - $(CLOSED_LINT_KMODS:%=-l%) \ - -L$(SPARC_LIB_DIR) $(SPARC_LINTS:%=-l%) - -lint.platmod: modlintlib - @-$(ECHO) "\nTazmo Platform-dependent module: global crosschecks:" - @-$(LINT) $(LINTFLAGS) $(LINT_LIBS) 2>&1 | $(LGREP.2) - $(TAZMO_KMODS): FRC @cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET) diff --git a/usr/src/uts/sun4u/tazmo/io/envctrl.c b/usr/src/uts/sun4u/tazmo/io/envctrl.c index 40e7f6532b..30c3e93feb 100644 --- a/usr/src/uts/sun4u/tazmo/io/envctrl.c +++ b/usr/src/uts/sun4u/tazmo/io/envctrl.c @@ -59,13 +59,13 @@ #include <sys/envctrl.h> /* Environment header */ /* driver entry point fn definitions */ -static int envctrl_open(queue_t *, dev_t *, int, int, cred_t *); +static int envctrl_open(queue_t *, dev_t *, int, int, cred_t *); static int envctrl_close(queue_t *, int, cred_t *); -static uint_t envctrl_bus_isr(caddr_t); -static uint_t envctrl_dev_isr(caddr_t); +static uint_t envctrl_bus_isr(caddr_t); +static uint_t envctrl_dev_isr(caddr_t); /* configuration entry point fn definitions */ -static int envctrl_getinfo(dev_info_t *, ddi_info_cmd_t, void *, void **); +static int envctrl_getinfo(dev_info_t *, ddi_info_cmd_t, void *, void **); static int envctrl_attach(dev_info_t *, ddi_attach_cmd_t); static int envctrl_detach(dev_info_t *, ddi_detach_cmd_t); @@ -141,7 +141,7 @@ static int controller_present[] = {-1, -1, -1}; #ifdef MULTIFAN static int envctrl_fan_debug = 0; #endif -static int eHc_debug = 0; +static int eHc_debug = 0; static int power_supply_previous_state[] = {-1, -1, -1}; extern void pci_thermal_rem_intr(dev_info_t *, uint_t); @@ -274,12 +274,12 @@ static struct modlinkage envctrlmodlinkage = { #define EHC_DEV3 0x06 #define EHC_DEV4 0x08 #define EHC_DEV5 0x0A -#define EHC_DEV6 0x0C +#define EHC_DEV6 0x0C #define EHC_DEV7 0x0E /* - * CONTROL OF CHIP + * CONTROL OF CHIP * PCF8591 Temp sensing control register definitions * * 7 6 5 4 3 2 1 0 @@ -520,7 +520,7 @@ envctrl_attach(dev_info_t *dip, ddi_attach_cmd_t cmd) (void) sprintf(name, "envctrl%d", instance); if (ddi_create_minor_node(dip, name, S_IFCHR, instance, DDI_PSEUDO, - NULL) == DDI_FAILURE) { + 0) == DDI_FAILURE) { ddi_remove_minor_node(dip, NULL); goto remhardintr1; } @@ -1449,7 +1449,7 @@ envctrl_init_bus(struct envctrlunit *unitp) { int i; - uint8_t noval = NULL; + uint8_t noval = 0; struct envctrl_tda8444t_chip fan; int fans[] = {ENVCTRL_CPU_FANS, ENVCTRL_PS_FANS, ENVCTRL_AFB_FANS}; @@ -1890,7 +1890,7 @@ envctrl_get_lm75_temp(struct envctrlunit *unitp) } else { k = lmval /2; } - return (k); + return (k); } @@ -1975,7 +1975,7 @@ envctrl_get_sys_temperatures(struct envctrlunit *unitp, uint8_t *diag_tempr) int i; struct envctrl_tda8444t_chip fan; uint8_t psaddr[] = {PSTEMP3, PSTEMP2, PSTEMP1, PSTEMP0}; - uint8_t noval = NULL; + uint8_t noval = 0; uint8_t fspval; ASSERT(MUTEX_HELD(&unitp->umutex)); @@ -2050,11 +2050,11 @@ envctrl_get_sys_temperatures(struct envctrlunit *unitp, uint8_t *diag_tempr) unitp->current_mode == ENVCTRL_NORMAL_MODE) { unitp->shutdown = B_TRUE; } - if (unitp->current_mode == ENVCTRL_NORMAL_MODE) { - cmn_err(CE_WARN, - "Ambient Temperature is %d C, shutdown now\n", - ambtemp); - } + if (unitp->current_mode == ENVCTRL_NORMAL_MODE) { + cmn_err(CE_WARN, + "Ambient Temperature is %d C, shutdown now\n", + ambtemp); + } } else { if (envctrl_isother_fault_led(unitp, fspval, ENVCTRL_FSP_TEMP_ERR)) { @@ -2106,16 +2106,16 @@ envctrl_get_sys_temperatures(struct envctrlunit *unitp, uint8_t *diag_tempr) } if (temperature < 0) { - fan.val = MAX_FAN_SPEED; /* blast it is out of range */ + fan.val = MAX_FAN_SPEED; /* blast it is out of range */ } else if (temperature > MAX_AMB_TEMP) { fan.val = MAX_FAN_SPEED; fspval |= (ENVCTRL_FSP_TEMP_ERR | ENVCTRL_FSP_GEN_ERR); - if (unitp->current_mode == ENVCTRL_NORMAL_MODE) { - cmn_err(CE_WARN, - "CPU Fans set to MAX. CPU Temp is %d C\n", - hicputemp); - } + if (unitp->current_mode == ENVCTRL_NORMAL_MODE) { + cmn_err(CE_WARN, + "CPU Fans set to MAX. CPU Temp is %d C\n", + hicputemp); + } } else if (ambtemp < MAX_AMB_TEMP) { if (!envctrl_p0_enclosure) { fan.val = acme_cpu_fanspd[temperature]; @@ -3635,7 +3635,7 @@ eHc_after_read_pcf8584(struct eHc_envcunit *ehcp, uint8_t *data) */ static int eHc_write_tda8444(struct eHc_envcunit *ehcp, int byteaddress, int instruction, - int subaddress, uint8_t *buf, int size) + int subaddress, uint8_t *buf, int size) { uint8_t control; int i, status; @@ -3687,7 +3687,7 @@ eHc_write_tda8444(struct eHc_envcunit *ehcp, int byteaddress, int instruction, */ static int eHc_read_pcf8574a(struct eHc_envcunit *ehcp, int byteaddress, uint8_t *buf, - int size) + int size) { int i; int status; @@ -3742,7 +3742,7 @@ eHc_read_pcf8574a(struct eHc_envcunit *ehcp, int byteaddress, uint8_t *buf, */ static int eHc_write_pcf8574a(struct eHc_envcunit *ehcp, int byteaddress, uint8_t *buf, - int size) + int size) { int i; int status; @@ -3789,7 +3789,7 @@ eHc_write_pcf8574a(struct eHc_envcunit *ehcp, int byteaddress, uint8_t *buf, */ static int eHc_read_pcf8574(struct eHc_envcunit *ehcp, int byteaddress, uint8_t *buf, - int size) + int size) { int i; int status; @@ -3844,7 +3844,7 @@ eHc_read_pcf8574(struct eHc_envcunit *ehcp, int byteaddress, uint8_t *buf, */ static int eHc_write_pcf8574(struct eHc_envcunit *ehcp, int byteaddress, uint8_t *buf, - int size) + int size) { int i; int status; @@ -3890,7 +3890,7 @@ eHc_write_pcf8574(struct eHc_envcunit *ehcp, int byteaddress, uint8_t *buf, */ static int eHc_read_lm75(struct eHc_envcunit *ehcp, int byteaddress, uint8_t *buf, - int size) + int size) { int i; int status; @@ -3944,7 +3944,7 @@ eHc_read_lm75(struct eHc_envcunit *ehcp, int byteaddress, uint8_t *buf, */ static int eHc_write_pcf8583(struct eHc_envcunit *ehcp, int byteaddress, uint8_t *buf, - int size) + int size) { int i; int status; @@ -3988,7 +3988,7 @@ eHc_write_pcf8583(struct eHc_envcunit *ehcp, int byteaddress, uint8_t *buf, */ static int eHc_read_pcf8591(struct eHc_envcunit *ehcp, int byteaddress, int channel, - int autoinc, int amode, int aenable, uint8_t *buf, int size) + int autoinc, int amode, int aenable, uint8_t *buf, int size) { int i; int status; diff --git a/usr/src/uts/sun4u/todds1287/Makefile b/usr/src/uts/sun4u/todds1287/Makefile index ee0d883bc9..df904ac01e 100644 --- a/usr/src/uts/sun4u/todds1287/Makefile +++ b/usr/src/uts/sun4u/todds1287/Makefile @@ -40,7 +40,6 @@ UTSBASE = ../.. # MODULE = todds1287 OBJECTS = $(TODDS1287_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(TODDS1287_OBJS:%.o=$(LINTS_DIR)/%.ln) ROOTMODULE = $(ROOT_PSM_TOD_DIR)/$(MODULE) # @@ -52,21 +51,8 @@ include $(UTSBASE)/sun4u/Makefile.sun4u # Define targets # ALL_TARGET = $(BINARY) -LINT_TARGET = $(MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) -# -# lint pass one enforcement -# -CFLAGS += $(CCVERBOSE) - -# -# For now, disable these lint checks; maintainers should endeavor -# to investigate and remove these for maximum lint coverage. -# Please do not carry these forward to new Makefiles. -# -LINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN - CERRWARN += $(CNOWARN_UNINIT) # @@ -82,16 +68,9 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - install: $(INSTALL_DEPS) # # Include common targets. # include $(UTSBASE)/sun4u/Makefile.targ - diff --git a/usr/src/uts/sun4u/todds1337/Makefile b/usr/src/uts/sun4u/todds1337/Makefile index 4e7ebf7363..3d068d04a7 100644 --- a/usr/src/uts/sun4u/todds1337/Makefile +++ b/usr/src/uts/sun4u/todds1337/Makefile @@ -22,8 +22,6 @@ # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -#ident "%Z%%M% %I% %E% SMI" -# # This makefile drives the production of todds1337 kernel module. # # sun4u implementation architecture dependent @@ -39,7 +37,6 @@ UTSBASE = ../.. # MODULE = todds1337 OBJECTS = $(TODDS1337_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(TODDS1337_OBJS:%.o=$(LINTS_DIR)/%.ln) ROOTMODULE = $(ROOT_PSM_TOD_DIR)/$(MODULE) # @@ -51,24 +48,11 @@ include $(UTSBASE)/sun4u/Makefile.sun4u # Define targets # ALL_TARGET = $(BINARY) -LINT_TARGET = $(MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) -# -# lint pass one enforcement -# -CFLAGS += $(CCVERBOSE) - LDFLAGS += -dy -N misc/i2c_svc # -# For now, disable these lint checks; maintainers should endeavor -# to investigate and remove these for maximum lint coverage. -# Please do not carry these forward to new Makefiles. -# -LINTTAGS += -erroff=E_ASSIGN_NARROW_CONV - -# # Default build targets. # .KEEP_STATE: @@ -81,16 +65,9 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - install: $(INSTALL_DEPS) # # Include common targets. # include $(UTSBASE)/sun4u/Makefile.targ - |