From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arnd Bergmann Subject: [PATCH 4.10 102/129] staging: lustre: ptlrpc: avoid warning on missing return Date: Thu, 11 May 2017 16:12:30 +0200 Message-Id: <20170511141226.637372656@linuxfoundation.org> In-Reply-To: <20170511141220.039886885@linuxfoundation.org> References: <20170511141220.039886885@linuxfoundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: 4.10-stable review patch. If anyone has any objections, please let me know. ------------------ From: Arnd Bergmann 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 Signed-off-by: Greg Kroah-Hartman --- drivers/staging/lustre/lustre/ptlrpc/pack_generic.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/staging/lustre/lustre/ptlrpc/pack_generic.c +++ b/drivers/staging/lustre/lustre/ptlrpc/pack_generic.c @@ -469,6 +469,7 @@ int lustre_shrink_msg(struct lustre_msg default: LASSERTF(0, "incorrect message magic: %08x\n", msg->lm_magic); } + return 0; } EXPORT_SYMBOL(lustre_shrink_msg);