From patchwork Wed Nov 13 00:22:53 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Holton X-Patchwork-Id: 3176611 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 582E79F39E for ; Wed, 13 Nov 2013 00:23:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 950E8205B7 for ; Wed, 13 Nov 2013 00:23:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 983B0205B2 for ; Wed, 13 Nov 2013 00:23:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757744Ab3KMAXn (ORCPT ); Tue, 12 Nov 2013 19:23:43 -0500 Received: from mail-qe0-f52.google.com ([209.85.128.52]:44834 "EHLO mail-qe0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757705Ab3KMAXi (ORCPT ); Tue, 12 Nov 2013 19:23:38 -0500 Received: by mail-qe0-f52.google.com with SMTP id t9so1958899qeq.11 for ; Tue, 12 Nov 2013 16:23:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ngUgsP3FrmFB77qBcb2P4V1E2OhHt275KOosmvLndBQ=; b=U2AvRXboFQk0O2V4g7MxpKJbpLTFdMLyteJAs+nzb92nJe19xiyG8c6bCs3DfZjANV mJeWynv+jAdUgRiy+VMkV7MPePkaEIYyGN1UUM7InpyGGq92J0fEcIyY2VvoCIKNYXgP TWOHPHBuwxveSUkYpvIDsEcbsS733lXAATWOiLiOITc0inOVxeiXlSrf+OB/tOH2BCfh LE6i2bc0s4gwlim87NoG+2G6+Pkq9yTFOUOms68+0wr4XOw3QyC58ay5KMlf8eV+c/R+ +XY0xJ8WzTTGCmFZQIUo05bb0ccaJKNmhw9AYQMz/r0SLhq2FKJsQb6SEdkkBIzBnlPr lydQ== X-Received: by 10.224.66.5 with SMTP id l5mr63829559qai.31.1384302217135; Tue, 12 Nov 2013 16:23:37 -0800 (PST) Received: from localhost.localdomain (nc-67-235-35-152.dhcp.embarqhsd.net. [67.235.35.152]) by mx.google.com with ESMTPSA id u3sm67452348qej.8.2013.11.12.16.23.36 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 12 Nov 2013 16:23:36 -0800 (PST) From: Frank Holton To: linux-btrfs@vger.kernel.org Cc: Frank Holton Subject: [PATCH 2/2] Btrfs: make btrfs_debug match pr_debug handling related to DEBUG Date: Tue, 12 Nov 2013 19:22:53 -0500 Message-Id: <1384302173-32075-3-git-send-email-fholton@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1384302173-32075-1-git-send-email-fholton@gmail.com> References: <1384302173-32075-1-git-send-email-fholton@gmail.com> Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The kernel macro pr_debug is defined as a empty statement when DEBUG is not defined. Make btrfs_debug match pr_debug to avoid spamming the kernel log with debug messages Signed-off-by: Frank Holton --- fs/btrfs/ctree.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index e319d25..3969133 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -3809,8 +3809,14 @@ void btrfs_printk(const struct btrfs_fs_info *fs_info, const char *fmt, ...) btrfs_printk(fs_info, KERN_NOTICE fmt, ##args) #define btrfs_info(fs_info, fmt, args...) \ btrfs_printk(fs_info, KERN_INFO fmt, ##args) + +#ifdef DEBUG #define btrfs_debug(fs_info, fmt, args...) \ btrfs_printk(fs_info, KERN_DEBUG fmt, ##args) +#else +#define btrfs_debug(fs_info, fmt, args...) \ + no_printk(KERN_DEBUG fmt, ##args) +#endif #ifdef CONFIG_BTRFS_ASSERT