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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <stable@xxxxxxxxxxxxxxx> know about it.


>From 74e3bb75315ce62a4567f2871276bab32802e8b4 Mon Sep 17 00:00:00 2001
From: Arnd Bergmann <arnd@xxxxxxxx>
Date: Wed, 25 Jan 2017 23:36:34 +0100
Subject: staging: lustre: ptlrpc: avoid warning on missing return

From: Arnd Bergmann <arnd@xxxxxxxx>

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@xxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

---
 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);
 


Patches currently in stable-queue which might be from arnd@xxxxxxxx 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



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]