summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
authorNick Todd <Nick.Todd@Sun.COM>2008-09-18 20:50:09 +0100
committerNick Todd <Nick.Todd@Sun.COM>2008-09-18 20:50:09 +0100
commit8793b36b40d14ad0a0fecc97738dc118a928f46c (patch)
tree2462e794aa4e591ef023a67fc2e4fb157003ba8e /usr/src
parenta9520aaebd92fe63e5034e135e59fe8737234d80 (diff)
downloadillumos-joyent-8793b36b40d14ad0a0fecc97738dc118a928f46c.tar.gz
6733185 Further cleanup of SUN Studio 12 lint warnings in ON source.
6365532 socketvar.h strangles lint for everyone 5002763 Sockfs debug macros should be linted 6746261 _mkarglst accidentally exported from libc.
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/cmd/cmd-inet/usr.lib/in.dhcpd/Makefile11
-rw-r--r--usr/src/cmd/cmd-inet/usr.lib/inetd/tlx.c4
-rw-r--r--usr/src/cmd/cmd-inet/usr.lib/inetd/wait.c6
-rw-r--r--usr/src/cmd/mdb/Makefile.mdb9
-rw-r--r--usr/src/lib/libc/port/gen/getutx.c3
-rw-r--r--usr/src/lib/libc/port/gen/syslog.c5
-rw-r--r--usr/src/lib/libc/port/mapfile-vers1
-rw-r--r--usr/src/lib/libc/port/print/doprnt.c6
-rw-r--r--usr/src/lib/libc/sparc/sys/ptrace.c3
-rw-r--r--usr/src/lib/libumem/common/umem_fail.c3
-rw-r--r--usr/src/psm/stand/cpr/sparcv9/sun4u/cprboot.c18
-rw-r--r--usr/src/uts/Makefile.uts5
-rw-r--r--usr/src/uts/common/disp/disp.c4
-rw-r--r--usr/src/uts/common/fs/sockfs/socksctp.c11
-rw-r--r--[-rwxr-xr-x]usr/src/uts/common/fs/sockfs/socksdp.c9
-rw-r--r--[-rwxr-xr-x]usr/src/uts/common/fs/sockfs/socksdpvnops.c5
-rw-r--r--usr/src/uts/common/fs/tmpfs/tmp_tnode.c6
-rw-r--r--usr/src/uts/common/inet/ip/ip.c2
-rw-r--r--usr/src/uts/common/inet/ip/ip_if.c3
-rw-r--r--usr/src/uts/common/inet/nca/nca.h36
-rw-r--r--usr/src/uts/common/inet/sctp/sctp_output.c5
-rw-r--r--usr/src/uts/common/io/dls/dls_soft_ring.c4
-rw-r--r--usr/src/uts/common/io/drm/ati_pcigart.c3
-rw-r--r--usr/src/uts/common/io/nxge/nxge_ndd.c18
-rw-r--r--usr/src/uts/common/io/usb/usba/usba_devdb.c2
-rw-r--r--usr/src/uts/common/io/usb/usba/usba_ugen.c3
-rw-r--r--usr/src/uts/common/io/usb/usba/usbai_register.c3
-rw-r--r--usr/src/uts/common/os/kcpc.c4
-rw-r--r--usr/src/uts/common/os/lgrp_topo.c65
-rw-r--r--usr/src/uts/common/os/mutex.c10
-rw-r--r--usr/src/uts/common/os/rwlock.c4
-rw-r--r--usr/src/uts/common/os/turnstile.c4
-rw-r--r--usr/src/uts/common/os/waitq.c6
-rw-r--r--usr/src/uts/common/sys/cpuvar.h2
-rw-r--r--usr/src/uts/common/sys/param.h13
-rw-r--r--usr/src/uts/common/sys/socketvar.h13
-rw-r--r--usr/src/uts/common/syscall/sendfile.c4
-rw-r--r--usr/src/uts/common/vm/seg_map.c6
-rw-r--r--usr/src/uts/common/vm/vm_anon.c4
-rw-r--r--usr/src/uts/common/vm/vm_page.c12
-rw-r--r--usr/src/uts/common/xen/io/xdf.c2
-rw-r--r--usr/src/uts/common/xen/io/xpvd.c6
-rw-r--r--usr/src/uts/common/xen/os/xvdi.c4
-rw-r--r--usr/src/uts/i86pc/io/pci/pci_tools.c4
-rw-r--r--usr/src/uts/i86pc/os/mp_implfuncs.c3
-rw-r--r--usr/src/uts/i86pc/unix/Makefile7
-rw-r--r--usr/src/uts/i86xpv/unix/Makefile7
-rw-r--r--usr/src/uts/intel/Makefile.intel16
-rw-r--r--usr/src/uts/intel/Makefile.intel.shared12
-rw-r--r--usr/src/uts/intel/genunix/Makefile8
-rw-r--r--usr/src/uts/intel/io/dktp/controller/ata/atapi_fsm.c6
-rw-r--r--usr/src/uts/sparc/Makefile.sparc12
-rw-r--r--usr/src/uts/sparc/Makefile.sparc.shared12
-rw-r--r--usr/src/uts/sparc/sys/old_procfs.h9
-rw-r--r--usr/src/uts/sun4u/genunix/Makefile7
-rw-r--r--usr/src/uts/sun4u/hummingbird/Makefile6
-rw-r--r--usr/src/uts/sun4u/io/iocache.c19
-rw-r--r--usr/src/uts/sun4u/io/iommu.c59
-rw-r--r--usr/src/uts/sun4u/io/mc-us3.c32
-rw-r--r--usr/src/uts/sun4u/spitfire/Makefile5
-rw-r--r--usr/src/uts/sun4u/starfire/Makefile.starfire5
-rw-r--r--usr/src/uts/sun4v/genunix/Makefile17
62 files changed, 279 insertions, 314 deletions
diff --git a/usr/src/cmd/cmd-inet/usr.lib/in.dhcpd/Makefile b/usr/src/cmd/cmd-inet/usr.lib/in.dhcpd/Makefile
index 72acb85862..3290764f9d 100644
--- a/usr/src/cmd/cmd-inet/usr.lib/in.dhcpd/Makefile
+++ b/usr/src/cmd/cmd-inet/usr.lib/in.dhcpd/Makefile
@@ -19,12 +19,10 @@
# CDDL HEADER END
#
#
-# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
-# cmd/cmd-inet/usr.lib/in.dhcpd/%M%
+# cmd/cmd-inet/usr.lib/in.dhcpd/Makefile
#
CMN_DIR = $(SRC)/common/net/dhcp
@@ -48,7 +46,10 @@ include ../../../Makefile.cmd
ROOTMANIFESTDIR= $(ROOTSVCNETWORK)
CPPFLAGS += -DNDEBUG -DNPROBE -D_REENTRANT -I./ -I$(CMN_DIR)
-LINTFLAGS += -u
+#
+# -erroff=E_BAD_FORMAT_STR2 added to workaround bug 6696366
+#
+LINTFLAGS += -u -erroff=E_BAD_FORMAT_STR2
LDFLAGS += -L$(NSU_DIR) -R/usr/lib/inet/dhcp/nsu $(MAPFILE.NGB:%=-M%)
LDLIBS += $(NSU_DIR)/rfc2136.so.1 -ldhcpsvc -ldhcputil -linetutil \
-lsocket -lnsl -lmtmalloc -lresolv
diff --git a/usr/src/cmd/cmd-inet/usr.lib/inetd/tlx.c b/usr/src/cmd/cmd-inet/usr.lib/inetd/tlx.c
index 0dcc10fde6..cf37694846 100644
--- a/usr/src/cmd/cmd-inet/usr.lib/inetd/tlx.c
+++ b/usr/src/cmd/cmd-inet/usr.lib/inetd/tlx.c
@@ -23,8 +23,6 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* Contains routines that deal with TLI/XTI endpoints and rpc services.
*/
@@ -514,7 +512,7 @@ process_tlook(const char *fmri, tlx_info_t *tlx_info)
break;
}
case -1:
- error_msg("t_look: %s", t_errno);
+ error_msg("t_look: %s", t_strerror(t_errno));
return (-1);
default:
error_msg(gettext("do_tlook: unexpected t_look event: %d"),
diff --git a/usr/src/cmd/cmd-inet/usr.lib/inetd/wait.c b/usr/src/cmd/cmd-inet/usr.lib/inetd/wait.c
index d1524d824d..0744a38e2d 100644
--- a/usr/src/cmd/cmd-inet/usr.lib/inetd/wait.c
+++ b/usr/src/cmd/cmd-inet/usr.lib/inetd/wait.c
@@ -23,8 +23,6 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* This file contains a set of routines used to perform wait based method
* reaping.
@@ -353,7 +351,7 @@ process_terminated_methods(void)
default: /* child terminated */
if (WIFEXITED(status)) {
ret = WEXITSTATUS(status);
- debug_msg("process %d of instance %s returned "
+ debug_msg("process %ld of instance %s returned "
"%d", pid, me->inst->fmri, ret);
} else if (WIFSIGNALED(status)) {
/*
@@ -364,7 +362,7 @@ process_terminated_methods(void)
* in the case of non-start methods, or when
* the instance is still enabled.
*/
- debug_msg("process %d of instance %s exited "
+ debug_msg("process %ld of instance %s exited "
"due to signal %d", pid, me->inst->fmri,
WTERMSIG(status));
ret = IMRET_FAILURE;
diff --git a/usr/src/cmd/mdb/Makefile.mdb b/usr/src/cmd/mdb/Makefile.mdb
index 8d6711a6ba..e090540b69 100644
--- a/usr/src/cmd/mdb/Makefile.mdb
+++ b/usr/src/cmd/mdb/Makefile.mdb
@@ -22,8 +22,6 @@
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
.KEEP_STATE:
.SUFFIXES:
@@ -93,7 +91,12 @@ C99LMODE= -Xc99=%all
LDLIBS += -ltermcap -lkvm -lproc -lrtld_db -lctf -lumem -ldisasm -lscf
-LINTFLAGS += -n -errtags=yes
+#
+# -erroff=E_INCONS_ARG_DECL2 works around a problem where lint gets confused
+# about how struct mdb_tgt_gregset is used in mdb_tgt_stack_f() and
+# mdb_tgt_stack_iter_f(). Will be resolved as part of fix for CR 6749868.
+#
+LINTFLAGS += -n -errtags=yes -erroff=E_INCONS_ARG_DECL2
LINTFILES = $(SRCS:%.c=%.ln)
PROG = mdb
diff --git a/usr/src/lib/libc/port/gen/getutx.c b/usr/src/lib/libc/port/gen/getutx.c
index e76acf1006..145ffc4a2a 100644
--- a/usr/src/lib/libc/port/gen/getutx.c
+++ b/usr/src/lib/libc/port/gen/getutx.c
@@ -37,7 +37,6 @@
* contributors.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
/*
* Routines to read and write the /etc/utmpx file. Also contains
@@ -510,7 +509,7 @@ invoke_utmp_update(const struct utmpx *entryx)
id[sizeof (entryx->ut_id)] = '\0';
(void) strncpy(line, entryx->ut_line, sizeof (entryx->ut_line));
line[sizeof (entryx->ut_line)] = '\0';
- (void) sprintf(pid, "%d", entryx->ut_pid);
+ (void) sprintf(pid, "%d", (int)entryx->ut_pid);
(void) sprintf(type, "%d", entryx->ut_type);
(void) sprintf(term, "%d", entryx->ut_exit.e_termination);
(void) sprintf(exit, "%d", entryx->ut_exit.e_exit);
diff --git a/usr/src/lib/libc/port/gen/syslog.c b/usr/src/lib/libc/port/gen/syslog.c
index aa535a1edf..9c4e7b9443 100644
--- a/usr/src/lib/libc/port/gen/syslog.c
+++ b/usr/src/lib/libc/port/gen/syslog.c
@@ -37,7 +37,6 @@
* contributors.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
/*
* SYSLOG -- print message on log file
@@ -216,7 +215,7 @@ vsyslog(int pri, const char *fmt, va_list ap)
*/
showpid = 0;
if (OpenLogCalled == 0) {
- (void) sprintf(procfile, "/proc/%d/psinfo", getpid());
+ (void) sprintf(procfile, "/proc/%d/psinfo", (int)getpid());
if ((procfd = open(procfile, O_RDONLY)) >= 0) {
if (read(procfd, &p, sizeof (psinfo_t)) >= 0) {
(void) strncpy(ProcName, p.pr_fname, PRFNSZ);
@@ -266,7 +265,7 @@ vsyslog(int pri, const char *fmt, va_list ap)
o += strlen(o);
}
if (LogStat & LOG_PID) {
- (void) sprintf(o, "[%d]", getpid());
+ (void) sprintf(o, "[%d]", (int)getpid());
o += strlen(o);
}
if (LogTag) {
diff --git a/usr/src/lib/libc/port/mapfile-vers b/usr/src/lib/libc/port/mapfile-vers
index 15e6574244..1f788f93f0 100644
--- a/usr/src/lib/libc/port/mapfile-vers
+++ b/usr/src/lib/libc/port/mapfile-vers
@@ -1517,7 +1517,6 @@ SUNWprivate_1.1 {
__mbtowc_sb;
mcfiller;
__messages_init;
- _mkarglst;
mntopt;
modctl;
modutx;
diff --git a/usr/src/lib/libc/port/print/doprnt.c b/usr/src/lib/libc/port/print/doprnt.c
index ac16e9445b..bf4f410583 100644
--- a/usr/src/lib/libc/port/print/doprnt.c
+++ b/usr/src/lib/libc/port/print/doprnt.c
@@ -27,8 +27,6 @@
/* Copyright (c) 1988 AT&T */
/* All Rights Reserved */
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* _doprnt: common code for printf, fprintf, sprintf
*/
@@ -225,7 +223,7 @@ typedef struct stva_list {
static void _wmkarglst(wchar_t *, stva_list, stva_list [], int);
static void _wgetarg(wchar_t *, stva_list *, long, int);
#else /* _WIDE */
-void _mkarglst(char *, stva_list, stva_list [], int);
+static void _mkarglst(char *, stva_list, stva_list [], int);
void _getarg(char *, stva_list *, long, int);
#endif /* _WIDE */
@@ -2254,7 +2252,7 @@ _watoi(wchar_t *fmt)
static void
_wmkarglst(wchar_t *fmt, stva_list args, stva_list arglst[], int prflag)
#else /* _WIDE */
-void
+static void
_mkarglst(char *fmt, stva_list args, stva_list arglst[], int prflag)
#endif /* _WIDE */
{
diff --git a/usr/src/lib/libc/sparc/sys/ptrace.c b/usr/src/lib/libc/sparc/sys/ptrace.c
index 7610586c3f..796e0dac5c 100644
--- a/usr/src/lib/libc/sparc/sys/ptrace.c
+++ b/usr/src/lib/libc/sparc/sys/ptrace.c
@@ -28,7 +28,6 @@
* ptrace(2) interface built on top of proc(4).
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
#pragma weak _ptrace = ptrace
@@ -476,7 +475,7 @@ Dupfd(int fd, int dfd)
static void
MakeProcName(char *procname, pid_t pid)
{
- (void) sprintf(procname, "/proc/%d", pid);
+ (void) sprintf(procname, "/proc/%d", (int)pid);
}
/*
diff --git a/usr/src/lib/libumem/common/umem_fail.c b/usr/src/lib/libumem/common/umem_fail.c
index ef39f1a10d..8e315b76c5 100644
--- a/usr/src/lib/libumem/common/umem_fail.c
+++ b/usr/src/lib/libumem/common/umem_fail.c
@@ -24,8 +24,6 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* Failure routines for libumem (not standalone)
*/
@@ -143,7 +141,6 @@ __umem_assert_failed(const char *assertion, const char *file, int line)
{
umem_panic("Assertion failed: %s, file %s, line %d\n",
assertion, file, line);
- umem_do_abort();
/*NOTREACHED*/
return (0);
}
diff --git a/usr/src/psm/stand/cpr/sparcv9/sun4u/cprboot.c b/usr/src/psm/stand/cpr/sparcv9/sun4u/cprboot.c
index e8037450d8..5e8b768be5 100644
--- a/usr/src/psm/stand/cpr/sparcv9/sun4u/cprboot.c
+++ b/usr/src/psm/stand/cpr/sparcv9/sun4u/cprboot.c
@@ -23,8 +23,6 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* cprboot - prom client that restores kadb/kernel pages
*
@@ -101,7 +99,7 @@ cb_intro(void)
if ((uintptr_t)_end > CB_SRC_VIRT) {
prom_printf("\ndata collision:\n"
"(_end=0x%p > CB_LOW_VIRT=0x%x), recompile...\n",
- _end, CB_SRC_VIRT);
+ (void *)_end, CB_SRC_VIRT);
return (ERR);
}
@@ -150,8 +148,8 @@ get_bootargs(void)
if (verbose) {
for (argv = cb_args; *argv; argv++) {
- prom_printf(" %ld: \"%s\"\n",
- (argv - cb_args), *argv);
+ prom_printf(" %d: \"%s\"\n",
+ (int)(argv - cb_args), *argv);
}
}
}
@@ -378,7 +376,7 @@ cb_read_statefile(void)
err = cb_alloc(alsize, MMU_PAGESIZE512K, &sfile.buf, &phys);
CB_VPRINTF(("%s:\n alloc size 0x%lx, buf size 0x%lx\n"
" virt 0x%p, phys 0x%llx\n",
- str, alsize, sfile.size, sfile.buf, phys));
+ str, alsize, sfile.size, (void *)sfile.buf, phys));
if (err) {
prom_printf("%s: cant alloc statefile buf, size 0x%lx\n%s\n",
str, sfile.size, rsvp);
@@ -448,8 +446,10 @@ cb_read_statefile(void)
if (alsize > sfile.size) {
len = alsize - sfile.size;
prom_free_phys(len, phys + sfile.size);
- CB_VPRINTF(("%s: freed %ld phys pages (0x%lx - 0x%lx)\n",
- str, mmu_btop(len), phys + sfile.size, phys + alsize));
+ CB_VPRINTF(("%s: freed %ld phys pages (0x%llx - 0x%llx)\n",
+ str, mmu_btop(len),
+ (unsigned long long)(phys + sfile.size),
+ (unsigned long long)(phys + alsize)));
}
/*
@@ -578,7 +578,7 @@ main(void *cookie, int first)
prom_printf("%s: resume pc 0x%lx\n",
prog, mdinfo.func);
prom_printf("%s: exit_to_kernel(0x%p, 0x%p)\n\n",
- prog, cookie, &mdinfo);
+ prog, cookie, (void *)&mdinfo);
}
check_halt("exit_to_kernel");
exit_to_kernel(cookie, &mdinfo);
diff --git a/usr/src/uts/Makefile.uts b/usr/src/uts/Makefile.uts
index d263a1df2a..f73341ab5f 100644
--- a/usr/src/uts/Makefile.uts
+++ b/usr/src/uts/Makefile.uts
@@ -23,8 +23,6 @@
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
#
# This Makefile contains the common targets and definitions for
@@ -163,7 +161,8 @@ LINT.c = $(LINT) -c -dirout=$(LINTS_DIR) $(LINTFLAGS) $(LINT_DEFS) $(CPPFLAGS)
# lint warnings in your module for things that cannot be fixed in any
# reasonable manner, please augment LINTTAGS in your module Makefile
# instead.
-LINTTAGS =
+LINTTAGS = -erroff=E_INCONS_ARG_DECL2
+LINTTAGS += -erroff=E_INCONS_VAL_TYPE_DECL2
LINTFLAGS_sparc_32 = $(LINTCCMODE) -nsxmuF -errtags=yes
LINTFLAGS_sparc_64 = $(LINTFLAGS_sparc_32) -Xarch=v9
diff --git a/usr/src/uts/common/disp/disp.c b/usr/src/uts/common/disp/disp.c
index 2770ef10f2..52ef3636ce 100644
--- a/usr/src/uts/common/disp/disp.c
+++ b/usr/src/uts/common/disp/disp.c
@@ -27,8 +27,6 @@
/* All Rights Reserved */
-#pragma ident "%Z%%M% %I% %E% SMI" /* from SVr4.0 1.30 */
-
#include <sys/types.h>
#include <sys/param.h>
#include <sys/sysmacros.h>
@@ -1831,7 +1829,7 @@ disp_swapped_setrun(kthread_t *tp)
case TS_RUN: /* called from ts_update */
break;
default:
- panic("disp_swapped_setrun: tp: %p bad t_state", tp);
+ panic("disp_swapped_setrun: tp: %p bad t_state", (void *)tp);
}
}
diff --git a/usr/src/uts/common/fs/sockfs/socksctp.c b/usr/src/uts/common/fs/sockfs/socksctp.c
index 6037b33a3c..a5763b0b5f 100644
--- a/usr/src/uts/common/fs/sockfs/socksctp.c
+++ b/usr/src/uts/common/fs/sockfs/socksctp.c
@@ -24,8 +24,6 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include <sys/types.h>
#include <sys/t_lock.h>
#include <sys/param.h>
@@ -416,7 +414,8 @@ sosctp_create(vnode_t *accessvp, int domain, int type, int protocol,
}
so = VTOSO(vp);
- dprint(2, ("sosctp_create: %p domain %d type %d\n", so, domain, type));
+ dprint(2, ("sosctp_create: %p domain %d type %d\n",
+ (void *)so, domain, type));
if (version == SOV_DEFAULT) {
version = so_default_version;
@@ -551,7 +550,7 @@ sosctp_accept(struct sonode *lso, int fflag, struct sonode **nsop)
return ((error == ENOTCONN) ? ECONNABORTED : error);
}
- dprint(2, ("sosctp_accept: new %p\n", nso));
+ dprint(2, ("sosctp_accept: new %p\n", (void *)nso));
*nsop = nso;
return (0);
@@ -1976,7 +1975,7 @@ sosctp_setsockopt(struct sonode *so, int level, int option_name,
}
}
dprint(2, ("sosctp_setsockopt %p (%d) - conn %p %d %d id:%d\n",
- ss, so->so_type, conn, level, option_name, id));
+ (void *)ss, so->so_type, conn, level, option_name, id));
ASSERT(ssa == NULL || (ssa != NULL && conn != NULL));
if (conn != NULL) {
@@ -2206,7 +2205,7 @@ sctp_sock_newconn(void *parenthandle, void *connind)
return (NULL);
}
- dprint(2, ("sctp_stream_newconn: new %p\n", nso));
+ dprint(2, ("sctp_stream_newconn: new %p\n", (void *)nso));
nss = SOTOSSO(nso);
diff --git a/usr/src/uts/common/fs/sockfs/socksdp.c b/usr/src/uts/common/fs/sockfs/socksdp.c
index 8ee0e808cf..7376783fc0 100755..100644
--- a/usr/src/uts/common/fs/sockfs/socksdp.c
+++ b/usr/src/uts/common/fs/sockfs/socksdp.c
@@ -24,8 +24,6 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include <sys/types.h>
#include <sys/t_lock.h>
#include <sys/param.h>
@@ -357,7 +355,8 @@ sosdp_create(vnode_t *accessvp, int domain, int type, int protocol,
}
so = VTOSO(vp);
- dprint(2, ("sosdp_create: %p domain %d type %d\n", so, domain, type));
+ dprint(2, ("sosdp_create: %p domain %d type %d\n", (void *)so,
+ domain, type));
if (version == SOV_DEFAULT) {
version = so_default_version;
@@ -455,7 +454,7 @@ sosdp_accept(struct sonode *lso, int fflag, struct sonode **nsop)
*/
(void) sosdp_getpeername(nso);
- dprint(2, ("sosdp_accept: new %p\n", nso));
+ dprint(2, ("sosdp_accept: new %p\n", (void *)nso));
*nsop = nso;
return (0);
@@ -1296,7 +1295,7 @@ sdp_sock_newconn(void *parenthandle, void *connind)
return (NULL);
}
- dprint(2, ("sdp_stream_newconn: new %p\n", nso));
+ dprint(2, ("sdp_stream_newconn: new %p\n", (void *)nso));
nss = SOTOSDO(nso);
/*
diff --git a/usr/src/uts/common/fs/sockfs/socksdpvnops.c b/usr/src/uts/common/fs/sockfs/socksdpvnops.c
index 76de32e406..395599daab 100755..100644
--- a/usr/src/uts/common/fs/sockfs/socksdpvnops.c
+++ b/usr/src/uts/common/fs/sockfs/socksdpvnops.c
@@ -24,8 +24,6 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include <sys/types.h>
#include <sys/t_lock.h>
#include <sys/param.h>
@@ -184,7 +182,8 @@ socksdpv_close(struct vnode *vp, int flag, int count, offset_t offset,
ASSERT(so->so_count > 0);
so->so_count--; /* one fewer open reference */
- dprint(2, ("socksdpv_close: %p so_count %d\n", so, so->so_count));
+ dprint(2, ("socksdpv_close: %p so_count %d\n", (void *)so,
+ so->so_count));
if (so->so_count == 0) {
/*
diff --git a/usr/src/uts/common/fs/tmpfs/tmp_tnode.c b/usr/src/uts/common/fs/tmpfs/tmp_tnode.c
index 7cae0dbe8e..51e57b2611 100644
--- a/usr/src/uts/common/fs/tmpfs/tmp_tnode.c
+++ b/usr/src/uts/common/fs/tmpfs/tmp_tnode.c
@@ -19,12 +19,10 @@
* CDDL HEADER END
*/
/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include <sys/types.h>
#include <sys/param.h>
#include <sys/t_lock.h>
@@ -142,7 +140,7 @@ tmpnode_growmap(struct tmpnode *tp, ulong_t newsize)
return;
if (newsize > MAXOFF_T)
- np = btopr(MAXOFF_T);
+ np = btopr((u_offset_t)MAXOFF_T);
if (tp->tn_anon == NULL) {
tp->tn_anon = anon_create(MAX(np, TMP_INIT_SZ), ANON_SLEEP);
diff --git a/usr/src/uts/common/inet/ip/ip.c b/usr/src/uts/common/inet/ip/ip.c
index 0950610206..d28bc10425 100644
--- a/usr/src/uts/common/inet/ip/ip.c
+++ b/usr/src/uts/common/inet/ip/ip.c
@@ -13758,7 +13758,7 @@ ip_check_and_align_header(queue_t *q, mblk_t *mp, ip_stack_t *ipst)
(void) mi_strlog(q, 1, SL_ERROR|SL_TRACE,
"ip_check_and_align_header: %s forced us to "
" pullup pkt, hdr len %ld, hdr addr %p",
- ill->ill_name, len, ipha);
+ ill->ill_name, len, (void *)ipha);
}
if (!pullupmsg(mp, IP_SIMPLE_HDR_LENGTH)) {
/* clear b_prev - used by ip_mroute_decap */
diff --git a/usr/src/uts/common/inet/ip/ip_if.c b/usr/src/uts/common/inet/ip/ip_if.c
index 9de6293245..cc05e27958 100644
--- a/usr/src/uts/common/inet/ip/ip_if.c
+++ b/usr/src/uts/common/inet/ip/ip_if.c
@@ -6507,7 +6507,8 @@ th_trace_gethash(ip_stack_t *ipst)
if ((thh = kmem_alloc(sizeof (*thh), KM_NOSLEEP)) == NULL)
return (NULL);
- (void) snprintf(name, sizeof (name), "th_trace_%p", curthread);
+ (void) snprintf(name, sizeof (name), "th_trace_%p",
+ (void *)curthread);
/*
* We use mod_hash_create_extended here rather than the more
diff --git a/usr/src/uts/common/inet/nca/nca.h b/usr/src/uts/common/inet/nca/nca.h
index cbe62ca0ff..1670c49d5d 100644
--- a/usr/src/uts/common/inet/nca/nca.h
+++ b/usr/src/uts/common/inet/nca/nca.h
@@ -19,15 +19,13 @@
* CDDL HEADER END
*/
/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _INET_NCA_H
#define _INET_NCA_H
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#ifdef __cplusplus
extern "C" {
#endif
@@ -296,8 +294,8 @@ typedef struct tw_s {
clock_t lbolt1; /* phase1 lbolt value (0 = NONE) */
clock_t lbolt2; /* phase2 lbolt value */
clock_t lbolt3; /* phase3 lbolt value */
- struct conn_s *head; /* Head of nca_conn_t list */
- struct conn_s *tail; /* Tail of nca_conn_t list */
+ struct nca_conn_s *head; /* Head of nca_conn_t list */
+ struct nca_conn_s *tail; /* Tail of nca_conn_t list */
timeout_id_t tid; /* Timer id of pending timeout() (0 = NONE) */
void *ep; /* pointer to encapsulating struct */
} tw_t;
@@ -379,8 +377,8 @@ typedef struct node_s {
nodef_t *ctaghashfanout; /* ctaghash bucket we're part off */
struct node_s *hashnext; /* hash list next node_t */
struct node_s *ctaghashnext; /* ctaghash list next node_t */
- struct conn_s *connhead; /* head of list of conn(s) in miss */
- struct conn_s *conntail; /* tail of list of conn(s) in miss */
+ struct nca_conn_s *connhead; /* head of list of conn(s) in miss */
+ struct nca_conn_s *conntail; /* tail of list of conn(s) in miss */
struct node_s *next; /* needed if data is in chunks */
struct node_s *back; /* needed if data is in chunks */
@@ -727,7 +725,7 @@ extern struct node_ts *node_tp;
#define DOOR_STK_DEPTH 6
struct door_ts {
- struct conn_s *cp;
+ struct nca_conn_s *cp;
unsigned action;
node_t *np;
int ref;
@@ -1086,7 +1084,7 @@ typedef struct if_s {
typedef struct connf_s {
uint32_t max;
- struct conn_s *head;
+ struct nca_conn_s *head;
kmutex_t lock;
} connf_t;
@@ -1146,24 +1144,24 @@ typedef struct connp_s {
#define TCP_XMIT_MAX_IX 5 /* Max xmit descriptors */
-typedef struct conn_s {
+typedef struct nca_conn_s {
int32_t ref; /* Reference counter */
te_t tcp_ti; /* TCP TIMER timer entry */
- struct conn_s *twnext; /* TIME_WAIT next */
- struct conn_s *twprev; /* TIME_WAIT prev */
+ struct nca_conn_s *twnext; /* TIME_WAIT next */
+ struct nca_conn_s *twprev; /* TIME_WAIT prev */
clock_t twlbolt; /* TIME_WAIT lbolt */
clock_t create; /* Create lbolt time */
connf_t *hashfanout; /* Hash bucket we're part of */
- struct conn_s *hashnext; /* Hash chain next */
- struct conn_s *hashprev; /* Hash chain prev */
+ struct nca_conn_s *hashnext; /* Hash chain next */
+ struct nca_conn_s *hashprev; /* Hash chain prev */
- struct conn_s *bindnext; /* Next conn_s in bind list. */
- struct conn_s *bindprev; /* Prev conn_s in bind list. */
+ struct nca_conn_s *bindnext; /* Next conn_s in bind list. */
+ struct nca_conn_s *bindprev; /* Prev conn_s in bind list. */
void *tbf; /* Pointer to bind hash list struct. */
/*
* Note: atomic access of memebers above is guaranteed by the
@@ -1201,7 +1199,7 @@ typedef struct conn_s {
int reqrefersz; /* size of above */
char *requagent; /* HTTP "User-Agent:" string */
int requagentsz; /* size of above */
- struct conn_s *nodenext; /* Node_t nca_conn_t list */
+ struct nca_conn_s *nodenext; /* Node_t nca_conn_t list */
clock_t http_count; /* HTTP Keep-Alive request count */
@@ -1230,8 +1228,8 @@ typedef struct conn_s {
* Connection NCA_IO_DIRECT_SPLICE & NCA_IO_DIRECT_TEE reference,
* see direct_splice and direct_tee below for type of send too.
*/
- struct conn_s *direct; /* nca_conn_t to send recv data too */
- mblk_t *direct_mp; /* mblk_t to use for tcp_close() */
+ struct nca_conn_s *direct; /* nca_conn_t to send recv data too */
+ mblk_t *direct_mp; /* mblk_t to use for tcp_close() */
/*
* nca_conn_t state.
diff --git a/usr/src/uts/common/inet/sctp/sctp_output.c b/usr/src/uts/common/inet/sctp/sctp_output.c
index ca8b10aeba..dc4dd72630 100644
--- a/usr/src/uts/common/inet/sctp/sctp_output.c
+++ b/usr/src/uts/common/inet/sctp/sctp_output.c
@@ -35,11 +35,6 @@
#include <sys/strsun.h>
#include <sys/strsubr.h>
#include <sys/socketvar.h>
-/* swilly code in sys/socketvar.h turns off DEBUG */
-#ifdef __lint
-#define DEBUG
-#endif
-
#include <inet/common.h>
#include <inet/mi.h>
#include <inet/ip.h>
diff --git a/usr/src/uts/common/io/dls/dls_soft_ring.c b/usr/src/uts/common/io/dls/dls_soft_ring.c
index a1ac10972c..078b9a9e4c 100644
--- a/usr/src/uts/common/io/dls/dls_soft_ring.c
+++ b/usr/src/uts/common/io/dls/dls_soft_ring.c
@@ -23,8 +23,6 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* General Soft rings - Simulating Rx rings in S/W.
*
@@ -612,7 +610,7 @@ dls_soft_ring_enable(dls_channel_t dc, dl_capab_dls_t *soft_ringp)
dip->di_soft_ring_size = 0;
bzero(name, sizeof (name));
- (void) snprintf(name, sizeof (name), "dls_soft_ring_%p", dip);
+ (void) snprintf(name, sizeof (name), "dls_soft_ring_%p", (void *)dip);
dip->di_soft_ring_list = soft_ring_set_create(name, S_RING_BIND_NONE,
0, S_RING_WORKER_ONLY, minclsyspri, soft_ringp->dls_ring_cnt);
diff --git a/usr/src/uts/common/io/drm/ati_pcigart.c b/usr/src/uts/common/io/drm/ati_pcigart.c
index df843fdd4a..4c236c1c53 100644
--- a/usr/src/uts/common/io/drm/ati_pcigart.c
+++ b/usr/src/uts/common/io/drm/ati_pcigart.c
@@ -34,8 +34,6 @@
*
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include "drmP.h"
#define ATI_PCIGART_PAGE_SIZE 4096 /* PCI GART page size */
@@ -77,6 +75,7 @@ drm_ati_pcigart_init(drm_device_t *dev, drm_ati_pcigart_info *gart_info)
pages = DRM_MIN(entry->pages, ATI_MAX_PCIGART_PAGES);
bzero(pci_gart, ATI_PCIGART_TABLE_SIZE);
+ /*CONSTCOND*/
ASSERT(PAGE_SIZE >= ATI_PCIGART_PAGE_SIZE);
dmah = entry->dmah_sg;
diff --git a/usr/src/uts/common/io/nxge/nxge_ndd.c b/usr/src/uts/common/io/nxge/nxge_ndd.c
index 022fac410c..90c8128428 100644
--- a/usr/src/uts/common/io/nxge/nxge_ndd.c
+++ b/usr/src/uts/common/io/nxge/nxge_ndd.c
@@ -23,8 +23,6 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include <sys/nxge/nxge_impl.h>
#include <sys/nxge/nxge_hio.h>
@@ -1061,8 +1059,8 @@ nxge_param_get_rxdma_info(p_nxge_t nxgep, queue_t *q, p_mblk_t mp, caddr_t cp)
rdc,
p_dma_cfgp->rcr_timeout[rdc],
p_dma_cfgp->rcr_threshold[rdc],
- rbr_rings[rdc],
- rbr_rings[rdc]->num_blocks, rcr_rings[rdc]);
+ (void *)rbr_rings[rdc],
+ rbr_rings[rdc]->num_blocks, (void *)rcr_rings[rdc]);
((mblk_t *)np)->b_wptr += print_len;
buf_len -= print_len;
}
@@ -2300,7 +2298,7 @@ nxge_param_dump_ptrs(p_nxge_t nxgep, queue_t *q, p_mblk_t mp, caddr_t cp)
print_len = snprintf((char *)((mblk_t *)np)->b_wptr, buf_len,
"nxgep (nxge_t) $%p\n"
"dev_regs (dev_regs_t) $%p\n",
- nxgep, nxgep->dev_regs);
+ (void *)nxgep, (void *)nxgep->dev_regs);
ADVANCE_PRINT_BUFFER(np, print_len, buf_len);
@@ -2308,8 +2306,8 @@ nxge_param_dump_ptrs(p_nxge_t nxgep, queue_t *q, p_mblk_t mp, caddr_t cp)
print_len = snprintf((char *)((mblk_t *)np)->b_wptr, buf_len,
"reg base (npi_reg_ptr_t) $%p\t "
"pci reg (npi_reg_ptr_t) $%p\n",
- nxgep->dev_regs->nxge_regp,
- nxgep->dev_regs->nxge_pciregp);
+ (void *)nxgep->dev_regs->nxge_regp,
+ (void *)nxgep->dev_regs->nxge_pciregp);
ADVANCE_PRINT_BUFFER(np, print_len, buf_len);
@@ -2341,8 +2339,8 @@ nxge_param_dump_ptrs(p_nxge_t nxgep, queue_t *q, p_mblk_t mp, caddr_t cp)
for (rdc = 0; rdc < p_cfgp->max_rdcs; rdc++) {
print_len = snprintf((char *)((mblk_t *)np)->b_wptr, buf_len,
" %d\t $%p\t\t $%p\n",
- rdc, rcr_rings[rdc],
- rbr_rings[rdc]);
+ rdc, (void *)rcr_rings[rdc],
+ (void *)rbr_rings[rdc]);
ADVANCE_PRINT_BUFFER(np, print_len, buf_len);
}
@@ -2353,7 +2351,7 @@ nxge_param_dump_ptrs(p_nxge_t nxgep, queue_t *q, p_mblk_t mp, caddr_t cp)
tx_rings = nxgep->tx_rings->rings;
for (tdc = 0; tdc < p_cfgp->tdc.count; tdc++) {
print_len = snprintf((char *)((mblk_t *)np)->b_wptr, buf_len,
- " %d\t $%p\n", tdc, tx_rings[tdc]);
+ " %d\t $%p\n", tdc, (void *)tx_rings[tdc]);
ADVANCE_PRINT_BUFFER(np, print_len, buf_len);
}
diff --git a/usr/src/uts/common/io/usb/usba/usba_devdb.c b/usr/src/uts/common/io/usb/usba/usba_devdb.c
index dbd8ee7717..f442abea43 100644
--- a/usr/src/uts/common/io/usb/usba/usba_devdb.c
+++ b/usr/src/uts/common/io/usb/usba/usba_devdb.c
@@ -417,7 +417,7 @@ usba_devdb_compare(const void *p1, const void *p2)
USB_DPRINTF_L4(DPRINT_MASK_DEVDB, usba_devdb_log_handle,
"usba_devdb_compare: p1=0x%p u1=0x%p p2=0x%p u2=0x%p",
- p1, (void *)u1, p2, u2);
+ p1, (void *)u1, p2, (void *)u2);
/* first match vendor id */
if (u1->idVendor < u2->idVendor) {
diff --git a/usr/src/uts/common/io/usb/usba/usba_ugen.c b/usr/src/uts/common/io/usb/usba/usba_ugen.c
index 2613560d5a..cb20c24270 100644
--- a/usr/src/uts/common/io/usb/usba/usba_ugen.c
+++ b/usr/src/uts/common/io/usb/usba/usba_ugen.c
@@ -22,7 +22,6 @@
* Use is subject to license terms.
*/
-
/*
* UGEN: USB Generic Driver support code
*
@@ -4282,7 +4281,7 @@ ugen_minor_index_create(ugen_state_t *ugenp, ugen_minor_t minor)
USB_DPRINTF_L4(UGEN_PRINT_ATTA, ugenp->ug_log_hdl,
"ugen_minor_index_create: %d: 0x%lx",
ugenp->ug_minor_node_table_index,
- minor);
+ (unsigned long)minor);
return (ugenp->ug_minor_node_table_index++);
} else {
diff --git a/usr/src/uts/common/io/usb/usba/usbai_register.c b/usr/src/uts/common/io/usb/usba/usbai_register.c
index 6f4d96d65b..c1b66d17d7 100644
--- a/usr/src/uts/common/io/usb/usba/usbai_register.c
+++ b/usr/src/uts/common/io/usb/usba/usbai_register.c
@@ -23,7 +23,6 @@
* Use is subject to license terms.
*/
-
/*
* USBA: Solaris USB Architecture support
*
@@ -1312,7 +1311,7 @@ usba_make_alts_sparse(usb_alt_if_data_t **array, uint_t *n_elements)
/* Place in sparse array based on key. */
USB_DPRINTF_L4(DPRINT_MASK_REGISTER, usbai_reg_log_handle,
"move %lu bytes (key %d) from 0x%p to 0x%p",
- sizeof (usb_alt_if_data_t), curr_value,
+ (unsigned long)sizeof (usb_alt_if_data_t), curr_value,
(void *)&orig_addr[i], (void *)&repl_array[curr_value]);
bcopy((char *)&orig_addr[i], (char *)&repl_array[curr_value],
diff --git a/usr/src/uts/common/os/kcpc.c b/usr/src/uts/common/os/kcpc.c
index df255cac93..8c9a135243 100644
--- a/usr/src/uts/common/os/kcpc.c
+++ b/usr/src/uts/common/os/kcpc.c
@@ -24,8 +24,6 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include <sys/param.h>
#include <sys/thread.h>
#include <sys/cpuvar.h>
@@ -471,7 +469,7 @@ kcpc_unbind(kcpc_set_t *set)
if (removectx(t, ctx, kcpc_save, kcpc_restore, NULL,
kcpc_lwp_create, NULL, kcpc_free) == 0)
panic("kcpc_unbind: context %p not preset on thread %p",
- ctx, t);
+ (void *)ctx, (void *)t);
#else
(void) removectx(t, ctx, kcpc_save, kcpc_restore, NULL,
kcpc_lwp_create, NULL, kcpc_free);
diff --git a/usr/src/uts/common/os/lgrp_topo.c b/usr/src/uts/common/os/lgrp_topo.c
index 6d14dd926f..43d565a039 100644
--- a/usr/src/uts/common/os/lgrp_topo.c
+++ b/usr/src/uts/common/os/lgrp_topo.c
@@ -19,12 +19,10 @@
* CDDL HEADER END
*/
/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* lgroup topology
*/
@@ -266,7 +264,7 @@ lgrp_ancestor_delete(lgrp_t *child, klgrpset_t *changed)
#ifdef DEBUG
if (lgrp_topo_debug > 1) {
prom_printf("lgrp_ancestor_delete(0x%p[%d],0x%p)\n",
- child, child->lgrp_id, changed);
+ (void *)child, child->lgrp_id, (void *)changed);
}
#endif /* DEBUG */
@@ -307,7 +305,7 @@ lgrp_ancestor_delete(lgrp_t *child, klgrpset_t *changed)
if (lgrp_topo_debug > 0)
prom_printf("lgrp_ancestor_delete: destroy"
" lgrp %d at 0x%p\n",
- current->lgrp_id, current);
+ current->lgrp_id, (void *)current);
#endif /* DEBUG */
lgrp_destroy(current);
}
@@ -344,7 +342,8 @@ lgrp_consolidate(lgrp_t *lgrp1, lgrp_t *lgrp2, klgrpset_t *changed)
#ifdef DEBUG
if (lgrp_topo_debug > 0)
prom_printf("lgrp_consolidate(0x%p[%d],0x%p[%d],0x%p)\n",
- lgrp1, lgrp1->lgrp_id, lgrp2, lgrp2->lgrp_id, changed);
+ (void *)lgrp1, lgrp1->lgrp_id, (void *)lgrp2,
+ lgrp2->lgrp_id, (void *)changed);
#endif /* DEBUG */
count = 0;
@@ -416,7 +415,7 @@ lgrp_consolidate(lgrp_t *lgrp1, lgrp_t *lgrp2, klgrpset_t *changed)
#ifdef DEBUG
if (lgrp_topo_debug > 0)
prom_printf("lgrp_consolidate: destroy lgrp %d at 0x%p\n",
- lgrp1->lgrp_id, lgrp1);
+ lgrp1->lgrp_id, (void *)lgrp1);
if (lgrp_topo_debug > 1 && changed)
prom_printf("lgrp_consolidate: changed %d lgrps: 0x%llx\n",
count, (u_longlong_t)*changed);
@@ -477,7 +476,7 @@ lgrp_collapse_dups(klgrpset_t target_set, int equidist_only,
if (lgrp_topo_debug > 1)
prom_printf("lgrp_collapse_dups: find "
"dups of lgrp %d at 0x%p\n",
- target->lgrp_id, target);
+ target->lgrp_id, (void *)target);
#endif /* DEBUG */
keep = NULL;
for (j = 0; j <= lgrp_alloc_max; j++) {
@@ -508,7 +507,7 @@ lgrp_collapse_dups(klgrpset_t target_set, int equidist_only,
if (lgrp_topo_debug > 1)
prom_printf("lgrp_collapse_dups: "
"keep lgrp %d at 0x%p\n",
- keep->lgrp_id, keep);
+ keep->lgrp_id, (void *)keep);
#endif /* DEBUG */
} else {
if (lgrp == lgrp_root) {
@@ -520,8 +519,8 @@ lgrp_collapse_dups(klgrpset_t target_set, int equidist_only,
prom_printf("lgrp_collapse_dups:"
" consolidate lgrp %d at 0x%p"
" into lgrp %d at 0x%p\n",
- lgrp->lgrp_id, lgrp,
- keep->lgrp_id, keep);
+ lgrp->lgrp_id, (void *)lgrp,
+ keep->lgrp_id, (void *)keep);
#endif /* DEBUG */
count += lgrp_consolidate(lgrp, keep,
&changes);
@@ -645,14 +644,14 @@ lgrp_proprogate(lgrp_t *newleaf, lgrp_t *child, int latency,
if (lgrp_topo_debug > 1) {
prom_printf("lgrp_proprogate: newleaf %d(0x%p), "
"latency %d, child %d(0x%p), parent %d(0x%p)\n",
- newleaf->lgrp_id, newleaf, latency, child->lgrp_id,
- child, parent->lgrp_id, parent);
+ newleaf->lgrp_id, (void *)newleaf, latency, child->lgrp_id,
+ (void *)child, parent->lgrp_id, (void *)parent);
prom_printf("lgrp_proprogate: parent's leaves becomes 0x%llx\n",
(u_longlong_t)parent->lgrp_leaves);
}
if (lgrp_topo_debug > 0) {
prom_printf("lgrp_proprogate: adding to parent %d (0x%p)\n",
- parent->lgrp_id, parent);
+ parent->lgrp_id, (void *)parent);
lgrp_rsets_print("parent resources become:", parent->lgrp_set);
}
@@ -699,8 +698,9 @@ lgrp_split(lgrp_t *oldleaf, lgrp_t *newleaf, lgrp_t *child,
#ifdef DEBUG
if (lgrp_topo_debug > 1)
prom_printf("lgrp_split(0x%p[%d],0x%p[%d],0x%p[%d],0x%p)\n",
- oldleaf, oldleaf->lgrp_id, newleaf, newleaf->lgrp_id,
- child, child->lgrp_id, changed);
+ (void *)oldleaf, oldleaf->lgrp_id,
+ (void *)newleaf, newleaf->lgrp_id,
+ (void *)child, child->lgrp_id, (void *)changed);
#endif /* DEBUG */
/*
@@ -778,7 +778,8 @@ lgrp_split(lgrp_t *oldleaf, lgrp_t *newleaf, lgrp_t *child,
if (lgrp_topo_debug > 0) {
prom_printf("lgrp_split: new parent %d (0x%p) for"
" lgrp %d (0x%p)\n",
- parent->lgrp_id, parent, child->lgrp_id, child);
+ parent->lgrp_id, (void *)parent,
+ child->lgrp_id, (void *)child);
lgrp_rsets_print("new parent resources:",
parent->lgrp_set);
}
@@ -854,8 +855,9 @@ lgrp_lineage_add(lgrp_t *newleaf, lgrp_t *oldleaf, klgrpset_t *changed)
#ifdef DEBUG
if (lgrp_topo_debug > 0)
prom_printf("\nlgrp_lineage_add(0x%p[%d],0x%p[%d],0x%p)\n",
- newleaf, newleaf->lgrp_id, oldleaf, oldleaf->lgrp_id,
- changed);
+ (void *)newleaf, newleaf->lgrp_id,
+ (void *)oldleaf, oldleaf->lgrp_id,
+ (void *)changed);
#endif /* DEBUG */
/*
@@ -903,7 +905,8 @@ lgrp_lineage_add(lgrp_t *newleaf, lgrp_t *oldleaf, klgrpset_t *changed)
if (lgrp_topo_debug > 1)
prom_printf("lgrp_lineage_add: child %d (0x%p), parent"
" %d (0x%p)\n",
- child->lgrp_id, child, parent->lgrp_id, parent);
+ child->lgrp_id, (void *)child,
+ parent->lgrp_id, (void *)parent);
#endif /* DEBUG */
/*
@@ -987,7 +990,7 @@ lgrp_lineage_add(lgrp_t *newleaf, lgrp_t *oldleaf, klgrpset_t *changed)
prom_printf("lgrp_lineage_add: "
"replaced parent lgrp %d at 0x%p"
" for lgrp %d\n",
- parent->lgrp_id, parent,
+ parent->lgrp_id, (void *)parent,
child->lgrp_id);
lgrp_rsets_print("old parent"
" resources:", parent->lgrp_set);
@@ -1020,7 +1023,7 @@ lgrp_lineage_add(lgrp_t *newleaf, lgrp_t *oldleaf, klgrpset_t *changed)
prom_printf("lgrp_lineage_add: new "
"parent lgrp %d at 0x%p for "
"lgrp %d\n", intermed->lgrp_id,
- intermed, child->lgrp_id);
+ (void *)intermed, child->lgrp_id);
lgrp_rsets_print("new parent "
"resources:", rset);
}
@@ -1101,7 +1104,8 @@ lgrp_leaf_add(lgrp_t *leaf, lgrp_t **lgrps, int lgrp_count,
#ifdef DEBUG
if (lgrp_topo_debug > 1)
prom_printf("\nlgrp_leaf_add(0x%p[%d],0x%p,%d,0x%p)\n",
- leaf, leaf->lgrp_id, lgrps, lgrp_count, changed);
+ (void *)leaf, leaf->lgrp_id, (void *)lgrps, lgrp_count,
+ (void *)changed);
#endif /* DEBUG */
count = 0;
@@ -1172,7 +1176,7 @@ lgrp_leaf_add(lgrp_t *leaf, lgrp_t **lgrps, int lgrp_count,
if (lgrp_topo_debug > 1)
prom_printf("lgrp_leaf_add: skip "
"lgrp %d at 0x%p\n",
- lgrp->lgrp_id, lgrp);
+ lgrp->lgrp_id, (void *)lgrp);
#endif /* DEBUG */
continue;
}
@@ -1181,7 +1185,8 @@ lgrp_leaf_add(lgrp_t *leaf, lgrp_t **lgrps, int lgrp_count,
if (lgrp_topo_debug > 0)
prom_printf("lgrp_leaf_add: lgrp %d (0x%p) =>"
" lgrp %d (0x%p)\n",
- leaf->lgrp_id, leaf, lgrp->lgrp_id, lgrp);
+ leaf->lgrp_id, (void *)leaf, lgrp->lgrp_id,
+ (void *)lgrp);
#endif /* DEBUG */
count += lgrp_lineage_add(leaf, lgrp, &changes);
@@ -1233,7 +1238,8 @@ lgrp_leaf_delete(lgrp_t *leaf, lgrp_t **lgrps, int lgrp_count,
#ifdef DEBUG
if (lgrp_topo_debug > 0)
prom_printf("lgrp_leaf_delete(0x%p[%d],0x%p,%d,0x%p)\n",
- leaf, leaf->lgrp_id, lgrps, lgrp_count, changed);
+ (void *)leaf, leaf->lgrp_id, (void *)lgrps, lgrp_count,
+ (void *)changed);
#endif /* DEBUG */
/*
@@ -1248,7 +1254,7 @@ lgrp_leaf_delete(lgrp_t *leaf, lgrp_t **lgrps, int lgrp_count,
#ifdef DEBUG
if (lgrp_topo_debug > 0)
prom_printf("lgrp_leaf_delete: remove leaf from"
- " lgrp %d at %p\n", lgrp->lgrp_id, lgrp);
+ " lgrp %d at %p\n", lgrp->lgrp_id, (void *)lgrp);
#endif /* DEBUG */
lgrp_rsets_delete(lgrp, leaf->lgrp_id, 0);
@@ -1465,7 +1471,8 @@ lgrp_topo_update(lgrp_t **lgrps, int lgrp_count, klgrpset_t *changed)
#ifdef DEBUG
if (lgrp_topo_debug > 1) {
prom_printf("\nlgrp_topo_update: updating lineage "
- "of lgrp %d at 0x%p\n", lgrp->lgrp_id, lgrp);
+ "of lgrp %d at 0x%p\n", lgrp->lgrp_id,
+ (void *)lgrp);
}
#endif /* DEBUG */
@@ -1513,7 +1520,7 @@ lgrp_print(lgrp_t *lgrp)
lgrp_rsets_print("\tresources", lgrp->lgrp_set);
parent = lgrp->lgrp_parent;
- prom_printf("\tparent 0x%p", parent);
+ prom_printf("\tparent 0x%p", (void *)parent);
if (parent)
prom_printf("[%d]\n", parent->lgrp_id);
else
diff --git a/usr/src/uts/common/os/mutex.c b/usr/src/uts/common/os/mutex.c
index f812aeb6bc..625e3a6ca2 100644
--- a/usr/src/uts/common/os/mutex.c
+++ b/usr/src/uts/common/os/mutex.c
@@ -23,8 +23,6 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* Big Theory Statement for mutual exclusion locking primitives.
*
@@ -249,7 +247,8 @@ mutex_panic(char *msg, mutex_impl_t *lp)
panic_mutex = *lp;
panic("%s, lp=%p owner=%p thread=%p",
- msg, lp, MUTEX_OWNER(&panic_mutex), curthread);
+ msg, (void *)lp, (void *)MUTEX_OWNER(&panic_mutex),
+ (void *)curthread);
}
/* "tunables" for per-platform backoff constants. */
@@ -655,7 +654,7 @@ lock_set_spin(lock_t *lp)
return;
if (ncpus == 1)
- panic("lock_set: %p lock held and only one CPU", lp);
+ panic("lock_set: %p lock held and only one CPU", (void *)lp);
spin_time = LOCKSTAT_START_TIME(LS_LOCK_SET_SPIN);
@@ -689,7 +688,8 @@ lock_set_spl_spin(lock_t *lp, int new_pil, ushort_t *old_pil_addr, int old_pil)
return;
if (ncpus == 1)
- panic("lock_set_spl: %p lock held and only one CPU", lp);
+ panic("lock_set_spl: %p lock held and only one CPU",
+ (void *)lp);
ASSERT(new_pil > LOCK_LEVEL);
diff --git a/usr/src/uts/common/os/rwlock.c b/usr/src/uts/common/os/rwlock.c
index 7e0daa89bc..4c5e6c4360 100644
--- a/usr/src/uts/common/os/rwlock.c
+++ b/usr/src/uts/common/os/rwlock.c
@@ -23,8 +23,6 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include <sys/param.h>
#include <sys/thread.h>
#include <sys/cmn_err.h>
@@ -182,7 +180,7 @@ rw_panic(char *msg, rwlock_impl_t *lp)
panic_rwlock = *lp;
panic("%s, lp=%p wwwh=%lx thread=%p",
- msg, lp, panic_rwlock.rw_wwwh, curthread);
+ msg, (void *)lp, panic_rwlock.rw_wwwh, (void *)curthread);
}
/* ARGSUSED */
diff --git a/usr/src/uts/common/os/turnstile.c b/usr/src/uts/common/os/turnstile.c
index 4175973c47..d68844ea26 100644
--- a/usr/src/uts/common/os/turnstile.c
+++ b/usr/src/uts/common/os/turnstile.c
@@ -24,8 +24,6 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* Big Theory Statement for turnstiles.
*
@@ -752,7 +750,7 @@ turnstile_wakeup(turnstile_t *ts, int qnum, int nthreads, kthread_t *owner)
thread_unlock_high(t); /* drop run queue lock */
}
if (owner != NULL)
- panic("turnstile_wakeup: owner %p not woken", owner);
+ panic("turnstile_wakeup: owner %p not woken", (void *)owner);
disp_lock_exit(&tc->tc_lock);
}
diff --git a/usr/src/uts/common/os/waitq.c b/usr/src/uts/common/os/waitq.c
index 276026a02e..7ef7d630f9 100644
--- a/usr/src/uts/common/os/waitq.c
+++ b/usr/src/uts/common/os/waitq.c
@@ -19,12 +19,10 @@
* CDDL HEADER END
*/
/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/thread.h>
@@ -296,7 +294,7 @@ waitq_setrun(kthread_t *t)
ASSERT(ISWAITING(t));
if (wq == NULL)
- panic("waitq_setrun: thread %p is not on waitq", t);
+ panic("waitq_setrun: thread %p is not on waitq", (void *)t);
waitq_dequeue(wq, t);
CL_SETRUN(t);
}
diff --git a/usr/src/uts/common/sys/cpuvar.h b/usr/src/uts/common/sys/cpuvar.h
index 5884d72789..6e7bb85673 100644
--- a/usr/src/uts/common/sys/cpuvar.h
+++ b/usr/src/uts/common/sys/cpuvar.h
@@ -27,8 +27,6 @@
#ifndef _SYS_CPUVAR_H
#define _SYS_CPUVAR_H
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include <sys/thread.h>
#include <sys/sysinfo.h> /* has cpu_stat_t definition */
#include <sys/disp.h>
diff --git a/usr/src/uts/common/sys/param.h b/usr/src/uts/common/sys/param.h
index 26798570a5..0279968fc8 100644
--- a/usr/src/uts/common/sys/param.h
+++ b/usr/src/uts/common/sys/param.h
@@ -39,8 +39,6 @@
#ifndef _SYS_PARAM_H
#define _SYS_PARAM_H
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#ifndef _ASM /* Avoid typedef headaches for assembly files */
#include <sys/types.h>
#include <sys/isa_defs.h>
@@ -339,6 +337,17 @@ extern uintptr_t _userlimit;
extern uintptr_t _userlimit32;
#endif /* defined(_KERNEL) && !defined(_ASM) */
+/*
+ * These three variables have been added within the #if defined(lint)
+ * below to ensure visibility to lint. This is a short term workaround
+ * to handle poor interaction between SS12 lint and these variables.
+ * CR 6742611 has been logged to address these issues.
+ */
+#if defined(lint)
+extern int snooping;
+extern uint_t snoop_interval;
+extern const unsigned int _pageshift;
+#endif /* lint */
#if !defined(_MACHDEP)
diff --git a/usr/src/uts/common/sys/socketvar.h b/usr/src/uts/common/sys/socketvar.h
index 178a8a2905..37a699345a 100644
--- a/usr/src/uts/common/sys/socketvar.h
+++ b/usr/src/uts/common/sys/socketvar.h
@@ -40,8 +40,6 @@
#ifndef _SYS_SOCKETVAR_H
#define _SYS_SOCKETVAR_H
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include <sys/types.h>
#include <sys/stream.h>
#include <sys/t_lock.h>
@@ -651,7 +649,7 @@ int so_verify_oobstate(struct sonode *);
/*
* DEBUG macros
*/
-#if defined(DEBUG) && !defined(__lint)
+#if defined(DEBUG)
#define SOCK_DEBUG
extern int sockdebug;
@@ -670,13 +668,13 @@ extern int sockprinterr;
#define eprintsoline(so, error) \
{ if (sockprinterr && ((so)->so_options & SO_DEBUG)) \
printf("socket(%p) error %d: line %d file %s\n", \
- (so), (error), __LINE__, __FILE__); \
+ (void *)(so), (error), __LINE__, __FILE__); \
}
#define dprint(level, args) { if (sockdebug > (level)) printf args; }
#define dprintso(so, level, args) \
{ if (sockdebug > (level) && ((so)->so_options & SO_DEBUG)) printf args; }
-#else /* define(DEBUG) && !defined(__lint) */
+#else /* define(DEBUG) */
#define eprint(args) {}
#define eprintso(so, args) {}
@@ -684,11 +682,8 @@ extern int sockprinterr;
#define eprintsoline(so, error) {}
#define dprint(level, args) {}
#define dprintso(so, level, args) {}
-#ifdef DEBUG
-#undef DEBUG
-#endif
-#endif /* defined(DEBUG) && !defined(__lint) */
+#endif /* defined(DEBUG) */
extern struct vfsops sock_vfsops;
extern struct vnodeops *socktpi_vnodeops;
diff --git a/usr/src/uts/common/syscall/sendfile.c b/usr/src/uts/common/syscall/sendfile.c
index 18f7ccb9ed..2ff310cde4 100644
--- a/usr/src/uts/common/syscall/sendfile.c
+++ b/usr/src/uts/common/syscall/sendfile.c
@@ -53,10 +53,6 @@
#include <sys/socket.h>
#include <sys/socketvar.h>
-/* swilly code in sys/socketvar.h turns off DEBUG */
-#ifdef __lint
-#define DEBUG
-#endif
#include <netinet/in.h>
#include <sys/sendfile.h>
diff --git a/usr/src/uts/common/vm/seg_map.c b/usr/src/uts/common/vm/seg_map.c
index ad18a2cb31..5a46d23e6f 100644
--- a/usr/src/uts/common/vm/seg_map.c
+++ b/usr/src/uts/common/vm/seg_map.c
@@ -19,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -31,8 +31,6 @@
* under license from the Regents of the University of California.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* VM - generic vnode mapping segment.
*
@@ -1821,6 +1819,8 @@ vrfy_smp:
/*
* Use segkpm
*/
+ /* Lint directive required until 6746211 is fixed */
+ /*CONSTCOND*/
ASSERT(PAGESIZE == MAXBSIZE);
/*
diff --git a/usr/src/uts/common/vm/vm_anon.c b/usr/src/uts/common/vm/vm_anon.c
index 3f3502036d..c3ccd9bd14 100644
--- a/usr/src/uts/common/vm/vm_anon.c
+++ b/usr/src/uts/common/vm/vm_anon.c
@@ -36,8 +36,6 @@
* contributors.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* VM - anonymous pages.
*
@@ -2398,7 +2396,7 @@ anon_private(
* but to do so now.
*/
panic("anon_private, ppcopy failed, opp = 0x%p, pp = 0x%p",
- opp, pp);
+ (void *)opp, (void *)pp);
}
hat_setrefmod(pp); /* mark as modified */
diff --git a/usr/src/uts/common/vm/vm_page.c b/usr/src/uts/common/vm/vm_page.c
index a0a9067065..b897f2004f 100644
--- a/usr/src/uts/common/vm/vm_page.c
+++ b/usr/src/uts/common/vm/vm_page.c
@@ -36,8 +36,6 @@
* contributors.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* VM - physical page management.
*/
@@ -2645,7 +2643,7 @@ page_free(page_t *pp, int dontneed)
if (hat_page_is_mapped(pp) || pp->p_lckcnt != 0 || pp->p_cowcnt != 0 ||
pp->p_slckcnt != 0) {
panic("page_free pp=%p, pfn=%lx, lckcnt=%d, cowcnt=%d "
- "slckcnt = %d", pp, page_pptonum(pp), pp->p_lckcnt,
+ "slckcnt = %d", (void *)pp, page_pptonum(pp), pp->p_lckcnt,
pp->p_cowcnt, pp->p_slckcnt);
/*NOTREACHED*/
}
@@ -6393,7 +6391,8 @@ page_capture_add_hash(page_t *pp, uint_t szc, uint_t flags, void *datap)
while (tp1 != &page_capture_hash[index].lists[l]) {
if (tp1->pp == pp) {
panic("page pp 0x%p already on hash "
- "at 0x%p\n", pp, tp1);
+ "at 0x%p\n",
+ (void *)pp, (void *)tp1);
}
tp1 = tp1->next;
}
@@ -6460,7 +6459,8 @@ page_capture_add_hash(page_t *pp, uint_t szc, uint_t flags, void *datap)
* and thus it either has to be set or not set and can't change
* while holding the mutex above.
*/
- panic("page_capture_add_hash, PR_CAPTURE flag set on pp %p\n", pp);
+ panic("page_capture_add_hash, PR_CAPTURE flag set on pp %p\n",
+ (void *)pp);
}
/*
@@ -6855,7 +6855,7 @@ page_capture_take_action(page_t *pp, uint_t flags, void *datap)
bp2 = bp2->next;
}
}
- panic("PR_CAPTURE set but not on hash for pp 0x%p\n", pp);
+ panic("PR_CAPTURE set but not on hash for pp 0x%p\n", (void *)pp);
/*NOTREACHED*/
}
diff --git a/usr/src/uts/common/xen/io/xdf.c b/usr/src/uts/common/xen/io/xdf.c
index fbc54dd5a8..d1ca51ffc0 100644
--- a/usr/src/uts/common/xen/io/xdf.c
+++ b/usr/src/uts/common/xen/io/xdf.c
@@ -999,7 +999,7 @@ xdf_dump(dev_t dev, caddr_t addr, daddr_t blkno, int nblk)
return (ENXIO);
DPRINTF(IO_DBG, ("xdf: dump addr (0x%p) blk (%ld) nblks (%d)\n",
- addr, blkno, nblk));
+ (void *)addr, blkno, nblk));
part = XDF_PART(minor);
if (!xdf_isopen(vdp, part))
diff --git a/usr/src/uts/common/xen/io/xpvd.c b/usr/src/uts/common/xen/io/xpvd.c
index 59fdd0bbc7..8b87801c0f 100644
--- a/usr/src/uts/common/xen/io/xpvd.c
+++ b/usr/src/uts/common/xen/io/xpvd.c
@@ -24,8 +24,6 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* Host to hypervisor virtual devices nexus driver
*
@@ -195,7 +193,7 @@ static ndi_event_hdl_t xpvd_ndi_event_handle;
static struct modldrv modldrv = {
&mod_driverops, /* Type of module */
- "virtual device nexus driver %I%",
+ "virtual device nexus driver",
&xpvd_ops, /* driver ops */
};
@@ -873,7 +871,7 @@ i_xpvd_parse_devname(char *name, xendev_devclass_t *devclassp,
*/
/* Backend format is "<domain>,<vdev>". */
- if (sscanf(caddr, "%d,%d", domp, vdevp) == 2) {
+ if (sscanf(caddr, "%hu,%d", domp, vdevp) == 2) {
ret = B_TRUE;
goto done;
}
diff --git a/usr/src/uts/common/xen/os/xvdi.c b/usr/src/uts/common/xen/os/xvdi.c
index 791445f2cc..46d7997874 100644
--- a/usr/src/uts/common/xen/os/xvdi.c
+++ b/usr/src/uts/common/xen/os/xvdi.c
@@ -24,8 +24,6 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* Xen virtual device driver interfaces
*/
@@ -2106,7 +2104,7 @@ i_xvdi_probe_path_handler(void *arg)
goto done;
}
} else {
- if (sscanf(p, "/%d/%d/", &dom, &vdev) != 2) {
+ if (sscanf(p, "/%hu/%d/", &dom, &vdev) != 2) {
XVDI_DPRINTF(XVDI_DBG_PROBE,
"i_xvdi_probe_path_handler: "
"cannot parse backend path %s",
diff --git a/usr/src/uts/i86pc/io/pci/pci_tools.c b/usr/src/uts/i86pc/io/pci/pci_tools.c
index 6251bcfc6f..19a756e0b4 100644
--- a/usr/src/uts/i86pc/io/pci/pci_tools.c
+++ b/usr/src/uts/i86pc/io/pci/pci_tools.c
@@ -23,8 +23,6 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include <sys/types.h>
#include <sys/mkdev.h>
#include <sys/stat.h>
@@ -813,7 +811,7 @@ pcitool_map(uint64_t phys_addr, size_t size, size_t *num_pages)
if (pcitool_debug)
prom_printf("pcitool_map: Called with PA:0x%p\n",
- (uint8_t *)(uintptr_t)phys_addr);
+ (void *)(uintptr_t)phys_addr);
*num_pages = 1;
diff --git a/usr/src/uts/i86pc/os/mp_implfuncs.c b/usr/src/uts/i86pc/os/mp_implfuncs.c
index 4b9400e3a3..c830cc5baf 100644
--- a/usr/src/uts/i86pc/os/mp_implfuncs.c
+++ b/usr/src/uts/i86pc/os/mp_implfuncs.c
@@ -23,9 +23,6 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include <sys/psm.h>
#include <sys/vmem.h>
#include <vm/hat.h>
#include <sys/modctl.h>
diff --git a/usr/src/uts/i86pc/unix/Makefile b/usr/src/uts/i86pc/unix/Makefile
index 7e46ed70d5..1af9f29c35 100644
--- a/usr/src/uts/i86pc/unix/Makefile
+++ b/usr/src/uts/i86pc/unix/Makefile
@@ -23,8 +23,6 @@
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-#ident "%Z%%M% %I% %E% SMI"
-#
# This makefile drives the production of unix (and unix.o).
#
# i86pc implementation architecture dependent
@@ -131,6 +129,11 @@ LINTTAGS += -erroff=E_STATIC_UNUSED
LINTTAGS += -erroff=E_PTRDIFF_OVERFLOW
LINTTAGS += -erroff=E_ASSIGN_NARROW_CONV
+# Ensure that lint sees 'struct cpu' containing a fully declared
+# embedded 'struct machcpu'
+#
+LINTFLAGS += -D_MACHDEP -I../../i86pc
+
#
# Default build targets.
#
diff --git a/usr/src/uts/i86xpv/unix/Makefile b/usr/src/uts/i86xpv/unix/Makefile
index 86dde00794..600b3db4d3 100644
--- a/usr/src/uts/i86xpv/unix/Makefile
+++ b/usr/src/uts/i86xpv/unix/Makefile
@@ -23,8 +23,6 @@
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-#ident "%Z%%M% %I% %E% SMI"
-#
# This makefile drives the production of unix (and unix.o).
#
# i86xpv implementation architecture dependent
@@ -125,6 +123,11 @@ LINTTAGS += -erroff=E_STATIC_UNUSED
LINTTAGS += -erroff=E_PTRDIFF_OVERFLOW
LINTTAGS += -erroff=E_ASSIGN_NARROW_CONV
+# Ensure that lint sees 'struct cpu' containing a fully declared
+# embedded 'struct machcpu'
+#
+LINTFLAGS += -D_MACHDEP -I../../i86pc
+
#
# Default build targets.
#
diff --git a/usr/src/uts/intel/Makefile.intel b/usr/src/uts/intel/Makefile.intel
index a440c99348..40eb973745 100644
--- a/usr/src/uts/intel/Makefile.intel
+++ b/usr/src/uts/intel/Makefile.intel
@@ -2,9 +2,8 @@
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License"). You may not use this file except in compliance
-# with the License.
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
@@ -21,12 +20,17 @@
#
#
-# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
UTSTREE=$(UTSBASE)
include $(UTSBASE)/intel/Makefile.intel.shared
+
+#
+# Ensure that the variable member of the cpu_t (cpu_m) is defined
+# for the lint builds so as not to cause lint errors during the
+# global cross check.
+#
+LINTFLAGS += -D_MACHDEP -I../../i86pc
diff --git a/usr/src/uts/intel/Makefile.intel.shared b/usr/src/uts/intel/Makefile.intel.shared
index 4ecc977112..cf43b873e9 100644
--- a/usr/src/uts/intel/Makefile.intel.shared
+++ b/usr/src/uts/intel/Makefile.intel.shared
@@ -166,18 +166,6 @@ $(IF_DEBUG_OBJ)syscall.o := DEBUG_DEFS += -DSYSCALLTRACE
$(IF_DEBUG_OBJ)clock.o := DEBUG_DEFS += -DKSLICE=1
#
-# This rather strange collection of definitions ensures that lint sees
-# 'struct cpu' containing a fully declared embedded 'struct machcpu'
-#
-# There's something deeply dissatisfying about this.
-#
-LINTMACHFLAGS = -D_MACHDEP -I../../i86pc
-$(LINTS_DIR)/kcpc.ln := LINTFLAGS += $(LINTMACHFLAGS)
-$(LINTS_DIR)/kdi.ln := LINTFLAGS += $(LINTMACHFLAGS)
-$(LINTS_DIR)/msacct.ln := LINTFLAGS += $(LINTMACHFLAGS)
-$(LINTS_DIR)/thread.ln := LINTFLAGS += $(LINTMACHFLAGS)
-
-#
# Collect the preprocessor definitions to be associated with *all*
# files.
#
diff --git a/usr/src/uts/intel/genunix/Makefile b/usr/src/uts/intel/genunix/Makefile
index f6ac2cf2c5..db7b60ff14 100644
--- a/usr/src/uts/intel/genunix/Makefile
+++ b/usr/src/uts/intel/genunix/Makefile
@@ -23,8 +23,6 @@
# Copyright 2008 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 generic
@@ -99,6 +97,12 @@ LINTTAGS += -erroff=E_PTRDIFF_OVERFLOW
LINTTAGS += -erroff=E_ASSIGN_NARROW_CONV
#
+# Ensure that lint sees 'struct cpu' containing a fully declared
+# embedded 'struct machcpu'
+#
+LINTFLAGS += -D_MACHDEP -I../../i86pc
+
+#
# Default build targets.
#
.KEEP_STATE:
diff --git a/usr/src/uts/intel/io/dktp/controller/ata/atapi_fsm.c b/usr/src/uts/intel/io/dktp/controller/ata/atapi_fsm.c
index a11e21831b..683c307089 100644
--- a/usr/src/uts/intel/io/dktp/controller/ata/atapi_fsm.c
+++ b/usr/src/uts/intel/io/dktp/controller/ata/atapi_fsm.c
@@ -20,12 +20,10 @@
*/
/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* Finite State Machines for ATA controller and ATAPI devices
*/
@@ -60,7 +58,7 @@ atapi_fsm_error(
uchar_t event)
{
ADBG_ERROR(("atapi protocol error: 0x%p 0x%x 0x%x\n",
- ata_ctlp->ac_data, state, event));
+ (void *)ata_ctlp->ac_data, state, event));
}
diff --git a/usr/src/uts/sparc/Makefile.sparc b/usr/src/uts/sparc/Makefile.sparc
index 4e94f84aa8..4fe4ec1624 100644
--- a/usr/src/uts/sparc/Makefile.sparc
+++ b/usr/src/uts/sparc/Makefile.sparc
@@ -19,12 +19,18 @@
#
#
-# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
UTSTREE=$(UTSBASE)
include $(UTSBASE)/sparc/Makefile.sparc.shared
+
+#
+# Ensure that the variable member of the cpu_t (cpu_m) is defined
+# for the lint builds so as not to cause lint errors during the
+# global cross check.
+#
+$(LINTFLAGSUPPRESS)LINTFLAGS += -D_MACHDEP -I../../sun4 -I../../sun4u \
+ -I../../sfmmu
diff --git a/usr/src/uts/sparc/Makefile.sparc.shared b/usr/src/uts/sparc/Makefile.sparc.shared
index 142bddb64c..489ed1153f 100644
--- a/usr/src/uts/sparc/Makefile.sparc.shared
+++ b/usr/src/uts/sparc/Makefile.sparc.shared
@@ -188,18 +188,6 @@ $(IF_DEBUG_OBJ)clock.o := DEBUG_DEFS += -DKSLICE=1
# $(IF_DEBUG_OBJ)disp_lock.o := DEBUG_DEFS += -DDISP_LOCK_STATS
#
-# This rather strange collection of definitions ensures that lint sees
-# 'struct cpu' containing a fully declared embedded 'struct machcpu'
-#
-# There's something deeply dissatisfying about this.
-#
-LINTMACHFLAGS = -D_MACHDEP -I../../sun4 -I../../$(PLATFORM) -I../../sfmmu
-$(LINTS_DIR)/kcpc.ln := LINTFLAGS += $(LINTMACHFLAGS)
-$(LINTS_DIR)/kdi.ln := LINTFLAGS += $(LINTMACHFLAGS)
-$(LINTS_DIR)/msacct.ln := LINTFLAGS += $(LINTMACHFLAGS)
-$(LINTS_DIR)/thread.ln := LINTFLAGS += $(LINTMACHFLAGS)
-
-#
# Collect the preprocessor definitions to be associated with *all*
# files.
#
diff --git a/usr/src/uts/sparc/sys/old_procfs.h b/usr/src/uts/sparc/sys/old_procfs.h
index 7bb34e9393..39a82b4710 100644
--- a/usr/src/uts/sparc/sys/old_procfs.h
+++ b/usr/src/uts/sparc/sys/old_procfs.h
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -20,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 1992-2003 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -31,8 +30,6 @@
#ifndef _SYS_OLD_PROCFS_H
#define _SYS_OLD_PROCFS_H
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* This file contains the definitions for the old ioctl()-based
* version of the process file system. It is obsolete but will
diff --git a/usr/src/uts/sun4u/genunix/Makefile b/usr/src/uts/sun4u/genunix/Makefile
index 9d86cdb173..8d7c87f065 100644
--- a/usr/src/uts/sun4u/genunix/Makefile
+++ b/usr/src/uts/sun4u/genunix/Makefile
@@ -23,8 +23,6 @@
# Copyright 2008 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 generic
@@ -111,6 +109,11 @@ LINTTAGS += -erroff=E_PTRDIFF_OVERFLOW
LINTTAGS += -erroff=E_ASSIGN_NARROW_CONV
#
+# Ensure that lint sees 'struct cpu' containing a fully declared
+# embedded 'struct machcpu'
+#
+LINTFLAGS += -D_MACHDEP -I../../sun4 -I../../$(PLATFORM) -I../../sfmmu
+
# Default build targets.
#
.KEEP_STATE:
diff --git a/usr/src/uts/sun4u/hummingbird/Makefile b/usr/src/uts/sun4u/hummingbird/Makefile
index 588e443a74..d19a6148f6 100644
--- a/usr/src/uts/sun4u/hummingbird/Makefile
+++ b/usr/src/uts/sun4u/hummingbird/Makefile
@@ -20,11 +20,9 @@
#
#
-# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2008 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 UltraSPARC-IIe
@@ -121,4 +119,4 @@ include $(UTSBASE)/sun4u/Makefile.targ
#
LINTTAGS += -erroff=E_PTRDIFF_OVERFLOW
LINTTAGS += -erroff=E_ASSIGN_NARROW_CONV
-
+LINTTAGS += -erroff=E_BAD_FORMAT_STR2
diff --git a/usr/src/uts/sun4u/io/iocache.c b/usr/src/uts/sun4u/io/iocache.c
index 72b791fec8..dc33f7d3d0 100644
--- a/usr/src/uts/sun4u/io/iocache.c
+++ b/usr/src/uts/sun4u/io/iocache.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -20,12 +19,10 @@
* CDDL HEADER END
*/
/*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include <sys/types.h>
#include <sys/conf.h>
#include <sys/ddi.h>
@@ -97,8 +94,8 @@ stream_buf_init(struct sbus_soft_state *softsp, caddr_t address)
DPRINTF(IOCACHE_REGISTERS_DEBUG, ("Streaming buffer control reg: 0x%p, "
"Streaming buffer flush reg: 0x%p, Streaming buffer sync reg: 0x%p",
- softsp->str_buf_ctrl_reg, softsp->str_buf_flush_reg,
- softsp->str_buf_sync_reg));
+ (void *)softsp->str_buf_ctrl_reg, (void *)softsp->str_buf_flush_reg,
+ (void *)softsp->str_buf_sync_reg));
/* Initialize stream buffer sync reg mutex */
mutex_init(&softsp->sync_reg_lock, NULL, MUTEX_DEFAULT, NULL);
@@ -174,7 +171,7 @@ sync_stream_buf(struct sbus_soft_state *softsp, ioaddr_t addr, uint_t npages,
DPRINTF(IOCACHE_SYNC_DEBUG, ("sync_stream_buf: ioaddr 0x%x, page cnt "
"0x%x, sync flag 0x%p, sync flag pf 0x%lx\n", addr, npages,
- sync_flag, phys_sync_flag));
+ (void *)sync_flag, phys_sync_flag));
ASSERT(npages > (uint_t)0);
@@ -204,7 +201,7 @@ sync_stream_buf(struct sbus_soft_state *softsp, ioaddr_t addr, uint_t npages,
DPRINTF(IOCACHE_DIAG_REG_DEBUG,
("IO cache line diag "
"reg addr 0x%p, hi0x%x lo0x%x\n",
- reg_addr, hi, lo));
+ (void *)reg_addr, hi, lo));
}
#endif /* DEBUG */
/* Check for a valid line */
@@ -272,7 +269,7 @@ sync_stream_buf(struct sbus_soft_state *softsp, ioaddr_t addr, uint_t npages,
*/
nsec_current = gethrtime();
if ((nsec_current - nsec_start) > nsectowait &&
- !*((volatile int *)sync_flag)) {
+ !*((volatile int *)sync_flag)) {
/*
* Trouble. The SYSIO chip has
* seemingly gone AWOL. Vomit.
diff --git a/usr/src/uts/sun4u/io/iommu.c b/usr/src/uts/sun4u/io/iommu.c
index 9a73efda42..66d7a46dc2 100644
--- a/usr/src/uts/sun4u/io/iommu.c
+++ b/usr/src/uts/sun4u/io/iommu.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -20,12 +19,10 @@
* CDDL HEADER END
*/
/*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include <sys/types.h>
#include <sys/param.h>
#include <sys/conf.h>
@@ -227,8 +224,9 @@ iommu_init(struct sbus_soft_state *softsp, caddr_t address)
DPRINTF(IOMMU_REGISTERS_DEBUG, ("IOMMU Control reg: %p IOMMU TSB "
"base reg: %p IOMMU flush reg: %p TSB base addr %p\n",
- softsp->iommu_ctrl_reg, softsp->tsb_base_addr,
- softsp->iommu_flush_reg, softsp->soft_tsb_base_addr));
+ (void *)softsp->iommu_ctrl_reg, (void *)softsp->tsb_base_addr,
+ (void *)softsp->iommu_flush_reg,
+ (void *)softsp->soft_tsb_base_addr));
return (DDI_SUCCESS);
}
@@ -245,7 +243,7 @@ iommu_uninit(struct sbus_soft_state *softsp)
/* flip off the IOMMU enable switch */
*softsp->iommu_ctrl_reg &=
- (TSB_SIZE << TSB_SIZE_SHIFT | IOMMU_DISABLE);
+ (TSB_SIZE << TSB_SIZE_SHIFT | IOMMU_DISABLE);
iommu_tsb_free(softsp->iommu_tsb_cookie);
@@ -318,14 +316,14 @@ iommu_tlb_flush(struct sbus_soft_state *softsp, ioaddr_t addr, pgcnt_t npages)
DPRINTF(IOMMU_TLB, ("Vaddr reg 0x%p, "
"TLB vaddr reg %lx, IO addr 0x%x "
"Base addr 0x%x, Hi addr 0x%x\n",
- vaddr_reg, tmpreg, ioaddr, addr, hiaddr));
+ (void *)vaddr_reg, tmpreg, ioaddr, addr, hiaddr));
if (ioaddr >= addr && ioaddr <= hiaddr) {
tmpreg = *valid_bit_reg;
DPRINTF(IOMMU_TLB, ("Valid reg addr 0x%p, "
"TLB valid reg %lx\n",
- valid_bit_reg, tmpreg));
+ (void *)valid_bit_reg, tmpreg));
if (tmpreg & IOMMU_TLB_VALID) {
*softsp->iommu_flush_reg = (uint64_t)ioaddr;
@@ -533,7 +531,7 @@ iommu_create_vaddr_mappings(ddi_dma_impl_t *mp, uintptr_t addr)
DPRINTF(IOMMU_TTE, ("vaddr mapping: tte index %p pfn %lx "
"tte flag %lx addr %lx ioaddr %x\n",
- iotte_ptr, pfn, iotte_flag, addr, ioaddr));
+ (void *)iotte_ptr, pfn, iotte_flag, addr, ioaddr));
/* Flush the IOMMU TLB before loading a new mapping */
if (!diag_tlb_flush)
@@ -643,7 +641,7 @@ iommu_create_pp_mappings(ddi_dma_impl_t *mp, page_t *pp, page_t **pplist)
}
DPRINTF(IOMMU_TTE, ("pp mapping TTE index %p pfn %lx "
- "tte flag %lx ioaddr %x\n", iotte_ptr,
+ "tte flag %lx ioaddr %x\n", (void *)iotte_ptr,
pfn, iotte_flag, ioaddr));
/* Flush the IOMMU TLB before loading a new mapping */
@@ -776,7 +774,8 @@ iommu_dma_allochdl(dev_info_t *dip, dev_info_t *rdip,
if (mppriv == NULL) {
if (waitfp != DDI_DMA_DONTWAIT) {
- ddi_set_callback(waitfp, arg, &softsp->dvma_call_list_id);
+ ddi_set_callback(waitfp, arg,
+ &softsp->dvma_call_list_id);
}
return (DDI_DMA_NORESOURCES);
}
@@ -784,7 +783,7 @@ iommu_dma_allochdl(dev_info_t *dip, dev_info_t *rdip,
DPRINTF(IOMMU_DMA_ALLOCHDL_DEBUG, ("dma_allochdl: (%s) handle %p "
"hi %x lo %x min %x burst %x\n",
- ddi_get_name(dip), mp, addrhigh, addrlow,
+ ddi_get_name(dip), (void *)mp, addrhigh, addrlow,
dma_attr->dma_attr_minxfer, dma_attr->dma_attr_burstsizes));
mp->dmai_rdip = rdip;
@@ -1025,7 +1024,7 @@ iommu_dma_bindhdl(dev_info_t *dip, dev_info_t *rdip,
DPRINTF(IOMMU_TTE, ("speed loading: TTE index %p "
"pfn %lx tte flag %lx addr %lx ioaddr %x\n",
- iotte_ptr, pfn, iotte_flag, addr, ioaddr));
+ (void *)iotte_ptr, pfn, iotte_flag, addr, ioaddr));
#if defined(DEBUG) && defined(IO_MEMUSAGE)
iomemp = kmem_alloc(sizeof (struct io_mem_list),
@@ -1052,7 +1051,7 @@ iommu_dma_bindhdl(dev_info_t *dip, dev_info_t *rdip,
(uint_t)dma_attr->dma_attr_seg + 1,
(void *)(uintptr_t)(ioaddr_t)dma_attr->dma_attr_addr_lo,
(void *)(uintptr_t)
- ((ioaddr_t)dma_attr->dma_attr_addr_hi + 1),
+ ((ioaddr_t)dma_attr->dma_attr_addr_hi + 1),
dmareq->dmar_fp == DDI_DMA_SLEEP ? VM_SLEEP : VM_NOSLEEP);
}
@@ -1317,8 +1316,8 @@ iommu_dma_map(dev_info_t *dip, dev_info_t *rdip,
ioaddr_t segalign;
int rval;
struct sbus_soft_state *softsp =
- (struct sbus_soft_state *)ddi_get_soft_state(sbusp,
- ddi_get_instance(dip));
+ (struct sbus_soft_state *)ddi_get_soft_state(sbusp,
+ ddi_get_instance(dip));
addrlow = dma_lim->dlim_addr_lo;
addrhigh = dma_lim->dlim_addr_hi;
@@ -1331,8 +1330,8 @@ iommu_dma_map(dev_info_t *dip, dev_info_t *rdip,
* Setup DMA burstsizes and min-xfer counts.
*/
(void) iommu_dma_lim_setup(dip, rdip, softsp, &dma_lim->dlim_burstsizes,
- (uint_t)dma_lim->dlim_burstsizes, &dma_lim->dlim_minxfer,
- dmareq->dmar_flags);
+ (uint_t)dma_lim->dlim_burstsizes, &dma_lim->dlim_minxfer,
+ dmareq->dmar_flags);
if (dma_lim->dlim_burstsizes == 0)
return (DDI_DMA_NOMAPPING);
@@ -1376,7 +1375,7 @@ iommu_dma_map(dev_info_t *dip, dev_info_t *rdip,
dma_attr->dma_attr_seg = segalign;
dma_attr->dma_attr_burstsizes = dma_lim->dlim_burstsizes;
rval = iommu_dma_bindhdl(dip, rdip, (ddi_dma_handle_t)mp,
- dmareq, NULL, NULL);
+ dmareq, NULL, NULL);
if (rval && (rval != DDI_DMA_PARTIAL_MAP)) {
kmem_free(mppriv, sizeof (*mppriv));
} else {
@@ -1398,7 +1397,7 @@ iommu_dma_mctl(dev_info_t *dip, dev_info_t *rdip,
ddi_dma_cookie_t *cp;
ddi_dma_impl_t *mp = (ddi_dma_impl_t *)handle;
- DPRINTF(IOMMU_DMAMCTL_DEBUG, ("dma_mctl: handle %p ", mp));
+ DPRINTF(IOMMU_DMAMCTL_DEBUG, ("dma_mctl: handle %p ", (void *)mp));
switch (request) {
case DDI_DMA_FREE:
{
@@ -1742,7 +1741,7 @@ iommu_dma_mctl(dev_info_t *dip, dev_info_t *rdip,
DPRINTF(IOMMU_FASTDMA_RESERVE,
("Reserve: mapping object %p base addr %lx size %x\n",
- mp, mp->dmai_mapping, mp->dmai_ndvmapages));
+ (void *)mp, mp->dmai_mapping, mp->dmai_ndvmapages));
break;
}
@@ -1947,15 +1946,15 @@ iommu_dvma_unload(ddi_dma_handle_t h, uint_t index, uint_t view)
#endif /* DEBUG && IO_MEMUSAGE */
DPRINTF(IOMMU_FASTDMA_SYNC, ("kaddr_unload: handle %p sync flag "
- "addr %p sync flag pfn %llx index %x page count %lx\n", mp,
- &iommu_fast_dvma->sync_flag[index],
+ "addr %p sync flag pfn %llx index %x page count %lx\n", (void *)mp,
+ (void *)&iommu_fast_dvma->sync_flag[index],
iommu_fast_dvma->phys_sync_flag[index],
index, npages));
if ((mp->dmai_rflags & DMP_NOSYNC) != DMP_NOSYNC) {
sync_stream_buf(softsp, ioaddr, npages,
- (int *)&iommu_fast_dvma->sync_flag[index],
- iommu_fast_dvma->phys_sync_flag[index]);
+ (int *)&iommu_fast_dvma->sync_flag[index],
+ iommu_fast_dvma->phys_sync_flag[index]);
}
}
@@ -1979,8 +1978,8 @@ iommu_dvma_sync(ddi_dma_handle_t h, uint_t index, uint_t view)
npages = iommu_fast_dvma->pagecnt[index];
DPRINTF(IOMMU_FASTDMA_SYNC, ("kaddr_sync: handle %p, "
- "sync flag addr %p, sync flag pfn %llx\n", mp,
- &iommu_fast_dvma->sync_flag[index],
+ "sync flag addr %p, sync flag pfn %llx\n", (void *)mp,
+ (void *)&iommu_fast_dvma->sync_flag[index],
iommu_fast_dvma->phys_sync_flag[index]));
sync_stream_buf(softsp, ioaddr, npages,
diff --git a/usr/src/uts/sun4u/io/mc-us3.c b/usr/src/uts/sun4u/io/mc-us3.c
index 759256a7b9..f008f42b2b 100644
--- a/usr/src/uts/sun4u/io/mc-us3.c
+++ b/usr/src/uts/sun4u/io/mc-us3.c
@@ -23,8 +23,6 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include <sys/types.h>
#include <sys/conf.h>
#include <sys/ddi.h>
@@ -128,7 +126,7 @@ extern struct mod_ops mod_driverops;
static struct modldrv modldrv = {
&mod_driverops, /* module type, this one is a driver */
- "Memory-controller: %I%", /* module name */
+ "Memory-controller", /* module name */
&mc_ops, /* driver ops */
};
@@ -316,12 +314,12 @@ mc_attach(dev_info_t *devi, ddi_attach_cmd_t cmd)
softsp->size = 0;
} else {
DPRINTF(MC_ATTACH_DEBUG, ("mc%d is disabled: dimminfop %p\n",
- instance, dimminfop));
+ instance, (void *)dimminfop));
goto bad2;
}
DPRINTF(MC_ATTACH_DEBUG, ("mc%d: dimminfop=0x%p data=0x%lx len=%d\n",
- instance, dimminfop, *(uint64_t *)dimminfop, len));
+ instance, (void *)dimminfop, *(uint64_t *)dimminfop, len));
/* Get MC registers and construct all needed data structure */
if (mc_get_mcregs(softsp) == -1)
@@ -625,7 +623,7 @@ mc_ioctl(dev_t dev, int cmd, intptr_t arg, int flag, cred_t *cred_p,
bank = seg->hb_inseg;
DPRINTF(MC_CMD_DEBUG, ("MCIOC_SEG:nbanks %d seg 0x%p bank %p\n",
- seg->nbanks, seg, bank));
+ seg->nbanks, (void *)seg, (void *)bank));
i = 0;
while (bank != NULL) {
@@ -669,7 +667,7 @@ mc_ioctl(dev_t dev, int cmd, intptr_t arg, int flag, cred_t *cred_p,
}
DPRINTF(MC_CMD_DEBUG, ("MCIOC_BANK: bank %d (0x%p) valid %hu\n",
- bank->bank_node.id, bank, bank->valid));
+ bank->bank_node.id, (void *)bank, bank->valid));
/*
* If (Physic Address & MASK) == MATCH, Physic Address is
@@ -889,7 +887,8 @@ mc_get_mcregs(struct mc_soft_state *softsp)
*/
for (i = 0; i < NBANKS; i++) {
DPRINTF(MC_REG_DEBUG, ("get_mcregs: mapreg=0x%p portid=%d "
- "cpu=%d\n", softsp->mc_base, softsp->portid, CPU->cpu_id));
+ "cpu=%d\n", (void *)softsp->mc_base, softsp->portid,
+ CPU->cpu_id));
kpreempt_disable();
if (softsp->portid == (cpunodes[CPU->cpu_id].portid))
@@ -1655,9 +1654,22 @@ mlayout_add(int mc_id, int bank_no, uint64_t reg, void *dimminfop)
bank_curr->pos = bank_no >> 1;
ASSERT((bank_curr->pos == 0) || (bank_curr->pos == 1));
+ /*
+ * Workaround to keep gcc and SS12 lint happy.
+ * Lint expects lk, uk and um in the format statement below
+ * to use %lx, but this produces a warning when compiled with
+ * gcc.
+ */
+
+#if defined(lint)
+ DPRINTF(MC_CNSTRC_DEBUG, ("mlayout_add 3: logical bank num %d, "
+ "lk 0x%lx uk 0x%lx um 0x%lx ifactor 0x%x size 0x%lx base 0x%lx\n",
+ idx, mcreg._s.lk, mcreg._s.uk, mcreg._s.um, ifactor, size, base));
+#else /* lint */
DPRINTF(MC_CNSTRC_DEBUG, ("mlayout_add 3: logical bank num %d, "
- "lk 0x%x uk 0x%x um 0x%x ifactor 0x%x size 0x%lx base 0x%lx\n",
+ "lk 0x%x uk 0x%x um 0x%x ifactor 0x%x size 0x%lx base 0x%lx\n",
idx, mcreg._s.lk, mcreg._s.uk, mcreg._s.um, ifactor, size, base));
+#endif /* lint */
/* connect the entry and update the size on dgrp_info list */
idx = mc_id * NDGRPS + (bank_no % NDGRPS);
@@ -1924,7 +1936,7 @@ static void
mc_node_add(mc_dlist_t *node, mc_dlist_t **head, mc_dlist_t **tail)
{
DPRINTF(MC_LIST_DEBUG, ("mc_node_add: node->id %d head %p tail %p\n",
- node->id, *head, *tail));
+ node->id, (void *)*head, (void *)*tail));
if (*head != NULL) {
node->prev = *tail;
diff --git a/usr/src/uts/sun4u/spitfire/Makefile b/usr/src/uts/sun4u/spitfire/Makefile
index b42deb92bb..414fd83707 100644
--- a/usr/src/uts/sun4u/spitfire/Makefile
+++ b/usr/src/uts/sun4u/spitfire/Makefile
@@ -20,11 +20,9 @@
#
#
-# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2008 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 UltraSPARC driver
@@ -86,6 +84,7 @@ AS_CPPFLAGS += -DCPU_MODULE -DSPITFIRE
#
LINTTAGS += -erroff=E_PTRDIFF_OVERFLOW
LINTTAGS += -erroff=E_ASSIGN_NARROW_CONV
+LINTTAGS += -erroff=E_BAD_FORMAT_STR2
#
# Default build targets.
diff --git a/usr/src/uts/sun4u/starfire/Makefile.starfire b/usr/src/uts/sun4u/starfire/Makefile.starfire
index 12a414ad11..ce706f8681 100644
--- a/usr/src/uts/sun4u/starfire/Makefile.starfire
+++ b/usr/src/uts/sun4u/starfire/Makefile.starfire
@@ -19,11 +19,9 @@
# CDDL HEADER END
#
#
-# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-#ident "%Z%%M% %I% %E% SMI"
-#
# Global definitions for sun4u starfire implementation specific modules.
#
@@ -131,3 +129,4 @@ LINTTAGS += -erroff=E_SUPPRESSION_DIRECTIVE_UNUSED
LINTTAGS += -erroff=E_STATIC_UNUSED
LINTTAGS += -erroff=E_PTRDIFF_OVERFLOW
LINTTAGS += -erroff=E_ASSIGN_NARROW_CONV
+LINTTAGS += -erroff=E_BAD_FORMAT_STR2
diff --git a/usr/src/uts/sun4v/genunix/Makefile b/usr/src/uts/sun4v/genunix/Makefile
index c2111f62b2..e629630fb5 100644
--- a/usr/src/uts/sun4v/genunix/Makefile
+++ b/usr/src/uts/sun4v/genunix/Makefile
@@ -23,9 +23,6 @@
# Copyright 2008 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 generic
# unix kernel module.
@@ -56,6 +53,15 @@ PLATFORM = sun4v
LIBGEN = $(OBJS_DIR)/libgenunix.so
LIBSTUBS = $(GENSTUBS_OBJS:%=$(OBJS_DIR)/%)
+# LINTFLAGS will be set to include definitions so that the cpu_t
+# structure is expanded. However this could be set to look at the
+# sun4u version which is not correct for sun4v. Therefore we only
+# want to use the LINTFLAGS modification in this Makefile and so
+# suppress the usage of the LINTFLAGS setting in the Makefile.sparc
+# file.
+#
+LINTFLAGSUPPRESS = $(POUND_SIGN)
+
#
# Include common rules.
#
@@ -110,6 +116,11 @@ LINTTAGS += -erroff=E_STATIC_UNUSED
LINTTAGS += -erroff=E_PTRDIFF_OVERFLOW
LINTTAGS += -erroff=E_ASSIGN_NARROW_CONV
+# Ensure that lint sees 'struct cpu' containing a fully declared
+# embedded 'struct machcpu'.
+#
+LINTFLAGS += -D_MACHDEP -I../../sun4 -I../../$(PLATFORM) -I../../sfmmu
+
#
# Default build targets.
#