stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Patch "libceph: use BUG() instead of BUG_ON(1)" has been added to the 4.9-stable tree
@ 2017-03-12 19:52 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-03-12 19:52 UTC (permalink / raw)
  To: arnd, gregkh, idryomov, xypron.glpk; +Cc: stable, stable-commits


This is a note to let you know that I've just added the patch titled

    libceph: use BUG() instead of BUG_ON(1)

to the 4.9-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     libceph-use-bug-instead-of-bug_on-1.patch
and it can be found in the queue-4.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From d24cdcd3e40a6825135498e11c20c7976b9bf545 Mon Sep 17 00:00:00 2001
From: Arnd Bergmann <arnd@arndb.de>
Date: Mon, 16 Jan 2017 12:06:09 +0100
Subject: libceph: use BUG() instead of BUG_ON(1)

From: Arnd Bergmann <arnd@arndb.de>

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 <arnd@arndb.de>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 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
@@ -57,7 +57,7 @@ static inline bool ceph_can_shift_osds(s
 	case CEPH_POOL_TYPE_EC:
 		return false;
 	default:
-		BUG_ON(1);
+		BUG();
 	}
 }
 


Patches currently in stable-queue which might be from arnd@arndb.de are

queue-4.9/libceph-use-bug-instead-of-bug_on-1.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-03-12 19:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-12 19:52 Patch "libceph: use BUG() instead of BUG_ON(1)" has been added to the 4.9-stable tree gregkh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).