From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-co1nam03on0118.outbound.protection.outlook.com ([104.47.40.118]:6016 "EHLO NAM03-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727773AbeH3WMV (ORCPT ); Thu, 30 Aug 2018 18:12:21 -0400 From: Sasha Levin To: "stable@vger.kernel.org" CC: Bart Van Assche , David Sterba , Sasha Levin Subject: [PATCH AUTOSEL 4.18 113/113] btrfs: Fix a C compliance issue Date: Thu, 30 Aug 2018 18:08:45 +0000 Message-ID: <20180830180714.36167-47-alexander.levin@microsoft.com> References: <20180830180714.36167-1-alexander.levin@microsoft.com> In-Reply-To: <20180830180714.36167-1-alexander.levin@microsoft.com> Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org List-ID: From: Bart Van Assche [ Upstream commit edf57cbf2b030781885e339f32e35a470d2f8eba ] The C programming language does not allow to use preprocessor statements inside macro arguments (pr_info() is defined as a macro). Hence rework the pr_info() statement in btrfs_print_mod_info() such that it becomes compliant. This patch allows tools like sparse to analyze the BTRFS source code. Fixes: 62e855771dac ("btrfs: convert printk(KERN_* to use pr_* calls") Signed-off-by: Bart Van Assche Reviewed-by: David Sterba Signed-off-by: David Sterba Signed-off-by: Sasha Levin --- fs/btrfs/super.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index f369b480956a..689551da9dce 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c @@ -2371,7 +2371,7 @@ static __cold void btrfs_interface_exit(void) =20 static void __init btrfs_print_mod_info(void) { - pr_info("Btrfs loaded, crc32c=3D%s" + static const char options[] =3D "" #ifdef CONFIG_BTRFS_DEBUG ", debug=3Don" #endif @@ -2384,8 +2384,8 @@ static void __init btrfs_print_mod_info(void) #ifdef CONFIG_BTRFS_FS_REF_VERIFY ", ref-verify=3Don" #endif - "\n", - crc32c_impl()); + ; + pr_info("Btrfs loaded, crc32c=3D%s%s\n", crc32c_impl(), options); } =20 static int __init init_btrfs_fs(void) --=20 2.17.1