Skip to contentSkip to conversation

Patch "staging: lustre: ptlrpc: avoid warning on missing return" has been added to the 4.10-stable tree

PATCH [email protected] 1 participant 1 message May 11, 2017

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

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

staging: lustre: ptlrpc: avoid warning on missing return

to the 4.10-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:
staging-lustre-ptlrpc-avoid-warning-on-missing-return.patch
and it can be found in the queue-4.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From 74e3bb75315ce62a4567f2871276bab32802e8b4 Mon Sep 17 00:00:00 2001

From: Arnd Bergmann <[email protected]>
Date: Wed, 25 Jan 2017 23:36:34 +0100
Subject: staging: lustre: ptlrpc: avoid warning on missing return

From: Arnd Bergmann <[email protected]>

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")
---
 drivers/staging/lustre/lustre/ptlrpc/pack_generic.c |    1 +
 1 file changed, 1 insertion(+)
drivers/staging/lustre/lustre/ptlrpc/pack_generic.c +1 -0
@@ -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);
 

Patches currently in stable-queue which might be from [email protected] are

queue-4.10/staging-emxx_udc-remove-incorrect-__init-annotations.patch queue-4.10/scsi-smartpqi-fix-time-handling.patch queue-4.10/staging-lustre-ptlrpc-avoid-warning-on-missing-return.patch queue-4.10/leds-ktd2692-avoid-harmless-maybe-uninitialized-warning.patch queue-4.10/scsi-qedi-fix-build-error-without-debug_fs.patch queue-4.10/arm-pxa-ezx-fix-a910-camera-data.patch