From patchwork Mon Jan 16 11:06:09 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9518487 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 840C2601C3 for ; Mon, 16 Jan 2017 11:06:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5A9222845E for ; Mon, 16 Jan 2017 11:06:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4E4B928466; Mon, 16 Jan 2017 11:06:46 +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.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI 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 0B3212845E for ; Mon, 16 Jan 2017 11:06:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751496AbdAPLGd (ORCPT ); Mon, 16 Jan 2017 06:06:33 -0500 Received: from mout.kundenserver.de ([212.227.126.130]:55473 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751262AbdAPLGc (ORCPT ); Mon, 16 Jan 2017 06:06:32 -0500 Received: from wuerfel.lan ([78.43.21.235]) by mrelayeu.kundenserver.de (mreue001 [212.227.15.129]) with ESMTPA (Nemesis) id 0MSUzj-1c1Kqx3nul-00TYXC; Mon, 16 Jan 2017 12:06:25 +0100 From: Arnd Bergmann To: Ilya Dryomov , "Yan, Zheng" , Sage Weil Cc: Arnd Bergmann , ceph-devel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] ceph: use BUG() instead of BUG_ON(1) Date: Mon, 16 Jan 2017 12:06:09 +0100 Message-Id: <20170116110622.3870494-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:Me7PLPwLrTtwRU8L+Xt9XckABiTBjv4tNUdx42rf36S0dNekjg1 /ZTxx367s7TzA2zLCWMil2K3Jwhrl1l2nLLuudrlX7HTCxd9zD+2w4Y4QkSB4npX21lFc7L lUyfKY83+z1jWMmPSrOJMhTQe5h7J7s/suZOu2cNk2YTOaVdKKvefqrmAFlhlz2nw0p8aNS TfD9BVWjk2WMgLJJpscCw== X-UI-Out-Filterresults: notjunk:1; V01:K0:LCCg+dwFb6A=:uZLD/s3Av84JCaAM4Xz17t 2P1ZOPaEdOxph2DtfxeDwiorE7rmr7m5nYrU0mbonhiS0L53Wtn23EcPHmKiGssu5H7vLvCqs B+4UyMap9cuL1pBIHAAM2XpdPNocoORtb8hsEdch02RIOoqd/10V4WOhgG5K88s/J1GsfloqS Y5pgtmWGqnmaiKUSY+C+MkbjyxkbW7o4Tg/zvMgmuRaTzK8GiY59fuy+7qdMmqsEP0PQKASLR nQMyoSKWAiu7gpc/uohVMEcwdEsEUImXc4/MglgLLSIXAB1JnNef/r74pzWhNzbjKkJxZMNnG qOFowQq/RrhvHo2Ij6J6pp0oTtpYd1vVoL0WPrgev6e6Ea4CnwLlyBTDAVuHB9KfOoI/8RZSK 12b/jHZHy1Ka9s5uHSgxIxosBL/1ehxIRRuoDxDjmM7NO4jOhiWlQ02xMABnSuO/6WmZnt7na SLstzfNdfNvYzJxV/miGx7uT3D3PGd7CZWFXMoVftIFqQFG5Lz195J+g1FMoh+1TLb0zimVSi 8iPEIEs2fXCHsTPPPqpwXyhWyyMVX2qUO/wtPwzOjJjusq4yVWcAxM+XyzHbd16aO7u1K0thG s/JSGWJy592jIHDHxGKAHod1dzOupcN4BfUx3bTD1JQGcygSDxGK41faR5cjHEliUIyAFgd8O AYU5qTSw2JFJbU47KB9IdbwDEM/IwTL9KyhJRG4ajBNDfmS+n4G7WCemCrck2EnPlV5M= Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP I ran into this compile warning, which is the result of BUG_ON(1) not always leading to the compiler treating the code path as unreachable: include/linux/ceph/osdmap.h: In function 'ceph_can_shift_osds': include/linux/ceph/osdmap.h:62:1: error: control reaches end of non-void function [-Werror=return-type] Using BUG() here avoids the warning. Signed-off-by: Arnd Bergmann --- include/linux/ceph/osdmap.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/ceph/osdmap.h b/include/linux/ceph/osdmap.h index 9a9041784dcf..412906609954 100644 --- a/include/linux/ceph/osdmap.h +++ b/include/linux/ceph/osdmap.h @@ -57,7 +57,7 @@ static inline bool ceph_can_shift_osds(struct ceph_pg_pool_info *pool) case CEPH_POOL_TYPE_EC: return false; default: - BUG_ON(1); + BUG(); } }