staging: lustre: ptlrpc: avoid warning on missing return
commit9576fcd1d93199441dcd1608b1729dabe1b68dab
authorArnd Bergmann <arnd@arndb.de>
Wed, 25 Jan 2017 22:36:34 +0000 (25 23:36 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 14 May 2017 12:08:28 +0000 (14 14:08 +0200)
tree2b88b1dea7206f982f2c7aed2a5a67e9a771b768
parente7d743d68744a8a2132bc94d7060d054f505a10e
staging: lustre: ptlrpc: avoid warning on missing return

commit 74e3bb75315ce62a4567f2871276bab32802e8b4 upstream.

The newly added function triggers a harmless warning:

drivers/staging/lustre/lustre/ptlrpc/pack_generic.c: In function 'lustre_shrink_msg':
drivers/staging/lustre/lustre/ptlrpc/pack_generic.c:472:1: error: control reaches end of non-void function [-Werror=return-type]

This probably happens because LASSERTF() contains an 'unlikely()' that
sometimes prevents gcc from analysing the control flow correctly.
Adding a return statement here seems harmless and lets us keep that
unlikely().

Fixes: 96049bd1ecd0 ("staging: lustre: ptlrpc: embed highest XID in each request")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/ptlrpc/pack_generic.c