lkml.org 
[lkml]   [2017]   [Apr]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 3.18 078/145] libceph: use BUG() instead of BUG_ON(1)
    Date
    3.18-stable review patch.  If anyone has any objections, please let me know.

    ------------------

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


    \
     
     \ /
      Last update: 2017-04-16 13:07    [W:4.309 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site