From owner-svn-src-head@FreeBSD.ORG Wed Jan 14 20:36:58 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DE2E910656BB; Wed, 14 Jan 2009 20:36:58 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B23428FC1E; Wed, 14 Jan 2009 20:36:58 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0EKawZH053225; Wed, 14 Jan 2009 20:36:58 GMT (envelope-from gonzo@svn.freebsd.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0EKawM6053224; Wed, 14 Jan 2009 20:36:58 GMT (envelope-from gonzo@svn.freebsd.org) Message-Id: <200901142036.n0EKawM6053224@svn.freebsd.org> From: Oleksandr Tymoshenko Date: Wed, 14 Jan 2009 20:36:58 +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: r187238 - head/sys/mips/mips X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jan 2009 20:37:00 -0000 Author: gonzo Date: Wed Jan 14 20:36:58 2009 New Revision: 187238 URL: http://svn.freebsd.org/changeset/base/187238 Log: o Make debug output conditional Modified: head/sys/mips/mips/nexus.c Modified: head/sys/mips/mips/nexus.c ============================================================================== --- head/sys/mips/mips/nexus.c Wed Jan 14 20:27:49 2009 (r187237) +++ head/sys/mips/mips/nexus.c Wed Jan 14 20:36:58 2009 (r187238) @@ -58,6 +58,12 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef NEXUS_DEBUG +#define dprintf printf +#else +#define dprintf(x, arg...) +#endif /* NEXUS_DEBUG */ + static MALLOC_DEFINE(M_NEXUSDEV, "nexusdev", "Nexus device"); struct nexus_device { @@ -253,7 +259,7 @@ nexus_hinted_child(device_t bus, const c resource_long_value(dname, dunit, "maddr", &maddr); resource_int_value(dname, dunit, "msize", &msize); - printf("%s: discovered hinted child %s at maddr %p(%d)\n", + dprintf("%s: discovered hinted child %s at maddr %p(%d)\n", __func__, device_get_nameunit(child), (void *)(intptr_t)maddr, msize); @@ -298,10 +304,10 @@ nexus_alloc_resource(device_t bus, devic struct rman *rm; int isdefault, needactivate, passthrough; - printf("%s: entry (%p, %p, %d, %p, %p, %p, %ld, %d)\n", + dprintf("%s: entry (%p, %p, %d, %p, %p, %p, %ld, %d)\n", __func__, bus, child, type, rid, (void *)(intptr_t)start, (void *)(intptr_t)end, count, flags); - printf("%s: requested rid is %d\n", __func__, *rid); + dprintf("%s: requested rid is %d\n", __func__, *rid); isdefault = (start == 0UL && end == ~0UL && count == 1); needactivate = flags & RF_ACTIVE; @@ -408,7 +414,7 @@ nexus_set_resource(device_t dev, device_ struct resource_list *rl = &ndev->nx_resources; struct resource_list_entry *rle; - printf("%s: entry (%p, %p, %d, %d, %p, %ld)\n", + dprintf("%s: entry (%p, %p, %d, %d, %p, %ld)\n", __func__, dev, child, type, rid, (void *)(intptr_t)start, count); rle = resource_list_add(rl, type, rid, start, start + count - 1, @@ -443,7 +449,7 @@ nexus_delete_resource(device_t dev, devi struct nexus_device *ndev = DEVTONX(child); struct resource_list *rl = &ndev->nx_resources; - printf("%s: entry\n", __func__); + dprintf("%s: entry\n", __func__); resource_list_delete(rl, type, rid); } @@ -452,7 +458,7 @@ static int nexus_release_resource(device_t bus, device_t child, int type, int rid, struct resource *r) { - printf("%s: entry\n", __func__); + dprintf("%s: entry\n", __func__); if (rman_get_flags(r) & RF_ACTIVE) { int error = bus_deactivate_resource(child, type, rid, r);