From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752277AbdCMJT3 (ORCPT ); Mon, 13 Mar 2017 05:19:29 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:39582 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751119AbdCMIlG (ORCPT ); Mon, 13 Mar 2017 04:41:06 -0400 From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arnd Bergmann , Ilya Dryomov , Heinrich Schuchardt Subject: [PATCH 4.4 34/36] libceph: use BUG() instead of BUG_ON(1) Date: Mon, 13 Mar 2017 16:39:34 +0800 Message-Id: <20170313083354.705959720@linuxfoundation.org> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20170313083352.550085638@linuxfoundation.org> References: <20170313083352.550085638@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Arnd Bergmann commit d24cdcd3e40a6825135498e11c20c7976b9bf545 upstream. 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 Signed-off-by: Ilya Dryomov Cc: Heinrich Schuchardt Signed-off-by: Greg Kroah-Hartman --- include/linux/ceph/osdmap.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/include/linux/ceph/osdmap.h +++ b/include/linux/ceph/osdmap.h @@ -49,7 +49,7 @@ static inline bool ceph_can_shift_osds(s case CEPH_POOL_TYPE_EC: return false; default: - BUG_ON(1); + BUG(); } }