--- /dev/null
+From arnd@arndb.de Fri May 5 10:45:31 2017
+From: Arnd Bergmann <arnd@arndb.de>
+Date: Fri, 5 May 2017 13:57:25 +0200
+Subject: gfs2: remove IS_ERR_VALUE abuse
+To: gregkh@linuxfoundation.org
+Cc: stable@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>
+Message-ID: <20170505115725.1424772-10-arnd@arndb.de>
+
+From: Arnd Bergmann <arnd@arndb.de>
+
+Picked from commit 287980e49ffc0f6d911601e7e352a812ed27768e ("remove lots
+of IS_ERR_VALUE abuses") upstream.
+
+The original fix that was backported to 3.18 already addressed the warning
+in some configurations, but not in others, leaving us with the same output:
+
+../fs/gfs2/dir.c: In function 'get_first_leaf':
+../fs/gfs2/dir.c:768:9: warning: 'leaf_no' may be used uninitialized in this function [-Wmaybe-uninitialized]
+ error = get_leaf(dip, leaf_no, bh_out);
+ ^
+../fs/gfs2/dir.c: In function 'dir_split_leaf.isra.20':
+../fs/gfs2/dir.c:987:8: warning: 'leaf_no' may be used uninitialized in this function [-Wmaybe-uninitialized]
+
+This takes the approach that we took in later versions in mainline,
+but does not backport the entire patch, as that would be too large
+for stable and IIRC caused regressions in other drivers.
+
+Fixes: 9d46d31e9aea ("gfs2: avoid uninitialized variable warning")
+Signed-off-by: Arnd Bergmann <arnd@arndb.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ fs/gfs2/dir.c | 15 +++++++++------
+ 1 file changed, 9 insertions(+), 6 deletions(-)
+
+--- a/fs/gfs2/dir.c
++++ b/fs/gfs2/dir.c
+@@ -749,12 +749,15 @@ static int get_leaf_nr(struct gfs2_inode
+ u64 *leaf_out)
+ {
+ __be64 *hash;
++ int error;
+
+ hash = gfs2_dir_get_hash_table(dip);
+- if (IS_ERR(hash))
+- return PTR_ERR(hash);
+- *leaf_out = be64_to_cpu(*(hash + index));
+- return 0;
++ error = PTR_ERR_OR_ZERO(hash);
++
++ if (!error)
++ *leaf_out = be64_to_cpu(*(hash + index));
++
++ return error;
+ }
+
+ static int get_first_leaf(struct gfs2_inode *dip, u32 index,
+@@ -764,7 +767,7 @@ static int get_first_leaf(struct gfs2_in
+ int error;
+
+ error = get_leaf_nr(dip, index, &leaf_no);
+- if (!IS_ERR_VALUE(error))
++ if (!error)
+ error = get_leaf(dip, leaf_no, bh_out);
+
+ return error;
+@@ -980,7 +983,7 @@ static int dir_split_leaf(struct inode *
+
+ index = name->hash >> (32 - dip->i_depth);
+ error = get_leaf_nr(dip, index, &leaf_no);
+- if (IS_ERR_VALUE(error))
++ if (error)
+ return error;
+
+ /* Get the old leaf block */
--- /dev/null
+From de4619937229378e81f95e99c9866acc8e207d34 Mon Sep 17 00:00:00 2001
+From: Masahiro Yamada <yamada.masahiro@socionext.com>
+Date: Fri, 13 Mar 2015 15:21:38 +0900
+Subject: kbuild: mergeconfig: fix "jobserver unavailable" warning
+
+From: Masahiro Yamada <yamada.masahiro@socionext.com>
+
+commit de4619937229378e81f95e99c9866acc8e207d34 upstream.
+
+If "make kvmconfig" is run with "-j" option, a warning message,
+"jobserver unavailable: using -j1. Add `+' to parent make rule.",
+is displayed.
+
+ $ make -s defconfig
+ *** Default configuration is based on 'x86_64_defconfig'
+ #
+ # configuration written to .config
+ #
+ $ make -j8 kvmconfig
+ Using ./.config as base
+ Merging ./arch/x86/configs/kvm_guest.config
+ [ snip ]
+ #
+ # merged configuration written to ./.config (needs make)
+ #
+ make[2]: warning: jobserver unavailable: using -j1. Add `+' to
+ parent make rule.
+ scripts/kconfig/conf --oldconfig Kconfig
+ [ snip ]
+ #
+ # configuration written to .config
+ #
+
+Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
+Reviewed-by: Josh Triplett <josh@joshtriplett.org>
+Reviewed-by: Darren Hart <dvhart@linux.intel.com>
+Signed-off-by: Michal Marek <mmarek@suse.cz>
+Signed-off-by: Arnd Bergmann <arnd@arndb.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ scripts/kconfig/Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/scripts/kconfig/Makefile
++++ b/scripts/kconfig/Makefile
+@@ -110,7 +110,7 @@ define mergeconfig
+ $(if $(wildcard $(objtree)/.config),, $(error You need an existing .config for this target))
+ $(if $(call configfiles,$(1)),, $(error No configuration exists for this target on this architecture))
+ $(Q)$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh -m -O $(objtree) $(objtree)/.config $(call configfiles,$(1))
+-$(Q)yes "" | $(MAKE) -f $(srctree)/Makefile oldconfig
+++$(Q)yes "" | $(MAKE) -f $(srctree)/Makefile oldconfig
+ endef
+
+ PHONY += kvmconfig
--- /dev/null
+From arnd@arndb.de Fri May 5 10:43:24 2017
+From: Arnd Bergmann <arnd@arndb.de>
+Date: Fri, 5 May 2017 13:57:22 +0200
+Subject: scsi: advansys: remove #warning message
+To: gregkh@linuxfoundation.org
+Cc: stable@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>, Hannes Reinecke <hare@suse.de>
+Message-ID: <20170505115725.1424772-7-arnd@arndb.de>
+
+From: Arnd Bergmann <arnd@arndb.de>
+
+The advansys driver was converted to the proper DMA API in linux-4.2, but
+the 3.18-stable kernel still warns about this:
+
+drivers/scsi/advansys.c:71:2: warning: #warning this driver is still not properly converted to the DMA API [-Wcpp]
+
+The warning clearly is not helpful in 3.18 any more, it just clutters up
+the build log. This removes the warning instead, and clarifies the
+comment above it.
+
+Cc: Hannes Reinecke <hare@suse.de>
+Signed-off-by: Arnd Bergmann <arnd@arndb.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/scsi/advansys.c | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+--- a/drivers/scsi/advansys.c
++++ b/drivers/scsi/advansys.c
+@@ -49,7 +49,7 @@
+ #include <scsi/scsi.h>
+ #include <scsi/scsi_host.h>
+
+-/* FIXME:
++/* Fixed in linux-4.2, not backported to 3.18:
+ *
+ * 1. Although all of the necessary command mapping places have the
+ * appropriate dma_map.. APIs, the driver still processes its internal
+@@ -68,7 +68,6 @@
+ * 7. advansys_info is not safe against multiple simultaneous callers
+ * 8. Add module_param to override ISA/VLB ioport array
+ */
+-#warning this driver is still not properly converted to the DMA API
+
+ /* Enable driver /proc statistics. */
+ #define ADVANSYS_STATS
+++ /dev/null
-From foo@baz Thu May 4 16:05:52 PDT 2017
-Date: Thu, 04 May 2017 16:05:52 -0700
-To: Greg KH <gregkh@linuxfoundation.org>
-From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-Subject: scsi: advansys.c: remove DMA build warning message
-
-From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
-The driver was finally converted to the "new" DMA api in newer kernels,
-but here in 3.18, it never will happen, so just shut the warning up for
-now as obviously no one is going to do anything about it.
-
-Cc: Arnd Bergmann <arnd@arndb.de>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
----
- drivers/scsi/advansys.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/drivers/scsi/advansys.c
-+++ b/drivers/scsi/advansys.c
-@@ -68,7 +68,7 @@
- * 7. advansys_info is not safe against multiple simultaneous callers
- * 8. Add module_param to override ISA/VLB ioport array
- */
--#warning this driver is still not properly converted to the DMA API
-+/*#warning this driver is still not properly converted to the DMA API */
-
- /* Enable driver /proc statistics. */
- #define ADVANSYS_STATS
mips-jz4740-fix-build-error-in-irq.h.patch
mips-elf2ecoff-ignore-pt_mips_abiflags-program-headers.patch
mips-elf2ecoff-fix-warning-due-to-dead-code.patch
-staging-unisys-fix-build-warning-in-periodic_work.patch
+staging-unisys-correctly-handle-return-value-from-queue_delayed_work.patch
message-i2o-fix-64bit-build-warnings.patch
-scsi-advansys.c-remove-dma-build-warning-message.patch
+scsi-advansys-remove-warning-message.patch
modpost-expand-pattern-matching-to-support-substring-matches.patch
modpost-don-t-emit-section-mismatch-warnings-for-compiler-optimizations.patch
cpumask_set_cpu_local_first-cpumask_local_spread-lament.patch
e1000e-fix-call-to-do_div-to-use-u64-arg.patch
+gfs2-remove-is_err_value-abuse.patch
+kbuild-mergeconfig-fix-jobserver-unavailable-warning.patch
-From foo@baz Thu May 4 15:57:02 PDT 2017
-Date: Thu, 04 May 2017 15:57:02 -0700
-To: Greg KH <gregkh@linuxfoundation.org>
-From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-Subject: staging: unisys: fix build warning in periodic_work
+From f84bd6267d623b49f196d54ba9edc41ff1c4d5e3 Mon Sep 17 00:00:00 2001
+From: Benjamin Romer <benjamin.romer@unisys.com>
+Date: Thu, 1 Oct 2015 11:52:30 -0400
+Subject: staging: unisys: correctly handle return value from queue_delayed_work()
-From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+From: Benjamin Romer <benjamin.romer@unisys.com>
-This code is long gone in mainline, so the build warning about trying to
-compare a bool to a value less than 0 isn't there. But fix it in 3.18
-to get the build warning list down to a small number.
+commit f84bd6267d623b49f196d54ba9edc41ff1c4d5e3 upstream.
-Cc: Arnd Bergmann <arnd@arndb.de>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Properly handle the return value from queue_delayed_work() - it's a
+bool, not an int, so using a less than comparison isn't appropriate.
+
+This mistake was found by David Binderman <dcb314@hotmail.com>.
+[arnd: the fix is from 4.4 but needed some minor fixup to adapt
+ to context changes]
+
+Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/staging/unisys/visorutil/periodic_work.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)