From owner-svn-src-all@FreeBSD.ORG Fri Feb 4 15:45:48 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C33A9106564A; Fri, 4 Feb 2011 15:45:48 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 978AB8FC1B; Fri, 4 Feb 2011 15:45:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p14FjmIQ089303; Fri, 4 Feb 2011 15:45:48 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p14Fjmmc089301; Fri, 4 Feb 2011 15:45:48 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201102041545.p14Fjmmc089301@svn.freebsd.org> From: Ed Maste Date: Fri, 4 Feb 2011 15:45:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r218280 - head/sys/dev/aac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Feb 2011 15:45:48 -0000 Author: emaste Date: Fri Feb 4 15:45:48 2011 New Revision: 218280 URL: http://svn.freebsd.org/changeset/base/218280 Log: We can pass a format string and args to panic(), so instead of using printf() to output some information before a panic, just include that information in the panic. Submitted by: bde Reviewed by: bde Modified: head/sys/dev/aac/aacvar.h Modified: head/sys/dev/aac/aacvar.h ============================================================================== --- head/sys/dev/aac/aacvar.h Fri Feb 4 15:28:26 2011 (r218279) +++ head/sys/dev/aac/aacvar.h Fri Feb 4 15:45:48 2011 (r218280) @@ -537,9 +537,8 @@ static __inline void \ aac_enqueue_ ## name (struct aac_command *cm) \ { \ if ((cm->cm_flags & AAC_ON_AACQ_MASK) != 0) { \ - printf("command %p is on another queue, flags = %#x\n", \ - cm, cm->cm_flags); \ - panic("aac: command is on another queue"); \ + panic("aac: command %p is on another queue, flags = %#x", \ + cm, cm->cm_flags); \ } \ TAILQ_INSERT_TAIL(&cm->cm_sc->aac_ ## name, cm, cm_link); \ cm->cm_flags |= AAC_ON_ ## index; \ @@ -549,9 +548,8 @@ static __inline void \ aac_requeue_ ## name (struct aac_command *cm) \ { \ if ((cm->cm_flags & AAC_ON_AACQ_MASK) != 0) { \ - printf("command %p is on another queue, flags = %#x\n", \ - cm, cm->cm_flags); \ - panic("aac: command is on another queue"); \ + panic("aac: command %p is on another queue, flags = %#x", \ + cm, cm->cm_flags); \ } \ TAILQ_INSERT_HEAD(&cm->cm_sc->aac_ ## name, cm, cm_link); \ cm->cm_flags |= AAC_ON_ ## index; \ @@ -564,10 +562,8 @@ aac_dequeue_ ## name (struct aac_softc * \ if ((cm = TAILQ_FIRST(&sc->aac_ ## name)) != NULL) { \ if ((cm->cm_flags & AAC_ON_ ## index) == 0) { \ - printf("command %p not in queue, flags = %#x, " \ - "bit = %#x\n", cm, cm->cm_flags, \ - AAC_ON_ ## index); \ - panic("aac: command not in queue"); \ + panic("aac: command %p not in queue, flags = %#x, bit = %#x", \ + cm, cm->cm_flags, AAC_ON_ ## index); \ } \ TAILQ_REMOVE(&sc->aac_ ## name, cm, cm_link); \ cm->cm_flags &= ~AAC_ON_ ## index; \ @@ -579,10 +575,8 @@ static __inline void \ aac_remove_ ## name (struct aac_command *cm) \ { \ if ((cm->cm_flags & AAC_ON_ ## index) == 0) { \ - printf("command %p not in queue, flags = %#x, " \ - "bit = %#x\n", cm, cm->cm_flags, \ - AAC_ON_ ## index); \ - panic("aac: command not in queue"); \ + panic("aac: command %p not in queue, flags = %#x, bit = %#x", \ + cm, cm->cm_flags, AAC_ON_ ## index); \ } \ TAILQ_REMOVE(&cm->cm_sc->aac_ ## name, cm, cm_link); \ cm->cm_flags &= ~AAC_ON_ ## index; \