From patchwork Fri Sep 23 16:05:21 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9348425 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 81B8D601C2 for ; Fri, 23 Sep 2016 16:06:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 732992ABA0 for ; Fri, 23 Sep 2016 16:06:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 67A992ABF4; Fri, 23 Sep 2016 16:06:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.4 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D36072ABA0 for ; Fri, 23 Sep 2016 16:06:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1034939AbcIWQF4 (ORCPT ); Fri, 23 Sep 2016 12:05:56 -0400 Received: from mout.kundenserver.de ([212.227.17.10]:56586 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030326AbcIWQFy (ORCPT ); Fri, 23 Sep 2016 12:05:54 -0400 Received: from wuerfel.lan. ([78.43.20.153]) by mrelayeu.kundenserver.de (mreue103) with ESMTPA (Nemesis) id 0Lz0gC-1asM630RZA-014Enm; Fri, 23 Sep 2016 18:05:35 +0200 From: Arnd Bergmann To: Chris Mason , Josef Bacik , David Sterba Cc: Arnd Bergmann , Jeff Mahoney , Qu Wenruo , Filipe Manana , Omar Sandoval , Anand Jain , linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] btrfs: fix btrfs_no_printk stub helper Date: Fri, 23 Sep 2016 18:05:21 +0200 Message-Id: <20160923160532.3619432-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:cYnNvr8y1LlG/uaA1QUPJvUlZ20ZRvMNQzpGyUkYVX8OEXxrRPh Qp7o5bVoOIo5aJmm6AcC4l+xODIDzBWKiyHg6ExHkabmaXzCoaRXMR0n6Uk6nWICHnMSaAf H7iOFkaLYoOO6NcYu4oey1+9y6cxoOfnCwGXsT3kZIRtOnd3Mbk7uJ2JPoKsfHUfCdl9FrY IhGjWEJlh20jasFRpYGdw== X-UI-Out-Filterresults: notjunk:1; V01:K0:Qv45BBAJ6/U=:ll0A0e8lxRWyhosHvJjIaH FLgFYA8dvIfS+k0XXbQFYbhoeHq6wUn3sGokpKCNXzho7AaP37E3U79Z56hAkcFgyx/3eJ6Rl KLKrFbIiQVUP/jfpeZKlVTH5XYD8Ibfp0MhEiyb6FjMAY6ckDSEWDwv5eqy6O8YuC+kYoB1FO fJhG3wecrTY3bGNs22OSxnFPtuoBJJAG9z6hDdEaL6KcjedQ+ujt0RJSDmOQCNE/5LEWhc3x5 RF1mHHh0DEQvlZfW8cQwa41OAnm58AFtGl0dRNqE/7+W44WZwP6KsG4vsb/+uBmILonZ9Ogyj 3AOTczMLZneVSj6Iza9CGkij12ERgtkWCOVCyAPiYW+02fTmaTCN2bLEEtRsXrgu9aj+qOILL uzSGi6ESfppp6myu12ANughed0LQHAcezfocE0VMrpKY8PUb5nEW7F2GHl4dQt+FhlKaryVQO GfhLpNKgZuqvgCLbLvPGQysweAQr6fLHuLxqbEnAE8XsiMErUMuXLrJE7TIYgKkGukXBi9hC6 d6N1GeceMCuu24IlEXNLf0/vK3p4AmELyn25d6x3jqb9Flbc4p5o5vkiycUFXfvnAXDWaOH0n dmdgAzoYXctDg6C8PCw9Kiv+3PXFBK6v0xo1+XpiZC0C0FyQcGnl7KnpJ8gIJE9TSAx5MeL2j 1jJRpeRvpHMowwjsMpOJym7XoMzDSqcsJK8HFuW7pegbFnSXWviBlpoQNmhn0PhlUIxo= Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The addition of btrfs_no_printk() caused a build failure when CONFIG_PRINTK is disabled: fs/btrfs/send.c: In function 'send_rename': fs/btrfs/ctree.h:3367:2: error: implicit declaration of function 'btrfs_no_printk' [-Werror=implicit-function-declaration] This moves the helper outside of that #ifdef so it is always defined, and changes the existing #ifdef to refer to that helper as well for consistency. Fixes: 47c57058ff2c ("btrfs: btrfs_debug should consume fs_info when DEBUG is not defined") Signed-off-by: Arnd Bergmann Reviewed-by: David Sterba --- fs/btrfs/ctree.h | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index e5621268c9fe..63bf4cc34626 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -3241,20 +3241,17 @@ int btrfs_parse_options(struct btrfs_root *root, char *options, unsigned long new_flags); int btrfs_sync_fs(struct super_block *sb, int wait); +static inline __printf(2, 3) +void btrfs_no_printk(const struct btrfs_fs_info *fs_info, const char *fmt, ...) +{ +} + #ifdef CONFIG_PRINTK __printf(2, 3) void btrfs_printk(const struct btrfs_fs_info *fs_info, const char *fmt, ...); -__printf(2, 3) -static inline int btrfs_no_printk(const struct btrfs_fs_info *fs_info, - const char *fmt, ...) -{ - return 0; -} #else -static inline __printf(2, 3) -void btrfs_printk(const struct btrfs_fs_info *fs_info, const char *fmt, ...) -{ -} +#define btrfs_printk(fs_info, fmt, args...) \ + btrfs_no_printk(fs_info, fmt, ##args) #endif #define btrfs_emerg(fs_info, fmt, args...) \