Date: Sat, 7 Feb 2009 02:14:27 +0000 (UTC) From: "Wojciech A. Koszek" <wkoszek@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r188266 - head/sys/dev/si Message-ID: <200902070214.n172ESMM078224@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: wkoszek Date: Sat Feb 7 02:14:27 2009 New Revision: 188266 URL: http://svn.freebsd.org/changeset/base/188266 Log: si_cmdname() is defined only when SI_DEBUG is enabled, thus using this function in simple printf() causes compile-time problems. Use conditionally enabled DPRINT() macro instead. Modified: head/sys/dev/si/si.c Modified: head/sys/dev/si/si.c ============================================================================== --- head/sys/dev/si/si.c Sat Feb 7 01:59:34 2009 (r188265) +++ head/sys/dev/si/si.c Sat Feb 7 02:14:27 2009 (r188266) @@ -1549,7 +1549,7 @@ si_command(struct si_port *pp, int cmd, /* This is very very bad. The card has crashed. */ /* XXX the driver breaks at this point */ if (err == ETIMEDOUT) - printf("%s: tsleep1 timeout. hi_stat %s, sp_pend %s\n", pp->sp_name, si_cmdname(ccbp->hi_stat), si_cmdname(pp->sp_pend)); + DPRINT(("%s: tsleep1 timeout. hi_stat %s, sp_pend %s\n", pp->sp_name, si_cmdname(ccbp->hi_stat), si_cmdname(pp->sp_pend))); splx(oldspl); return; } @@ -1586,7 +1586,7 @@ si_command(struct si_port *pp, int cmd, if (err) { DPRINT((pp, DBG_PARAM, "sicmd2 tsleep error: hi_stat (%s) sp_pend (%s)\n", si_cmdname(ccbp->hi_stat), si_cmdname(pp->sp_pend))); if (err == ETIMEDOUT) { - printf("%s: tsleep2 timeout. hi_stat %s, sp_pend %s\n", pp->sp_name, si_cmdname(ccbp->hi_stat), si_cmdname(pp->sp_pend)); + DPRINT(("%s: tsleep2 timeout. hi_stat %s, sp_pend %s\n", pp->sp_name, si_cmdname(ccbp->hi_stat), si_cmdname(pp->sp_pend))); } break; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200902070214.n172ESMM078224>