All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 3.16-stable 00/87] build warnings and errors
@ 2017-05-05 19:46 Arnd Bergmann
  2017-05-05 19:46 ` [PATCH 3.16-stable 01/87] mm/init: fix zone boundary creation Arnd Bergmann
                   ` (87 more replies)
  0 siblings, 88 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:46 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: stable

Hi Ben,

As we are closing in on zero build failures for 3.18-stable, I've gone
through my earlier list for 3.16 as well, and filled some gaps from patches
I already backported or created for 3.18, plus a very small number that
are only needed on 3.16.

The series is a bit longer than I had hoped for, but it should get us
fairly close to a clean build on the architecture tested by kernelci
(ARM, ARM64, x86 and MIPS), and I can address the remaining warnings
once you have done a release or rc.

I hope sending the patches as a series makes your life easier than
a list of commit IDs. I can also provide a git tree for this huge
set if you prefer.

      Arnd

^ permalink raw reply	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 01/87] mm/init: fix zone boundary creation
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
@ 2017-05-05 19:46 ` Arnd Bergmann
  2017-05-05 19:46 ` [PATCH 3.16-stable 02/87] Disable "frame-address" warning Arnd Bergmann
                   ` (86 subsequent siblings)
  87 siblings, 0 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:46 UTC (permalink / raw)
  To: Ben Hutchings
  Cc: stable, Oliver O'Halloran, Anton Blanchard,
	Benjamin Herrenschmidt, Paul Mackerras, Mel Gorman,
	Andrew Morton, Linus Torvalds, Arnd Bergmann, Greg Kroah-Hartman

From: Oliver O'Halloran <oohall@gmail.com>

commit 90cae1fe1c3540f791d5b8e025985fa5e699b2bb upstream.

As a part of memory initialisation the architecture passes an array to
free_area_init_nodes() which specifies the max PFN of each memory zone.
This array is not necessarily monotonic (due to unused zones) so this
array is parsed to build monotonic lists of the min and max PFN for each
zone.  ZONE_MOVABLE is special cased here as its limits are managed by
the mm subsystem rather than the architecture.  Unfortunately, this
special casing is broken when ZONE_MOVABLE is the not the last zone in
the zone list.  The core of the issue is:

	if (i == ZONE_MOVABLE)
		continue;
	arch_zone_lowest_possible_pfn[i] =
		arch_zone_highest_possible_pfn[i-1];

As ZONE_MOVABLE is skipped the lowest_possible_pfn of the next zone will
be set to zero.  This patch fixes this bug by adding explicitly tracking
where the next zone should start rather than relying on the contents
arch_zone_highest_possible_pfn[].

Thie is low priority.  To get bitten by this you need to enable a zone
that appears after ZONE_MOVABLE in the zone_type enum.  As far as I can
tell this means running a kernel with ZONE_DEVICE or ZONE_CMA enabled,
so I can't see this affecting too many people.

I only noticed this because I've been fiddling with ZONE_DEVICE on
powerpc and 4.6 broke my test kernel.  This bug, in conjunction with the
changes in Taku Izumi's kernelcore=mirror patch (d91749c1dda71) and
powerpc being the odd architecture which initialises max_zone_pfn[] to
~0ul instead of 0 caused all of system memory to be placed into
ZONE_DEVICE at boot, followed a panic since device memory cannot be used
for kernel allocations.  I've already submitted a patch to fix the
powerpc specific bits, but I figured this should be fixed too.

Link: http://lkml.kernel.org/r/1462435033-15601-1-git-send-email-oohall@gmail.com
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Cc: Anton Blanchard <anton@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Mel Gorman <mgorman@techsingularity.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 mm/page_alloc.c | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 9ddea0200c94..7415fb62fa9d 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -5319,15 +5319,18 @@ void __init free_area_init_nodes(unsigned long *max_zone_pfn)
 				sizeof(arch_zone_lowest_possible_pfn));
 	memset(arch_zone_highest_possible_pfn, 0,
 				sizeof(arch_zone_highest_possible_pfn));
-	arch_zone_lowest_possible_pfn[0] = find_min_pfn_with_active_regions();
-	arch_zone_highest_possible_pfn[0] = max_zone_pfn[0];
-	for (i = 1; i < MAX_NR_ZONES; i++) {
+
+	start_pfn = find_min_pfn_with_active_regions();
+
+	for (i = 0; i < MAX_NR_ZONES; i++) {
 		if (i == ZONE_MOVABLE)
 			continue;
-		arch_zone_lowest_possible_pfn[i] =
-			arch_zone_highest_possible_pfn[i-1];
-		arch_zone_highest_possible_pfn[i] =
-			max(max_zone_pfn[i], arch_zone_lowest_possible_pfn[i]);
+
+		end_pfn = max(max_zone_pfn[i], start_pfn);
+		arch_zone_lowest_possible_pfn[i] = start_pfn;
+		arch_zone_highest_possible_pfn[i] = end_pfn;
+
+		start_pfn = end_pfn;
 	}
 	arch_zone_lowest_possible_pfn[ZONE_MOVABLE] = 0;
 	arch_zone_highest_possible_pfn[ZONE_MOVABLE] = 0;
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 02/87] Disable "frame-address" warning
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
  2017-05-05 19:46 ` [PATCH 3.16-stable 01/87] mm/init: fix zone boundary creation Arnd Bergmann
@ 2017-05-05 19:46 ` Arnd Bergmann
  2017-05-05 19:46 ` [PATCH 3.16-stable 03/87] modpost: expand pattern matching to support substring matches Arnd Bergmann
                   ` (85 subsequent siblings)
  87 siblings, 0 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:46 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: stable, Linus Torvalds, Greg Kroah-Hartman, Arnd Bergmann

From: Linus Torvalds <torvalds@linux-foundation.org>

commit 124a3d88fa20e1869fc229d7d8c740cc81944264 upstream.

Newer versions of gcc warn about the use of __builtin_return_address()
with a non-zero argument when "-Wall" is specified:

  kernel/trace/trace_irqsoff.c: In function ‘stop_critical_timings’:
  kernel/trace/trace_irqsoff.c:433:86: warning: calling ‘__builtin_return_address’ with a nonzero argument is unsafe [-Wframe-address]
     stop_critical_timing(CALLER_ADDR0, CALLER_ADDR1);
  [ .. repeats a few times for other similar cases .. ]

It is true that a non-zero argument is somewhat dangerous, and we do not
actually have very many uses of that in the kernel - but the ftrace code
does use it, and as Stephen Rostedt says:

 "We are well aware of the danger of using __builtin_return_address() of
  > 0.  In fact that's part of the reason for having the "thunk" code in
  x86 (See arch/x86/entry/thunk_{64,32}.S).  [..] it adds extra frames
  when tracking irqs off sections, to prevent __builtin_return_address()
  from accessing bad areas.  In fact the thunk_32.S states: 'Trampoline to
  trace irqs off.  (otherwise CALLER_ADDR1 might crash)'."

For now, __builtin_return_address() with a non-zero argument is the best
we can do, and the warning is not helpful and can end up making people
miss other warnings for real problems.

So disable the frame-address warning on compilers that need it.

Acked-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Makefile b/Makefile
index 28b1d5eed2c5..c3aa051dea75 100644
--- a/Makefile
+++ b/Makefile
@@ -616,6 +616,7 @@ all: vmlinux
 include $(srctree)/arch/$(SRCARCH)/Makefile
 
 KBUILD_CFLAGS	+= $(call cc-option,-fno-delete-null-pointer-checks,)
+KBUILD_CFLAGS	+= $(call cc-disable-warning,frame-address,)
 
 ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
 KBUILD_CFLAGS	+= -Os $(call cc-disable-warning,maybe-uninitialized,)
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 03/87] modpost: expand pattern matching to support substring matches
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
  2017-05-05 19:46 ` [PATCH 3.16-stable 01/87] mm/init: fix zone boundary creation Arnd Bergmann
  2017-05-05 19:46 ` [PATCH 3.16-stable 02/87] Disable "frame-address" warning Arnd Bergmann
@ 2017-05-05 19:46 ` Arnd Bergmann
  2017-05-05 19:46 ` [PATCH 3.16-stable 04/87] modpost: don't emit section mismatch warnings for compiler optimizations Arnd Bergmann
                   ` (84 subsequent siblings)
  87 siblings, 0 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:46 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: stable, Paul Gortmaker, Rusty Russell, Arnd Bergmann

From: Paul Gortmaker <paul.gortmaker@windriver.com>

Commit 09c20c032b0f753969ae778d9783d946f054d7fe upstream.

Currently the match() function supports a leading * to match any
prefix and a trailing * to match any suffix.  However there currently
is not a combination of both that can be used to target matches of
whole families of functions that share a common substring.

Here we expand the *foo and foo* match to also support *foo* with
the goal of targeting compiler generated symbol names that contain
strings like ".constprop." and ".isra."

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 scripts/mod/modpost.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 9d9c5b905b35..14e3f53ebf17 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -798,6 +798,7 @@ static int number_prefix(const char *sym)
  *   where the '1' can be any number including several digits.
  *   The $ syntax is for sections where ld append a dot number
  *   to make section name unique.
+ * "*foo*" will match a string that contains "foo"
  */
 static int match(const char *sym, const char * const pat[])
 {
@@ -806,8 +807,17 @@ static int match(const char *sym, const char * const pat[])
 		p = *pat++;
 		const char *endp = p + strlen(p) - 1;
 
+		/* "*foo*" */
+		if (*p == '*' && *endp == '*') {
+			char *here, *bare = strndup(p + 1, strlen(p) - 2);
+
+			here = strstr(sym, bare);
+			free(bare);
+			if (here != NULL)
+				return 1;
+		}
 		/* "*foo" */
-		if (*p == '*') {
+		else if (*p == '*') {
 			if (strrcmp(sym, p + 1) == 0)
 				return 1;
 		}
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 04/87] modpost: don't emit section mismatch warnings for compiler optimizations
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
                   ` (2 preceding siblings ...)
  2017-05-05 19:46 ` [PATCH 3.16-stable 03/87] modpost: expand pattern matching to support substring matches Arnd Bergmann
@ 2017-05-05 19:46 ` Arnd Bergmann
  2017-05-05 19:46 ` [PATCH 3.16-stable 05/87] module: fix types of device tables aliases Arnd Bergmann
                   ` (83 subsequent siblings)
  87 siblings, 0 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:46 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: stable, Paul Gortmaker, Rusty Russell, Arnd Bergmann

From: Paul Gortmaker <paul.gortmaker@windriver.com>

Commit 4a3893d069b788f3570c19c12d9e986e8e15870f upstream.

Currently an allyesconfig build [gcc-4.9.1] can generate the following:

   WARNING: vmlinux.o(.text.unlikely+0x3864): Section mismatch in
   reference from the function cpumask_empty.constprop.3() to the
   variable .init.data:nmi_ipi_mask

which comes from the cpumask_empty usage in arch/x86/kernel/nmi_selftest.c.

Normally we would not see a symbol entry for cpumask_empty since it is:

	static inline bool cpumask_empty(const struct cpumask *srcp)

however in this case, the variant of the symbol gets emitted when GCC does
constant propagation optimization.

Fix things up so that any locally optimized constprop variants don't warn
when accessing variables that live in the __init sections.

[arnd: adapted text_sections definition to 3.18]

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 scripts/mod/modpost.c | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 14e3f53ebf17..2241d036b63a 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -930,6 +930,10 @@ static const char *init_sections[] = { ALL_INIT_SECTIONS, NULL };
 static const char *init_exit_sections[] =
 	{ALL_INIT_SECTIONS, ALL_EXIT_SECTIONS, NULL };
 
+/* all text sections */
+static const char *const text_sections[] = { ALL_INIT_TEXT_SECTIONS,
+				ALL_EXIT_TEXT_SECTIONS, TEXT_SECTIONS, NULL };
+
 /* data section */
 static const char *data_sections[] = { DATA_SECTIONS, NULL };
 
@@ -948,6 +952,7 @@ static const char *data_sections[] = { DATA_SECTIONS, NULL };
 static const char *head_sections[] = { ".head.text*", NULL };
 static const char *linker_symbols[] =
 	{ "__init_begin", "_sinittext", "_einittext", NULL };
+static const char *const optim_symbols[] = { "*.constprop.*", NULL };
 
 enum mismatch {
 	TEXT_TO_ANY_INIT,
@@ -1105,6 +1110,17 @@ static const struct sectioncheck *section_mismatch(
  *   This pattern is identified by
  *   refsymname = __init_begin, _sinittext, _einittext
  *
+ * Pattern 5:
+ *   GCC may optimize static inlines when fed constant arg(s) resulting
+ *   in functions like cpumask_empty() -- generating an associated symbol
+ *   cpumask_empty.constprop.3 that appears in the audit.  If the const that
+ *   is passed in comes from __init, like say nmi_ipi_mask, we get a
+ *   meaningless section warning.  May need to add isra symbols too...
+ *   This pattern is identified by
+ *   tosec   = init section
+ *   fromsec = text section
+ *   refsymname = *.constprop.*
+ *
  **/
 static int secref_whitelist(const struct sectioncheck *mismatch,
 			    const char *fromsec, const char *fromsym,
@@ -1137,6 +1153,12 @@ static int secref_whitelist(const struct sectioncheck *mismatch,
 	if (match(tosym, linker_symbols))
 		return 0;
 
+	/* Check for pattern 5 */
+	if (match(fromsec, text_sections) &&
+	    match(tosec, init_sections) &&
+	    match(fromsym, optim_symbols))
+		return 0;
+
 	return 1;
 }
 
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 05/87] module: fix types of device tables aliases
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
                   ` (3 preceding siblings ...)
  2017-05-05 19:46 ` [PATCH 3.16-stable 04/87] modpost: don't emit section mismatch warnings for compiler optimizations Arnd Bergmann
@ 2017-05-05 19:46 ` Arnd Bergmann
  2017-05-05 19:46 ` [PATCH 3.16-stable 06/87] MODULE_DEVICE_TABLE: fix some callsites Arnd Bergmann
                   ` (82 subsequent siblings)
  87 siblings, 0 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:46 UTC (permalink / raw)
  To: Ben Hutchings
  Cc: stable, Andrey Ryabinin, Dmitry Vyukov, Konstantin Serebryany,
	Dmitry Chernenkov, Andrey Konovalov, Yuri Gribov,
	Konstantin Khlebnikov, Sasha Levin, Christoph Lameter,
	Joonsoo Kim, Dave Hansen, Andi Kleen, Ingo Molnar,
	Thomas Gleixner, H. Peter Anvin, Pekka Enberg, David Rientjes,
	Andrew Morton, Linus Torvalds, Greg Kroah-Hartman, Arnd Bergmann

From: Andrey Ryabinin <a.ryabinin@samsung.com>

commit 6301939d97d079f0d3dbe71e750f4daf5d39fc33 upstream.

MODULE_DEVICE_TABLE() macro used to create aliases to device tables.
Normally alias should have the same type as aliased symbol.

Device tables are arrays, so they have 'struct type##_device_id[x]'
types. Alias created by MODULE_DEVICE_TABLE() will have non-array type -
	'struct type##_device_id'.

This inconsistency confuses compiler, it could make a wrong assumption
about variable's size which leads KASan to produce a false positive report
about out of bounds access.

For every global variable compiler calls __asan_register_globals() passing
information about global variable (address, size, size with redzone, name
...) __asan_register_globals() poison symbols redzone to detect possible
out of bounds accesses.

When symbol has an alias __asan_register_globals() will be called as for
symbol so for alias.  Compiler determines size of variable by size of
variable's type.  Alias and symbol have the same address, so if alias have
the wrong size part of memory that actually belongs to the symbol could be
poisoned as redzone of alias symbol.

By fixing type of alias symbol we will fix size of it, so
__asan_register_globals() will not poison valid memory.

Signed-off-by: Andrey Ryabinin <a.ryabinin@samsung.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Konstantin Serebryany <kcc@google.com>
Cc: Dmitry Chernenkov <dmitryc@google.com>
Signed-off-by: Andrey Konovalov <adech.fo@gmail.com>
Cc: Yuri Gribov <tetra2005@gmail.com>
Cc: Konstantin Khlebnikov <koct9i@gmail.com>
Cc: Sasha Levin <sasha.levin@oracle.com>
Cc: Christoph Lameter <cl@linux.com>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Dave Hansen <dave.hansen@intel.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Christoph Lameter <cl@linux.com>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 include/linux/module.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/module.h b/include/linux/module.h
index f520a767c86c..ac1e65afc5a1 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -135,7 +135,7 @@ void trim_init_extable(struct module *m);
 #ifdef MODULE
 /* Creates an alias so file2alias.c can find device table. */
 #define MODULE_DEVICE_TABLE(type, name)					\
-  extern const struct type##_device_id __mod_##type##__##name##_device_table \
+extern const typeof(name) __mod_##type##__##name##_device_table		\
   __attribute__ ((unused, alias(__stringify(name))))
 #else  /* !MODULE */
 #define MODULE_DEVICE_TABLE(type, name)
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 06/87] MODULE_DEVICE_TABLE: fix some callsites
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
                   ` (4 preceding siblings ...)
  2017-05-05 19:46 ` [PATCH 3.16-stable 05/87] module: fix types of device tables aliases Arnd Bergmann
@ 2017-05-05 19:46 ` Arnd Bergmann
  2017-05-05 19:46 ` [PATCH 3.16-stable 07/87] mm/hugetlb: improve locking in dissolve_free_huge_pages() Arnd Bergmann
                   ` (81 subsequent siblings)
  87 siblings, 0 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:46 UTC (permalink / raw)
  To: Ben Hutchings
  Cc: stable, Andrew Morton, James Bottomley, Andrey Ryabinin,
	David Miller, Hans Verkuil, Linus Torvalds, Greg Kroah-Hartman,
	Arnd Bergmann

From: Andrew Morton <akpm@linux-foundation.org>

commit 0f989f749b51ec1fd94bb5a42f8ad10c8b9f73cb upstream.

The patch "module: fix types of device tables aliases" newly requires that
invocations of

MODULE_DEVICE_TABLE(type, name);

come *after* the definition of `name'.  That is reasonable, but some
drivers weren't doing this.  Fix them.

Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Andrey Ryabinin <a.ryabinin@samsung.com>
Cc: David Miller <davem@davemloft.net>
Cc: Hans Verkuil <hverkuil@xs4all.nl>
Acked-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 Documentation/video4linux/v4l2-pci-skeleton.c | 2 +-
 drivers/net/ethernet/emulex/benet/be_main.c   | 1 -
 drivers/scsi/be2iscsi/be_main.c               | 1 -
 3 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/Documentation/video4linux/v4l2-pci-skeleton.c b/Documentation/video4linux/v4l2-pci-skeleton.c
index 46904fe49609..8c3d3d625c6c 100644
--- a/Documentation/video4linux/v4l2-pci-skeleton.c
+++ b/Documentation/video4linux/v4l2-pci-skeleton.c
@@ -42,7 +42,6 @@
 MODULE_DESCRIPTION("V4L2 PCI Skeleton Driver");
 MODULE_AUTHOR("Hans Verkuil");
 MODULE_LICENSE("GPL v2");
-MODULE_DEVICE_TABLE(pci, skeleton_pci_tbl);
 
 /**
  * struct skeleton - All internal data for one instance of device
@@ -95,6 +94,7 @@ static const struct pci_device_id skeleton_pci_tbl[] = {
 	/* { PCI_DEVICE(PCI_VENDOR_ID_, PCI_DEVICE_ID_) }, */
 	{ 0, }
 };
+MODULE_DEVICE_TABLE(pci, skeleton_pci_tbl);
 
 /*
  * HDTV: this structure has the capabilities of the HDTV receiver.
diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c
index 1e187fb760f8..7329ab75afb5 100644
--- a/drivers/net/ethernet/emulex/benet/be_main.c
+++ b/drivers/net/ethernet/emulex/benet/be_main.c
@@ -26,7 +26,6 @@
 #include <net/vxlan.h>
 
 MODULE_VERSION(DRV_VER);
-MODULE_DEVICE_TABLE(pci, be_dev_ids);
 MODULE_DESCRIPTION(DRV_DESC " " DRV_VER);
 MODULE_AUTHOR("Emulex Corporation");
 MODULE_LICENSE("GPL");
diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c
index 803fd64d0966..1075b7001e4a 100644
--- a/drivers/scsi/be2iscsi/be_main.c
+++ b/drivers/scsi/be2iscsi/be_main.c
@@ -48,7 +48,6 @@ static unsigned int be_iopoll_budget = 10;
 static unsigned int be_max_phys_size = 64;
 static unsigned int enable_msix = 1;
 
-MODULE_DEVICE_TABLE(pci, beiscsi_pci_id_table);
 MODULE_DESCRIPTION(DRV_DESC " " BUILD_STR);
 MODULE_VERSION(BUILD_STR);
 MODULE_AUTHOR("Emulex Corporation");
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 07/87] mm/hugetlb: improve locking in dissolve_free_huge_pages()
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
                   ` (5 preceding siblings ...)
  2017-05-05 19:46 ` [PATCH 3.16-stable 06/87] MODULE_DEVICE_TABLE: fix some callsites Arnd Bergmann
@ 2017-05-05 19:46 ` Arnd Bergmann
  2017-05-05 19:46 ` [PATCH 3.16-stable 08/87] cpumask_set_cpu_local_first => cpumask_local_spread, lament Arnd Bergmann
                   ` (80 subsequent siblings)
  87 siblings, 0 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:46 UTC (permalink / raw)
  To: Ben Hutchings
  Cc: stable, Gerald Schaefer, Kirill A . Shutemov, Vlastimil Babka,
	Mike Kravetz, Aneesh Kumar K . V, Martin Schwidefsky,
	Heiko Carstens, Rui Teng, Dave Hansen, Andrew Morton,
	Linus Torvalds, Arnd Bergmann

From: Gerald Schaefer <gerald.schaefer@de.ibm.com>

Commit 7b21d5b87b550c5cdaca73bd37c976cc1ab85398 upstream.

For every pfn aligned to minimum_order, dissolve_free_huge_pages() will
call dissolve_free_huge_page() which takes the hugetlb spinlock, even if
the page is not huge at all or a hugepage that is in-use.

Improve this by doing the PageHuge() and page_count() checks already in
dissolve_free_huge_pages() before calling dissolve_free_huge_page().  In
dissolve_free_huge_page(), when holding the spinlock, those checks need
to be revalidated.

Link: http://lkml.kernel.org/r/20160926172811.94033-4-gerald.schaefer@de.ibm.com
Signed-off-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Acked-by: Michal Hocko <mhocko@suse.com>
Acked-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Cc: "Kirill A . Shutemov" <kirill.shutemov@linux.intel.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Mike Kravetz <mike.kravetz@oracle.com>
Cc: "Aneesh Kumar K . V" <aneesh.kumar@linux.vnet.ibm.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Rui Teng <rui.teng@linux.vnet.ibm.com>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 mm/hugetlb.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index 467d04b62948..c892a6b51e8e 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -1105,14 +1105,20 @@ out:
 int dissolve_free_huge_pages(unsigned long start_pfn, unsigned long end_pfn)
 {
 	unsigned long pfn;
+	struct page *page;
 	int rc = 0;
 
 	if (!hugepages_supported())
 		return rc;
 
-	for (pfn = start_pfn; pfn < end_pfn; pfn += 1 << minimum_order)
-		if (rc = dissolve_free_huge_page(pfn_to_page(pfn)))
-			break;
+	for (pfn = start_pfn; pfn < end_pfn; pfn += 1 << minimum_order) {
+		page = pfn_to_page(pfn);
+		if (PageHuge(page) && !page_count(page)) {
+			rc = dissolve_free_huge_page(page);
+			if (rc)
+				break;
+		}
+	}
 
 	return rc;
 }
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 08/87] cpumask_set_cpu_local_first => cpumask_local_spread, lament
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
                   ` (6 preceding siblings ...)
  2017-05-05 19:46 ` [PATCH 3.16-stable 07/87] mm/hugetlb: improve locking in dissolve_free_huge_pages() Arnd Bergmann
@ 2017-05-05 19:46 ` Arnd Bergmann
  2017-05-05 19:46 ` [PATCH 3.16-stable 09/87] gfs2: avoid uninitialized variable warning Arnd Bergmann
                   ` (79 subsequent siblings)
  87 siblings, 0 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:46 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: stable, Rusty Russell, Arnd Bergmann

From: Rusty Russell <rusty@rustcorp.com.au>

Commit f36963c9d3f6f415732710da3acdd8608a9fa0e upstream.

da91309e0a7e (cpumask: Utility function to set n'th cpu...) created a
genuinely weird function.  I never saw it before, it went through DaveM.
(He only does this to make us other maintainers feel better about our own
mistakes.)

cpumask_set_cpu_local_first's purpose is say "I need to spread things
across N online cpus, choose the ones on this numa node first"; you call
it in a loop.

It can fail.  One of the two callers ignores this, the other aborts and
fails the device open.

It can fail in two ways: allocating the off-stack cpumask, or through a
convoluted codepath which AFAICT can only occur if cpu_online_mask
changes.  Which shouldn't happen, because if cpu_online_mask can change
while you call this, it could return a now-offline cpu anyway.

It contains a nonsensical test "!cpumask_of_node(numa_node)".  This was
drawn to my attention by Geert, who said this causes a warning on Sparc.
It sets a single bit in a cpumask instead of returning a cpu number,
because that's what the callers want.

It could be made more efficient by passing the previous cpu rather than
an index, but that would be more invasive to the callers.

Fixes: da91309e0a7e8966d916a74cce42ed170fde06bf
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (then rebased)
Tested-by: Amir Vadai <amirv@mellanox.com>
Acked-by: Amir Vadai <amirv@mellanox.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 10 ++--
 drivers/net/ethernet/mellanox/mlx4/en_tx.c     |  6 +--
 include/linux/cpumask.h                        |  6 +--
 lib/cpumask.c                                  | 74 +++++++++-----------------
 4 files changed, 34 insertions(+), 62 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
index 6bf4ea400643..f9056192e81c 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
@@ -1535,17 +1535,13 @@ static int mlx4_en_init_affinity_hint(struct mlx4_en_priv *priv, int ring_idx)
 {
 	struct mlx4_en_rx_ring *ring = priv->rx_ring[ring_idx];
 	int numa_node = priv->mdev->dev->numa_node;
-	int ret = 0;
 
 	if (!zalloc_cpumask_var(&ring->affinity_mask, GFP_KERNEL))
 		return -ENOMEM;
 
-	ret = cpumask_set_cpu_local_first(ring_idx, numa_node,
-					  ring->affinity_mask);
-	if (ret)
-		free_cpumask_var(ring->affinity_mask);
-
-	return ret;
+	cpumask_set_cpu(cpumask_local_spread(ring_idx, numa_node),
+			ring->affinity_mask);
+	return 0;
 }
 
 static void mlx4_en_free_affinity_hint(struct mlx4_en_priv *priv, int ring_idx)
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_tx.c b/drivers/net/ethernet/mellanox/mlx4/en_tx.c
index c5be6d890e94..a3d86e31f34c 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_tx.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_tx.c
@@ -133,9 +133,9 @@ int mlx4_en_create_tx_ring(struct mlx4_en_priv *priv,
 	ring->queue_index = queue_index;
 
 	if (queue_index < priv->num_tx_rings_p_up)
-		cpumask_set_cpu_local_first(queue_index,
-					    priv->mdev->dev->numa_node,
-					    &ring->affinity_mask);
+		cpumask_set_cpu(cpumask_local_spread(queue_index,
+						     priv->mdev->dev->numa_node),
+				&ring->affinity_mask);
 
 	*pring = ring;
 	return 0;
diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h
index 2997af6d2ccd..f7a172e31aec 100644
--- a/include/linux/cpumask.h
+++ b/include/linux/cpumask.h
@@ -142,10 +142,8 @@ static inline unsigned int cpumask_any_but(const struct cpumask *mask,
 	return 1;
 }
 
-static inline int cpumask_set_cpu_local_first(int i, int numa_node, cpumask_t *dstp)
+static inline unsigned int cpumask_local_spread(unsigned int i, int node)
 {
-	set_bit(0, cpumask_bits(dstp));
-
 	return 0;
 }
 
@@ -199,7 +197,7 @@ static inline unsigned int cpumask_next_zero(int n, const struct cpumask *srcp)
 
 int cpumask_next_and(int n, const struct cpumask *, const struct cpumask *);
 int cpumask_any_but(const struct cpumask *mask, unsigned int cpu);
-int cpumask_set_cpu_local_first(int i, int numa_node, cpumask_t *dstp);
+unsigned int cpumask_local_spread(unsigned int i, int node);
 
 /**
  * for_each_cpu - iterate over every cpu in a mask
diff --git a/lib/cpumask.c b/lib/cpumask.c
index b6513a9f2892..c0bd0df01e3d 100644
--- a/lib/cpumask.c
+++ b/lib/cpumask.c
@@ -166,64 +166,42 @@ void __init free_bootmem_cpumask_var(cpumask_var_t mask)
 #endif
 
 /**
- * cpumask_set_cpu_local_first - set i'th cpu with local numa cpu's first
- *
+ * cpumask_local_spread - select the i'th cpu with local numa cpu's first
  * @i: index number
- * @numa_node: local numa_node
- * @dstp: cpumask with the relevant cpu bit set according to the policy
+ * @node: local numa_node
  *
- * This function sets the cpumask according to a numa aware policy.
- * cpumask could be used as an affinity hint for the IRQ related to a
- * queue. When the policy is to spread queues across cores - local cores
- * first.
+ * This function selects an online CPU according to a numa aware policy;
+ * local cpus are returned first, followed by non-local ones, then it
+ * wraps around.
  *
- * Returns 0 on success, -ENOMEM for no memory, and -EAGAIN when failed to set
- * the cpu bit and need to re-call the function.
+ * It's not very efficient, but useful for setup.
  */
-int cpumask_set_cpu_local_first(int i, int numa_node, cpumask_t *dstp)
+unsigned int cpumask_local_spread(unsigned int i, int node)
 {
-	cpumask_var_t mask;
 	int cpu;
-	int ret = 0;
-
-	if (!zalloc_cpumask_var(&mask, GFP_KERNEL))
-		return -ENOMEM;
 
+	/* Wrap: we always want a cpu. */
 	i %= num_online_cpus();
 
-	if (numa_node == -1 || !cpumask_of_node(numa_node)) {
-		/* Use all online cpu's for non numa aware system */
-		cpumask_copy(mask, cpu_online_mask);
+	if (node == -1) {
+		for_each_cpu(cpu, cpu_online_mask)
+			if (i-- == 0)
+				return cpu;
 	} else {
-		int n;
-
-		cpumask_and(mask,
-			    cpumask_of_node(numa_node), cpu_online_mask);
-
-		n = cpumask_weight(mask);
-		if (i >= n) {
-			i -= n;
-
-			/* If index > number of local cpu's, mask out local
-			 * cpu's
-			 */
-			cpumask_andnot(mask, cpu_online_mask, mask);
+		/* NUMA first. */
+		for_each_cpu_and(cpu, cpumask_of_node(node), cpu_online_mask)
+			if (i-- == 0)
+				return cpu;
+
+		for_each_cpu(cpu, cpu_online_mask) {
+			/* Skip NUMA nodes, done above. */
+			if (cpumask_test_cpu(cpu, cpumask_of_node(node)))
+				continue;
+
+			if (i-- == 0)
+				return cpu;
 		}
 	}
-
-	for_each_cpu(cpu, mask) {
-		if (--i < 0)
-			goto out;
-	}
-
-	ret = -EAGAIN;
-
-out:
-	free_cpumask_var(mask);
-
-	if (!ret)
-		cpumask_set_cpu(cpu, dstp);
-
-	return ret;
+	BUG();
 }
-EXPORT_SYMBOL(cpumask_set_cpu_local_first);
+EXPORT_SYMBOL(cpumask_local_spread);
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 09/87] gfs2: avoid uninitialized variable warning
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
                   ` (7 preceding siblings ...)
  2017-05-05 19:46 ` [PATCH 3.16-stable 08/87] cpumask_set_cpu_local_first => cpumask_local_spread, lament Arnd Bergmann
@ 2017-05-05 19:46 ` Arnd Bergmann
  2017-05-05 19:46 ` [PATCH 3.16-stable 10/87] gfs2: remove IS_ERR_VALUE abuse Arnd Bergmann
                   ` (78 subsequent siblings)
  87 siblings, 0 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:46 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: stable, Arnd Bergmann, Bob Peterson, Greg Kroah-Hartman

commit 67893f12e5374bbcaaffbc6e570acbc2714ea884 upstream.

We get a bogus warning about a potential uninitialized variable
use in gfs2, because the compiler does not figure out that we
never use the leaf number if get_leaf_nr() returns an error:

fs/gfs2/dir.c: In function 'get_first_leaf':
fs/gfs2/dir.c:802:9: warning: 'leaf_no' may be used uninitialized in this function [-Wmaybe-uninitialized]
fs/gfs2/dir.c: In function 'dir_split_leaf':
fs/gfs2/dir.c:1021:8: warning: 'leaf_no' may be used uninitialized in this function [-Wmaybe-uninitialized]

Changing the 'if (!error)' to 'if (!IS_ERR_VALUE(error))' is
sufficient to let gcc understand that this is exactly the same
condition as in IS_ERR() so it can optimize the code path enough
to understand it.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 fs/gfs2/dir.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/gfs2/dir.c b/fs/gfs2/dir.c
index 5d4261ff5d23..9291cf5e7439 100644
--- a/fs/gfs2/dir.c
+++ b/fs/gfs2/dir.c
@@ -764,7 +764,7 @@ static int get_first_leaf(struct gfs2_inode *dip, u32 index,
 	int error;
 
 	error = get_leaf_nr(dip, index, &leaf_no);
-	if (!error)
+	if (!IS_ERR_VALUE(error))
 		error = get_leaf(dip, leaf_no, bh_out);
 
 	return error;
@@ -980,7 +980,7 @@ static int dir_split_leaf(struct inode *inode, const struct qstr *name)
 
 	index = name->hash >> (32 - dip->i_depth);
 	error = get_leaf_nr(dip, index, &leaf_no);
-	if (error)
+	if (IS_ERR_VALUE(error))
 		return error;
 
 	/*  Get the old leaf block  */
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 10/87] gfs2: remove IS_ERR_VALUE abuse
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
                   ` (8 preceding siblings ...)
  2017-05-05 19:46 ` [PATCH 3.16-stable 09/87] gfs2: avoid uninitialized variable warning Arnd Bergmann
@ 2017-05-05 19:46 ` Arnd Bergmann
  2017-05-05 19:46 ` [PATCH 3.16-stable 11/87] iio: fix printk format string warning Arnd Bergmann
                   ` (77 subsequent siblings)
  87 siblings, 0 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:46 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: stable, Arnd Bergmann

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>
---
 fs/gfs2/dir.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/fs/gfs2/dir.c b/fs/gfs2/dir.c
index 9291cf5e7439..6810c8772eb1 100644
--- a/fs/gfs2/dir.c
+++ b/fs/gfs2/dir.c
@@ -749,12 +749,15 @@ static int get_leaf_nr(struct gfs2_inode *dip, u32 index,
 		       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,
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 11/87] iio: fix printk format string warning
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
                   ` (9 preceding siblings ...)
  2017-05-05 19:46 ` [PATCH 3.16-stable 10/87] gfs2: remove IS_ERR_VALUE abuse Arnd Bergmann
@ 2017-05-05 19:46 ` Arnd Bergmann
  2017-11-06 16:55   ` Ben Hutchings
  2017-05-05 19:46 ` [PATCH 3.16-stable 12/87] iio: adc: fix building on 64-bit Arnd Bergmann
                   ` (76 subsequent siblings)
  87 siblings, 1 reply; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:46 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: stable, Arnd Bergmann

On 3.16, we get this warning:

drivers/iio/industrialio-core.c: In function 'iio_format_value':
drivers/iio/industrialio-core.c:408:30: error: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'long int' [-Werror=format=]

Upstream commit 8f57e4d930d4 ("include/linux/kernel.h: change abs() macro
so it uses consistent return type") addressed this in a more verbose
way, but here we can simply add a type cast to shut up the warning.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/iio/industrialio-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c
index 230cbdda6ce1..669c27d93049 100644
--- a/drivers/iio/industrialio-core.c
+++ b/drivers/iio/industrialio-core.c
@@ -405,7 +405,7 @@ ssize_t iio_format_value(char *buf, unsigned int type, int size, int *vals)
 	case IIO_VAL_FRACTIONAL:
 		tmp = div_s64((s64)vals[0] * 1000000000LL, vals[1]);
 		vals[0] = (int)div_s64_rem(tmp, 1000000000, &vals[1]);
-		return sprintf(buf, "%d.%09u\n", vals[0], abs(vals[1]));
+		return sprintf(buf, "%d.%09ld\n", vals[0], abs(vals[1]));
 	case IIO_VAL_FRACTIONAL_LOG2:
 		tmp = (s64)vals[0] * 1000000000LL >> vals[1];
 		vals[1] = do_div(tmp, 1000000000LL);
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 12/87] iio: adc: fix building on 64-bit
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
                   ` (10 preceding siblings ...)
  2017-05-05 19:46 ` [PATCH 3.16-stable 11/87] iio: fix printk format string warning Arnd Bergmann
@ 2017-05-05 19:46 ` Arnd Bergmann
  2017-05-05 19:46 ` [PATCH 3.16-stable 13/87] infiniband: mlx5: avoid a compile-time warning Arnd Bergmann
                   ` (75 subsequent siblings)
  87 siblings, 0 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:46 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: stable, Arnd Bergmann

On the 3.16 kernel, we get a harmless warning:

drivers/iio/adc/exynos_adc.c: In function 'exynos_adc_get_version':
drivers/iio/adc/exynos_adc.c:112:9: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]

Upstream commit e49d99e0ecc8 ("iio: adc: exynos_adc: Add exynos_adc_data
structure to improve readability") in 3.17 removed the function, so
we can't backport a fix from upstream, but changing the cast to
use uintptr_t is the obvious fix.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/iio/adc/exynos_adc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iio/adc/exynos_adc.c b/drivers/iio/adc/exynos_adc.c
index 010578f1d762..bb7c50cd3f72 100644
--- a/drivers/iio/adc/exynos_adc.c
+++ b/drivers/iio/adc/exynos_adc.c
@@ -109,7 +109,7 @@ static inline unsigned int exynos_adc_get_version(struct platform_device *pdev)
 	const struct of_device_id *match;
 
 	match = of_match_node(exynos_adc_match, pdev->dev.of_node);
-	return (unsigned int)match->data;
+	return (uintptr_t)match->data;
 }
 
 static void exynos_adc_hw_init(struct exynos_adc *info)
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 13/87] infiniband: mlx5: avoid a compile-time warning
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
                   ` (11 preceding siblings ...)
  2017-05-05 19:46 ` [PATCH 3.16-stable 12/87] iio: adc: fix building on 64-bit Arnd Bergmann
@ 2017-05-05 19:46 ` Arnd Bergmann
  2017-05-05 19:46 ` [PATCH 3.16-stable 14/87] power/reset: xgene-reset: Fix prototype of xgene_restart() Arnd Bergmann
                   ` (74 subsequent siblings)
  87 siblings, 0 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:46 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: stable, Arnd Bergmann, David S . Miller

Commit 7835bfb5261501590a508b3de3379e2231cb4853 upstream.

The return type of find_first_bit() is architecture specific,
on ARM it is 'unsigned int', while the asm-generic code used
on x86 and a lot of other architectures returns 'unsigned long'.

When building the mlx5 driver on ARM, we get a warning about
this:

infiniband/hw/mlx5/mem.c: In function 'mlx5_ib_cont_pages':
infiniband/hw/mlx5/mem.c:84:143: warning: comparison of distinct pointer types lacks a cast
     m = min(m, find_first_bit(&tmp, sizeof(tmp)));

This patch changes the driver to use min_t to make it behave
the same way on all architectures.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Eli Cohen <eli@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/infiniband/hw/mlx5/mem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/infiniband/hw/mlx5/mem.c b/drivers/infiniband/hw/mlx5/mem.c
index 8499aec94db6..deff377934ff 100644
--- a/drivers/infiniband/hw/mlx5/mem.c
+++ b/drivers/infiniband/hw/mlx5/mem.c
@@ -68,7 +68,7 @@ void mlx5_ib_cont_pages(struct ib_umem *umem, u64 addr, int *count, int *shift,
 		for (k = 0; k < len; k++) {
 			if (!(i & mask)) {
 				tmp = (unsigned long)pfn;
-				m = min(m, find_first_bit(&tmp, sizeof(tmp)));
+				m = min_t(unsigned long, m, find_first_bit(&tmp, sizeof(tmp)));
 				skip = 1 << m;
 				mask = skip - 1;
 				base = pfn;
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 14/87] power/reset: xgene-reset: Fix prototype of xgene_restart()
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
                   ` (12 preceding siblings ...)
  2017-05-05 19:46 ` [PATCH 3.16-stable 13/87] infiniband: mlx5: avoid a compile-time warning Arnd Bergmann
@ 2017-05-05 19:46 ` Arnd Bergmann
  2017-05-05 19:46 ` [PATCH 3.16-stable 15/87] mfd: arizona: Rid data size incompatibility warn when building for 64bit Arnd Bergmann
                   ` (73 subsequent siblings)
  87 siblings, 0 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:46 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: stable, Mark Brown, Sebastian Reichel, Arnd Bergmann

From: Mark Brown <broonie@linaro.org>

Commit 777ad00725f7c8629db4640b25e19dc9665bb62f upstream.

The xgene-reset driver uses xgene_restart() as arm_pm_restart() but that
function should take an enum reset_type as the first argument rather than
a char. Fix this; the paramter is not referenced in the implementation.

Signed-off-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/power/reset/xgene-reboot.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/power/reset/xgene-reboot.c b/drivers/power/reset/xgene-reboot.c
index ecd55f81b9d1..6b49be6867ab 100644
--- a/drivers/power/reset/xgene-reboot.c
+++ b/drivers/power/reset/xgene-reboot.c
@@ -40,7 +40,7 @@ struct xgene_reboot_context {
 
 static struct xgene_reboot_context *xgene_restart_ctx;
 
-static void xgene_restart(char str, const char *cmd)
+static void xgene_restart(enum reboot_mode mode, const char *cmd)
 {
 	struct xgene_reboot_context *ctx = xgene_restart_ctx;
 	unsigned long timeout;
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 15/87] mfd: arizona: Rid data size incompatibility warn when building for 64bit
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
                   ` (13 preceding siblings ...)
  2017-05-05 19:46 ` [PATCH 3.16-stable 14/87] power/reset: xgene-reset: Fix prototype of xgene_restart() Arnd Bergmann
@ 2017-05-05 19:46 ` Arnd Bergmann
  2017-05-05 19:46 ` [PATCH 3.16-stable 16/87] Input: joystick - use get_cycles on ARMv8 Arnd Bergmann
                   ` (72 subsequent siblings)
  87 siblings, 0 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:46 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: stable, Lee Jones, Arnd Bergmann

From: Lee Jones <lee.jones@linaro.org>

Commit 06128eb07567dabd85aa8249fd60c9d2a060b057 upstream.

Extinguishes:

../drivers/mfd/arizona-core.c: In function ‘arizona_of_get_type’:
../drivers/mfd/arizona-core.c:505:10:
	warning: cast from pointer to integer of different size

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/mfd/arizona-core.c | 4 ++--
 drivers/mfd/arizona-i2c.c  | 5 +++--
 drivers/mfd/arizona-spi.c  | 3 ++-
 drivers/mfd/arizona.h      | 4 ++--
 4 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/drivers/mfd/arizona-core.c b/drivers/mfd/arizona-core.c
index 1577e6418306..c39d119b4cbd 100644
--- a/drivers/mfd/arizona-core.c
+++ b/drivers/mfd/arizona-core.c
@@ -497,12 +497,12 @@ const struct dev_pm_ops arizona_pm_ops = {
 EXPORT_SYMBOL_GPL(arizona_pm_ops);
 
 #ifdef CONFIG_OF
-int arizona_of_get_type(struct device *dev)
+unsigned long arizona_of_get_type(struct device *dev)
 {
 	const struct of_device_id *id = of_match_device(arizona_of_match, dev);
 
 	if (id)
-		return (int)id->data;
+		return (unsigned long)id->data;
 	else
 		return 0;
 }
diff --git a/drivers/mfd/arizona-i2c.c b/drivers/mfd/arizona-i2c.c
index beccb790c9ba..9d4156fb082a 100644
--- a/drivers/mfd/arizona-i2c.c
+++ b/drivers/mfd/arizona-i2c.c
@@ -24,11 +24,12 @@
 #include "arizona.h"
 
 static int arizona_i2c_probe(struct i2c_client *i2c,
-					  const struct i2c_device_id *id)
+			     const struct i2c_device_id *id)
 {
 	struct arizona *arizona;
 	const struct regmap_config *regmap_config;
-	int ret, type;
+	unsigned long type;
+	int ret;
 
 	if (i2c->dev.of_node)
 		type = arizona_of_get_type(&i2c->dev);
diff --git a/drivers/mfd/arizona-spi.c b/drivers/mfd/arizona-spi.c
index 1ca554b18bef..5145d78bf07e 100644
--- a/drivers/mfd/arizona-spi.c
+++ b/drivers/mfd/arizona-spi.c
@@ -28,7 +28,8 @@ static int arizona_spi_probe(struct spi_device *spi)
 	const struct spi_device_id *id = spi_get_device_id(spi);
 	struct arizona *arizona;
 	const struct regmap_config *regmap_config;
-	int ret, type;
+	unsigned long type;
+	int ret;
 
 	if (spi->dev.of_node)
 		type = arizona_of_get_type(&spi->dev);
diff --git a/drivers/mfd/arizona.h b/drivers/mfd/arizona.h
index b4cef777df73..2951498ab9a1 100644
--- a/drivers/mfd/arizona.h
+++ b/drivers/mfd/arizona.h
@@ -46,9 +46,9 @@ int arizona_irq_init(struct arizona *arizona);
 int arizona_irq_exit(struct arizona *arizona);
 
 #ifdef CONFIG_OF
-int arizona_of_get_type(struct device *dev);
+unsigned long arizona_of_get_type(struct device *dev);
 #else
-static inline int arizona_of_get_type(struct device *dev)
+static inline unsigned long arizona_of_get_type(struct device *dev)
 {
 	return 0;
 }
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 16/87] Input: joystick - use get_cycles on ARMv8
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
                   ` (14 preceding siblings ...)
  2017-05-05 19:46 ` [PATCH 3.16-stable 15/87] mfd: arizona: Rid data size incompatibility warn when building for 64bit Arnd Bergmann
@ 2017-05-05 19:46 ` Arnd Bergmann
  2017-05-05 19:46 ` [PATCH 3.16-stable 17/87] dma: pl08x: Use correct specifier for size_t values Arnd Bergmann
                   ` (71 subsequent siblings)
  87 siblings, 0 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:46 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: stable, Mark Brown, Dmitry Torokhov, Arnd Bergmann

From: Mark Brown <broonie@linaro.org>

Commit 13ba5d947a6790a0fdd36f49e7ca88d889acdacd upstream.

As with ARM the ARMv8 architecture provides a cycle counter which can be
used to provide a high resolution time for the joystick driver and
silence the build warning that results from not having a precise timer
on ARMv8, making allmodconfig and allyesconfig quieter.

Signed-off-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/input/joystick/analog.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/input/joystick/analog.c b/drivers/input/joystick/analog.c
index 9135606c8649..ab0fdcd36e18 100644
--- a/drivers/input/joystick/analog.c
+++ b/drivers/input/joystick/analog.c
@@ -158,7 +158,7 @@ static unsigned int get_time_pit(void)
 #define GET_TIME(x)	rdtscl(x)
 #define DELTA(x,y)	((y)-(x))
 #define TIME_NAME	"TSC"
-#elif defined(__alpha__) || defined(CONFIG_MN10300) || defined(CONFIG_ARM) || defined(CONFIG_TILE)
+#elif defined(__alpha__) || defined(CONFIG_MN10300) || defined(CONFIG_ARM) || defined(CONFIG_ARM64) || defined(CONFIG_TILE)
 #define GET_TIME(x)	do { x = get_cycles(); } while (0)
 #define DELTA(x,y)	((y)-(x))
 #define TIME_NAME	"get_cycles"
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 17/87] dma: pl08x: Use correct specifier for size_t values
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
                   ` (15 preceding siblings ...)
  2017-05-05 19:46 ` [PATCH 3.16-stable 16/87] Input: joystick - use get_cycles on ARMv8 Arnd Bergmann
@ 2017-05-05 19:46 ` Arnd Bergmann
  2017-05-05 19:46 ` [PATCH 3.16-stable 18/87] gpio: drop retval check enforcing from gpiochip_remove() Arnd Bergmann
                   ` (70 subsequent siblings)
  87 siblings, 0 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:46 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: stable, Mark Brown, Vinod Koul, Arnd Bergmann

From: Mark Brown <broonie@linaro.org>

Commit 3ec57792fe16343dd98f82cd6b8842753731f3af upstream.

When printing size_t values we should use the %zd or %zx format specifier
in order to ensure the value is displayed correctly and avoid warnings from
sparse.

Signed-off-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/dma/amba-pl08x.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/dma/amba-pl08x.c b/drivers/dma/amba-pl08x.c
index 8114731a1c62..8ff32b126605 100644
--- a/drivers/dma/amba-pl08x.c
+++ b/drivers/dma/amba-pl08x.c
@@ -1040,7 +1040,7 @@ static int pl08x_fill_llis_for_desc(struct pl08x_driver_data *pl08x,
 
 		if (early_bytes) {
 			dev_vdbg(&pl08x->adev->dev,
-				"%s byte width LLIs (remain 0x%08x)\n",
+				"%s byte width LLIs (remain 0x%08zx)\n",
 				__func__, bd.remainder);
 			prep_byte_width_lli(pl08x, &bd, &cctl, early_bytes,
 				num_llis++, &total_bytes);
@@ -1662,7 +1662,7 @@ static struct dma_async_tx_descriptor *pl08x_prep_dma_cyclic(
 	dma_addr_t slave_addr;
 
 	dev_dbg(&pl08x->adev->dev,
-		"%s prepare cyclic transaction of %d/%d bytes %s %s\n",
+		"%s prepare cyclic transaction of %zd/%zd bytes %s %s\n",
 		__func__, period_len, buf_len,
 		direction == DMA_MEM_TO_DEV ? "to" : "from",
 		plchan->name);
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 18/87] gpio: drop retval check enforcing from gpiochip_remove()
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
                   ` (16 preceding siblings ...)
  2017-05-05 19:46 ` [PATCH 3.16-stable 17/87] dma: pl08x: Use correct specifier for size_t values Arnd Bergmann
@ 2017-05-05 19:46 ` Arnd Bergmann
  2017-05-05 19:46 ` [PATCH 3.16-stable 19/87] ASoC: fsl-ssi: fix do_div build warning in fsl_ssi_set_bclk() Arnd Bergmann
                   ` (69 subsequent siblings)
  87 siblings, 0 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:46 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: stable, Linus Walleij, Abdoulaye Berthe, Arnd Bergmann

From: Linus Walleij <linus.walleij@linaro.org>

Commit 62986edec3f06737cc5319df1aa41ecdc7e90089 upstream.

As we start to decomission the return value from gpiochip_remove()
the compilers emit warnings due to the function being tagged
__must_check. So drop this until we remove the return value
altogether.

Cc: Abdoulaye Berthe <berthe.ab@gmail.com>
Suggested-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 include/linux/gpio/driver.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/gpio/driver.h b/include/linux/gpio/driver.h
index 573e4f3243d0..ca3024554a2d 100644
--- a/include/linux/gpio/driver.h
+++ b/include/linux/gpio/driver.h
@@ -141,7 +141,7 @@ extern const char *gpiochip_is_requested(struct gpio_chip *chip,
 
 /* add/remove chips */
 extern int gpiochip_add(struct gpio_chip *chip);
-extern int __must_check gpiochip_remove(struct gpio_chip *chip);
+extern int gpiochip_remove(struct gpio_chip *chip);
 extern struct gpio_chip *gpiochip_find(void *data,
 			      int (*match)(struct gpio_chip *chip, void *data));
 
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 19/87] ASoC: fsl-ssi: fix do_div build warning in fsl_ssi_set_bclk()
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
                   ` (17 preceding siblings ...)
  2017-05-05 19:46 ` [PATCH 3.16-stable 18/87] gpio: drop retval check enforcing from gpiochip_remove() Arnd Bergmann
@ 2017-05-05 19:46 ` Arnd Bergmann
  2017-05-05 19:46 ` [PATCH 3.16-stable 20/87] ASoC: imx-audmux: Use uintptr_t for port numbers Arnd Bergmann
                   ` (68 subsequent siblings)
  87 siblings, 0 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:46 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: stable, Timur Tabi, Mark Brown, Arnd Bergmann

From: Timur Tabi <timur@tabi.org>

Commit 95af467eed7c85e7a574a50ae60316111434a118 upstream.

do_div() requires that the first parameter is a 64-bit integer,
which but clkrate was defined as an unsigned long.  This caused
the following warnings:

 CC      sound/soc/fsl/fsl_ssi.o
sound/soc/fsl/fsl_ssi.c: In function 'fsl_ssi_set_bclk':
sound/soc/fsl/fsl_ssi.c:593:3: warning: comparison of distinct pointer types lacks a cast
sound/soc/fsl/fsl_ssi.c:593:3: warning: right shift count >= width of type
sound/soc/fsl/fsl_ssi.c:593:3: warning: passing argument 1 of '__div64_32' from incompatible pointer type
include/asm-generic/div64.h:35:17: note: expected 'uint64_t *' but argument is of type 'long unsigned int *'

Signed-off-by: Timur Tabi <timur@tabi.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 sound/soc/fsl/fsl_ssi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c
index 9bfef55d77d1..3043d576856b 100644
--- a/sound/soc/fsl/fsl_ssi.c
+++ b/sound/soc/fsl/fsl_ssi.c
@@ -590,8 +590,8 @@ static int fsl_ssi_set_bclk(struct snd_pcm_substream *substream,
 		else
 			clkrate = clk_round_rate(ssi_private->baudclk, tmprate);
 
-		do_div(clkrate, factor);
-		afreq = (u32)clkrate / (i + 1);
+		clkrate /= factor;
+		afreq = clkrate / (i + 1);
 
 		if (freq == afreq)
 			sub = 0;
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 20/87] ASoC: imx-audmux: Use uintptr_t for port numbers
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
                   ` (18 preceding siblings ...)
  2017-05-05 19:46 ` [PATCH 3.16-stable 19/87] ASoC: fsl-ssi: fix do_div build warning in fsl_ssi_set_bclk() Arnd Bergmann
@ 2017-05-05 19:46 ` Arnd Bergmann
  2017-05-05 19:46 ` [PATCH 3.16-stable 21/87] ASoC: fsl_sai: Set SYNC bit of TCR2 to Asynchronous Mode Arnd Bergmann
                   ` (67 subsequent siblings)
  87 siblings, 0 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:46 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: stable, Mark Brown, Arnd Bergmann

From: Mark Brown <broonie@linaro.org>

Commit 30e75719940ef0a873778f69e2d129ab516ae31d upstream.

Since we pass the port number through file private data for debugfs we cast
it to and from a pointer so use uintptr_t in order to ensure that the
types are compatible, avoiding warnings on 64 bit platforms where pointers
are 64 bit and unsigned integers 32 bit.

Signed-off-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 sound/soc/fsl/imx-audmux.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/sound/soc/fsl/imx-audmux.c b/sound/soc/fsl/imx-audmux.c
index 267717aa96c1..46f9beb6b273 100644
--- a/sound/soc/fsl/imx-audmux.c
+++ b/sound/soc/fsl/imx-audmux.c
@@ -67,7 +67,7 @@ static ssize_t audmux_read_file(struct file *file, char __user *user_buf,
 {
 	ssize_t ret;
 	char *buf;
-	int port = (int)file->private_data;
+	uintptr_t port = (uintptr_t)file->private_data;
 	u32 pdcr, ptcr;
 
 	if (audmux_clk) {
@@ -147,7 +147,7 @@ static const struct file_operations audmux_debugfs_fops = {
 
 static void audmux_debugfs_init(void)
 {
-	int i;
+	uintptr_t i;
 	char buf[20];
 
 	audmux_debugfs_root = debugfs_create_dir("audmux", NULL);
@@ -157,10 +157,10 @@ static void audmux_debugfs_init(void)
 	}
 
 	for (i = 0; i < MX31_AUDMUX_PORT7_SSI_PINS_7 + 1; i++) {
-		snprintf(buf, sizeof(buf), "ssi%d", i);
+		snprintf(buf, sizeof(buf), "ssi%lu", i);
 		if (!debugfs_create_file(buf, 0444, audmux_debugfs_root,
 					 (void *)i, &audmux_debugfs_fops))
-			pr_warning("Failed to create AUDMUX port %d debugfs file\n",
+			pr_warning("Failed to create AUDMUX port %lu debugfs file\n",
 				   i);
 	}
 }
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 21/87] ASoC: fsl_sai: Set SYNC bit of TCR2 to Asynchronous Mode
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
                   ` (19 preceding siblings ...)
  2017-05-05 19:46 ` [PATCH 3.16-stable 20/87] ASoC: imx-audmux: Use uintptr_t for port numbers Arnd Bergmann
@ 2017-05-05 19:46 ` Arnd Bergmann
  2017-05-05 19:46 ` [PATCH 3.16-stable 22/87] ASoC: adau1977: Fix truncation warning on 64 bit architectures Arnd Bergmann
                   ` (66 subsequent siblings)
  87 siblings, 0 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:46 UTC (permalink / raw)
  To: Ben Hutchings
  Cc: stable, Nicolin Chen, Nicolin Chen, Mark Brown, Arnd Bergmann

From: Nicolin Chen <Guangyu.Chen@freescale.com>

Commit 497782d5b44818b8482aa8b6b2dd9fccd99e63d2 upstream.

There is one design rule according to SAI's reference manual:
If the transmitter bit clock and frame sync are to be used by both transmitter
and receiver, the transmitter must be configured for asynchronous operation
and the receiver for synchronous operation.

And SYNC of TCR2 is a 2-width control bit:
00 Asynchronous mode.
01 Synchronous with receiver.
10 Synchronous with another SAI transmitter.
11 Synchronous with another SAI receiver.

So the driver should have set SYNC bit of TCR2 to 0x0, and meanwhile set SYNC
bit of RCR2 to 0x1 (Synchronous with transmitter).

Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 sound/soc/fsl/fsl_sai.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c
index c5a0e8af8226..60465646fed8 100644
--- a/sound/soc/fsl/fsl_sai.c
+++ b/sound/soc/fsl/fsl_sai.c
@@ -333,8 +333,7 @@ static int fsl_sai_trigger(struct snd_pcm_substream *substream, int cmd,
 	 * The transmitter bit clock and frame sync are to be
 	 * used by both the transmitter and receiver.
 	 */
-	regmap_update_bits(sai->regmap, FSL_SAI_TCR2, FSL_SAI_CR2_SYNC,
-			   ~FSL_SAI_CR2_SYNC);
+	regmap_update_bits(sai->regmap, FSL_SAI_TCR2, FSL_SAI_CR2_SYNC, 0);
 	regmap_update_bits(sai->regmap, FSL_SAI_RCR2, FSL_SAI_CR2_SYNC,
 			   FSL_SAI_CR2_SYNC);
 
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 22/87] ASoC: adau1977: Fix truncation warning on 64 bit architectures
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
                   ` (20 preceding siblings ...)
  2017-05-05 19:46 ` [PATCH 3.16-stable 21/87] ASoC: fsl_sai: Set SYNC bit of TCR2 to Asynchronous Mode Arnd Bergmann
@ 2017-05-05 19:46 ` Arnd Bergmann
  2017-05-05 19:46 ` [PATCH 3.16-stable 23/87] ALSA: oxygen: Fix logical-not-parentheses warning Arnd Bergmann
                   ` (65 subsequent siblings)
  87 siblings, 0 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:46 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: stable, Mark Brown, Arnd Bergmann

From: Mark Brown <broonie@linaro.org>

Commit c675220dd64cfc59ba5ea20710bd76d67faad148 upstream.

Negating ADAU1977_BLOCK_POWER_SAI_LDO_EN creates an unsigned long constant
with all bits set which on 64 bit architectures needs to be truncated to
an unsigned int, generating a warning. Add an explicit cast since we know
this is OK.

Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 sound/soc/codecs/adau1977.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/codecs/adau1977.c b/sound/soc/codecs/adau1977.c
index fd55da7cb9d4..70ab35744aba 100644
--- a/sound/soc/codecs/adau1977.c
+++ b/sound/soc/codecs/adau1977.c
@@ -968,7 +968,7 @@ int adau1977_probe(struct device *dev, struct regmap *regmap,
 	if (adau1977->dvdd_reg)
 		power_off_mask = ~0;
 	else
-		power_off_mask = ~ADAU1977_BLOCK_POWER_SAI_LDO_EN;
+		power_off_mask = (unsigned int)~ADAU1977_BLOCK_POWER_SAI_LDO_EN;
 
 	ret = regmap_update_bits(adau1977->regmap, ADAU1977_REG_BLOCK_POWER_SAI,
 				power_off_mask, 0x00);
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 23/87] ALSA: oxygen: Fix logical-not-parentheses warning
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
                   ` (21 preceding siblings ...)
  2017-05-05 19:46 ` [PATCH 3.16-stable 22/87] ASoC: adau1977: Fix truncation warning on 64 bit architectures Arnd Bergmann
@ 2017-05-05 19:46 ` Arnd Bergmann
  2017-05-05 19:46 ` [PATCH 3.16-stable 24/87] ata: hpt366: fix constant cast warning Arnd Bergmann
                   ` (64 subsequent siblings)
  87 siblings, 0 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:46 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: stable, Tomer Barletz, Takashi Iwai, Arnd Bergmann

From: Tomer Barletz <barletz@gmail.com>

Commit 15ca92c8a00b566a2e6f7d4f088f867575dadf70 upstream.

This fixes the following warning, that is seen with gcc 5.1:
warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses].

Signed-off-by: Tomer Barletz <barletz@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 sound/pci/oxygen/oxygen_mixer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/pci/oxygen/oxygen_mixer.c b/sound/pci/oxygen/oxygen_mixer.c
index 5988e044c519..259bf54a9df0 100644
--- a/sound/pci/oxygen/oxygen_mixer.c
+++ b/sound/pci/oxygen/oxygen_mixer.c
@@ -88,7 +88,7 @@ static int dac_mute_put(struct snd_kcontrol *ctl,
 	int changed;
 
 	mutex_lock(&chip->mutex);
-	changed = !value->value.integer.value[0] != chip->dac_mute;
+	changed = (!value->value.integer.value[0]) != chip->dac_mute;
 	if (changed) {
 		chip->dac_mute = !value->value.integer.value[0];
 		chip->model.update_dac_mute(chip);
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 24/87] ata: hpt366: fix constant cast warning
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
                   ` (22 preceding siblings ...)
  2017-05-05 19:46 ` [PATCH 3.16-stable 23/87] ALSA: oxygen: Fix logical-not-parentheses warning Arnd Bergmann
@ 2017-05-05 19:46 ` Arnd Bergmann
  2017-05-05 19:46 ` [PATCH 3.16-stable 25/87] clk/efm32gg: fix dt init prototype Arnd Bergmann
                   ` (63 subsequent siblings)
  87 siblings, 0 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:46 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: stable, Arnd Bergmann, Tejun Heo

Commit c4c54a7b7dbf62ab1b15df88a23cbd0900b1bef3 upstream.

gcc-5.x warns about a preexisting problem in the hpt36x pata driver:

drivers/ata/pata_hpt366.c: In function 'hpt36x_init_one':
drivers/ata/pata_hpt366.c:376:9: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-array-qualifiers]

Other ata drivers have the same problem, as ata_pci_bmdma_init_one
takes a non-const pointer, and they solve it by using a cast to
turn that pointer into a normal non-const pointer.

I also tried to change the ata core code to make host->private_data
a const pointer, but that quickly got out of hand, as some other
drivers expect it to be writable, so I ended up using the same
hack as the others here.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/ata/pata_hpt366.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/ata/pata_hpt366.c b/drivers/ata/pata_hpt366.c
index cbc3de793d1d..0038dc4c06c7 100644
--- a/drivers/ata/pata_hpt366.c
+++ b/drivers/ata/pata_hpt366.c
@@ -352,7 +352,7 @@ static int hpt36x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 	};
 	const struct ata_port_info *ppi[] = { &info_hpt366, NULL };
 
-	void *hpriv = NULL;
+	const void *hpriv = NULL;
 	u32 reg1;
 	int rc;
 
@@ -383,7 +383,7 @@ static int hpt36x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 		break;
 	}
 	/* Now kick off ATA set up */
-	return ata_pci_bmdma_init_one(dev, ppi, &hpt36x_sht, hpriv, 0);
+	return ata_pci_bmdma_init_one(dev, ppi, &hpt36x_sht, (void *)hpriv, 0);
 }
 
 #ifdef CONFIG_PM_SLEEP
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 25/87] clk/efm32gg: fix dt init prototype
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
                   ` (23 preceding siblings ...)
  2017-05-05 19:46 ` [PATCH 3.16-stable 24/87] ata: hpt366: fix constant cast warning Arnd Bergmann
@ 2017-05-05 19:46 ` Arnd Bergmann
  2017-05-05 19:46 ` [PATCH 3.16-stable 26/87] spi: rspi: Remove unused variable in rspi_rz_transfer_one() Arnd Bergmann
                   ` (62 subsequent siblings)
  87 siblings, 0 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:46 UTC (permalink / raw)
  To: Ben Hutchings
  Cc: stable, Uwe Kleine-König, Rob Herring, Mike Turquette,
	Arnd Bergmann

From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Commit 34bac750ed6f7a87fe6ea0f1d7b000391ae08698 upstream.

Since commit 54196ccbe0ba (of: consolidate linker section OF match table
declarations) which went into 3.16-rc1 the following compiler warning is
generated:

	In file included from drivers/clk/clk-efm32gg.c:12:0: include/linux/of.h:772:20:
	warning: comparison of distinct pointer types lacks a cast [enabled by default]
		.data = (fn == (fn_type)NULL) ? fn : fn  }
			    ^
	include/linux/of.h:785:3: note: in expansion of macro '_OF_DECLARE'
	   _OF_DECLARE(table, name, compat, fn, of_init_fn_1)
	   ^
	include/linux/clk-provider.h:545:42: note: in expansion of macro 'OF_DECLARE_1'
	 #define CLK_OF_DECLARE(name, compat, fn) OF_DECLARE_1(clk, name, compat, fn)
						  ^
	drivers/clk/clk-efm32gg.c:81:1: note: in expansion of macro 'CLK_OF_DECLARE'
	 CLK_OF_DECLARE(efm32ggcmu, "efm32gg,cmu", efm32gg_cmu_init);
	 ^

Fix it by making efm32gg_cmu_init return void.

Cc: Rob Herring <robh@kernel.org>
Reported-by: Bryan Hundven <bryanhundven@gmail.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/clk/clk-efm32gg.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/clk/clk-efm32gg.c b/drivers/clk/clk-efm32gg.c
index bac2ddf49d02..73a8d0ff530c 100644
--- a/drivers/clk/clk-efm32gg.c
+++ b/drivers/clk/clk-efm32gg.c
@@ -22,7 +22,7 @@ static struct clk_onecell_data clk_data = {
 	.clk_num = ARRAY_SIZE(clk),
 };
 
-static int __init efm32gg_cmu_init(struct device_node *np)
+static void __init efm32gg_cmu_init(struct device_node *np)
 {
 	int i;
 	void __iomem *base;
@@ -33,7 +33,7 @@ static int __init efm32gg_cmu_init(struct device_node *np)
 	base = of_iomap(np, 0);
 	if (!base) {
 		pr_warn("Failed to map address range for efm32gg,cmu node\n");
-		return -EADDRNOTAVAIL;
+		return;
 	}
 
 	clk[clk_HFXO] = clk_register_fixed_rate(NULL, "HFXO", NULL,
@@ -76,6 +76,6 @@ static int __init efm32gg_cmu_init(struct device_node *np)
 	clk[clk_HFPERCLKDAC0] = clk_register_gate(NULL, "HFPERCLK.DAC0",
 			"HFXO", 0, base + CMU_HFPERCLKEN0, 17, 0, NULL);
 
-	return of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data);
+	of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data);
 }
 CLK_OF_DECLARE(efm32ggcmu, "efm32gg,cmu", efm32gg_cmu_init);
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 26/87] spi: rspi: Remove unused variable in rspi_rz_transfer_one()
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
                   ` (24 preceding siblings ...)
  2017-05-05 19:46 ` [PATCH 3.16-stable 25/87] clk/efm32gg: fix dt init prototype Arnd Bergmann
@ 2017-05-05 19:46 ` Arnd Bergmann
  2017-05-05 19:46 ` [PATCH 3.16-stable 27/87] spi/atmel: Fix pointer to int conversion warnings on 64 bit builds Arnd Bergmann
                   ` (61 subsequent siblings)
  87 siblings, 0 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:46 UTC (permalink / raw)
  To: Ben Hutchings
  Cc: stable, Geert Uytterhoeven, Geert Uytterhoeven, Mark Brown,
	Arnd Bergmann

From: Geert Uytterhoeven <geert@linux-m68k.org>

Commit d11e5dbf9a0edea96635c17fd0498a18fcf5fe40 upstream.

Introduced by commit 8b983e90ea1a3dd82070f96c062ad521a06b7cc0 ("spi: rspi:
Extract rspi_common_transfer()"), which removed its users.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/spi/spi-rspi.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c
index 10112745bb17..ddee9df1547d 100644
--- a/drivers/spi/spi-rspi.c
+++ b/drivers/spi/spi-rspi.c
@@ -630,7 +630,6 @@ static int rspi_rz_transfer_one(struct spi_master *master,
 				struct spi_transfer *xfer)
 {
 	struct rspi_data *rspi = spi_master_get_devdata(master);
-	int ret;
 
 	rspi_rz_receive_init(rspi);
 
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 27/87] spi/atmel: Fix pointer to int conversion warnings on 64 bit builds
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
                   ` (25 preceding siblings ...)
  2017-05-05 19:46 ` [PATCH 3.16-stable 26/87] spi: rspi: Remove unused variable in rspi_rz_transfer_one() Arnd Bergmann
@ 2017-05-05 19:46 ` Arnd Bergmann
  2017-05-05 19:46 ` [PATCH 3.16-stable 28/87] spi/pl022: Explicitly truncate large bitmask Arnd Bergmann
                   ` (60 subsequent siblings)
  87 siblings, 0 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:46 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: stable, Mark Brown, Arnd Bergmann

From: Mark Brown <broonie@linaro.org>

Commit bc0795f5cac166cb6df30508cb0af37975cf38f8 upstream.

On 64 bit systems integers are generally still 32 bit but long values and
pointers are usually 64 bit. GCC warns when casting a 64 bit pointer into
a 32 bit integer so cast to a long instead in order to avoid warnings.

Signed-off-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/spi/spi-atmel.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/spi/spi-atmel.c b/drivers/spi/spi-atmel.c
index bbf7c5e79b95..907649913557 100644
--- a/drivers/spi/spi-atmel.c
+++ b/drivers/spi/spi-atmel.c
@@ -1019,7 +1019,7 @@ static int atmel_spi_setup(struct spi_device *spi)
 	csr |= SPI_BF(DLYBCT, 0);
 
 	/* chipselect must have been muxed as GPIO (e.g. in board setup) */
-	npcs_pin = (unsigned int)spi->controller_data;
+	npcs_pin = (unsigned long)spi->controller_data;
 
 	if (gpio_is_valid(spi->cs_gpio))
 		npcs_pin = spi->cs_gpio;
@@ -1254,7 +1254,7 @@ msg_done:
 static void atmel_spi_cleanup(struct spi_device *spi)
 {
 	struct atmel_spi_device	*asd = spi->controller_state;
-	unsigned		gpio = (unsigned) spi->controller_data;
+	unsigned		gpio = (unsigned long) spi->controller_data;
 
 	if (!asd)
 		return;
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 28/87] spi/pl022: Explicitly truncate large bitmask
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
                   ` (26 preceding siblings ...)
  2017-05-05 19:46 ` [PATCH 3.16-stable 27/87] spi/atmel: Fix pointer to int conversion warnings on 64 bit builds Arnd Bergmann
@ 2017-05-05 19:46 ` Arnd Bergmann
  2017-05-05 19:46 ` [PATCH 3.16-stable 29/87] tty: nozomi: avoid a harmless gcc warning Arnd Bergmann
                   ` (59 subsequent siblings)
  87 siblings, 0 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:46 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: stable, Mark Brown, Arnd Bergmann

From: Mark Brown <broonie@linaro.org>

Commit 41b5da6383a72732f9facd2e03873c481baacb6e upstream.

When building on 64 bit architectures the use of bitwise negation generates
constants larger than 32 bits which won't fit in u32s used to represent
32 bit register values on the device. Explicitly cast to let the compiler
know that the higher bits are not significant and can be discarded.

Signed-off-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/spi/spi-pl022.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/spi/spi-pl022.c b/drivers/spi/spi-pl022.c
index 02798036df8f..53a908e4219f 100644
--- a/drivers/spi/spi-pl022.c
+++ b/drivers/spi/spi-pl022.c
@@ -1417,7 +1417,7 @@ static void do_interrupt_dma_transfer(struct pl022 *pl022)
 	 * Default is to enable all interrupts except RX -
 	 * this will be enabled once TX is complete
 	 */
-	u32 irqflags = ENABLE_ALL_INTERRUPTS & ~SSP_IMSC_MASK_RXIM;
+	u32 irqflags = (u32)(ENABLE_ALL_INTERRUPTS & ~SSP_IMSC_MASK_RXIM);
 
 	/* Enable target chip, if not already active */
 	if (!pl022->next_msg_cs_active)
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 29/87] tty: nozomi: avoid a harmless gcc warning
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
                   ` (27 preceding siblings ...)
  2017-05-05 19:46 ` [PATCH 3.16-stable 28/87] spi/pl022: Explicitly truncate large bitmask Arnd Bergmann
@ 2017-05-05 19:46 ` Arnd Bergmann
  2017-05-05 19:46 ` [PATCH 3.16-stable 30/87] tty/isicom: fix big-endian compile warning Arnd Bergmann
                   ` (58 subsequent siblings)
  87 siblings, 0 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:46 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: stable, Arnd Bergmann, Greg Kroah-Hartman

Commit 12ad7e7221c80094be100a0e564f0d65775017dc upstream.

The nozomi wireless data driver has its own helper function to
transfer data from a FIFO, doing an extra byte swap on big-endian
architectures, presumably to bring the data back into byte-serial
order after readw() or readl() perform their implicit byteswap.

This helper function is used in the receive_data() function to
first read the length into a 32-bit variable, which causes
a compile-time warning:

drivers/tty/nozomi.c: In function 'receive_data':
drivers/tty/nozomi.c:857:9: warning: 'size' may be used uninitialized in this function [-Wmaybe-uninitialized]

The problem is that gcc is unsure whether the data was actually
read or not. We know that it is at this point, so we can replace
it with a single readl() to shut up that warning.

I am leaving the byteswap in there, to preserve the existing
behavior, even though this seems fishy: Reading the length of
the data into a cpu-endian variable should normally not use
a second byteswap on big-endian systems, unless the hardware
is aware of the CPU endianess.

There appears to be a lot more confusion about endianess in this
driver, so it probably has not worked on big-endian systems in
a long time, if ever, and I have no way to test it. It's well
possible that this driver has not been used by anyone in a while,
the last patch that looks like it was tested on the hardware is
from 2008.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/tty/nozomi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/nozomi.c b/drivers/tty/nozomi.c
index cd0429369557..b5b1b195ff2c 100644
--- a/drivers/tty/nozomi.c
+++ b/drivers/tty/nozomi.c
@@ -823,7 +823,7 @@ static int receive_data(enum port_type index, struct nozomi *dc)
 	struct tty_struct *tty = tty_port_tty_get(&port->port);
 	int i, ret;
 
-	read_mem32((u32 *) &size, addr, 4);
+	size = __le32_to_cpu(readl(addr));
 	/*  DBG1( "%d bytes port: %d", size, index); */
 
 	if (tty && test_bit(TTY_THROTTLED, &tty->flags)) {
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 30/87] tty/isicom: fix big-endian compile warning
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
                   ` (28 preceding siblings ...)
  2017-05-05 19:46 ` [PATCH 3.16-stable 29/87] tty: nozomi: avoid a harmless gcc warning Arnd Bergmann
@ 2017-05-05 19:46 ` Arnd Bergmann
  2017-05-05 19:46 ` [PATCH 3.16-stable 31/87] i2o: hide unsafe ioctl on 64-bit Arnd Bergmann
                   ` (57 subsequent siblings)
  87 siblings, 0 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:46 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: stable, Arnd Bergmann, Greg Kroah-Hartman

Commit f3e2d56dce47dbd0bb3f69f84741b439542fef37 upstream.

Building an arm allmodconfig kernel triggers a lengthy but harmless
warning in the isicom driver:

drvers/tty/isicom.c: In function 'isicom_send_break':
uapi/linux/swab.h:13:15: warning: integer overflow in expression [-Woverflow]
  (((__u16)(x) & (__u16)0x00ffU) << 8) |   \
               ^
uapi/linux/swab.h:107:2: note: in expansion of macro '___constant_swab16'
  ___constant_swab16(x) :   \
  ^
uapi/linux/byteorder/big_endian.h:34:43: note: in expansion of macro '__swab16'
 #define __cpu_to_le16(x) ((__force __le16)__swab16((x)))
                                           ^
linux/byteorder/generic.h:89:21: note: in expansion of macro '__cpu_to_le16'
 #define cpu_to_le16 __cpu_to_le16
                     ^
include/asm/io.h:270:6: note: in expansion of macro 'cpu_to_le16'
      cpu_to_le16(v),__io(p)); })
      ^
drivers/tty/isicom.c:1058:2: note: in expansion of macro 'outw'
  outw((length & 0xff00), base);
  ^

Apparently, the problem is related to the fact that the value 0xff00,
when used as a 16-bit number, is negative and passed into bitwise
operands of the generic byte swapping code.

Marking the input argument as unsigned in both technically correct
and avoids the warning.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/tty/isicom.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/isicom.c b/drivers/tty/isicom.c
index 858291ca889c..c03ecaa0af7f 100644
--- a/drivers/tty/isicom.c
+++ b/drivers/tty/isicom.c
@@ -1055,7 +1055,7 @@ static int isicom_send_break(struct tty_struct *tty, int length)
 
 	outw(0x8000 | ((port->channel) << (card->shift_count)) | 0x3, base);
 	outw((length & 0xff) << 8 | 0x00, base);
-	outw((length & 0xff00), base);
+	outw((length & 0xff00u), base);
 	InterruptTheCard(base);
 
 	unlock_card(card);
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 31/87] i2o: hide unsafe ioctl on 64-bit
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
                   ` (29 preceding siblings ...)
  2017-05-05 19:46 ` [PATCH 3.16-stable 30/87] tty/isicom: fix big-endian compile warning Arnd Bergmann
@ 2017-05-05 19:46 ` Arnd Bergmann
  2017-05-05 20:07   ` Patch "[PATCH 3.16-stable 31/87] i2o: hide unsafe ioctl on 64-bit" has been added to the 3.18-stable tree gregkh
  2017-05-05 19:46 ` [PATCH 3.16-stable 32/87] dm bufio: hide bogus warning Arnd Bergmann
                   ` (56 subsequent siblings)
  87 siblings, 1 reply; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:46 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: stable, Arnd Bergmann

We get a warning about a broken pointer conversion on 64-bit architectures:

drivers/message/i2o/i2o_config.c: In function 'i2o_cfg_passthru':
drivers/message/i2o/i2o_config.c:893:19: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
         (p->virt, (void __user *)sg[i].addr_bus,
                   ^
drivers/message/i2o/i2o_config.c:953:10: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
         ((void __user *)sg[j].addr_bus, sg_list[j].virt,
          ^

This has clearly never worked right, so we can add an #ifdef around the code.
The driver was moved to staging in linux-4.0 and finally removed in 4.2,
so upstream does not have a fix for it.

The driver originally got this mostly right, though probably by accident.

Fixes: f4c2c15b930b ("[PATCH] Convert i2o to compat_ioctl")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/message/i2o/i2o_config.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/message/i2o/i2o_config.c b/drivers/message/i2o/i2o_config.c
index 04bd3b6de401..67ceb3010a10 100644
--- a/drivers/message/i2o/i2o_config.c
+++ b/drivers/message/i2o/i2o_config.c
@@ -772,7 +772,7 @@ static long i2o_cfg_compat_ioctl(struct file *file, unsigned cmd,
 
 #endif
 
-#ifdef CONFIG_I2O_EXT_ADAPTEC
+#if defined(CONFIG_I2O_EXT_ADAPTEC) && !defined(CONFIG_64BIT)
 static int i2o_cfg_passthru(unsigned long arg)
 {
 	struct i2o_cmd_passthru __user *cmd =
@@ -1045,7 +1045,7 @@ static long i2o_cfg_ioctl(struct file *fp, unsigned int cmd, unsigned long arg)
 		ret = i2o_cfg_evt_get(arg, fp);
 		break;
 
-#ifdef CONFIG_I2O_EXT_ADAPTEC
+#if defined(CONFIG_I2O_EXT_ADAPTEC) && !defined(CONFIG_64BIT)
 	case I2OPASSTHRU:
 		ret = i2o_cfg_passthru(arg);
 		break;
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 32/87] dm bufio: hide bogus warning
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
                   ` (30 preceding siblings ...)
  2017-05-05 19:46 ` [PATCH 3.16-stable 31/87] i2o: hide unsafe ioctl on 64-bit Arnd Bergmann
@ 2017-05-05 19:46 ` Arnd Bergmann
  2017-05-05 19:46 ` [PATCH 3.16-stable 33/87] scsi-tgt: fix type conversion warning Arnd Bergmann
                   ` (55 subsequent siblings)
  87 siblings, 0 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:46 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: stable, Arnd Bergmann, Greg Kroah-Hartman

mips-gcc-5.3 warns about correct code on linux-3.18 and earlier:

In file included from ../include/linux/blkdev.h:4:0,
                 from ../drivers/md/dm-bufio.h:12,
                 from ../drivers/md/dm-bufio.c:9:
../drivers/md/dm-bufio.c: In function 'alloc_buffer':
../include/linux/sched.h:1975:56: warning: 'noio_flag' may be used uninitialized in this function [-Wmaybe-uninitialized]
  current->flags = (current->flags & ~PF_MEMALLOC_NOIO) | flags;
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
../drivers/md/dm-bufio.c:325:11: note: 'noio_flag' was declared here

The warning disappeared on later kernels with this commit: be0c37c985ed
("MIPS: Rearrange PTE bits into fixed positions.")  I assume this only
happened because it changed some inlining decisions.

On 3.18.y, we can shut up the warning by adding an extra initialization.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/md/dm-bufio.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/md/dm-bufio.c b/drivers/md/dm-bufio.c
index 4d1edcf552bb..3711ca2a709e 100644
--- a/drivers/md/dm-bufio.c
+++ b/drivers/md/dm-bufio.c
@@ -349,6 +349,7 @@ static void *alloc_buffer_data(struct dm_bufio_client *c, gfp_t gfp_mask,
 	 * as if GFP_NOIO was specified.
 	 */
 
+	noio_flag = 0;
 	if (gfp_mask & __GFP_NORETRY)
 		noio_flag = memalloc_noio_save();
 
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 33/87] scsi-tgt: fix type conversion warning
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
                   ` (31 preceding siblings ...)
  2017-05-05 19:46 ` [PATCH 3.16-stable 32/87] dm bufio: hide bogus warning Arnd Bergmann
@ 2017-05-05 19:46 ` Arnd Bergmann
  2017-05-05 19:46 ` [PATCH 3.16-stable 34/87] ips: remove pointless #warning Arnd Bergmann
                   ` (54 subsequent siblings)
  87 siblings, 0 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:46 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: stable, Arnd Bergmann

In 3.16-stable, we get this warning:

drivers/scsi/scsi_tgt_if.c:289:36: warning: passing argument 1 of 'virt_to_phys' makes pointer from integer without a cast [-Wint-conversion]

The driver was removed in 3.17, so the bug was never fixed, but the code
works correctly and is only lacking a cast to build cleanly on all architectures.

Fixes: 97f78759ea1c ("[SCSI] scsi tgt: scsi target user and kernel communication interface")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/scsi/scsi_tgt_if.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/scsi_tgt_if.c b/drivers/scsi/scsi_tgt_if.c
index 6209110f295d..7199753591b2 100644
--- a/drivers/scsi/scsi_tgt_if.c
+++ b/drivers/scsi/scsi_tgt_if.c
@@ -286,7 +286,7 @@ static int uspace_ring_map(struct vm_area_struct *vma, unsigned long addr,
 	int i, err;
 
 	for (i = 0; i < TGT_RING_PAGES; i++) {
-		struct page *page = virt_to_page(ring->tr_pages[i]);
+		struct page *page = virt_to_page((void *)ring->tr_pages[i]);
 		err = vm_insert_page(vma, addr, page);
 		if (err)
 			return err;
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 34/87] ips: remove pointless #warning
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
                   ` (32 preceding siblings ...)
  2017-05-05 19:46 ` [PATCH 3.16-stable 33/87] scsi-tgt: fix type conversion warning Arnd Bergmann
@ 2017-05-05 19:46 ` Arnd Bergmann
  2017-11-06 17:31   ` Ben Hutchings
  2017-05-05 19:46 ` [PATCH 3.16-stable 35/87] scsi: advansys: remove #warning message Arnd Bergmann
                   ` (53 subsequent siblings)
  87 siblings, 1 reply; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:46 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: stable, James Bottomley, Arnd Bergmann

From: James Bottomley <JBottomley@Odin.com>

Commit e03c2da6574223081b786960e39c1e5ecf5d492d upstream.

non-x86 builds want the #warning in the IPS code about compiling on the wrong
architecture removed because it keeps triggering on their platforms build
farms.  Transform from a compile time warning into a runtime one with taint to
preserve the original intent of the authors.

Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/scsi/ips.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/scsi/ips.c b/drivers/scsi/ips.c
index 52a216f21ae5..946084014316 100644
--- a/drivers/scsi/ips.c
+++ b/drivers/scsi/ips.c
@@ -206,10 +206,6 @@ module_param(ips, charp, 0);
 #define IPS_VERSION_HIGH        IPS_VER_MAJOR_STRING "." IPS_VER_MINOR_STRING
 #define IPS_VERSION_LOW         "." IPS_VER_BUILD_STRING " "
 
-#if !defined(__i386__) && !defined(__ia64__) && !defined(__x86_64__)
-#warning "This driver has only been tested on the x86/ia64/x86_64 platforms"
-#endif
-
 #define IPS_DMA_DIR(scb) ((!scb->scsi_cmd || ips_is_passthru(scb->scsi_cmd) || \
                          DMA_NONE == scb->scsi_cmd->sc_data_direction) ? \
                          PCI_DMA_BIDIRECTIONAL : \
@@ -6789,6 +6785,11 @@ ips_remove_device(struct pci_dev *pci_dev)
 static int __init
 ips_module_init(void)
 {
+#if !defined(__i386__) && !defined(__ia64__) && !defined(__x86_64__)
+	printk(KERN_ERR "ips: This driver has only been tested on the x86/ia64/x86_64 platforms\n");
+	add_taint(TAINT_CPU_OUT_OF_SPEC, LOCKDEP_STILL_OK);
+#endif
+
 	if (pci_register_driver(&ips_pci_driver) < 0)
 		return -ENODEV;
 	ips_driver_template.module = THIS_MODULE;
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 35/87] scsi: advansys: remove #warning message
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
                   ` (33 preceding siblings ...)
  2017-05-05 19:46 ` [PATCH 3.16-stable 34/87] ips: remove pointless #warning Arnd Bergmann
@ 2017-05-05 19:46 ` Arnd Bergmann
  2017-05-05 19:46 ` [PATCH 3.16-stable 36/87] bfa: Fix indentation Arnd Bergmann
                   ` (52 subsequent siblings)
  87 siblings, 0 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:46 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: stable, Arnd Bergmann, Hannes Reinecke

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>
---
 drivers/scsi/advansys.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/scsi/advansys.c b/drivers/scsi/advansys.c
index d8145888e66a..8cf443eeeaef 100644
--- 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
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 36/87] bfa: Fix indentation
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
                   ` (34 preceding siblings ...)
  2017-05-05 19:46 ` [PATCH 3.16-stable 35/87] scsi: advansys: remove #warning message Arnd Bergmann
@ 2017-05-05 19:46 ` Arnd Bergmann
  2017-05-05 19:46 ` [PATCH 3.16-stable 37/87] fnic: assign FIP_ALL_FCF_MACS to fcoe_all_fcfs Arnd Bergmann
                   ` (51 subsequent siblings)
  87 siblings, 0 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:46 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: stable, Anil Gurumurthy, James Bottomley, Arnd Bergmann

From: Anil Gurumurthy <anil.gurumurthy@qlogic.com>

Commit 956d6c6aacb80fc4f6ed2cb9e2aca0deb2ae3657 upstream.

Signed-off-by: Anil Gurumurthy <anil.gurumurthy@qlogic.com>
Tested-by : Sudarasana Kalluru <sudarsana.kalluru@qlogic.com>
Reviewed-by: Ewan D. Milne <emilne@redhat.com>
Signed-off-by: James Bottomley <JBottomley@Odin.com>

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/scsi/bfa/bfa_ioc.c | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/drivers/scsi/bfa/bfa_ioc.c b/drivers/scsi/bfa/bfa_ioc.c
index 315d6d6dcfc8..4e7104461f09 100644
--- a/drivers/scsi/bfa/bfa_ioc.c
+++ b/drivers/scsi/bfa/bfa_ioc.c
@@ -3665,19 +3665,19 @@ bfa_cb_sfp_state_query(struct bfa_sfp_s *sfp)
 		if (sfp->state_query_cbfn)
 			sfp->state_query_cbfn(sfp->state_query_cbarg,
 					sfp->status);
-			sfp->media = NULL;
-		}
+		sfp->media = NULL;
+	}
 
-		if (sfp->portspeed) {
-			sfp->status = bfa_sfp_speed_valid(sfp, sfp->portspeed);
-			if (sfp->state_query_cbfn)
-				sfp->state_query_cbfn(sfp->state_query_cbarg,
-						sfp->status);
-				sfp->portspeed = BFA_PORT_SPEED_UNKNOWN;
-		}
+	if (sfp->portspeed) {
+		sfp->status = bfa_sfp_speed_valid(sfp, sfp->portspeed);
+		if (sfp->state_query_cbfn)
+			sfp->state_query_cbfn(sfp->state_query_cbarg,
+					sfp->status);
+		sfp->portspeed = BFA_PORT_SPEED_UNKNOWN;
+	}
 
-		sfp->state_query_lock = 0;
-		sfp->state_query_cbfn = NULL;
+	sfp->state_query_lock = 0;
+	sfp->state_query_cbfn = NULL;
 }
 
 /*
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 37/87] fnic: assign FIP_ALL_FCF_MACS to fcoe_all_fcfs
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
                   ` (35 preceding siblings ...)
  2017-05-05 19:46 ` [PATCH 3.16-stable 36/87] bfa: Fix indentation Arnd Bergmann
@ 2017-05-05 19:46 ` Arnd Bergmann
  2017-11-06 17:41   ` Ben Hutchings
  2017-05-05 19:46 ` [PATCH 3.16-stable 38/87] be2iscsi: Fix bogus WARN_ON length check Arnd Bergmann
                   ` (50 subsequent siblings)
  87 siblings, 1 reply; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:46 UTC (permalink / raw)
  To: Ben Hutchings
  Cc: stable, Hiral Shah, Sesidhar Baddela, Christoph Hellwig, Arnd Bergmann

From: Hiral Shah <hishah@cisco.com>

Commit fffd96e05f5a23eaff542951e7d3ae4ec2f6258f upstream.

1) Assgning FIP_ALL_FCF_MACS to fcoe_all_fcfs allows VLAN request to be sent
to correct Mac address for VLAN Discovery otherwise VLAN request will be
sent to invalid address hence FLOGI never happens.

2) Simplify the copy_and_format_trace_data code and log the correct Link event
for fnic control path tracing in case of link status UP->UP.

3) Increment Fnic driver version

Signed-off-by: Hiral Shah <hishah@cisco.com>
Signed-off-by: Sesidhar Baddela <sebaddel@cisco.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/scsi/fnic/fnic.h       | 2 +-
 drivers/scsi/fnic/fnic_fcs.c   | 5 +++--
 drivers/scsi/fnic/fnic_trace.c | 5 ++---
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/scsi/fnic/fnic.h b/drivers/scsi/fnic/fnic.h
index 1d3521e13d77..bf8d34c26f13 100644
--- a/drivers/scsi/fnic/fnic.h
+++ b/drivers/scsi/fnic/fnic.h
@@ -39,7 +39,7 @@
 
 #define DRV_NAME		"fnic"
 #define DRV_DESCRIPTION		"Cisco FCoE HBA Driver"
-#define DRV_VERSION		"1.6.0.10"
+#define DRV_VERSION		"1.6.0.11"
 #define PFX			DRV_NAME ": "
 #define DFX                     DRV_NAME "%d: "
 
diff --git a/drivers/scsi/fnic/fnic_fcs.c b/drivers/scsi/fnic/fnic_fcs.c
index 1b948f633fc5..f3984b48f8e9 100644
--- a/drivers/scsi/fnic/fnic_fcs.c
+++ b/drivers/scsi/fnic/fnic_fcs.c
@@ -35,7 +35,7 @@
 #include "cq_enet_desc.h"
 #include "cq_exch_desc.h"
 
-static u8 fcoe_all_fcfs[ETH_ALEN];
+static u8 fcoe_all_fcfs[ETH_ALEN] = FIP_ALL_FCF_MACS;
 struct workqueue_struct *fnic_fip_queue;
 struct workqueue_struct *fnic_event_queue;
 
@@ -101,13 +101,14 @@ void fnic_handle_link(struct work_struct *work)
 				FNIC_FCS_DBG(KERN_DEBUG, fnic->lport->host,
 					     "link up\n");
 				fcoe_ctlr_link_up(&fnic->ctlr);
-			} else
+			} else {
 				/* UP -> UP */
 				spin_unlock_irqrestore(&fnic->fnic_lock, flags);
 				fnic_fc_trace_set_data(
 					fnic->lport->host->host_no, FNIC_FC_LE,
 					"Link Status: UP_UP",
 					strlen("Link Status: UP_UP"));
+			}
 		}
 	} else if (fnic->link_status) {
 		/* DOWN -> UP */
diff --git a/drivers/scsi/fnic/fnic_trace.c b/drivers/scsi/fnic/fnic_trace.c
index c77285926827..121a5d7e98c4 100644
--- a/drivers/scsi/fnic/fnic_trace.c
+++ b/drivers/scsi/fnic/fnic_trace.c
@@ -743,7 +743,7 @@ void copy_and_format_trace_data(struct fc_trace_hdr *tdata,
 
 	fmt = "%02d:%02d:%04ld %02d:%02d:%02d.%09lu ns%8x       %c%8x\t";
 	len += snprintf(fnic_dbgfs_prt->buffer + len,
-		(fnic_fc_trace_max_pages * PAGE_SIZE * 3) - len,
+		max_size - len,
 		fmt,
 		tm.tm_mon + 1, tm.tm_mday, tm.tm_year + 1900,
 		tm.tm_hour, tm.tm_min, tm.tm_sec,
@@ -767,8 +767,7 @@ void copy_and_format_trace_data(struct fc_trace_hdr *tdata,
 				j == ethhdr_len + fcoehdr_len + fchdr_len ||
 				(i > 3 && j%fchdr_len == 0)) {
 				len += snprintf(fnic_dbgfs_prt->buffer
-					+ len, (fnic_fc_trace_max_pages
-					* PAGE_SIZE * 3) - len,
+					+ len, max_size - len,
 					"\n\t\t\t\t\t\t\t\t");
 				i++;
 			}
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 38/87] be2iscsi: Fix bogus WARN_ON length check
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
                   ` (36 preceding siblings ...)
  2017-05-05 19:46 ` [PATCH 3.16-stable 37/87] fnic: assign FIP_ALL_FCF_MACS to fcoe_all_fcfs Arnd Bergmann
@ 2017-05-05 19:46 ` Arnd Bergmann
  2017-05-05 19:46 ` [PATCH 3.16-stable 39/87] mvsas: fix misleading indentation Arnd Bergmann
                   ` (49 subsequent siblings)
  87 siblings, 0 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:46 UTC (permalink / raw)
  To: Ben Hutchings
  Cc: stable, Tim Gardner, Jayamohan Kallickal, Minh Tran,
	John Soni Jose, James E.J. Bottomley, Martin K . Petersen,
	Arnd Bergmann

From: Tim Gardner <tim.gardner@canonical.com>

Commit ff5260af23815ff79dffa9b4a3cca1260692b094 upstream.

drivers/scsi/be2iscsi/be_main.c: In function 'be_sgl_create_contiguous':
drivers/scsi/be2iscsi/be_main.c:3187:18: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
  WARN_ON(!length > 0);

gcc version 5.2.1

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Cc: Jayamohan Kallickal <jayamohan.kallickal@avagotech.com>
Cc: Minh Tran <minh.tran@avagotech.com>
Cc: John Soni Jose <sony.john-n@avagotech.com>
Cc: "James E.J. Bottomley" <JBottomley@odin.com>
Reported-by: Joel Stanley <joel@jms.id.au>
Reviewed-by: Manoj Kumar <manoj@linux.vnet.ibm.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/scsi/be2iscsi/be_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c
index 1075b7001e4a..d5068e43cfc5 100644
--- a/drivers/scsi/be2iscsi/be_main.c
+++ b/drivers/scsi/be2iscsi/be_main.c
@@ -3152,7 +3152,7 @@ be_sgl_create_contiguous(void *virtual_address,
 {
 	WARN_ON(!virtual_address);
 	WARN_ON(!physical_address);
-	WARN_ON(!length > 0);
+	WARN_ON(!length);
 	WARN_ON(!sgl);
 
 	sgl->va = virtual_address;
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 39/87] mvsas: fix misleading indentation
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
                   ` (37 preceding siblings ...)
  2017-05-05 19:46 ` [PATCH 3.16-stable 38/87] be2iscsi: Fix bogus WARN_ON length check Arnd Bergmann
@ 2017-05-05 19:46 ` Arnd Bergmann
  2017-05-05 19:46 ` [PATCH 3.16-stable 40/87] paride: fix the "verbose" module param Arnd Bergmann
                   ` (48 subsequent siblings)
  87 siblings, 0 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:46 UTC (permalink / raw)
  To: Ben Hutchings
  Cc: stable, Luis de Bethencourt, Martin K . Petersen, Arnd Bergmann

From: Luis de Bethencourt <luisbg@osg.samsung.com>

Commit f8fe5d3a9286263fb8aad500b91f39dda0a302eb upstream.

Fix a smatch warning:
drivers/scsi/mvsas/mv_sas.c:740 mvs_task_prep() warn: curly braces intended?

The code is correct, the indention is misleading. When the device is not
ready we want to return SAS_PHY_DOWN. But current indentation makes it
look like we only do so in the else branch of if (mvi_dev).

Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/scsi/mvsas/mv_sas.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/mvsas/mv_sas.c b/drivers/scsi/mvsas/mv_sas.c
index 42b1f3318e59..eab05c5f8b0e 100644
--- a/drivers/scsi/mvsas/mv_sas.c
+++ b/drivers/scsi/mvsas/mv_sas.c
@@ -737,8 +737,8 @@ static int mvs_task_prep(struct sas_task *task, struct mvs_info *mvi, int is_tmf
 			mv_dprintk("device %016llx not ready.\n",
 				SAS_ADDR(dev->sas_addr));
 
-			rc = SAS_PHY_DOWN;
-			return rc;
+		rc = SAS_PHY_DOWN;
+		return rc;
 	}
 	tei.port = dev->port->lldd_port;
 	if (tei.port && !tei.port->port_attached && !tmf) {
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 40/87] paride: fix the "verbose" module param
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
                   ` (38 preceding siblings ...)
  2017-05-05 19:46 ` [PATCH 3.16-stable 39/87] mvsas: fix misleading indentation Arnd Bergmann
@ 2017-05-05 19:46 ` Arnd Bergmann
  2017-05-05 19:46 ` [PATCH 3.16-stable 41/87] aic94xx: Skip reading user settings if flash is not found Arnd Bergmann
                   ` (47 subsequent siblings)
  87 siblings, 0 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:46 UTC (permalink / raw)
  To: Ben Hutchings
  Cc: stable, Dan Carpenter, Tim Waugh, Andrew Morton, Linus Torvalds,
	Arnd Bergmann

From: Dan Carpenter <dan.carpenter@oracle.com>

Commit dac6eba5d29aca58fa6832fd70f2eb86a562dc23 upstream.

The verbose module parameter can be set to 2 for extremely verbose
messages so the type should be int instead of bool.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Tim Waugh <tim@cyberelk.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/block/paride/pg.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/block/paride/pg.c b/drivers/block/paride/pg.c
index 2ce3dfd7e6b9..876d0c3eaf58 100644
--- a/drivers/block/paride/pg.c
+++ b/drivers/block/paride/pg.c
@@ -137,7 +137,7 @@
 
 */
 
-static bool verbose = 0;
+static int verbose;
 static int major = PG_MAJOR;
 static char *name = PG_NAME;
 static int disable = 0;
@@ -168,7 +168,7 @@ enum {D_PRT, D_PRO, D_UNI, D_MOD, D_SLV, D_DLY};
 
 #include <asm/uaccess.h>
 
-module_param(verbose, bool, 0644);
+module_param(verbose, int, 0644);
 module_param(major, int, 0);
 module_param(name, charp, 0);
 module_param_array(drive0, int, NULL, 0);
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 41/87] aic94xx: Skip reading user settings if flash is not found
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
                   ` (39 preceding siblings ...)
  2017-05-05 19:46 ` [PATCH 3.16-stable 40/87] paride: fix the "verbose" module param Arnd Bergmann
@ 2017-05-05 19:46 ` Arnd Bergmann
  2017-05-05 19:47 ` [PATCH 3.16-stable 42/87] mtd: pmcmsp: use kstrndup instead of kmalloc+strncpy Arnd Bergmann
                   ` (46 subsequent siblings)
  87 siblings, 0 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:46 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: stable, Hannes Reinecke, James Bottomley, Arnd Bergmann

From: Hannes Reinecke <hare@suse.de>

Commit 23efd4ea053c883d98e1cc12bb13319a62b9b045 upstream.

If no user settings are found it's pointless trying to
read them from flash. So skip that step.
This also fixes a compilation warning about uninitialized variables in
aic94xx.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/scsi/aic94xx/aic94xx_sds.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/aic94xx/aic94xx_sds.c b/drivers/scsi/aic94xx/aic94xx_sds.c
index edb43fda9f36..c831e30411fa 100644
--- a/drivers/scsi/aic94xx/aic94xx_sds.c
+++ b/drivers/scsi/aic94xx/aic94xx_sds.c
@@ -983,7 +983,7 @@ static int asd_process_ctrl_a_user(struct asd_ha_struct *asd_ha,
 {
 	int err, i;
 	u32 offs, size;
-	struct asd_ll_el *el;
+	struct asd_ll_el *el = NULL;
 	struct asd_ctrla_phy_settings *ps;
 	struct asd_ctrla_phy_settings dflt_ps;
 
@@ -1004,6 +1004,7 @@ static int asd_process_ctrl_a_user(struct asd_ha_struct *asd_ha,
 
 		size = sizeof(struct asd_ctrla_phy_settings);
 		ps = &dflt_ps;
+		goto out_process;
 	}
 
 	if (size == 0)
@@ -1028,7 +1029,7 @@ static int asd_process_ctrl_a_user(struct asd_ha_struct *asd_ha,
 		ASD_DPRINTK("couldn't find ctrla phy settings struct\n");
 		goto out2;
 	}
-
+out_process:
 	err = asd_process_ctrla_phy_settings(asd_ha, ps);
 	if (err) {
 		ASD_DPRINTK("couldn't process ctrla phy settings\n");
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 42/87] mtd: pmcmsp: use kstrndup instead of kmalloc+strncpy
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
                   ` (40 preceding siblings ...)
  2017-05-05 19:46 ` [PATCH 3.16-stable 41/87] aic94xx: Skip reading user settings if flash is not found Arnd Bergmann
@ 2017-05-05 19:47 ` Arnd Bergmann
  2017-05-05 19:47 ` [PATCH 3.16-stable 43/87] mtd: maps: rbtx4939-flash: delete an unused variable in rbtx4939_flash_remove Arnd Bergmann
                   ` (45 subsequent siblings)
  87 siblings, 0 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:47 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: stable, Arnd Bergmann, Brian Norris

Commit b3c3a0685e34e98172cf467e982a7a8a9a89d518 upstream.

kernelci.org reports a warning for this driver, as it copies a local
variable into a 'const char *' string:

    drivers/mtd/maps/pmcmsp-flash.c:149:30: warning: passing argument 1 of 'strncpy' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]

Using kstrndup() simplifies the code and avoids the warning.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/mtd/maps/pmcmsp-flash.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/mtd/maps/pmcmsp-flash.c b/drivers/mtd/maps/pmcmsp-flash.c
index f9fa3fad728e..2051f28ddac6 100644
--- a/drivers/mtd/maps/pmcmsp-flash.c
+++ b/drivers/mtd/maps/pmcmsp-flash.c
@@ -139,15 +139,13 @@ static int __init init_msp_flash(void)
 		}
 
 		msp_maps[i].bankwidth = 1;
-		msp_maps[i].name = kmalloc(7, GFP_KERNEL);
+		msp_maps[i].name = kstrndup(flash_name, 7, GFP_KERNEL);
 		if (!msp_maps[i].name) {
 			iounmap(msp_maps[i].virt);
 			kfree(msp_parts[i]);
 			goto cleanup_loop;
 		}
 
-		msp_maps[i].name = strncpy(msp_maps[i].name, flash_name, 7);
-
 		for (j = 0; j < pcnt; j++) {
 			part_name[5] = '0' + i;
 			part_name[7] = '0' + j;
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 43/87] mtd: maps: rbtx4939-flash: delete an unused variable in rbtx4939_flash_remove
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
                   ` (41 preceding siblings ...)
  2017-05-05 19:47 ` [PATCH 3.16-stable 42/87] mtd: pmcmsp: use kstrndup instead of kmalloc+strncpy Arnd Bergmann
@ 2017-05-05 19:47 ` Arnd Bergmann
  2017-05-05 19:47 ` [PATCH 3.16-stable 44/87] xilinx: Fix compiler warning Arnd Bergmann
                   ` (44 subsequent siblings)
  87 siblings, 0 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:47 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: stable, Atsushi Nemoto, Brian Norris, Arnd Bergmann

From: Atsushi Nemoto <anemo@mba.ocn.ne.jp>

Commit 939f9d8ee0aa99d7cb44af8de8eed13333ceb2ed upstream.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/mtd/maps/rbtx4939-flash.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/mtd/maps/rbtx4939-flash.c b/drivers/mtd/maps/rbtx4939-flash.c
index 146b6047ed2b..a84fdfb10518 100644
--- a/drivers/mtd/maps/rbtx4939-flash.c
+++ b/drivers/mtd/maps/rbtx4939-flash.c
@@ -35,8 +35,6 @@ static int rbtx4939_flash_remove(struct platform_device *dev)
 		return 0;
 
 	if (info->mtd) {
-		struct rbtx4939_flash_data *pdata = dev_get_platdata(&dev->dev);
-
 		mtd_device_unregister(info->mtd);
 		map_destroy(info->mtd);
 	}
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 44/87] xilinx: Fix compiler warning
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
                   ` (42 preceding siblings ...)
  2017-05-05 19:47 ` [PATCH 3.16-stable 43/87] mtd: maps: rbtx4939-flash: delete an unused variable in rbtx4939_flash_remove Arnd Bergmann
@ 2017-05-05 19:47 ` Arnd Bergmann
  2017-05-05 19:47 ` [PATCH 3.16-stable 45/87] i40e: Reduce stack in i40e_dbg_dump_desc Arnd Bergmann
                   ` (43 subsequent siblings)
  87 siblings, 0 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:47 UTC (permalink / raw)
  To: Ben Hutchings
  Cc: stable, Manuel Schölling, David S . Miller, Arnd Bergmann

From: Manuel Schölling <manuel.schoelling@gmx.de>

Commit b2daccdc2f728b20850bffbe4e22241dfc2dca59 upstream.

The time comparsion functions require arguments of type unsigned long
instead of (signed) long.

Signed-off-by: Manuel Schölling <manuel.schoelling@gmx.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/net/ethernet/xilinx/ll_temac_main.c       | 2 +-
 drivers/net/ethernet/xilinx/xilinx_axienet_mdio.c | 2 +-
 drivers/net/ethernet/xilinx/xilinx_emaclite.c     | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/xilinx/ll_temac_main.c b/drivers/net/ethernet/xilinx/ll_temac_main.c
index 4ef818a7a6c6..8a6e5c2d6f95 100644
--- a/drivers/net/ethernet/xilinx/ll_temac_main.c
+++ b/drivers/net/ethernet/xilinx/ll_temac_main.c
@@ -72,7 +72,7 @@ void temac_iow(struct temac_local *lp, int offset, u32 value)
 
 int temac_indirect_busywait(struct temac_local *lp)
 {
-	long end = jiffies + 2;
+	unsigned long end = jiffies + 2;
 
 	while (!(temac_ior(lp, XTE_RDY0_OFFSET) & XTE_RDY0_HARD_ACS_RDY_MASK)) {
 		if (time_before_eq(end, jiffies)) {
diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_mdio.c b/drivers/net/ethernet/xilinx/xilinx_axienet_mdio.c
index d4abf478e2bb..3b67d60d4378 100644
--- a/drivers/net/ethernet/xilinx/xilinx_axienet_mdio.c
+++ b/drivers/net/ethernet/xilinx/xilinx_axienet_mdio.c
@@ -19,7 +19,7 @@
 /* Wait till MDIO interface is ready to accept a new transaction.*/
 int axienet_mdio_wait_until_ready(struct axienet_local *lp)
 {
-	long end = jiffies + 2;
+	unsigned long end = jiffies + 2;
 	while (!(axienet_ior(lp, XAE_MDIO_MCR_OFFSET) &
 		 XAE_MDIO_MCR_READY_MASK)) {
 		if (time_before_eq(end, jiffies)) {
diff --git a/drivers/net/ethernet/xilinx/xilinx_emaclite.c b/drivers/net/ethernet/xilinx/xilinx_emaclite.c
index 06b5e4132040..af36c7b560df 100644
--- a/drivers/net/ethernet/xilinx/xilinx_emaclite.c
+++ b/drivers/net/ethernet/xilinx/xilinx_emaclite.c
@@ -707,7 +707,7 @@ static irqreturn_t xemaclite_interrupt(int irq, void *dev_id)
 
 static int xemaclite_mdio_wait(struct net_local *lp)
 {
-	long end = jiffies + 2;
+	unsigned long end = jiffies + 2;
 
 	/* wait for the MDIO interface to not be busy or timeout
 	   after some time.
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 45/87] i40e: Reduce stack in i40e_dbg_dump_desc
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
                   ` (43 preceding siblings ...)
  2017-05-05 19:47 ` [PATCH 3.16-stable 44/87] xilinx: Fix compiler warning Arnd Bergmann
@ 2017-05-05 19:47 ` Arnd Bergmann
  2017-05-05 19:47 ` [PATCH 3.16-stable 46/87] mlx5: avoid build warnings on 32-bit Arnd Bergmann
                   ` (42 subsequent siblings)
  87 siblings, 0 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:47 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: stable, Joe Perches, Jeff Kirsher, Arnd Bergmann

From: Joe Perches <joe@perches.com>

Commit 1ddc2c00fdb275fcbb99a5585a6431f074cc0bc4 upstream.

Reduce stack use by using kmemdup and not using a very
large struct on stack.

In function ‘i40e_dbg_dump_desc’:
warning: the frame size of 8192 bytes is larger than 2048 bytes [-Wframe-larger-than=]

Signed-off-by: Joe Perches <joe@perches.com>
Tested-by: Jim Young <jamesx.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/net/ethernet/intel/i40e/i40e_debugfs.c | 30 +++++++++++++++-----------
 1 file changed, 17 insertions(+), 13 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_debugfs.c b/drivers/net/ethernet/intel/i40e/i40e_debugfs.c
index cffdfc21290f..decf6faaa89d 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_debugfs.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_debugfs.c
@@ -754,7 +754,7 @@ static void i40e_dbg_dump_desc(int cnt, int vsi_seid, int ring_id, int desc_n,
 {
 	struct i40e_tx_desc *txd;
 	union i40e_rx_desc *rxd;
-	struct i40e_ring ring;
+	struct i40e_ring *ring;
 	struct i40e_vsi *vsi;
 	int i;
 
@@ -773,29 +773,32 @@ static void i40e_dbg_dump_desc(int cnt, int vsi_seid, int ring_id, int desc_n,
 			 vsi_seid);
 		return;
 	}
-	if (is_rx_ring)
-		ring = *vsi->rx_rings[ring_id];
-	else
-		ring = *vsi->tx_rings[ring_id];
+
+	ring = kmemdup(is_rx_ring
+		       ? vsi->rx_rings[ring_id] : vsi->tx_rings[ring_id],
+		       sizeof(*ring), GFP_KERNEL);
+	if (!ring)
+		return;
+
 	if (cnt == 2) {
 		dev_info(&pf->pdev->dev, "vsi = %02i %s ring = %02i\n",
 			 vsi_seid, is_rx_ring ? "rx" : "tx", ring_id);
-		for (i = 0; i < ring.count; i++) {
+		for (i = 0; i < ring->count; i++) {
 			if (!is_rx_ring) {
-				txd = I40E_TX_DESC(&ring, i);
+				txd = I40E_TX_DESC(ring, i);
 				dev_info(&pf->pdev->dev,
 					 "   d[%03i] = 0x%016llx 0x%016llx\n",
 					 i, txd->buffer_addr,
 					 txd->cmd_type_offset_bsz);
 			} else if (sizeof(union i40e_rx_desc) ==
 				   sizeof(union i40e_16byte_rx_desc)) {
-				rxd = I40E_RX_DESC(&ring, i);
+				rxd = I40E_RX_DESC(ring, i);
 				dev_info(&pf->pdev->dev,
 					 "   d[%03i] = 0x%016llx 0x%016llx\n",
 					 i, rxd->read.pkt_addr,
 					 rxd->read.hdr_addr);
 			} else {
-				rxd = I40E_RX_DESC(&ring, i);
+				rxd = I40E_RX_DESC(ring, i);
 				dev_info(&pf->pdev->dev,
 					 "   d[%03i] = 0x%016llx 0x%016llx 0x%016llx 0x%016llx\n",
 					 i, rxd->read.pkt_addr,
@@ -804,26 +807,26 @@ static void i40e_dbg_dump_desc(int cnt, int vsi_seid, int ring_id, int desc_n,
 			}
 		}
 	} else if (cnt == 3) {
-		if (desc_n >= ring.count || desc_n < 0) {
+		if (desc_n >= ring->count || desc_n < 0) {
 			dev_info(&pf->pdev->dev,
 				 "descriptor %d not found\n", desc_n);
 			return;
 		}
 		if (!is_rx_ring) {
-			txd = I40E_TX_DESC(&ring, desc_n);
+			txd = I40E_TX_DESC(ring, desc_n);
 			dev_info(&pf->pdev->dev,
 				 "vsi = %02i tx ring = %02i d[%03i] = 0x%016llx 0x%016llx\n",
 				 vsi_seid, ring_id, desc_n,
 				 txd->buffer_addr, txd->cmd_type_offset_bsz);
 		} else if (sizeof(union i40e_rx_desc) ==
 			   sizeof(union i40e_16byte_rx_desc)) {
-			rxd = I40E_RX_DESC(&ring, desc_n);
+			rxd = I40E_RX_DESC(ring, desc_n);
 			dev_info(&pf->pdev->dev,
 				 "vsi = %02i rx ring = %02i d[%03i] = 0x%016llx 0x%016llx\n",
 				 vsi_seid, ring_id, desc_n,
 				 rxd->read.pkt_addr, rxd->read.hdr_addr);
 		} else {
-			rxd = I40E_RX_DESC(&ring, desc_n);
+			rxd = I40E_RX_DESC(ring, desc_n);
 			dev_info(&pf->pdev->dev,
 				 "vsi = %02i rx ring = %02i d[%03i] = 0x%016llx 0x%016llx 0x%016llx 0x%016llx\n",
 				 vsi_seid, ring_id, desc_n,
@@ -833,6 +836,7 @@ static void i40e_dbg_dump_desc(int cnt, int vsi_seid, int ring_id, int desc_n,
 	} else {
 		dev_info(&pf->pdev->dev, "dump desc rx/tx <vsi_seid> <ring_id> [<desc_n>]\n");
 	}
+	kfree(ring);
 }
 
 /**
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 46/87] mlx5: avoid build warnings on 32-bit
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
                   ` (44 preceding siblings ...)
  2017-05-05 19:47 ` [PATCH 3.16-stable 45/87] i40e: Reduce stack in i40e_dbg_dump_desc Arnd Bergmann
@ 2017-05-05 19:47 ` Arnd Bergmann
  2017-05-05 19:47 ` [PATCH 3.16-stable 47/87] mISDN: avoid arch specific __builtin_return_address call Arnd Bergmann
                   ` (41 subsequent siblings)
  87 siblings, 0 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:47 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: stable, Arnd Bergmann, David S . Miller

Commit 07fd45564be5acb2667ab76d8c075886377928a5 upstream.

The mlx5 driver passes a string pointer in through a 'u64' variable,
which on 32-bit machines causes a build warning:

drivers/net/ethernet/mellanox/mlx5/core/debugfs.c: In function 'qp_read_field':
drivers/net/ethernet/mellanox/mlx5/core/debugfs.c:303:11: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]

The code is in fact safe, so we can shut up the warning by adding
extra type casts.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/net/ethernet/mellanox/mlx5/core/debugfs.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/debugfs.c b/drivers/net/ethernet/mellanox/mlx5/core/debugfs.c
index 10e1f1a18255..4878025e231c 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/debugfs.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/debugfs.c
@@ -300,11 +300,11 @@ static u64 qp_read_field(struct mlx5_core_dev *dev, struct mlx5_core_qp *qp,
 		param = qp->pid;
 		break;
 	case QP_STATE:
-		param = (u64)mlx5_qp_state_str(be32_to_cpu(ctx->flags) >> 28);
+		param = (unsigned long)mlx5_qp_state_str(be32_to_cpu(ctx->flags) >> 28);
 		*is_str = 1;
 		break;
 	case QP_XPORT:
-		param = (u64)mlx5_qp_type_str((be32_to_cpu(ctx->flags) >> 16) & 0xff);
+		param = (unsigned long)mlx5_qp_type_str((be32_to_cpu(ctx->flags) >> 16) & 0xff);
 		*is_str = 1;
 		break;
 	case QP_MTU:
@@ -464,7 +464,7 @@ static ssize_t dbg_read(struct file *filp, char __user *buf, size_t count,
 
 
 	if (is_str)
-		ret = snprintf(tbuf, sizeof(tbuf), "%s\n", (const char *)field);
+		ret = snprintf(tbuf, sizeof(tbuf), "%s\n", (const char *)(unsigned long)field);
 	else
 		ret = snprintf(tbuf, sizeof(tbuf), "0x%llx\n", field);
 
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 47/87] mISDN: avoid arch specific __builtin_return_address call
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
                   ` (45 preceding siblings ...)
  2017-05-05 19:47 ` [PATCH 3.16-stable 46/87] mlx5: avoid build warnings on 32-bit Arnd Bergmann
@ 2017-05-05 19:47 ` Arnd Bergmann
  2017-05-05 19:47 ` [PATCH 3.16-stable 48/87] cpmac: remove hopeless #warning Arnd Bergmann
                   ` (40 subsequent siblings)
  87 siblings, 0 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:47 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: stable, Arnd Bergmann, David S . Miller

Commit 3e7a8716e20b759eec0ad88145255bb33174f0c8 upstream.

Not all architectures are able to call __builtin_return_address().
On ARM, the mISDN code produces this warning:

hardware/mISDN/w6692.c: In function 'w6692_dctrl':
hardware/mISDN/w6692.c:1181:75: warning: unsupported argument to '__builtin_return_address'
  pr_debug("%s: %s dev(%d) open from %p\n", card->name, __func__,
                                                                           ^
hardware/mISDN/mISDNipac.c: In function 'open_dchannel':
hardware/mISDN/mISDNipac.c:759:75: warning: unsupported argument to '__builtin_return_address'
  pr_debug("%s: %s dev(%d) open from %p\n", isac->name, __func__,
                                                                           ^

In a lot of cases, this is relatively easy to work around by
passing the value of __builtin_return_address(0) from the
callers into the functions that want it. One exception is
the indirect 'open' function call in struct isac_hw. While it
would be possible to fix this as well, this patch only addresses
the other callers properly and lets this one return the direct
parent function, which should be good enough.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/isdn/hardware/mISDN/mISDNipac.c | 12 +++++++++---
 drivers/isdn/hardware/mISDN/w6692.c     |  6 +++---
 2 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/drivers/isdn/hardware/mISDN/mISDNipac.c b/drivers/isdn/hardware/mISDN/mISDNipac.c
index 92cf6fcd20ac..cb428b9ee441 100644
--- a/drivers/isdn/hardware/mISDN/mISDNipac.c
+++ b/drivers/isdn/hardware/mISDN/mISDNipac.c
@@ -754,10 +754,10 @@ dbusy_timer_handler(struct isac_hw *isac)
 }
 
 static int
-open_dchannel(struct isac_hw *isac, struct channel_req *rq)
+open_dchannel_caller(struct isac_hw *isac, struct channel_req *rq, void *caller)
 {
 	pr_debug("%s: %s dev(%d) open from %p\n", isac->name, __func__,
-		 isac->dch.dev.id, __builtin_return_address(1));
+		 isac->dch.dev.id, caller);
 	if (rq->protocol != ISDN_P_TE_S0)
 		return -EINVAL;
 	if (rq->adr.channel == 1)
@@ -771,6 +771,12 @@ open_dchannel(struct isac_hw *isac, struct channel_req *rq)
 	return 0;
 }
 
+static int
+open_dchannel(struct isac_hw *isac, struct channel_req *rq)
+{
+	return open_dchannel_caller(isac, rq, __builtin_return_address(0));
+}
+
 static const char *ISACVer[] =
 {"2086/2186 V1.1", "2085 B1", "2085 B2",
  "2085 V2.3"};
@@ -1547,7 +1553,7 @@ ipac_dctrl(struct mISDNchannel *ch, u32 cmd, void *arg)
 	case OPEN_CHANNEL:
 		rq = arg;
 		if (rq->protocol == ISDN_P_TE_S0)
-			err = open_dchannel(isac, rq);
+			err = open_dchannel_caller(isac, rq, __builtin_return_address(0));
 		else
 			err = open_bchannel(ipac, rq);
 		if (err)
diff --git a/drivers/isdn/hardware/mISDN/w6692.c b/drivers/isdn/hardware/mISDN/w6692.c
index de69f6828c76..741675525b53 100644
--- a/drivers/isdn/hardware/mISDN/w6692.c
+++ b/drivers/isdn/hardware/mISDN/w6692.c
@@ -1176,10 +1176,10 @@ w6692_l1callback(struct dchannel *dch, u32 cmd)
 }
 
 static int
-open_dchannel(struct w6692_hw *card, struct channel_req *rq)
+open_dchannel(struct w6692_hw *card, struct channel_req *rq, void *caller)
 {
 	pr_debug("%s: %s dev(%d) open from %p\n", card->name, __func__,
-		 card->dch.dev.id, __builtin_return_address(1));
+		 card->dch.dev.id, caller);
 	if (rq->protocol != ISDN_P_TE_S0)
 		return -EINVAL;
 	if (rq->adr.channel == 1)
@@ -1207,7 +1207,7 @@ w6692_dctrl(struct mISDNchannel *ch, u32 cmd, void *arg)
 	case OPEN_CHANNEL:
 		rq = arg;
 		if (rq->protocol == ISDN_P_TE_S0)
-			err = open_dchannel(card, rq);
+			err = open_dchannel(card, rq, __builtin_return_address(0));
 		else
 			err = open_bchannel(card, rq);
 		if (err)
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 48/87] cpmac: remove hopeless #warning
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
                   ` (46 preceding siblings ...)
  2017-05-05 19:47 ` [PATCH 3.16-stable 47/87] mISDN: avoid arch specific __builtin_return_address call Arnd Bergmann
@ 2017-05-05 19:47 ` Arnd Bergmann
  2017-05-05 19:47 ` [PATCH 3.16-stable 49/87] net: caif: fix misleading indentation Arnd Bergmann
                   ` (39 subsequent siblings)
  87 siblings, 0 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:47 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: stable, Arnd Bergmann, David S . Miller

Commit 4ce83574a7310d893cdb1e0a8cabe77b0efc8e58 upstream.

The #warning was present 10 years ago when the driver first got merged.
As the platform is rather obsolete by now, it seems very unlikely that
the warning will cause anyone to fix the code properly.

kernelci.org reports the warning for every build in the meantime, so
I think it's better to just turn it into a code comment to reduce
noise.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/net/ethernet/ti/cpmac.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/ti/cpmac.c b/drivers/net/ethernet/ti/cpmac.c
index 7399a52f7c26..44d5a7bee0d7 100644
--- a/drivers/net/ethernet/ti/cpmac.c
+++ b/drivers/net/ethernet/ti/cpmac.c
@@ -1226,7 +1226,7 @@ int cpmac_init(void)
 		goto fail_alloc;
 	}
 
-#warning FIXME: unhardcode gpio&reset bits
+	/* FIXME: unhardcode gpio&reset bits */
 	ar7_gpio_disable(26);
 	ar7_gpio_disable(27);
 	ar7_device_reset(AR7_RESET_BIT_CPMAC_LO);
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 49/87] net: caif: fix misleading indentation
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
                   ` (47 preceding siblings ...)
  2017-05-05 19:47 ` [PATCH 3.16-stable 48/87] cpmac: remove hopeless #warning Arnd Bergmann
@ 2017-05-05 19:47 ` Arnd Bergmann
  2017-05-05 19:47 ` [PATCH 3.16-stable 50/87] net: am2150: fix nmclan_cs.c shared interrupt handling Arnd Bergmann
                   ` (38 subsequent siblings)
  87 siblings, 0 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:47 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: stable, Arnd Bergmann, David S . Miller, Greg Kroah-Hartman

commit 8e0cc8c326d99e41468c96fea9785ab78883a281 upstream.

gcc points out code that is not indented the way it is
interpreted:

net/caif/cfpkt_skbuff.c: In function 'cfpkt_setlen':
net/caif/cfpkt_skbuff.c:289:4: error: statement is indented as if it were guarded by... [-Werror=misleading-indentation]
    return cfpkt_getlen(pkt);
    ^~~~~~
net/caif/cfpkt_skbuff.c:286:3: note: ...this 'else' clause, but it is not
   else
   ^~~~

It is clear from the context that not returning here would be
a bug, as we'd end up passing a negative length into a function
that takes a u16 length, so it is not missing curly braces
here, and I'm assuming that the indentation is the only part
that's wrong about it.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 net/caif/cfpkt_skbuff.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/caif/cfpkt_skbuff.c b/net/caif/cfpkt_skbuff.c
index 1be0b521ac49..5add8e75759d 100644
--- a/net/caif/cfpkt_skbuff.c
+++ b/net/caif/cfpkt_skbuff.c
@@ -286,7 +286,7 @@ int cfpkt_setlen(struct cfpkt *pkt, u16 len)
 		else
 			skb_trim(skb, len);
 
-			return cfpkt_getlen(pkt);
+		return cfpkt_getlen(pkt);
 	}
 
 	/* Need to expand SKB */
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 50/87] net: am2150: fix nmclan_cs.c shared interrupt handling
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
                   ` (48 preceding siblings ...)
  2017-05-05 19:47 ` [PATCH 3.16-stable 49/87] net: caif: fix misleading indentation Arnd Bergmann
@ 2017-05-05 19:47 ` Arnd Bergmann
  2017-05-05 19:47 ` [PATCH 3.16-stable 51/87] am2150: Update nmclan_cs.c to use update PCMCIA API Arnd Bergmann
                   ` (37 subsequent siblings)
  87 siblings, 0 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:47 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: stable, Arnd Bergmann, David S . Miller

Commit ec48c4ad83d711f18daea527bb2c78d388cc5ef3 upstream.

A recent patch tried to work around a valid warning for the use of a
deprecated interface by blindly changing from the old
pcmcia_request_exclusive_irq() interface to pcmcia_request_irq().

This driver has an interrupt handler that is not currently aware
of shared interrupts, but can be easily converted to be.
At the moment, the driver reads the interrupt status register
repeatedly until it contains only zeroes in the interesting bits,
and handles each bit individually.

This patch adds the missing part of returning IRQ_NONE in case none
of the bits are set to start with, so we can move on to the next
interrupt source.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 5f5316fcd08ef7 ("am2150: Update nmclan_cs.c to use update PCMCIA API")
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/net/ethernet/amd/nmclan_cs.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/amd/nmclan_cs.c b/drivers/net/ethernet/amd/nmclan_cs.c
index abf3b1581c82..11cb05df749c 100644
--- a/drivers/net/ethernet/amd/nmclan_cs.c
+++ b/drivers/net/ethernet/amd/nmclan_cs.c
@@ -952,6 +952,8 @@ static irqreturn_t mace_interrupt(int irq, void *dev_id)
   do {
     /* WARNING: MACE_IR is a READ/CLEAR port! */
     status = inb(ioaddr + AM2150_MACE_BASE + MACE_IR);
+    if (!(status & ~MACE_IMR_DEFAULT) && IntrCnt == MACE_MAX_IR_ITERATIONS)
+      return IRQ_NONE;
 
     pr_debug("mace_interrupt: irq 0x%X status 0x%X.\n", irq, status);
 
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 51/87] am2150: Update nmclan_cs.c to use update PCMCIA API
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
                   ` (49 preceding siblings ...)
  2017-05-05 19:47 ` [PATCH 3.16-stable 50/87] net: am2150: fix nmclan_cs.c shared interrupt handling Arnd Bergmann
@ 2017-05-05 19:47 ` Arnd Bergmann
  2017-05-05 19:47 ` [PATCH 3.16-stable 52/87] net: tulip: turn compile-time warning into dev_warn() Arnd Bergmann
                   ` (36 subsequent siblings)
  87 siblings, 0 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:47 UTC (permalink / raw)
  To: Ben Hutchings
  Cc: stable, Jeff Kirsher, Roger Pao, David S . Miller, Arnd Bergmann

From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>

Commit c775bd73d40b6f15ff448754e5d801ae3634395e upstream.

Resolves compile warning about use of a deprecated function call:
drivers/net/ethernet/amd/nmclan_cs.c: In function ‘nmclan_config’:
drivers/net/ethernet/amd/nmclan_cs.c:624:3: warning: ‘pcmcia_request_exclusive_irq’ is deprecated (declared at include/pcmcia/ds.h:213) [-Wdeprecated-declarations]
   ret = pcmcia_request_exclusive_irq(link, mace_interrupt);

Updates pcmcia_request_exclusive_irq() to pcmcia_request_irq().

CC: Roger Pao <rpao@paonet.org>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/net/ethernet/amd/nmclan_cs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/amd/nmclan_cs.c b/drivers/net/ethernet/amd/nmclan_cs.c
index 11cb05df749c..27245efe9f50 100644
--- a/drivers/net/ethernet/amd/nmclan_cs.c
+++ b/drivers/net/ethernet/amd/nmclan_cs.c
@@ -621,7 +621,7 @@ static int nmclan_config(struct pcmcia_device *link)
   ret = pcmcia_request_io(link);
   if (ret)
 	  goto failed;
-  ret = pcmcia_request_exclusive_irq(link, mace_interrupt);
+  ret = pcmcia_request_irq(link, mace_interrupt);
   if (ret)
 	  goto failed;
   ret = pcmcia_enable_device(link);
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 52/87] net: tulip: turn compile-time warning into dev_warn()
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
                   ` (50 preceding siblings ...)
  2017-05-05 19:47 ` [PATCH 3.16-stable 51/87] am2150: Update nmclan_cs.c to use update PCMCIA API Arnd Bergmann
@ 2017-05-05 19:47 ` Arnd Bergmann
  2017-05-05 19:47 ` [PATCH 3.16-stable 53/87] net: vxge: avoid unused function warnings Arnd Bergmann
                   ` (35 subsequent siblings)
  87 siblings, 0 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:47 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: stable, Arnd Bergmann, David S . Miller

Commit 738cc2bfd9b0858122a60c07f228ec8807592602 upstream.

The tulip driver causes annoying build-time warnings for allmodconfig
builds for all recent architectures:

dec/tulip/winbond-840.c:910:2: warning: #warning Processor architecture undefined
dec/tulip/tulip_core.c:101:2: warning: #warning Processor architecture undefined!

This is the last remaining warning for arm64, and I'd like to get rid of
it. We don't really know the cache line size, architecturally it would
be at least 16 bytes, but all implementations I found have 64 or 128
bytes. Configuring tulip for 32-byte lines as we do on ARM32 seems to
be the safe but slow default, and nobody who cares about performance these
days would use a tulip chip anyway, so we can just use that.

To save the next person the job of trying to find out what this is for
and picking a default for their architecture just to kill off the warning,
I'm now removing the preprocessor #warning and turning it into a pr_warn
or dev_warn that prints the equivalent information when the driver gets
loaded.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Grant Grundler <grundler@parisc-linux.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/net/ethernet/dec/tulip/tulip_core.c  | 9 +++++++--
 drivers/net/ethernet/dec/tulip/winbond-840.c | 2 +-
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/dec/tulip/tulip_core.c b/drivers/net/ethernet/dec/tulip/tulip_core.c
index 861660841ce2..eab3142bd795 100644
--- a/drivers/net/ethernet/dec/tulip/tulip_core.c
+++ b/drivers/net/ethernet/dec/tulip/tulip_core.c
@@ -98,8 +98,7 @@ static int csr0 = 0x01A00000 | 0x4800;
 #elif defined(__mips__)
 static int csr0 = 0x00200000 | 0x4000;
 #else
-#warning Processor architecture undefined!
-static int csr0 = 0x00A00000 | 0x4800;
+static int csr0;
 #endif
 
 /* Operational parameters that usually are not changed. */
@@ -1982,6 +1981,12 @@ static int __init tulip_init (void)
 	pr_info("%s", version);
 #endif
 
+	if (!csr0) {
+		pr_warn("tulip: unknown CPU architecture, using default csr0\n");
+		/* default to 8 longword cache line alignment */
+		csr0 = 0x00A00000 | 0x4800;
+	}
+
 	/* copy module parms into globals */
 	tulip_rx_copybreak = rx_copybreak;
 	tulip_max_interrupt_work = max_interrupt_work;
diff --git a/drivers/net/ethernet/dec/tulip/winbond-840.c b/drivers/net/ethernet/dec/tulip/winbond-840.c
index 62fe512bb216..345f2fe8755c 100644
--- a/drivers/net/ethernet/dec/tulip/winbond-840.c
+++ b/drivers/net/ethernet/dec/tulip/winbond-840.c
@@ -907,7 +907,7 @@ static void init_registers(struct net_device *dev)
 #elif defined(CONFIG_SPARC) || defined (CONFIG_PARISC)
 	i |= 0x4800;
 #else
-#warning Processor architecture undefined
+	dev_warn(&dev->dev, "unknown CPU architecture, using default csr0 setting\n");
 	i |= 0x4800;
 #endif
 	iowrite32(i, ioaddr + PCIBusCfg);
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 53/87] net: vxge: avoid unused function warnings
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
                   ` (51 preceding siblings ...)
  2017-05-05 19:47 ` [PATCH 3.16-stable 52/87] net: tulip: turn compile-time warning into dev_warn() Arnd Bergmann
@ 2017-05-05 19:47 ` Arnd Bergmann
  2017-05-05 19:47 ` [PATCH 3.16-stable 54/87] ethernet: amd: fix pci device ids Arnd Bergmann
                   ` (34 subsequent siblings)
  87 siblings, 0 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:47 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: stable, Arnd Bergmann, David S . Miller

Commit 77e1adc8f41be3e2d44ca335814e8a78920f319a upstream.

When CONFIG_PCI_MSI is disabled, we get warnings about unused functions
in the vxge driver:

drivers/net/ethernet/neterion/vxge/vxge-main.c:2121:13: warning: 'adaptive_coalesce_tx_interrupts' defined but not used [-Wunused-function]
drivers/net/ethernet/neterion/vxge/vxge-main.c:2149:13: warning: 'adaptive_coalesce_rx_interrupts' defined but not used [-Wunused-function]

We could add another #ifdef here, but it's nicer to avoid those warnings
for good by converting the existing #ifdef to if(IS_ENABLED()), which has
the same effect but provides better compile-time coverage in general,
and lets the compiler understand better when the function is intentionally
unused.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/net/ethernet/neterion/vxge/vxge-main.c | 31 ++++++++++----------------
 1 file changed, 12 insertions(+), 19 deletions(-)

diff --git a/drivers/net/ethernet/neterion/vxge/vxge-main.c b/drivers/net/ethernet/neterion/vxge/vxge-main.c
index 7a0deadd53bf..75682df75c89 100644
--- a/drivers/net/ethernet/neterion/vxge/vxge-main.c
+++ b/drivers/net/ethernet/neterion/vxge/vxge-main.c
@@ -2224,8 +2224,6 @@ static irqreturn_t vxge_isr_napi(int irq, void *dev_id)
 	return IRQ_NONE;
 }
 
-#ifdef CONFIG_PCI_MSI
-
 static irqreturn_t vxge_tx_msix_handle(int irq, void *dev_id)
 {
 	struct vxge_fifo *fifo = (struct vxge_fifo *)dev_id;
@@ -2443,16 +2441,13 @@ static void vxge_rem_msix_isr(struct vxgedev *vdev)
 	if (vdev->config.intr_type == MSI_X)
 		pci_disable_msix(vdev->pdev);
 }
-#endif
 
 static void vxge_rem_isr(struct vxgedev *vdev)
 {
-#ifdef CONFIG_PCI_MSI
-	if (vdev->config.intr_type == MSI_X) {
+	if (IS_ENABLED(CONFIG_PCI_MSI) &&
+	    vdev->config.intr_type == MSI_X) {
 		vxge_rem_msix_isr(vdev);
-	} else
-#endif
-	if (vdev->config.intr_type == INTA) {
+	} else if (vdev->config.intr_type == INTA) {
 			synchronize_irq(vdev->pdev->irq);
 			free_irq(vdev->pdev->irq, vdev);
 	}
@@ -2461,11 +2456,10 @@ static void vxge_rem_isr(struct vxgedev *vdev)
 static int vxge_add_isr(struct vxgedev *vdev)
 {
 	int ret = 0;
-#ifdef CONFIG_PCI_MSI
 	int vp_idx = 0, intr_idx = 0, intr_cnt = 0, msix_idx = 0, irq_req = 0;
 	int pci_fun = PCI_FUNC(vdev->pdev->devfn);
 
-	if (vdev->config.intr_type == MSI_X)
+	if (IS_ENABLED(CONFIG_PCI_MSI) && vdev->config.intr_type == MSI_X)
 		ret = vxge_enable_msix(vdev);
 
 	if (ret) {
@@ -2476,7 +2470,7 @@ static int vxge_add_isr(struct vxgedev *vdev)
 		vdev->config.intr_type = INTA;
 	}
 
-	if (vdev->config.intr_type == MSI_X) {
+	if (IS_ENABLED(CONFIG_PCI_MSI) && vdev->config.intr_type == MSI_X) {
 		for (intr_idx = 0;
 		     intr_idx < (vdev->no_of_vpath *
 			VXGE_HW_VPATH_MSIX_ACTIVE); intr_idx++) {
@@ -2577,9 +2571,8 @@ static int vxge_add_isr(struct vxgedev *vdev)
 		vdev->vxge_entries[intr_cnt].in_use = 1;
 		vdev->vxge_entries[intr_cnt].arg = &vdev->vpaths[0];
 	}
-INTA_MODE:
-#endif
 
+INTA_MODE:
 	if (vdev->config.intr_type == INTA) {
 		snprintf(vdev->desc[0], VXGE_INTR_STRLEN,
 			"%s:vxge:INTA", vdev->ndev->name);
@@ -3890,12 +3883,12 @@ static void vxge_device_config_init(struct vxge_hw_device_config *device_config,
 	if (max_mac_vpath > VXGE_MAX_MAC_ADDR_COUNT)
 		max_mac_vpath = VXGE_MAX_MAC_ADDR_COUNT;
 
-#ifndef CONFIG_PCI_MSI
-	vxge_debug_init(VXGE_ERR,
-		"%s: This Kernel does not support "
-		"MSI-X. Defaulting to INTA", VXGE_DRIVER_NAME);
-	*intr_type = INTA;
-#endif
+	if (!IS_ENABLED(CONFIG_PCI_MSI)) {
+		vxge_debug_init(VXGE_ERR,
+			"%s: This Kernel does not support "
+			"MSI-X. Defaulting to INTA", VXGE_DRIVER_NAME);
+		*intr_type = INTA;
+	}
 
 	/* Configure whether MSI-X or IRQL. */
 	switch (*intr_type) {
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 54/87] ethernet: amd: fix pci device ids
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
                   ` (52 preceding siblings ...)
  2017-05-05 19:47 ` [PATCH 3.16-stable 53/87] net: vxge: avoid unused function warnings Arnd Bergmann
@ 2017-05-05 19:47 ` Arnd Bergmann
  2017-05-05 19:47 ` [PATCH 3.16-stable 55/87] drivers/net/ethernet/dec/tulip/uli526x.c: fix misleading indentation in uli526x_timer Arnd Bergmann
                   ` (33 subsequent siblings)
  87 siblings, 0 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:47 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: stable, Varka Bhadram, David S . Miller, Arnd Bergmann

From: Varka Bhadram <varkab@cdac.in>

Commit ba69a3d78e4f51e65933a86b8b107c86709bb2f5 upstream.

Normally any device ids will be above the corresponding device driver
structure. This patch moves the pci device ids and MODULE_DEVICE_TABLE()
above the pci driver structure.

Signed-off-by: Varka Bhadram <varkab@cdac.in>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/net/ethernet/amd/amd8111e.c | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/drivers/net/ethernet/amd/amd8111e.c b/drivers/net/ethernet/amd/amd8111e.c
index 068dc7cad5fa..47b34f7c4512 100644
--- a/drivers/net/ethernet/amd/amd8111e.c
+++ b/drivers/net/ethernet/amd/amd8111e.c
@@ -101,7 +101,6 @@ Revision History:
 MODULE_AUTHOR("Advanced Micro Devices, Inc.");
 MODULE_DESCRIPTION ("AMD8111 based 10/100 Ethernet Controller. Driver Version "MODULE_VERS);
 MODULE_LICENSE("GPL");
-MODULE_DEVICE_TABLE(pci, amd8111e_pci_tbl);
 module_param_array(speed_duplex, int, NULL, 0);
 MODULE_PARM_DESC(speed_duplex, "Set device speed and duplex modes, 0: Auto Negotiate, 1: 10Mbps Half Duplex, 2: 10Mbps Full Duplex, 3: 100Mbps Half Duplex, 4: 100Mbps Full Duplex");
 module_param_array(coalesce, bool, NULL, 0);
@@ -109,13 +108,6 @@ MODULE_PARM_DESC(coalesce, "Enable or Disable interrupt coalescing, 1: Enable, 0
 module_param_array(dynamic_ipg, bool, NULL, 0);
 MODULE_PARM_DESC(dynamic_ipg, "Enable or Disable dynamic IPG, 1: Enable, 0: Disable");
 
-static DEFINE_PCI_DEVICE_TABLE(amd8111e_pci_tbl) = {
-
-	{ PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD8111E_7462,
-	 PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
-	{ 0, }
-
-};
 /*
 This function will read the PHY registers.
 */
@@ -1970,6 +1962,17 @@ err_disable_pdev:
 
 }
 
+static const struct pci_device_id amd8111e_pci_tbl[] = {
+	{
+	 .vendor = PCI_VENDOR_ID_AMD,
+	 .device = PCI_DEVICE_ID_AMD8111E_7462,
+	},
+	{
+	 .vendor = 0,
+	}
+};
+MODULE_DEVICE_TABLE(pci, amd8111e_pci_tbl);
+
 static struct pci_driver amd8111e_driver = {
 	.name   	= MODULE_NAME,
 	.id_table	= amd8111e_pci_tbl,
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 55/87] drivers/net/ethernet/dec/tulip/uli526x.c: fix misleading indentation in uli526x_timer
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
                   ` (53 preceding siblings ...)
  2017-05-05 19:47 ` [PATCH 3.16-stable 54/87] ethernet: amd: fix pci device ids Arnd Bergmann
@ 2017-05-05 19:47 ` Arnd Bergmann
  2017-05-05 19:47 ` [PATCH 3.16-stable 56/87] hostap: avoid uninitialized variable use in hfa384x_get_rid Arnd Bergmann
                   ` (32 subsequent siblings)
  87 siblings, 0 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:47 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: stable, David Malcolm, David S . Miller, Arnd Bergmann

From: David Malcolm <dmalcolm@redhat.com>

Commit 862f90c368e4e310def16f5a89edd0e078d7b840 upstream.

This code in drivers/net/ethernet/dec/tulip/uli526x.c
function "uli526x_timer":

  1086          } else
  1087                  if ((tmp_cr12 & 0x3) && db->link_failed) {
  [...snip...]
  1109                  }
  1110                  else if(!(tmp_cr12 & 0x3) && db->link_failed)
  1111                  {
  [...snip...]
  1117                  }
  1118                  db->init=0;

is misleadingly indented: the
  db->init=0
is indented as if part of the else clause at line 1086, but it is
independent of it (no braces before the "if" at line 1087).

This patch fixes the indentation to reflect the actual meaning of the code,
though is it actually meant to be part of the "else" clause?  (I'm a
compiler developer, not a kernel person).  It also adds spaces around
the assignment, to placate checkpatch.pl.

Seen via an experimental new gcc warning I'm working on for gcc 6,
-Wmisleading-indentation, using gcc r223098 adding
-Werror=misleading-indentation to KBUILD_CFLAGS in Makefile.
The experimental GCC emits this warning (as an error), rightly IMHO:

drivers/net/ethernet/dec/tulip/uli526x.c: In function ‘uli526x_timer’:
drivers/net/ethernet/dec/tulip/uli526x.c:1118:3: error: statement is
indented as if it were guarded by... [-Werror=misleading-indentation]
   db->init=0;
    ^
drivers/net/ethernet/dec/tulip/uli526x.c:1086:4: note: ...this ‘else’
clause, but it is not
  } else
     ^

Hope this is helpful
Dave

Signed-off-by: David Malcolm <dmalcolm@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/net/ethernet/dec/tulip/uli526x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/dec/tulip/uli526x.c b/drivers/net/ethernet/dec/tulip/uli526x.c
index 80afec335a11..f6b8edf6516e 100644
--- a/drivers/net/ethernet/dec/tulip/uli526x.c
+++ b/drivers/net/ethernet/dec/tulip/uli526x.c
@@ -1115,7 +1115,7 @@ static void uli526x_timer(unsigned long data)
 				netif_carrier_off(dev);
 			}
 		}
-		db->init=0;
+	db->init = 0;
 
 	/* Timer active again */
 	db->timer.expires = ULI526X_TIMER_WUT;
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 56/87] hostap: avoid uninitialized variable use in hfa384x_get_rid
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
                   ` (54 preceding siblings ...)
  2017-05-05 19:47 ` [PATCH 3.16-stable 55/87] drivers/net/ethernet/dec/tulip/uli526x.c: fix misleading indentation in uli526x_timer Arnd Bergmann
@ 2017-05-05 19:47 ` Arnd Bergmann
  2017-05-05 19:47 ` [PATCH 3.16-stable 57/87] iwlegacy: avoid warning about missing braces Arnd Bergmann
                   ` (31 subsequent siblings)
  87 siblings, 0 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:47 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: stable, Arnd Bergmann, Kalle Valo

Commit 4dc690c46508d23c143a9e8f12ebde6e11e901d6 upstream.

The driver reads a value from hfa384x_from_bap(), which may fail,
and then assigns the value to a local variable. gcc detects that
in in the failure case, the 'rlen' variable now contains
uninitialized data:

In file included from ../drivers/net/wireless/intersil/hostap/hostap_pci.c:220:0:
drivers/net/wireless/intersil/hostap/hostap_hw.c: In function 'hfa384x_get_rid':
drivers/net/wireless/intersil/hostap/hostap_hw.c:842:5: warning: 'rec' may be used uninitialized in this function [-Wmaybe-uninitialized]
  if (le16_to_cpu(rec.len) == 0) {

This restructures the function as suggested by Russell King, to
make it more readable and get more reliable error handling, by
handling each failure mode using a goto.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/net/wireless/hostap/hostap_hw.c | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/drivers/net/wireless/hostap/hostap_hw.c b/drivers/net/wireless/hostap/hostap_hw.c
index 6df3ee561d52..515aa3f993f3 100644
--- a/drivers/net/wireless/hostap/hostap_hw.c
+++ b/drivers/net/wireless/hostap/hostap_hw.c
@@ -836,25 +836,30 @@ static int hfa384x_get_rid(struct net_device *dev, u16 rid, void *buf, int len,
 	spin_lock_bh(&local->baplock);
 
 	res = hfa384x_setup_bap(dev, BAP0, rid, 0);
-	if (!res)
-		res = hfa384x_from_bap(dev, BAP0, &rec, sizeof(rec));
+	if (res)
+		goto unlock;
+
+	res = hfa384x_from_bap(dev, BAP0, &rec, sizeof(rec));
+	if (res)
+		goto unlock;
 
 	if (le16_to_cpu(rec.len) == 0) {
 		/* RID not available */
 		res = -ENODATA;
+		goto unlock;
 	}
 
 	rlen = (le16_to_cpu(rec.len) - 1) * 2;
-	if (!res && exact_len && rlen != len) {
+	if (exact_len && rlen != len) {
 		printk(KERN_DEBUG "%s: hfa384x_get_rid - RID len mismatch: "
 		       "rid=0x%04x, len=%d (expected %d)\n",
 		       dev->name, rid, rlen, len);
 		res = -ENODATA;
 	}
 
-	if (!res)
-		res = hfa384x_from_bap(dev, BAP0, buf, len);
+	res = hfa384x_from_bap(dev, BAP0, buf, len);
 
+unlock:
 	spin_unlock_bh(&local->baplock);
 	mutex_unlock(&local->rid_bap_mtx);
 
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 57/87] iwlegacy: avoid warning about missing braces
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
                   ` (55 preceding siblings ...)
  2017-05-05 19:47 ` [PATCH 3.16-stable 56/87] hostap: avoid uninitialized variable use in hfa384x_get_rid Arnd Bergmann
@ 2017-05-05 19:47 ` Arnd Bergmann
  2017-05-05 19:47 ` [PATCH 3.16-stable 58/87] brcmfmac: avoid gcc-5.1 warning Arnd Bergmann
                   ` (30 subsequent siblings)
  87 siblings, 0 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:47 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: stable, Arnd Bergmann, Kalle Valo, Greg Kroah-Hartman

commit 2cce76c3fab410520610a7d2f52faebc3cfcf843 upstream.

gcc-6 warns about code in il3945_hw_txq_ctx_free() being
somewhat ambiguous:

drivers/net/wireless/intel/iwlegacy/3945.c:1022:5: warning: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses]

This adds a set of curly braces to avoid the warning.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/net/wireless/iwlegacy/3945.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/iwlegacy/3945.c b/drivers/net/wireless/iwlegacy/3945.c
index b598e2803500..fbfd77440049 100644
--- a/drivers/net/wireless/iwlegacy/3945.c
+++ b/drivers/net/wireless/iwlegacy/3945.c
@@ -1019,12 +1019,13 @@ il3945_hw_txq_ctx_free(struct il_priv *il)
 	int txq_id;
 
 	/* Tx queues */
-	if (il->txq)
+	if (il->txq) {
 		for (txq_id = 0; txq_id < il->hw_params.max_txq_num; txq_id++)
 			if (txq_id == IL39_CMD_QUEUE_NUM)
 				il_cmd_queue_free(il);
 			else
 				il_tx_queue_free(il, txq_id);
+	}
 
 	/* free tx queue structure */
 	il_free_txq_mem(il);
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 58/87] brcmfmac: avoid gcc-5.1 warning
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
                   ` (56 preceding siblings ...)
  2017-05-05 19:47 ` [PATCH 3.16-stable 57/87] iwlegacy: avoid warning about missing braces Arnd Bergmann
@ 2017-05-05 19:47 ` Arnd Bergmann
  2017-05-05 19:47 ` [PATCH 3.16-stable 59/87] netfilter: Fix switch statement warnings with recent gcc Arnd Bergmann
                   ` (29 subsequent siblings)
  87 siblings, 0 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:47 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: stable, Arnd Bergmann, Kalle Valo

Commit 85773e14ccccddaa9ee4b5bc08b3cf9d62d2c1a8 upstream.

gcc-5.0 gained a new warning in the fwsignal portion of the brcmfmac
driver:

drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c: In function 'brcmf_fws_txs_process':
drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c:1478:8: warning: 'skb' may be used uninitialized in this function [-Wmaybe-uninitialized]

This is a false positive, and marking the brcmf_fws_hanger_poppkt function
as 'static inline' makes the warning go away. I have checked the object
file output and while a little code gets moved around, the size of
the binary remains identical.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c b/drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c
index 699908de314a..c9b0586d7b58 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c
@@ -607,7 +607,7 @@ static int brcmf_fws_hanger_pushpkt(struct brcmf_fws_hanger *h,
 	return 0;
 }
 
-static int brcmf_fws_hanger_poppkt(struct brcmf_fws_hanger *h,
+static inline int brcmf_fws_hanger_poppkt(struct brcmf_fws_hanger *h,
 					  u32 slot_id, struct sk_buff **pktout,
 					  bool remove_item)
 {
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 59/87] netfilter: Fix switch statement warnings with recent gcc.
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
                   ` (57 preceding siblings ...)
  2017-05-05 19:47 ` [PATCH 3.16-stable 58/87] brcmfmac: avoid gcc-5.1 warning Arnd Bergmann
@ 2017-05-05 19:47 ` Arnd Bergmann
  2017-05-05 19:47 ` [PATCH 3.16-stable 60/87] netfilter; Add some missing default cases to switch statements in nft_reject Arnd Bergmann
                   ` (28 subsequent siblings)
  87 siblings, 0 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:47 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: stable, David Miller, Arnd Bergmann

From: David Miller <davem@davemloft.net>

Commit c1f866767777d1c6abae0ec57effffcb72017c00 upstream.

More recent GCC warns about two kinds of switch statement uses:

1) Switching on an enumeration, but not having an explicit case
   statement for all members of the enumeration.  To show the
   compiler this is intentional, we simply add a default case
   with nothing more than a break statement.

2) Switching on a boolean value.  I think this warning is dumb
   but nevertheless you get it wholesale with -Wswitch.

This patch cures all such warnings in netfilter.

Signed-off-by: David S. Miller <davem@davemloft.net>
Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 net/ipv4/netfilter/nft_reject_ipv4.c | 2 ++
 net/ipv6/netfilter/nft_reject_ipv6.c | 2 ++
 net/netfilter/nft_compat.c           | 6 +++---
 net/netfilter/nft_ct.c               | 8 ++++++++
 4 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/net/ipv4/netfilter/nft_reject_ipv4.c b/net/ipv4/netfilter/nft_reject_ipv4.c
index e79718a382f2..292783018da5 100644
--- a/net/ipv4/netfilter/nft_reject_ipv4.c
+++ b/net/ipv4/netfilter/nft_reject_ipv4.c
@@ -33,6 +33,8 @@ void nft_reject_ipv4_eval(const struct nft_expr *expr,
 	case NFT_REJECT_TCP_RST:
 		nf_send_reset(pkt->skb, pkt->ops->hooknum);
 		break;
+	default:
+		break;
 	}
 
 	data[NFT_REG_VERDICT].verdict = NF_DROP;
diff --git a/net/ipv6/netfilter/nft_reject_ipv6.c b/net/ipv6/netfilter/nft_reject_ipv6.c
index 0bc19fa87821..367bd4841a0c 100644
--- a/net/ipv6/netfilter/nft_reject_ipv6.c
+++ b/net/ipv6/netfilter/nft_reject_ipv6.c
@@ -34,6 +34,8 @@ void nft_reject_ipv6_eval(const struct nft_expr *expr,
 	case NFT_REJECT_TCP_RST:
 		nf_send_reset6(net, pkt->skb, pkt->ops->hooknum);
 		break;
+	default:
+		break;
 	}
 
 	data[NFT_REG_VERDICT].verdict = NF_DROP;
diff --git a/net/netfilter/nft_compat.c b/net/netfilter/nft_compat.c
index 62097fda49dc..55be1e0a4a7f 100644
--- a/net/netfilter/nft_compat.c
+++ b/net/netfilter/nft_compat.c
@@ -295,11 +295,11 @@ static void nft_match_eval(const struct nft_expr *expr,
 		return;
 	}
 
-	switch(ret) {
-	case true:
+	switch (ret ? 1 : 0) {
+	case 1:
 		data[NFT_REG_VERDICT].verdict = NFT_CONTINUE;
 		break;
-	case false:
+	case 0:
 		data[NFT_REG_VERDICT].verdict = NFT_BREAK;
 		break;
 	}
diff --git a/net/netfilter/nft_ct.c b/net/netfilter/nft_ct.c
index cc5603016242..18d520e0ca0a 100644
--- a/net/netfilter/nft_ct.c
+++ b/net/netfilter/nft_ct.c
@@ -56,6 +56,8 @@ static void nft_ct_get_eval(const struct nft_expr *expr,
 			state = NF_CT_STATE_BIT(ctinfo);
 		dest->data[0] = state;
 		return;
+	default:
+		break;
 	}
 
 	if (ct == NULL)
@@ -117,6 +119,8 @@ static void nft_ct_get_eval(const struct nft_expr *expr,
 		return;
 	}
 #endif
+	default:
+		break;
 	}
 
 	tuple = &ct->tuplehash[priv->dir].tuple;
@@ -141,6 +145,8 @@ static void nft_ct_get_eval(const struct nft_expr *expr,
 	case NFT_CT_PROTO_DST:
 		dest->data[0] = (__force __u16)tuple->dst.u.all;
 		return;
+	default:
+		break;
 	}
 	return;
 err:
@@ -172,6 +178,8 @@ static void nft_ct_set_eval(const struct nft_expr *expr,
 		}
 		break;
 #endif
+	default:
+		break;
 	}
 }
 
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 60/87] netfilter; Add some missing default cases to switch statements in nft_reject.
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
                   ` (58 preceding siblings ...)
  2017-05-05 19:47 ` [PATCH 3.16-stable 59/87] netfilter: Fix switch statement warnings with recent gcc Arnd Bergmann
@ 2017-05-05 19:47 ` Arnd Bergmann
  2017-05-05 19:47 ` [PATCH 3.16-stable 61/87] drm/i915: cleanup some indenting Arnd Bergmann
                   ` (27 subsequent siblings)
  87 siblings, 0 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:47 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: stable, David S. Miller, Greg Kroah-Hartman, Arnd Bergmann

From: "David S. Miller" <davem@davemloft.net>

commit 129d23a56623eea0947a05288158d76dc7f2f0ac upstream.

This fixes:

====================
net/netfilter/nft_reject.c: In function ‘nft_reject_dump’:
net/netfilter/nft_reject.c:61:2: warning: enumeration value ‘NFT_REJECT_TCP_RST’ not handled in switch [-Wswitch]
  switch (priv->type) {
  ^
net/netfilter/nft_reject.c:61:2: warning: enumeration value ‘NFT_REJECT_ICMPX_UNREACH’ not handled in switch [-Wswi\
tch]
net/netfilter/nft_reject_inet.c: In function ‘nft_reject_inet_dump’:
net/netfilter/nft_reject_inet.c:105:2: warning: enumeration value ‘NFT_REJECT_TCP_RST’ not handled in switch [-Wswi\
tch]
  switch (priv->type) {
  ^
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 net/netfilter/nft_reject.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/net/netfilter/nft_reject.c b/net/netfilter/nft_reject.c
index f3448c296446..5d5d1df34f77 100644
--- a/net/netfilter/nft_reject.c
+++ b/net/netfilter/nft_reject.c
@@ -61,6 +61,8 @@ int nft_reject_dump(struct sk_buff *skb, const struct nft_expr *expr)
 		if (nla_put_u8(skb, NFTA_REJECT_ICMP_CODE, priv->icmp_code))
 			goto nla_put_failure;
 		break;
+	default:
+		break;
 	}
 
 	return 0;
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 61/87] drm/i915: cleanup some indenting
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
                   ` (59 preceding siblings ...)
  2017-05-05 19:47 ` [PATCH 3.16-stable 60/87] netfilter; Add some missing default cases to switch statements in nft_reject Arnd Bergmann
@ 2017-05-05 19:47 ` Arnd Bergmann
  2017-05-05 19:47   ` Arnd Bergmann
                   ` (26 subsequent siblings)
  87 siblings, 0 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:47 UTC (permalink / raw)
  To: Ben Hutchings
  Cc: stable, Dan Carpenter, Daniel Vetter, Greg Kroah-Hartman, Arnd Bergmann

From: Dan Carpenter <dan.carpenter@oracle.com>

commit ba0635ffb7665d76715b43ae8144e014a90c1e63 upstream.

Static checkers complain that we should probably add curly braces
because, from the indenting, it looks like seq_printf() should be inside
the list_for_each_entry() loop.  But the code is actually correct, it's
just the indenting which is off.

Besides fixing the indenting on seq_printf(), I did add curly braces,
because generally mult-line indents should have curly braces to make
them more readable.

The unintended indent was left behind and not unindented in

commit d7f46fc4e7323887494db13f063a8e59861fefb0
Author: Ben Widawsky <benjamin.widawsky@intel.com>
Date:   Fri Dec 6 14:10:55 2013 -0800

    drm/i915: Make pin count per VMA
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/gpu/drm/i915/i915_debugfs.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index b8c689202c40..14d2f2cfd88f 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -141,10 +141,11 @@ describe_obj(struct seq_file *m, struct drm_i915_gem_object *obj)
 		   obj->madv == I915_MADV_DONTNEED ? " purgeable" : "");
 	if (obj->base.name)
 		seq_printf(m, " (name: %d)", obj->base.name);
-	list_for_each_entry(vma, &obj->vma_list, vma_link)
+	list_for_each_entry(vma, &obj->vma_list, vma_link) {
 		if (vma->pin_count > 0)
 			pin_count++;
-		seq_printf(m, " (pinned x %d)", pin_count);
+	}
+	seq_printf(m, " (pinned x %d)", pin_count);
 	if (obj->pin_display)
 		seq_printf(m, " (display)");
 	if (obj->fence_reg != I915_FENCE_REG_NONE)
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 62/87] video: mx3fb: always enable BACKLIGHT_LCD_SUPPORT
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
@ 2017-05-05 19:47   ` Arnd Bergmann
  2017-05-05 19:46 ` [PATCH 3.16-stable 02/87] Disable "frame-address" warning Arnd Bergmann
                     ` (86 subsequent siblings)
  87 siblings, 0 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:47 UTC (permalink / raw)
  To: Ben Hutchings
  Cc: stable, Arnd Bergmann, Alexander Stein, Tomi Valkeinen,
	linux-fbdev, Jean-Christophe Plagniol-Villard

Commit d06268f2c4867279648f499a31fba79a4066f3af upstream.

Commit 7edaa761ee81b ("video: mx3fb: Add backlight control support")
changed the mx3fb driver so it always selects the BACKLIGHT_CLASS_DEVICE
symbol, but that is hidden behind BACKLIGHT_LCD_SUPPORT in Kconfig, so
we get a Kconfig warning for multi_v5_defconfig, which doesn't have that:

Warning: (DRM_RADEON && DRM_NOUVEAU && DRM_I915 && DRM_GMA500 &&
DRM_SHMOBILE && DRM_TILCDC && FB_BACKLIGHT && FB_MX3 && USB_APPLEDISPLAY
&& FB_OLPC_DCON && ASUS_LAPTOP && SONY_LAPTOP && THINKPAD_ACPI &&
EEEPC_LAPTOP && ACPI_CMPC && SAMSUNG_Q10) selects BACKLIGHT_CLASS_DEVICE
which has unmet direct dependencies (HAS_IOMEM && BACKLIGHT_LCD_SUPPORT)

This makes sure we always enable both symbols together for mx3fb, like
we do for the other drivers that can't be built without backlight
support. Note that a better solution would be to ensure the driver can
work with or without backlight support.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Alexander Stein <alexander.stein@systec-electronic.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: linux-fbdev@vger.kernel.org
Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/video/fbdev/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig
index fac73ceb90e5..3b453c34f7a2 100644
--- a/drivers/video/fbdev/Kconfig
+++ b/drivers/video/fbdev/Kconfig
@@ -2332,10 +2332,11 @@ config FB_MSM
 config FB_MX3
 	tristate "MX3 Framebuffer support"
 	depends on FB && MX3_IPU
+	select BACKLIGHT_CLASS_DEVICE
+	select BACKLIGHT_LCD_SUPPORT
 	select FB_CFB_FILLRECT
 	select FB_CFB_COPYAREA
 	select FB_CFB_IMAGEBLIT
-	select BACKLIGHT_CLASS_DEVICE
 	default y
 	help
 	  This is a framebuffer device for the i.MX31 LCD Controller. So
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 62/87] video: mx3fb: always enable BACKLIGHT_LCD_SUPPORT
@ 2017-05-05 19:47   ` Arnd Bergmann
  0 siblings, 0 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:47 UTC (permalink / raw)
  To: Ben Hutchings
  Cc: stable, Arnd Bergmann, Alexander Stein, Tomi Valkeinen,
	linux-fbdev, Jean-Christophe Plagniol-Villard

Commit d06268f2c4867279648f499a31fba79a4066f3af upstream.

Commit 7edaa761ee81b ("video: mx3fb: Add backlight control support")
changed the mx3fb driver so it always selects the BACKLIGHT_CLASS_DEVICE
symbol, but that is hidden behind BACKLIGHT_LCD_SUPPORT in Kconfig, so
we get a Kconfig warning for multi_v5_defconfig, which doesn't have that:

Warning: (DRM_RADEON && DRM_NOUVEAU && DRM_I915 && DRM_GMA500 &&
DRM_SHMOBILE && DRM_TILCDC && FB_BACKLIGHT && FB_MX3 && USB_APPLEDISPLAY
&& FB_OLPC_DCON && ASUS_LAPTOP && SONY_LAPTOP && THINKPAD_ACPI &&
EEEPC_LAPTOP && ACPI_CMPC && SAMSUNG_Q10) selects BACKLIGHT_CLASS_DEVICE
which has unmet direct dependencies (HAS_IOMEM && BACKLIGHT_LCD_SUPPORT)

This makes sure we always enable both symbols together for mx3fb, like
we do for the other drivers that can't be built without backlight
support. Note that a better solution would be to ensure the driver can
work with or without backlight support.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Alexander Stein <alexander.stein@systec-electronic.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: linux-fbdev@vger.kernel.org
Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/video/fbdev/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig
index fac73ceb90e5..3b453c34f7a2 100644
--- a/drivers/video/fbdev/Kconfig
+++ b/drivers/video/fbdev/Kconfig
@@ -2332,10 +2332,11 @@ config FB_MSM
 config FB_MX3
 	tristate "MX3 Framebuffer support"
 	depends on FB && MX3_IPU
+	select BACKLIGHT_CLASS_DEVICE
+	select BACKLIGHT_LCD_SUPPORT
 	select FB_CFB_FILLRECT
 	select FB_CFB_COPYAREA
 	select FB_CFB_IMAGEBLIT
-	select BACKLIGHT_CLASS_DEVICE
 	default y
 	help
 	  This is a framebuffer device for the i.MX31 LCD Controller. So
-- 
2.9.0


^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 63/87] staging: bcm: add 32-bit host dependency
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
                   ` (61 preceding siblings ...)
  2017-05-05 19:47   ` Arnd Bergmann
@ 2017-05-05 19:47 ` Arnd Bergmann
  2017-05-05 19:47 ` [PATCH 3.16-stable 64/87] staging: imx-drm: fix indentation warning Arnd Bergmann
                   ` (24 subsequent siblings)
  87 siblings, 0 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:47 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: stable, Arnd Bergmann

The driver uses a 32-bit variable to store a pointer, causing a couple of
warnings:

../drivers/staging/bcm/CmHost.c: In function 'StoreCmControlResponseMessage':
../drivers/staging/bcm/CmHost.c:1503:3: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
   (struct bcm_connect_mgr_params *) ntohl(
   ^
../drivers/staging/bcm/CmHost.c:1546:3: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
   (struct bcm_connect_mgr_params *) ntohl(
   ^
../drivers/staging/bcm/CmHost.c:1564:3: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
   (struct bcm_connect_mgr_params *) ntohl(

I fixed other warnings in an earlier commit 9f1c75ac2dba ("staging/bcm: fix most
build warnings"), but couldn't figure out what was the intended behavior on
64-bit machines here.

The driver was removed in linux-3.19, commit d09e9b160fc1 ("staging: bcm: remove
driver") which explains that it never worked on 64-bit machines. This adds
a Kconfig dependency instead to prevent it from being built in the known
broken configuration. This workaround applies to v2.6.37 or higher.

Fixes: f8942e07a3db ("staging: Beeceem USB Wimax driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/staging/bcm/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/staging/bcm/Kconfig b/drivers/staging/bcm/Kconfig
index 8acf4b24a7c9..94e04701e008 100644
--- a/drivers/staging/bcm/Kconfig
+++ b/drivers/staging/bcm/Kconfig
@@ -1,6 +1,7 @@
 config BCM_WIMAX
        tristate "Beceem BCS200/BCS220-3 and BCSM250 wimax support"
        depends on USB && NET
+	depends on !64BIT
        help
          This is an experimental driver for the Beceem WIMAX chipset used
 	 by Sprint 4G.
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 64/87] staging: imx-drm: fix indentation warning
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
                   ` (62 preceding siblings ...)
  2017-05-05 19:47 ` [PATCH 3.16-stable 63/87] staging: bcm: add 32-bit host dependency Arnd Bergmann
@ 2017-05-05 19:47 ` Arnd Bergmann
  2017-05-05 19:47 ` [PATCH 3.16-stable 65/87] staging: vt6655: fix overly large stack usage Arnd Bergmann
                   ` (23 subsequent siblings)
  87 siblings, 0 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:47 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: stable, Arnd Bergmann

gcc-6 produces a harmless warning:

drivers/staging/imx-drm/imx-hdmi.c: In function 'hdmi_config_AVI':
drivers/staging/imx-drm/imx-hdmi.c:967:2: error: this 'else' clause does not guard... [-Werror=misleading-indentation]

Commit d083c312cba2 ("drm: bridge/dw_hdmi: simplify hdmi_config_AVI() a little")
in linux-4.3 fixes this with a larger rewrite that is not applicable here.
After that rewrite, the variable that gets assigned here no longer exists.

The assignment is rather pointless here, as we just set a variable to zero
that is later added into another variable using a bitwise or operator, and
that has no effect, so I'm just changing the indentation here to shut up
the warning.

The driver was originally merged in linux-3.13, and the fix applies
to all versions between that and 4.2.

Fixes: 9aaf880ed4ee ("imx-drm: Add mx6 hdmi transmitter support")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/staging/imx-drm/imx-hdmi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/imx-drm/imx-hdmi.c b/drivers/staging/imx-drm/imx-hdmi.c
index 18c9ccd460b7..6943449a8a48 100644
--- a/drivers/staging/imx-drm/imx-hdmi.c
+++ b/drivers/staging/imx-drm/imx-hdmi.c
@@ -968,7 +968,7 @@ static void hdmi_config_AVI(struct imx_hdmi *hdmi)
 	else
 		pix_fmt = HDMI_FC_AVICONF0_PIX_FMT_RGB;
 
-		under_scan =  HDMI_FC_AVICONF0_SCAN_INFO_NODATA;
+	under_scan =  HDMI_FC_AVICONF0_SCAN_INFO_NODATA;
 
 	/*
 	 * Active format identification data is present in the AVI InfoFrame.
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 65/87] staging: vt6655: fix overly large stack usage
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
                   ` (63 preceding siblings ...)
  2017-05-05 19:47 ` [PATCH 3.16-stable 64/87] staging: imx-drm: fix indentation warning Arnd Bergmann
@ 2017-05-05 19:47 ` Arnd Bergmann
  2017-05-05 19:47 ` [PATCH 3.16-stable 66/87] Staging: iio: adc: fix indent on break statement Arnd Bergmann
                   ` (22 subsequent siblings)
  87 siblings, 0 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:47 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: stable, Arnd Bergmann

We get a warning for the large stack usage in some configurations:

drivers/staging/vt6655/device_main.c: In function 'device_ioctl':
drivers/staging/vt6655/device_main.c:2974:1: warning: the frame size of 1304 bytes is larger than 1024 bytes [-Wframe-larger-than=]

This is addressed in linux-3.19 with commit 67013f2c0e58 ("staging: vt6655:
mac80211 conversion add main mac80211 functions"), which obsoletes the
device_ioctl() function, but as that does not apply to stable kernels,
this picks an easier way out by using dynamic allocation.

The driver was merged in 2.6.31, and the fix applies to all versions
before 3.19.

Fixes: 5449c685a4b3 ("Staging: Add pristine upstream vt6655 driver sources")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/staging/vt6655/device_main.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c
index e3ae2599a2b7..88ffe31053ed 100644
--- a/drivers/staging/vt6655/device_main.c
+++ b/drivers/staging/vt6655/device_main.c
@@ -2933,11 +2933,13 @@ static int  device_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) {
 		DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWSENS \n");
 		rc = -EOPNOTSUPP;
 		break;
-
 	case SIOCGIWAPLIST: {
-		char buffer[IW_MAX_AP * (sizeof(struct sockaddr) + sizeof(struct iw_quality))];
+		char *buffer = kzalloc(IW_MAX_AP * (sizeof(struct sockaddr) +
+				       sizeof(struct iw_quality)), GFP_KERNEL);
 
-		if (wrq->u.data.pointer) {
+		if (!buffer) {
+			rc = -ENOMEM;
+		} else if (wrq->u.data.pointer) {
 			rc = iwctl_giwaplist(dev, NULL, &(wrq->u.data), buffer);
 			if (rc == 0) {
 				if (copy_to_user(wrq->u.data.pointer,
@@ -2947,6 +2949,7 @@ static int  device_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) {
 					rc = -EFAULT;
 			}
 		}
+		kfree(buffer);
 	}
 	break;
 
@@ -2993,7 +2996,6 @@ static int  device_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) {
 		DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWGENIE \n");
 		rc = iwctl_giwgenie(dev, NULL, &(wrq->u.data), wrq->u.data.pointer);
 		break;
-
 	case SIOCSIWENCODEEXT: {
 		char extra[sizeof(struct iw_encode_ext)+MAX_KEY_LEN+1];
 		DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWENCODEEXT \n");
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 66/87] Staging: iio: adc: fix indent on break statement
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
                   ` (64 preceding siblings ...)
  2017-05-05 19:47 ` [PATCH 3.16-stable 65/87] staging: vt6655: fix overly large stack usage Arnd Bergmann
@ 2017-05-05 19:47 ` Arnd Bergmann
  2017-05-05 19:47 ` [PATCH 3.16-stable 67/87] Staging: lustre: missing curly braces in ll_setattr_raw() Arnd Bergmann
                   ` (21 subsequent siblings)
  87 siblings, 0 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:47 UTC (permalink / raw)
  To: Ben Hutchings
  Cc: stable, Colin Ian King, Jonathan Cameron, Greg Kroah-Hartman,
	Arnd Bergmann

From: Colin Ian King <colin.king@canonical.com>

commit b6acb0cfc21293a1bfc283e9217f58f7474ef728 upstream.

Fix indent warning when building with gcc 6:
drivers/staging/iio/adc/ad7192.c:239:4: warning: statement is indented
  as if it were guarded by... [-Wmisleading-indentation]

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/staging/iio/adc/ad7192.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/iio/adc/ad7192.c b/drivers/staging/iio/adc/ad7192.c
index 83bb44b38152..26b2cdca29ad 100644
--- a/drivers/staging/iio/adc/ad7192.c
+++ b/drivers/staging/iio/adc/ad7192.c
@@ -236,7 +236,7 @@ static int ad7192_setup(struct ad7192_state *st,
 			st->mclk = pdata->ext_clk_Hz;
 		else
 			st->mclk = AD7192_INT_FREQ_MHz;
-			break;
+		break;
 	default:
 		ret = -EINVAL;
 		goto out;
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 67/87] Staging: lustre: missing curly braces in ll_setattr_raw()
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
                   ` (65 preceding siblings ...)
  2017-05-05 19:47 ` [PATCH 3.16-stable 66/87] Staging: iio: adc: fix indent on break statement Arnd Bergmann
@ 2017-05-05 19:47 ` Arnd Bergmann
  2017-05-05 19:47 ` [PATCH 3.16-stable 68/87] staging: rtl8723au: core: rtw_wlan_util: fix misleading indentation Arnd Bergmann
                   ` (20 subsequent siblings)
  87 siblings, 0 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:47 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: stable, Dan Carpenter, Greg Kroah-Hartman, Arnd Bergmann

From: Dan Carpenter <dan.carpenter@oracle.com>

commit 53bd4a004ee5ff0f71a858de78faac98924b4a87 upstream.

>>From the indenting, it looks like curly braces were intended here.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/staging/lustre/lustre/llite/llite_lib.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/lustre/llite/llite_lib.c b/drivers/staging/lustre/lustre/llite/llite_lib.c
index 17cfa99b4fc0..764953089f64 100644
--- a/drivers/staging/lustre/lustre/llite/llite_lib.c
+++ b/drivers/staging/lustre/lustre/llite/llite_lib.c
@@ -1489,7 +1489,7 @@ int ll_setattr_raw(struct dentry *dentry, struct iattr *attr, bool hsm_import)
 
 	if (attr->ia_valid & (ATTR_SIZE |
 			      ATTR_ATIME | ATTR_ATIME_SET |
-			      ATTR_MTIME | ATTR_MTIME_SET))
+			      ATTR_MTIME | ATTR_MTIME_SET)) {
 		/* For truncate and utimes sending attributes to OSTs, setting
 		 * mtime/atime to the past will be performed under PW [0:EOF]
 		 * extent lock (new_size:EOF for truncate).  It may seem
@@ -1501,6 +1501,7 @@ int ll_setattr_raw(struct dentry *dentry, struct iattr *attr, bool hsm_import)
 		rc = ll_setattr_ost(inode, attr);
 		if (attr->ia_valid & ATTR_SIZE)
 			up_write(&lli->lli_trunc_sem);
+	}
 out:
 	if (op_data) {
 		if (op_data->op_ioepoch) {
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 68/87] staging: rtl8723au: core: rtw_wlan_util: fix misleading indentation
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
                   ` (66 preceding siblings ...)
  2017-05-05 19:47 ` [PATCH 3.16-stable 67/87] Staging: lustre: missing curly braces in ll_setattr_raw() Arnd Bergmann
@ 2017-05-05 19:47 ` Arnd Bergmann
  2017-05-05 19:47 ` [PATCH 3.16-stable 69/87] Staging: wlan-ng: fix sparse warning in prism2fw.c Arnd Bergmann
                   ` (19 subsequent siblings)
  87 siblings, 0 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:47 UTC (permalink / raw)
  To: Ben Hutchings
  Cc: stable, Luis de Bethencourt, Greg Kroah-Hartman, Arnd Bergmann

From: Luis de Bethencourt <luisbg@osg.samsung.com>

commit 8c182ae20791d638c07ff499709c4a1d4697bd7c upstream.

For loop is outside of the else branch of the above conditional statement.
Fixing misleading indentation.

Fix a smatch warning:
drivers/staging/rtl8723au/core/rtw_wlan_util.c:528
WMMOnAssocRsp23a() warn: curly braces intended?

Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com>
Acked-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/staging/rtl8723au/core/rtw_wlan_util.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8723au/core/rtw_wlan_util.c b/drivers/staging/rtl8723au/core/rtw_wlan_util.c
index 579a4a8c8276..013ebd9629f3 100644
--- a/drivers/staging/rtl8723au/core/rtw_wlan_util.c
+++ b/drivers/staging/rtl8723au/core/rtw_wlan_util.c
@@ -546,7 +546,7 @@ void WMMOnAssocRsp23a(struct rtw_adapter *padapter)
 	else
 		aSifsTime = 16;
 
-		for (i = 0; i < 4; i++) {
+	for (i = 0; i < 4; i++) {
 		ACI = (pmlmeinfo->WMM_param.ac_param[i].ACI_AIFSN >> 5) & 0x03;
 		ACM = (pmlmeinfo->WMM_param.ac_param[i].ACI_AIFSN >> 4) & 0x01;
 
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 69/87] Staging: wlan-ng: fix sparse warning in prism2fw.c
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
                   ` (67 preceding siblings ...)
  2017-05-05 19:47 ` [PATCH 3.16-stable 68/87] staging: rtl8723au: core: rtw_wlan_util: fix misleading indentation Arnd Bergmann
@ 2017-05-05 19:47 ` Arnd Bergmann
  2017-05-05 19:47 ` [PATCH 3.16-stable 70/87] staging: dgnc: Fix frame size is larger than 1024B Arnd Bergmann
                   ` (18 subsequent siblings)
  87 siblings, 0 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:47 UTC (permalink / raw)
  To: Ben Hutchings
  Cc: stable, A Raghavendra Rao, A Raghavendra Rao, Greg Kroah-Hartman,
	Arnd Bergmann

From: A Raghavendra Rao <raghav3276@gmail.com>

Commit da00fc79ae504f0db7bb1c03efa40f4c6cae883d upstream.

Fix the following sparse warning :

In file included from drivers/staging/wlan-ng/prism2usb.c:5:0:
drivers/staging/wlan-ng/prism2fw.c: In function
‘read_cardpda.constprop.43’:
drivers/staging/wlan-ng/prism2fw.c:792:1: warning: the frame size of
1068 bytes is larger than 1024 bytes [-Wframe-larger-than=]

The variable to 'struct p80211msg_p2req_readpda' was previously being created
on the stack, which inturn exeeded the frame size limit, resulting in a
sparse warning. This patch alloctes the memory to the structure dynamically
and the operations are left unchanged.

Signed-off-by: A Raghavendra Rao <arrao@cdac.in>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/staging/wlan-ng/prism2fw.c | 33 +++++++++++++++++++--------------
 1 file changed, 19 insertions(+), 14 deletions(-)

diff --git a/drivers/staging/wlan-ng/prism2fw.c b/drivers/staging/wlan-ng/prism2fw.c
index f7870355c69f..45182ea4172f 100644
--- a/drivers/staging/wlan-ng/prism2fw.c
+++ b/drivers/staging/wlan-ng/prism2fw.c
@@ -763,30 +763,35 @@ static int plugimage(struct imgchunk *fchunk, unsigned int nfchunks,
 static int read_cardpda(struct pda *pda, wlandevice_t *wlandev)
 {
 	int result = 0;
-	struct p80211msg_p2req_readpda msg;
+	struct p80211msg_p2req_readpda *msg;
+
+	msg = kzalloc(sizeof(*msg), GFP_KERNEL);
+	if (!msg)
+		return -ENOMEM;
 
 	/* set up the msg */
-	msg.msgcode = DIDmsg_p2req_readpda;
-	msg.msglen = sizeof(msg);
-	strcpy(msg.devname, wlandev->name);
-	msg.pda.did = DIDmsg_p2req_readpda_pda;
-	msg.pda.len = HFA384x_PDA_LEN_MAX;
-	msg.pda.status = P80211ENUM_msgitem_status_no_value;
-	msg.resultcode.did = DIDmsg_p2req_readpda_resultcode;
-	msg.resultcode.len = sizeof(u32);
-	msg.resultcode.status = P80211ENUM_msgitem_status_no_value;
-
-	if (prism2mgmt_readpda(wlandev, &msg) != 0) {
+	msg->msgcode = DIDmsg_p2req_readpda;
+	msg->msglen = sizeof(msg);
+	strcpy(msg->devname, wlandev->name);
+	msg->pda.did = DIDmsg_p2req_readpda_pda;
+	msg->pda.len = HFA384x_PDA_LEN_MAX;
+	msg->pda.status = P80211ENUM_msgitem_status_no_value;
+	msg->resultcode.did = DIDmsg_p2req_readpda_resultcode;
+	msg->resultcode.len = sizeof(u32);
+	msg->resultcode.status = P80211ENUM_msgitem_status_no_value;
+
+	if (prism2mgmt_readpda(wlandev, msg) != 0) {
 		/* prism2mgmt_readpda prints an errno if appropriate */
 		result = -1;
-	} else if (msg.resultcode.data == P80211ENUM_resultcode_success) {
-		memcpy(pda->buf, msg.pda.data, HFA384x_PDA_LEN_MAX);
+	} else if (msg->resultcode.data == P80211ENUM_resultcode_success) {
+		memcpy(pda->buf, msg->pda.data, HFA384x_PDA_LEN_MAX);
 		result = mkpdrlist(pda);
 	} else {
 		/* resultcode must've been something other than success */
 		result = -1;
 	}
 
+	kfree(msg);
 	return result;
 }
 
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 70/87] staging: dgnc: Fix frame size is larger than 1024B
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
                   ` (68 preceding siblings ...)
  2017-05-05 19:47 ` [PATCH 3.16-stable 69/87] Staging: wlan-ng: fix sparse warning in prism2fw.c Arnd Bergmann
@ 2017-05-05 19:47 ` Arnd Bergmann
  2017-05-05 19:47 ` [PATCH 3.16-stable 71/87] x86/xen: fix upper bound of pmd loop in xen_cleanhighmap() Arnd Bergmann
                   ` (17 subsequent siblings)
  87 siblings, 0 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:47 UTC (permalink / raw)
  To: Ben Hutchings
  Cc: stable, Konrad Zapalowicz, Greg Kroah-Hartman, Arnd Bergmann

From: Konrad Zapalowicz <bergo.torino@gmail.com>

Commit 59939d1eaadbb374b04648a35ff5560db58afeba upstream.

This comit fixes the following sparse warnign:

drivers/staging/dgnc/dgnc_tty.c:572:1:
    warning: the frame size of 1060 bytes is larger than 1024 bytes
    [-Wframe-larger-than=]

This was caused by having buffer as an automatic variable. This commit
moves it from the stack to the heap.

Signed-off-by: Konrad Zapalowicz <bergo.torino@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/staging/dgnc/dgnc_tty.c | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/dgnc/dgnc_tty.c b/drivers/staging/dgnc/dgnc_tty.c
index 4135cb0ed9f5..cd7a6dbdddb8 100644
--- a/drivers/staging/dgnc/dgnc_tty.c
+++ b/drivers/staging/dgnc/dgnc_tty.c
@@ -481,13 +481,18 @@ void dgnc_sniff_nowait_nolock(struct channel_t *ch, uchar *text, uchar *buf, int
 	int nbuf;
 	int i;
 	int tmpbuflen;
-	char tmpbuf[TMPBUFLEN];
-	char *p = tmpbuf;
+	char *tmpbuf;
+	char *p;
 	int too_much_data;
 
+	tmpbuf = kzalloc(TMPBUFLEN, GFP_KERNEL);
+	if (!tmpbuf)
+		return;
+	p = tmpbuf;
+
 	/* Leave if sniff not open */
 	if (!(ch->ch_sniff_flags & SNIFF_OPEN))
-		return;
+		goto exit;
 
 	do_gettimeofday(&tv);
 
@@ -534,7 +539,7 @@ void dgnc_sniff_nowait_nolock(struct channel_t *ch, uchar *text, uchar *buf, int
 			 * function was probably called by the interrupt/timer routines!
 			 */
 			if (n == 0)
-				return;
+				goto exit;
 
 			/*
 			 * Copy as much data as will fit.
@@ -579,6 +584,9 @@ void dgnc_sniff_nowait_nolock(struct channel_t *ch, uchar *text, uchar *buf, int
 		}
 
 	} while (too_much_data);
+
+exit:
+	kfree(tmpbuf);
 }
 
 
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 71/87] x86/xen: fix upper bound of pmd loop in xen_cleanhighmap()
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
                   ` (69 preceding siblings ...)
  2017-05-05 19:47 ` [PATCH 3.16-stable 70/87] staging: dgnc: Fix frame size is larger than 1024B Arnd Bergmann
@ 2017-05-05 19:47 ` Arnd Bergmann
  2017-05-05 19:47 ` [PATCH 3.16-stable 72/87] x86/boot: Add CONFIG_PARAVIRT_SPINLOCKS quirk to arch/x86/boot/compressed/misc.h Arnd Bergmann
                   ` (16 subsequent siblings)
  87 siblings, 0 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:47 UTC (permalink / raw)
  To: Ben Hutchings
  Cc: stable, Juergen Gross, David Vrabel, Greg Kroah-Hartman, Arnd Bergmann

From: Juergen Gross <jgross@suse.com>

commit 1cf38741308c64d08553602b3374fb39224eeb5a upstream.

xen_cleanhighmap() is operating on level2_kernel_pgt only. The upper
bound of the loop setting non-kernel-image entries to zero should not
exceed the size of level2_kernel_pgt.

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/x86/xen/mmu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c
index 16fb0099b7f2..f05f2d897a67 100644
--- a/arch/x86/xen/mmu.c
+++ b/arch/x86/xen/mmu.c
@@ -1187,7 +1187,7 @@ static void __init xen_cleanhighmap(unsigned long vaddr,
 
 	/* NOTE: The loop is more greedy than the cleanup_highmap variant.
 	 * We include the PMD passed in on _both_ boundaries. */
-	for (; vaddr <= vaddr_end && (pmd < (level2_kernel_pgt + PAGE_SIZE));
+	for (; vaddr <= vaddr_end && (pmd < (level2_kernel_pgt + PTRS_PER_PMD));
 			pmd++, vaddr += PMD_SIZE) {
 		if (pmd_none(*pmd))
 			continue;
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 72/87] x86/boot: Add CONFIG_PARAVIRT_SPINLOCKS quirk to arch/x86/boot/compressed/misc.h
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
                   ` (70 preceding siblings ...)
  2017-05-05 19:47 ` [PATCH 3.16-stable 71/87] x86/xen: fix upper bound of pmd loop in xen_cleanhighmap() Arnd Bergmann
@ 2017-05-05 19:47 ` Arnd Bergmann
  2017-05-05 19:47 ` [PATCH 3.16-stable 73/87] ARM: cns3xxx: shut up frame size warning Arnd Bergmann
                   ` (15 subsequent siblings)
  87 siblings, 0 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:47 UTC (permalink / raw)
  To: Ben Hutchings
  Cc: stable, Ingo Molnar, H. Peter Anvin, Thomas Gleixner,
	linux-kernel, Arnd Bergmann

From: Ingo Molnar <mingo@kernel.org>

Commit 927392d73a97d8d235bb65400e2e3c7f0bec2b6f upstream.

Linus reported the following new warning on x86 allmodconfig with GCC 5.1:

  > ./arch/x86/include/asm/spinlock.h: In function ‘arch_spin_lock’:
  > ./arch/x86/include/asm/spinlock.h:119:3: warning: implicit declaration
  > of function ‘__ticket_lock_spinning’ [-Wimplicit-function-declaration]
  >    __ticket_lock_spinning(lock, inc.tail);
  >    ^

This warning triggers because of these hacks in misc.h:

  /*
   * we have to be careful, because no indirections are allowed here, and
   * paravirt_ops is a kind of one. As it will only run in baremetal anyway,
   * we just keep it from happening
   */
  #undef CONFIG_PARAVIRT
  #undef CONFIG_KASAN

But these hacks were not updated when CONFIG_PARAVIRT_SPINLOCKS was added,
and eventually (with the introduction of queued paravirt spinlocks in
recent kernels) this created an invalid Kconfig combination and broke
the build.

So add a CONFIG_PARAVIRT_SPINLOCKS #undef line as well.

Also remove the _ASM_X86_DESC_H quirk: that undocumented quirk
was originally added ages ago, in:

  099e1377269a ("x86: use ELF format in compressed images.")

and I went back to that kernel (and fixed up the main Makefile
which didn't build anymore) and checked what failure it
avoided: it avoided an include file dependencies related
build failure related to our old x86-platforms code.

That old code is long gone, the header dependencies got cleaned
up, and the build does not fail anymore with the totality of
asm/desc.h included - so remove the quirk.

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/x86/boot/compressed/misc.h | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/arch/x86/boot/compressed/misc.h b/arch/x86/boot/compressed/misc.h
index 24e3e569a13c..124312be129b 100644
--- a/arch/x86/boot/compressed/misc.h
+++ b/arch/x86/boot/compressed/misc.h
@@ -2,14 +2,13 @@
 #define BOOT_COMPRESSED_MISC_H
 
 /*
- * we have to be careful, because no indirections are allowed here, and
- * paravirt_ops is a kind of one. As it will only run in baremetal anyway,
- * we just keep it from happening
+ * Special hack: we have to be careful, because no indirections are allowed here,
+ * and paravirt_ops is a kind of one. As it will only run in baremetal anyway,
+ * we just keep it from happening. (This list needs to be extended when new
+ * paravirt and debugging variants are added.)
  */
 #undef CONFIG_PARAVIRT
-#ifdef CONFIG_X86_32
-#define _ASM_X86_DESC_H 1
-#endif
+#undef CONFIG_PARAVIRT_SPINLOCKS
 
 #include <linux/linkage.h>
 #include <linux/screen_info.h>
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 73/87] ARM: cns3xxx: shut up frame size warning
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
                   ` (71 preceding siblings ...)
  2017-05-05 19:47 ` [PATCH 3.16-stable 72/87] x86/boot: Add CONFIG_PARAVIRT_SPINLOCKS quirk to arch/x86/boot/compressed/misc.h Arnd Bergmann
@ 2017-05-05 19:47 ` Arnd Bergmann
  2017-05-05 19:47 ` [PATCH 3.16-stable 74/87] ARM: 8383/1: nommu: avoid deprecated source register on mov Arnd Bergmann
                   ` (14 subsequent siblings)
  87 siblings, 0 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:47 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: stable, Arnd Bergmann

This shuts up a warning in the 3.18-stable series that has been fixed
in newer kernels with commit 498a92d42596 ("ARM: cns3xxx: pci: avoid
potential stack overflow"):

arch/arm/mach-cns3xxx/pcie.c: In function 'cns3xxx_pcie_hw_init':
arch/arm/mach-cns3xxx/pcie.c:313:1: error: the frame size of 1080 bytes is larger than 1024 bytes [-Werror=frame-larger-than=]

The fix that went into v4.4 is known to be buggy and was later
fixed again with commit 88e9da9a2a70 ("CNS3xxx: Fix PCI
cns3xxx_write_config()"). While we could backport both to 3.18,
they are fairly invasive and the warning is definitely harmless
here as the call chain is known to not overflow the stack of the
init task.

This simply adds a Makefile flag to extend the limit for this one
file.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
We do want 88e9da9a2a70 ("CNS3xxx: Fix PCI cns3xxx_write_config()")
backported into v4.4 though.
---
 arch/arm/mach-cns3xxx/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/mach-cns3xxx/Makefile b/arch/arm/mach-cns3xxx/Makefile
index a1ff10848698..fd610561616e 100644
--- a/arch/arm/mach-cns3xxx/Makefile
+++ b/arch/arm/mach-cns3xxx/Makefile
@@ -2,4 +2,5 @@ obj-$(CONFIG_ARCH_CNS3XXX)		+= cns3xxx.o
 cns3xxx-y				+= core.o pm.o
 cns3xxx-$(CONFIG_ATAGS)			+= devices.o
 cns3xxx-$(CONFIG_PCI)			+= pcie.o
+CFLAGS_pcie.o				+= -Wframe-larger-than=1536 # override default 1024, this is safe here
 cns3xxx-$(CONFIG_MACH_CNS3420VB)	+= cns3420vb.o
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 74/87] ARM: 8383/1: nommu: avoid deprecated source register on mov
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
                   ` (72 preceding siblings ...)
  2017-05-05 19:47 ` [PATCH 3.16-stable 73/87] ARM: cns3xxx: shut up frame size warning Arnd Bergmann
@ 2017-05-05 19:47 ` Arnd Bergmann
  2017-05-06  9:45   ` Arnd Bergmann
  2017-05-05 19:47 ` [PATCH 3.16-stable 75/87] ARM: 8221/1: PJ4: allow building in Thumb-2 mode Arnd Bergmann
                   ` (13 subsequent siblings)
  87 siblings, 1 reply; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:47 UTC (permalink / raw)
  To: Ben Hutchings
  Cc: stable, Stefan Agner, Russell King, Arnd Bergmann, Greg Kroah-Hartman

From: Stefan Agner <stefan@agner.ch>

commit 970d96f9a81b0dd83ddd8bce0e5e1ba31881c5f5 upstream.

In Thumb2 mode, the stack register r13 is deprecated if the
destination register is the program counter (r15). Similar to
head.S, head-nommu.S uses r13 to store the return address used
after configuring the CPU's CP15 register. However, since we do
not enable a MMU, there will be no address switch and it is
possible to use branch with link instruction to call
__after_proc_init.

Avoid using r13 completely by using bl to call __after_proc_init
and get rid of __secondary_switched.

Beside removing unnecessary complexity, this also fixes a
compiler warning when compiling a !MMU kernel:
Warning: Use of r13 as a source register is deprecated when r15
is the destination register.

Tested-by: Maxime Coquelin <mcoquelin.stm32@gmail.com>
Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/kernel/head-nommu.S | 22 ++++++++++------------
 1 file changed, 10 insertions(+), 12 deletions(-)

diff --git a/arch/arm/kernel/head-nommu.S b/arch/arm/kernel/head-nommu.S
index 716249cc2ee1..db0c82f4a99b 100644
--- a/arch/arm/kernel/head-nommu.S
+++ b/arch/arm/kernel/head-nommu.S
@@ -77,13 +77,12 @@ ENTRY(stext)
 	orr	r6, r6, #(1 << MPU_RSR_EN)	@ Set region enabled bit
 	bl	__setup_mpu
 #endif
-	ldr	r13, =__mmap_switched		@ address to jump to after
-						@ initialising sctlr
 	adr	lr, BSYM(1f)			@ return (PIC) address
  ARM(	add	pc, r10, #PROCINFO_INITFUNC	)
  THUMB(	add	r12, r10, #PROCINFO_INITFUNC	)
  THUMB(	mov	pc, r12				)
- 1:	b	__after_proc_init
+1:	bl	__after_proc_init
+	b	__mmap_switched
 ENDPROC(stext)
 
 #ifdef CONFIG_SMP
@@ -106,8 +105,7 @@ ENTRY(secondary_startup)
 	movs	r10, r5				@ invalid processor?
 	beq	__error_p			@ yes, error 'p'
 
-	adr	r4, __secondary_data
-	ldmia	r4, {r7, r12}
+	ldr	r7, __secondary_data
 
 #ifdef CONFIG_ARM_MPU
 	/* Use MPU region info supplied by __cpu_up */
@@ -115,23 +113,19 @@ ENTRY(secondary_startup)
 	bl      __setup_mpu			@ Initialize the MPU
 #endif
 
-	adr	lr, BSYM(__after_proc_init)	@ return address
-	mov	r13, r12			@ __secondary_switched address
+	adr	lr, BSYM(1f)			@ return (PIC) address
  ARM(	add	pc, r10, #PROCINFO_INITFUNC	)
  THUMB(	add	r12, r10, #PROCINFO_INITFUNC	)
  THUMB(	mov	pc, r12				)
-ENDPROC(secondary_startup)
-
-ENTRY(__secondary_switched)
+1:	bl	__after_proc_init
 	ldr	sp, [r7, #8]			@ set up the stack pointer
 	mov	fp, #0
 	b	secondary_start_kernel
-ENDPROC(__secondary_switched)
+ENDPROC(secondary_startup)
 
 	.type	__secondary_data, %object
 __secondary_data:
 	.long	secondary_data
-	.long	__secondary_switched
 #endif /* CONFIG_SMP */
 
 /*
@@ -164,7 +158,11 @@ __after_proc_init:
 #endif
 	mcr	p15, 0, r0, c1, c0, 0		@ write control reg
 #endif /* CONFIG_CPU_CP15 */
+<<<<<<< HEAD
 	mov	pc, r13
+=======
+	ret	lr
+>>>>>>> 12ebe5ca67dc... ARM: 8383/1: nommu: avoid deprecated source register on mov
 ENDPROC(__after_proc_init)
 	.ltorg
 
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 75/87] ARM: 8221/1: PJ4: allow building in Thumb-2 mode
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
                   ` (73 preceding siblings ...)
  2017-05-05 19:47 ` [PATCH 3.16-stable 74/87] ARM: 8383/1: nommu: avoid deprecated source register on mov Arnd Bergmann
@ 2017-05-05 19:47 ` Arnd Bergmann
  2017-05-06  7:42   ` Ard Biesheuvel
  2017-05-05 19:47 ` [PATCH 3.16-stable 76/87] ARM: OMAP: Fix Kconfig warning for omap1 Arnd Bergmann
                   ` (12 subsequent siblings)
  87 siblings, 1 reply; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:47 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: stable, Ard Biesheuvel, Russell King, Arnd Bergmann

From: Ard Biesheuvel <ard.biesheuvel@linaro.org>

Commit 69bbf2ab20389418327484288d8730732e4f3dd0 upstream.

Two files that get included when building the multi_v7_defconfig target
fail to build when selecting THUMB2_KERNEL for this configuration.

In both cases, we can just build the file as ARM code, as none of its
symbols are exported to modules, so there are no interworking concerns.
In the iwmmxt.S case, add ENDPROC() declarations so the symbols are
annotated as functions, resulting in the linker to emit the appropriate
mode switches.

Acked-by: Nicolas Pitre <nico@linaro.org>
Tested-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/kernel/Makefile |  1 +
 arch/arm/kernel/iwmmxt.S | 13 +++++++++++++
 2 files changed, 14 insertions(+)

diff --git a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile
index 03120e656aea..2ecc7d15bc09 100644
--- a/arch/arm/kernel/Makefile
+++ b/arch/arm/kernel/Makefile
@@ -84,6 +84,7 @@ obj-$(CONFIG_CPU_PJ4B)		+= pj4-cp0.o
 obj-$(CONFIG_IWMMXT)		+= iwmmxt.o
 obj-$(CONFIG_PERF_EVENTS)	+= perf_regs.o
 obj-$(CONFIG_HW_PERF_EVENTS)	+= perf_event.o perf_event_cpu.o
+CFLAGS_pj4-cp0.o		:= -marm
 AFLAGS_iwmmxt.o			:= -Wa,-mcpu=iwmmxt
 obj-$(CONFIG_ARM_CPU_TOPOLOGY)  += topology.o
 
diff --git a/arch/arm/kernel/iwmmxt.S b/arch/arm/kernel/iwmmxt.S
index 2b32978ae905..d65bb940d797 100644
--- a/arch/arm/kernel/iwmmxt.S
+++ b/arch/arm/kernel/iwmmxt.S
@@ -58,6 +58,7 @@
 #define MMX_SIZE		(0x98)
 
 	.text
+	.arm
 
 /*
  * Lazy switching of Concan coprocessor context
@@ -182,6 +183,8 @@ concan_load:
 	tmcr	wCon, r2
 	mov	pc, lr
 
+ENDPROC(iwmmxt_task_enable)
+
 /*
  * Back up Concan regs to save area and disable access to them
  * (mainly for gdb or sleep mode usage)
@@ -232,6 +235,8 @@ ENTRY(iwmmxt_task_disable)
 1:	msr	cpsr_c, ip			@ restore interrupt mode
 	ldmfd	sp!, {r4, pc}
 
+ENDPROC(iwmmxt_task_disable)
+
 /*
  * Copy Concan state to given memory address
  *
@@ -268,6 +273,8 @@ ENTRY(iwmmxt_task_copy)
 	msr	cpsr_c, ip			@ restore interrupt mode
 	mov	pc, r3
 
+ENDPROC(iwmmxt_task_copy)
+
 /*
  * Restore Concan state from given memory address
  *
@@ -304,6 +311,8 @@ ENTRY(iwmmxt_task_restore)
 	msr	cpsr_c, ip			@ restore interrupt mode
 	mov	pc, r3
 
+ENDPROC(iwmmxt_task_restore)
+
 /*
  * Concan handling on task switch
  *
@@ -335,6 +344,8 @@ ENTRY(iwmmxt_task_switch)
 	mrc	p15, 0, r1, c2, c0, 0
 	sub	pc, lr, r1, lsr #32		@ cpwait and return
 
+ENDPROC(iwmmxt_task_switch)
+
 /*
  * Remove Concan ownership of given task
  *
@@ -353,6 +364,8 @@ ENTRY(iwmmxt_task_release)
 	msr	cpsr_c, r2			@ restore interrupts
 	mov	pc, lr
 
+ENDPROC(iwmmxt_task_release)
+
 	.data
 concan_owner:
 	.word	0
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 76/87] ARM: OMAP: Fix Kconfig warning for omap1
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
                   ` (74 preceding siblings ...)
  2017-05-05 19:47 ` [PATCH 3.16-stable 75/87] ARM: 8221/1: PJ4: allow building in Thumb-2 mode Arnd Bergmann
@ 2017-05-05 19:47 ` Arnd Bergmann
  2017-05-05 19:47 ` [PATCH 3.16-stable 77/87] ARM: 8160/1: drop warning about return_address not using unwind tables Arnd Bergmann
                   ` (11 subsequent siblings)
  87 siblings, 0 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:47 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: stable, Tony Lindgren, Arnd Bergmann

From: Tony Lindgren <tony@atomide.com>

Commit f311f63369ac04993e69e36c7a1913cbf9f470ee upstream.

Commit 21278aeafbfa ("ARM: use menuconfig for sub-arch menus") improved
the sub-arch menus, but accidentally caused new warnings for omap1.
This was because the commit added a menu entry around config ARCH_OMAP
bool entry where the menu had depends on ARCH_MULTI_V6 || ARCH_MULTI_V7.

As ARCH_OMAP is shared between omap1 and omap2plus, let's fix the
issue by defining ARCH_OMAP in the shared plat-omap/Kconfig.

Fixes: 21278aeafbfa ("ARM: use menuconfig for sub-arch menus")
Reported-by: Andreas Ruprecht <rupran@einserver.de>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-omap2/Kconfig | 3 ---
 arch/arm/plat-omap/Kconfig  | 3 +++
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index 1c1ed737f7ab..3ac9cb2b2eb2 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -1,9 +1,6 @@
 menu "TI OMAP/AM/DM/DRA Family"
 	depends on ARCH_MULTI_V6 || ARCH_MULTI_V7
 
-config ARCH_OMAP
-	bool
-
 config ARCH_OMAP2
 	bool "TI OMAP2"
 	depends on ARCH_MULTI_V6
diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig
index 02fc10d2d63b..d055db32ffcb 100644
--- a/arch/arm/plat-omap/Kconfig
+++ b/arch/arm/plat-omap/Kconfig
@@ -1,3 +1,6 @@
+config ARCH_OMAP
+	bool
+
 if ARCH_OMAP
 
 menu "TI OMAP Common Features"
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 77/87] ARM: 8160/1: drop warning about return_address not using unwind tables
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
                   ` (75 preceding siblings ...)
  2017-05-05 19:47 ` [PATCH 3.16-stable 76/87] ARM: OMAP: Fix Kconfig warning for omap1 Arnd Bergmann
@ 2017-05-05 19:47 ` Arnd Bergmann
  2017-05-05 19:47 ` [PATCH 3.16-stable 78/87] ARM: 8296/1: cache-l2x0: clean up aurora cache handling Arnd Bergmann
                   ` (10 subsequent siblings)
  87 siblings, 0 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:47 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: stable, Uwe Kleine-König, Russell King, Arnd Bergmann

From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Commit e16343c47e4276f5ebc77ca16feb5e50ca1918f9 upstream.

The warning was introduced in 2009 (commit 4bf1fa5a34aa ([ARM] 5613/1:
implement CALLER_ADDRESSx)). The only "problem" here is that
CALLER_ADDRESSx for x > 1 returns NULL which doesn't do much harm.

The drawback of implementing a fix (i.e. use unwind tables to implement CALLER_ADDRESSx) is that much of the unwinder code would need to be marked as not
traceable.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/kernel/return_address.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/arch/arm/kernel/return_address.c b/arch/arm/kernel/return_address.c
index fafedd86885d..827d946d2be4 100644
--- a/arch/arm/kernel/return_address.c
+++ b/arch/arm/kernel/return_address.c
@@ -59,10 +59,6 @@ void *return_address(unsigned int level)
 
 #else /* if defined(CONFIG_FRAME_POINTER) && !defined(CONFIG_ARM_UNWIND) */
 
-#if defined(CONFIG_ARM_UNWIND)
-#warning "TODO: return_address should use unwind tables"
-#endif
-
 void *return_address(unsigned int level)
 {
 	return NULL;
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 78/87] ARM: 8296/1: cache-l2x0: clean up aurora cache handling
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
                   ` (76 preceding siblings ...)
  2017-05-05 19:47 ` [PATCH 3.16-stable 77/87] ARM: 8160/1: drop warning about return_address not using unwind tables Arnd Bergmann
@ 2017-05-05 19:47 ` Arnd Bergmann
  2017-05-05 19:47 ` [PATCH 3.16-stable 79/87] arm64: add missing data types in smp_load_acquire/smp_store_release Arnd Bergmann
                   ` (9 subsequent siblings)
  87 siblings, 0 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:47 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: stable, Arnd Bergmann, Russell King

Commit 20e783e39e55c2615fb61d1b3d139ee9edcf6772 upstream.

The aurora cache controller is the only remaining user of a couple
of functions in this file and are completely unused when that is
disabled, leading to build warnings:

arch/arm/mm/cache-l2x0.c:167:13: warning: 'l2x0_cache_sync' defined but not used [-Wunused-function]
arch/arm/mm/cache-l2x0.c:184:13: warning: 'l2x0_flush_all' defined but not used [-Wunused-function]
arch/arm/mm/cache-l2x0.c:194:13: warning: 'l2x0_disable' defined but not used [-Wunused-function]

With the knowledge that the code is now aurora-specific, we can
simplify it noticeably:

- The pl310 errata workarounds are not needed on aurora and can be removed
- As confirmed by Thomas Petazzoni from the data sheet, the cache_wait()
  macro is never needed.
- No need to hold the lock across atomic cache sync
- We can load the l2x0_base into a local variable across operations

There should be no functional change in this patch, but readability
and the generated object code improves, along with avoiding the
warnings.

 (on Armada 370 RD and Armada XP GP, boot tested, plus a little bit of
 DMA traffic by reading data from a SD card)

Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tested-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 arch/arm/mm/cache-l2x0.c | 111 ++++++++++++++++-------------------------------
 1 file changed, 38 insertions(+), 73 deletions(-)

diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c
index 7c3fb41a462e..011490e7204d 100644
--- a/arch/arm/mm/cache-l2x0.c
+++ b/arch/arm/mm/cache-l2x0.c
@@ -135,73 +135,6 @@ static void l2c_disable(void)
 	dsb(st);
 }
 
-#ifdef CONFIG_CACHE_PL310
-static inline void cache_wait(void __iomem *reg, unsigned long mask)
-{
-	/* cache operations by line are atomic on PL310 */
-}
-#else
-#define cache_wait	l2c_wait_mask
-#endif
-
-static inline void cache_sync(void)
-{
-	void __iomem *base = l2x0_base;
-
-	writel_relaxed(0, base + sync_reg_offset);
-	cache_wait(base + L2X0_CACHE_SYNC, 1);
-}
-
-#if defined(CONFIG_PL310_ERRATA_588369) || defined(CONFIG_PL310_ERRATA_727915)
-static inline void debug_writel(unsigned long val)
-{
-	l2c_set_debug(l2x0_base, val);
-}
-#else
-/* Optimised out for non-errata case */
-static inline void debug_writel(unsigned long val)
-{
-}
-#endif
-
-static void l2x0_cache_sync(void)
-{
-	unsigned long flags;
-
-	raw_spin_lock_irqsave(&l2x0_lock, flags);
-	cache_sync();
-	raw_spin_unlock_irqrestore(&l2x0_lock, flags);
-}
-
-static void __l2x0_flush_all(void)
-{
-	debug_writel(0x03);
-	__l2c_op_way(l2x0_base + L2X0_CLEAN_INV_WAY);
-	cache_sync();
-	debug_writel(0x00);
-}
-
-static void l2x0_flush_all(void)
-{
-	unsigned long flags;
-
-	/* clean all ways */
-	raw_spin_lock_irqsave(&l2x0_lock, flags);
-	__l2x0_flush_all();
-	raw_spin_unlock_irqrestore(&l2x0_lock, flags);
-}
-
-static void l2x0_disable(void)
-{
-	unsigned long flags;
-
-	raw_spin_lock_irqsave(&l2x0_lock, flags);
-	__l2x0_flush_all();
-	l2c_write_sec(0, l2x0_base, L2X0_CTRL);
-	dsb(st);
-	raw_spin_unlock_irqrestore(&l2x0_lock, flags);
-}
-
 static void l2c_save(void __iomem *base)
 {
 	l2x0_saved_regs.aux_ctrl = readl_relaxed(l2x0_base + L2X0_AUX_CTRL);
@@ -1126,14 +1059,15 @@ static unsigned long calc_range_end(unsigned long start, unsigned long end)
 static void aurora_pa_range(unsigned long start, unsigned long end,
 			unsigned long offset)
 {
+	void __iomem *base = l2x0_base;
 	unsigned long flags;
 
 	raw_spin_lock_irqsave(&l2x0_lock, flags);
-	writel_relaxed(start, l2x0_base + AURORA_RANGE_BASE_ADDR_REG);
-	writel_relaxed(end, l2x0_base + offset);
+	writel_relaxed(start, base + AURORA_RANGE_BASE_ADDR_REG);
+	writel_relaxed(end, base + offset);
 	raw_spin_unlock_irqrestore(&l2x0_lock, flags);
 
-	cache_sync();
+	writel_relaxed(0, base + AURORA_SYNC_REG);
 }
 
 static void aurora_inv_range(unsigned long start, unsigned long end)
@@ -1193,6 +1127,37 @@ static void aurora_flush_range(unsigned long start, unsigned long end)
 	}
 }
 
+static void aurora_flush_all(void)
+{
+	void __iomem *base = l2x0_base;
+	unsigned long flags;
+
+	/* clean all ways */
+	raw_spin_lock_irqsave(&l2x0_lock, flags);
+	__l2c_op_way(base + L2X0_CLEAN_INV_WAY);
+	raw_spin_unlock_irqrestore(&l2x0_lock, flags);
+
+	writel_relaxed(0, base + AURORA_SYNC_REG);
+}
+
+static void aurora_cache_sync(void)
+{
+	writel_relaxed(0, l2x0_base + AURORA_SYNC_REG);
+}
+
+static void aurora_disable(void)
+{
+	void __iomem *base = l2x0_base;
+	unsigned long flags;
+
+	raw_spin_lock_irqsave(&l2x0_lock, flags);
+	__l2c_op_way(base + L2X0_CLEAN_INV_WAY);
+	writel_relaxed(0, base + AURORA_SYNC_REG);
+	l2c_write_sec(0, base, L2X0_CTRL);
+	dsb(st);
+	raw_spin_unlock_irqrestore(&l2x0_lock, flags);
+}
+
 static void aurora_save(void __iomem *base)
 {
 	l2x0_saved_regs.ctrl = readl_relaxed(base + L2X0_CTRL);
@@ -1267,9 +1232,9 @@ static const struct l2c_init_data of_aurora_with_outer_data __initconst = {
 		.inv_range   = aurora_inv_range,
 		.clean_range = aurora_clean_range,
 		.flush_range = aurora_flush_range,
-		.flush_all   = l2x0_flush_all,
-		.disable     = l2x0_disable,
-		.sync        = l2x0_cache_sync,
+		.flush_all   = aurora_flush_all,
+		.disable     = aurora_disable,
+		.sync	     = aurora_cache_sync,
 		.resume      = aurora_resume,
 	},
 };
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 79/87] arm64: add missing data types in smp_load_acquire/smp_store_release
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
                   ` (77 preceding siblings ...)
  2017-05-05 19:47 ` [PATCH 3.16-stable 78/87] ARM: 8296/1: cache-l2x0: clean up aurora cache handling Arnd Bergmann
@ 2017-05-05 19:47 ` Arnd Bergmann
  2017-11-06 18:56   ` Ben Hutchings
       [not found] ` <20170505194745.3627137-1-arnd-r2nGTMty4D4@public.gmane.org>
                   ` (8 subsequent siblings)
  87 siblings, 1 reply; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:47 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: stable, Andre Przywara, Will Deacon, Arnd Bergmann

From: Andre Przywara <andre.przywara@arm.com>

Commit 2427963027aea8d649b69a6956979cc875edfcf3 upstream.

Commit 8053871d0f7f ("smp: Fix smp_call_function_single_async()
locking") introduced a call to smp_load_acquire() with a u16 argument,
but we only cared about u32 and u64 types in that function so far.
This resulted in a compiler warning fortunately, pointing at an
uninitialized use. Due to the implementation structure the compiler
misses that bug in the smp_store_release(), though.
Add the u16 and u8 variants using ldarh/stlrh and ldarb/stlrb,
respectively. Together with the compiletime_assert_atomic_type() check
this should cover all cases now.

Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm64/include/asm/barrier.h | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/arch/arm64/include/asm/barrier.h b/arch/arm64/include/asm/barrier.h
index 6389d60574d9..45548e19c673 100644
--- a/arch/arm64/include/asm/barrier.h
+++ b/arch/arm64/include/asm/barrier.h
@@ -62,6 +62,14 @@ do {									\
 do {									\
 	compiletime_assert_atomic_type(*p);				\
 	switch (sizeof(*p)) {						\
+	case 1:								\
+		asm volatile ("stlrb %w1, %0"				\
+				: "=Q" (*p) : "r" (v) : "memory");	\
+		break;							\
+	case 2:								\
+		asm volatile ("stlrh %w1, %0"				\
+				: "=Q" (*p) : "r" (v) : "memory");	\
+		break;							\
 	case 4:								\
 		asm volatile ("stlr %w1, %0"				\
 				: "=Q" (*p) : "r" (v) : "memory");	\
@@ -78,6 +86,14 @@ do {									\
 	typeof(*p) ___p1;						\
 	compiletime_assert_atomic_type(*p);				\
 	switch (sizeof(*p)) {						\
+	case 1:								\
+		asm volatile ("ldarb %w0, %1"				\
+			: "=r" (___p1) : "Q" (*p) : "memory");		\
+		break;							\
+	case 2:								\
+		asm volatile ("ldarh %w0, %1"				\
+			: "=r" (___p1) : "Q" (*p) : "memory");		\
+		break;							\
 	case 4:								\
 		asm volatile ("ldar %w0, %1"				\
 			: "=r" (___p1) : "Q" (*p) : "memory");		\
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 80/87] MIPS: BMIPS: Fix ".previous without corresponding .section" warnings
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
@ 2017-05-05 19:47     ` Arnd Bergmann
  2017-05-05 19:46 ` [PATCH 3.16-stable 02/87] Disable "frame-address" warning Arnd Bergmann
                       ` (86 subsequent siblings)
  87 siblings, 0 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:47 UTC (permalink / raw)
  To: Ben Hutchings
  Cc: stable-u79uwXL29TY76Z2rM5mHXA, Kevin Cernekee,
	f.fainelli-Re5JQEeQqe8AvxtiuMwx3w, mbizon-MmRyKUhfbQ9GWvitb5QawA,
	jogo-p3rKhJxN3npAfugRpC6u6w, jfraser-dY08KVG/lbpWk0Htik3J/w,
	linux-mips-6z/3iImG2C8G8FEW9MqTrA,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Ralf Baechle, Arnd Bergmann

From: Kevin Cernekee <cernekee-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

Commit dd9e0165f1edf9c5af0ceeabae592f9911a1569d upstream.

Commit 078a55fc824c1 ("Delete __cpuinit/__CPUINIT usage from MIPS code")
removed our __CPUINIT directives, so now the ".previous" directives
are superfluous.  Remove them.

Signed-off-by: Kevin Cernekee <cernekee-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Cc: mbizon-MmRyKUhfbQ9GWvitb5QawA@public.gmane.org
Cc: jogo-p3rKhJxN3npAfugRpC6u6w@public.gmane.org
Cc: jfraser-dY08KVG/lbpWk0Htik3J/w@public.gmane.org
Cc: linux-mips-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Patchwork: https://patchwork.linux-mips.org/patch/8156/
Signed-off-by: Ralf Baechle <ralf-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org>
Signed-off-by: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
---
 arch/mips/kernel/bmips_vec.S | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/arch/mips/kernel/bmips_vec.S b/arch/mips/kernel/bmips_vec.S
index d4614d31d828..d9495f3f3fad 100644
--- a/arch/mips/kernel/bmips_vec.S
+++ b/arch/mips/kernel/bmips_vec.S
@@ -211,7 +211,6 @@ bmips_reset_nmi_vec_end:
 END(bmips_reset_nmi_vec)
 
 	.set	pop
-	.previous
 
 /***********************************************************************
  * CPU1 warm restart vector (used for second and subsequent boots).
@@ -286,5 +285,3 @@ LEAF(bmips_enable_xks01)
 	jr	ra
 
 END(bmips_enable_xks01)
-
-	.previous
-- 
2.9.0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 80/87] MIPS: BMIPS: Fix ".previous without corresponding .section" warnings
@ 2017-05-05 19:47     ` Arnd Bergmann
  0 siblings, 0 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:47 UTC (permalink / raw)
  To: Ben Hutchings
  Cc: stable, Kevin Cernekee, f.fainelli, mbizon, jogo, jfraser,
	linux-mips, devicetree, Ralf Baechle, Arnd Bergmann

From: Kevin Cernekee <cernekee@gmail.com>

Commit dd9e0165f1edf9c5af0ceeabae592f9911a1569d upstream.

Commit 078a55fc824c1 ("Delete __cpuinit/__CPUINIT usage from MIPS code")
removed our __CPUINIT directives, so now the ".previous" directives
are superfluous.  Remove them.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Cc: f.fainelli@gmail.com
Cc: mbizon@freebox.fr
Cc: jogo@openwrt.org
Cc: jfraser@broadcom.com
Cc: linux-mips@linux-mips.org
Cc: devicetree@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/8156/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/mips/kernel/bmips_vec.S | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/arch/mips/kernel/bmips_vec.S b/arch/mips/kernel/bmips_vec.S
index d4614d31d828..d9495f3f3fad 100644
--- a/arch/mips/kernel/bmips_vec.S
+++ b/arch/mips/kernel/bmips_vec.S
@@ -211,7 +211,6 @@ bmips_reset_nmi_vec_end:
 END(bmips_reset_nmi_vec)
 
 	.set	pop
-	.previous
 
 /***********************************************************************
  * CPU1 warm restart vector (used for second and subsequent boots).
@@ -286,5 +285,3 @@ LEAF(bmips_enable_xks01)
 	jr	ra
 
 END(bmips_enable_xks01)
-
-	.previous
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 81/87] MIPS: DEC: Avoid la pseudo-instruction in delay slots
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
                   ` (79 preceding siblings ...)
       [not found] ` <20170505194745.3627137-1-arnd-r2nGTMty4D4@public.gmane.org>
@ 2017-05-05 19:47 ` Arnd Bergmann
  2017-11-06 19:05   ` Ben Hutchings
  2017-05-05 19:47 ` [PATCH 3.16-stable 82/87] MIPS: ip27: Disable qlge driver in defconfig Arnd Bergmann
                   ` (6 subsequent siblings)
  87 siblings, 1 reply; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:47 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: stable, Ralf Baechle, Arnd Bergmann

From: Ralf Baechle <ralf@linux-mips.org>

Commit a4d7f14bd8d3316f847c3e0f7020dad95a8a648a upstream.

When expanding the la or dla pseudo-instruction in a delay slot the GNU
assembler will complain should the pseudo-instruction expand to multiple
actual instructions, since only the first of them will be in the delay
slot leading to the pseudo-instruction being only partially executed if
the branch is taken. Use of PTR_LA in the dec int-handler.S leads to
such warnings:

  arch/mips/dec/int-handler.S: Assembler messages:
  arch/mips/dec/int-handler.S:149: Warning: macro instruction expanded into multiple instructions in a branch delay slot
  arch/mips/dec/int-handler.S:198: Warning: macro instruction expanded into multiple instructions in a branch delay slot

Avoid this by open coding the PTR_LA macros.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/mips/dec/int-handler.S | 40 ++++++++++++++++++++++++++++++++++++++--
 1 file changed, 38 insertions(+), 2 deletions(-)

diff --git a/arch/mips/dec/int-handler.S b/arch/mips/dec/int-handler.S
index 41a2fa1fa12e..c7953f2aca4f 100644
--- a/arch/mips/dec/int-handler.S
+++ b/arch/mips/dec/int-handler.S
@@ -146,7 +146,25 @@
 		/*
 		 * Find irq with highest priority
 		 */
-		 PTR_LA	t1,cpu_mask_nr_tbl
+		# open coded PTR_LA t1, cpu_mask_nr_tbl
+#if (_MIPS_SZPTR == 32)
+		# open coded la t1, cpu_mask_nr_tbl
+		lui	t1, %hi(cpu_mask_nr_tbl)
+		addiu	t1, %lo(cpu_mask_nr_tbl)
+
+#endif
+#if (_MIPS_SZPTR == 64)
+		# open coded dla t1, cpu_mask_nr_tbl
+		.set	push
+		.set	noat
+		lui	t1, %highest(cpu_mask_nr_tbl)
+		lui	AT, %hi(cpu_mask_nr_tbl)
+		daddiu	t1, t1, %higher(cpu_mask_nr_tbl)
+		daddiu	AT, AT, %lo(cpu_mask_nr_tbl)
+		dsll	t1, 32
+		daddu	t1, t1, AT
+		.set	pop
+#endif
 1:		lw	t2,(t1)
 		nop
 		and	t2,t0
@@ -195,7 +213,25 @@
 		/*
 		 * Find irq with highest priority
 		 */
-		 PTR_LA	t1,asic_mask_nr_tbl
+		# open coded PTR_LA t1,asic_mask_nr_tbl
+#if (_MIPS_SZPTR == 32)
+		# open coded la t1, asic_mask_nr_tbl
+		lui	t1, %hi(asic_mask_nr_tbl)
+		addiu	t1, %lo(asic_mask_nr_tbl)
+
+#endif
+#if (_MIPS_SZPTR == 64)
+		# open coded dla t1, asic_mask_nr_tbl
+		.set	push
+		.set	noat
+		lui	t1, %highest(asic_mask_nr_tbl)
+		lui	AT, %hi(asic_mask_nr_tbl)
+		daddiu	t1, t1, %higher(asic_mask_nr_tbl)
+		daddiu	AT, AT, %lo(asic_mask_nr_tbl)
+		dsll	t1, 32
+		daddu	t1, t1, AT
+		.set	pop
+#endif
 2:		lw	t2,(t1)
 		nop
 		and	t2,t0
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 82/87] MIPS: ip27: Disable qlge driver in defconfig
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
                   ` (80 preceding siblings ...)
  2017-05-05 19:47 ` [PATCH 3.16-stable 81/87] MIPS: DEC: Avoid la pseudo-instruction in delay slots Arnd Bergmann
@ 2017-05-05 19:47 ` Arnd Bergmann
  2017-11-06 19:08   ` Ben Hutchings
  2017-05-05 19:47 ` [PATCH 3.16-stable 83/87] MIPS: ip22: Fix ip28 build for modern gcc Arnd Bergmann
                   ` (5 subsequent siblings)
  87 siblings, 1 reply; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:47 UTC (permalink / raw)
  To: Ben Hutchings
  Cc: stable, Arnd Bergmann, Ralf Baechle, linux-mips, linux-kernel,
	James Hogan

Commit c64ebe32d3fc90c52277257d6c9fa7d589877cc2 upstream.

One of the last remaining failures in kernelci.org is for a gcc bug:

drivers/net/ethernet/qlogic/qlge/qlge_main.c:4819:1: error: insn does not satisfy its constraints:
drivers/net/ethernet/qlogic/qlge/qlge_main.c:4819:1: internal compiler error: in extract_constrain_insn, at recog.c:2190

This is apparently broken in gcc-6 but fixed in gcc-7, and I cannot
reproduce the problem here. However, it is clear that ip27_defconfig
does not actually need this driver as the platform has only PCI-X but
not PCIe, and the qlge adapter in turn is PCIe-only.

The driver was originally enabled in 2010 along with lots of other
drivers.

Fixes: 59d302b342e5 ("MIPS: IP27: Make defconfig useful again.")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/15197/
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/mips/configs/ip27_defconfig | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/mips/configs/ip27_defconfig b/arch/mips/configs/ip27_defconfig
index 0e36abcd39cc..7446284dd7b3 100644
--- a/arch/mips/configs/ip27_defconfig
+++ b/arch/mips/configs/ip27_defconfig
@@ -206,7 +206,6 @@ CONFIG_MLX4_EN=m
 # CONFIG_MLX4_DEBUG is not set
 CONFIG_TEHUTI=m
 CONFIG_BNX2X=m
-CONFIG_QLGE=m
 CONFIG_SFC=m
 CONFIG_BE2NET=m
 CONFIG_LIBERTAS_THINFIRM=m
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 83/87] MIPS: ip22: Fix ip28 build for modern gcc
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
                   ` (81 preceding siblings ...)
  2017-05-05 19:47 ` [PATCH 3.16-stable 82/87] MIPS: ip27: Disable qlge driver in defconfig Arnd Bergmann
@ 2017-05-05 19:47 ` Arnd Bergmann
  2017-05-05 19:47 ` [PATCH 3.16-stable 84/87] MIPS: MSP71xx: remove odd locking in PCI config space access code Arnd Bergmann
                   ` (4 subsequent siblings)
  87 siblings, 0 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:47 UTC (permalink / raw)
  To: Ben Hutchings
  Cc: stable, Arnd Bergmann, linux-mips, linux-kernel, Ralf Baechle

Commit c3ef8bf59deea37d1105ffb771b163d3c322fff7 upstream.

kernelci reports a failure of the ip28_defconfig build after upgrading its
gcc version:

arch/mips/sgi-ip22/Platform:29: *** gcc doesn't support needed option -mr10k-cache-barrier=store.  Stop.

The problem apparently is that the -mr10k-cache-barrier=store option is now
rejected for CPUs other than r10k. Explicitly including the CPU in the
check fixes this and is safe because both options were introduced in
gcc-4.4.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/15049/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/mips/sgi-ip22/Platform | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/mips/sgi-ip22/Platform b/arch/mips/sgi-ip22/Platform
index b7a4b7e04c38..e8f6b3a42a48 100644
--- a/arch/mips/sgi-ip22/Platform
+++ b/arch/mips/sgi-ip22/Platform
@@ -25,7 +25,7 @@ endif
 # Simplified: what IP22 does at 128MB+ in ksegN, IP28 does at 512MB+ in xkphys
 #
 ifdef CONFIG_SGI_IP28
-  ifeq ($(call cc-option-yn,-mr10k-cache-barrier=store), n)
+  ifeq ($(call cc-option-yn,-march=r10000 -mr10k-cache-barrier=store), n)
       $(error gcc doesn't support needed option -mr10k-cache-barrier=store)
   endif
 endif
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 84/87] MIPS: MSP71xx: remove odd locking in PCI config space access code
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
                   ` (82 preceding siblings ...)
  2017-05-05 19:47 ` [PATCH 3.16-stable 83/87] MIPS: ip22: Fix ip28 build for modern gcc Arnd Bergmann
@ 2017-05-05 19:47 ` Arnd Bergmann
  2017-05-05 19:47 ` [PATCH 3.16-stable 85/87] MIPS: Fix the build on jz4740 after removing the custom gpio.h Arnd Bergmann
                   ` (3 subsequent siblings)
  87 siblings, 0 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:47 UTC (permalink / raw)
  To: Ben Hutchings
  Cc: stable, Sergey Ryazanov, Linux MIPS, Ralf Baechle, Arnd Bergmann

From: Sergey Ryazanov <ryazanov.s.a@gmail.com>

Commit 7b2cae08b63e2acc94139c3dda557ac84165b327 upstream.

Caller (generic PCI code) already do proper locking so no need to add
another one here.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
Cc: Linux MIPS <linux-mips@linux-mips.org>
Patchwork: https://patchwork.linux-mips.org/patch/7601/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/mips/pci/ops-pmcmsp.c | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/arch/mips/pci/ops-pmcmsp.c b/arch/mips/pci/ops-pmcmsp.c
index 50034f985be1..dd2d9f7e9412 100644
--- a/arch/mips/pci/ops-pmcmsp.c
+++ b/arch/mips/pci/ops-pmcmsp.c
@@ -193,8 +193,6 @@ static void pci_proc_init(void)
 }
 #endif /* CONFIG_PROC_FS && PCI_COUNTERS */
 
-static DEFINE_SPINLOCK(bpci_lock);
-
 /*****************************************************************************
  *
  *  STRUCT: pci_io_resource
@@ -368,7 +366,6 @@ int msp_pcibios_config_access(unsigned char access_type,
 	struct msp_pci_regs *preg = (void *)PCI_BASE_REG;
 	unsigned char bus_num = bus->number;
 	unsigned char dev_fn = (unsigned char)devfn;
-	unsigned long flags;
 	unsigned long intr;
 	unsigned long value;
 	static char pciirqflag;
@@ -401,10 +398,7 @@ int msp_pcibios_config_access(unsigned char access_type,
 	}
 
 #if defined(CONFIG_PMC_MSP7120_GW) || defined(CONFIG_PMC_MSP7120_EVAL)
-	local_irq_save(flags);
 	vpe_status = dvpe();
-#else
-	spin_lock_irqsave(&bpci_lock, flags);
 #endif
 
 	/*
@@ -457,9 +451,6 @@ int msp_pcibios_config_access(unsigned char access_type,
 
 #if defined(CONFIG_PMC_MSP7120_GW) || defined(CONFIG_PMC_MSP7120_EVAL)
 		evpe(vpe_status);
-		local_irq_restore(flags);
-#else
-		spin_unlock_irqrestore(&bpci_lock, flags);
 #endif
 
 		return -1;
@@ -467,9 +458,6 @@ int msp_pcibios_config_access(unsigned char access_type,
 
 #if defined(CONFIG_PMC_MSP7120_GW) || defined(CONFIG_PMC_MSP7120_EVAL)
 	evpe(vpe_status);
-	local_irq_restore(flags);
-#else
-	spin_unlock_irqrestore(&bpci_lock, flags);
 #endif
 
 	return PCIBIOS_SUCCESSFUL;
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 85/87] MIPS: Fix the build on jz4740 after removing the custom gpio.h
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
                   ` (83 preceding siblings ...)
  2017-05-05 19:47 ` [PATCH 3.16-stable 84/87] MIPS: MSP71xx: remove odd locking in PCI config space access code Arnd Bergmann
@ 2017-05-05 19:47 ` Arnd Bergmann
  2017-05-05 19:47 ` [PATCH 3.16-stable 86/87] MIPS: TXx9: Delete an unused variable in tx4927_pcibios_setup Arnd Bergmann
                   ` (2 subsequent siblings)
  87 siblings, 0 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:47 UTC (permalink / raw)
  To: Ben Hutchings
  Cc: stable, Alban Bedel, Paul Burton, Lars-Peter Clausen,
	Brian Norris, Thomas Gleixner, Linus Walleij, linux-mips,
	linux-kernel, Ralf Baechle, Arnd Bergmann

From: Alban Bedel <albeu@free.fr>

Commit 8293821972679f185562c9d2bfadd897fac40243 upstream.

Somehow the wrong version of the patch to remove the use of custom
gpio.h on mips has been merged. This patch add the missing fixes for a
build error on jz4740 because linux/gpio.h doesn't provide any machine
specfics definitions anymore.

Signed-off-by: Alban Bedel <albeu@free.fr>
Cc: Paul Burton <paul.burton@imgtec.com>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Cc: Brian Norris <computersforpeace@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/11089/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/mips/jz4740/board-qi_lb60.c | 1 +
 arch/mips/jz4740/gpio.c          | 1 +
 2 files changed, 2 insertions(+)

diff --git a/arch/mips/jz4740/board-qi_lb60.c b/arch/mips/jz4740/board-qi_lb60.c
index 088e92a79ae6..7da9ff143499 100644
--- a/arch/mips/jz4740/board-qi_lb60.c
+++ b/arch/mips/jz4740/board-qi_lb60.c
@@ -25,6 +25,7 @@
 #include <linux/power/jz4740-battery.h>
 #include <linux/power/gpio-charger.h>
 
+#include <asm/mach-jz4740/gpio.h>
 #include <asm/mach-jz4740/jz4740_fb.h>
 #include <asm/mach-jz4740/jz4740_mmc.h>
 #include <asm/mach-jz4740/jz4740_nand.h>
diff --git a/arch/mips/jz4740/gpio.c b/arch/mips/jz4740/gpio.c
index 00b798d2fb7c..000d2d91b704 100644
--- a/arch/mips/jz4740/gpio.c
+++ b/arch/mips/jz4740/gpio.c
@@ -27,6 +27,7 @@
 #include <linux/seq_file.h>
 
 #include <asm/mach-jz4740/base.h>
+#include <asm/mach-jz4740/gpio.h>
 
 #include "irq.h"
 
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 86/87] MIPS: TXx9: Delete an unused variable in tx4927_pcibios_setup
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
                   ` (84 preceding siblings ...)
  2017-05-05 19:47 ` [PATCH 3.16-stable 85/87] MIPS: Fix the build on jz4740 after removing the custom gpio.h Arnd Bergmann
@ 2017-05-05 19:47 ` Arnd Bergmann
  2017-05-05 19:47 ` [PATCH 3.16-stable 87/87] MIPS: elf2ecoff: Fix warning due to dead code Arnd Bergmann
  2017-11-06 19:14 ` [PATCH 3.16-stable 00/87] build warnings and errors Ben Hutchings
  87 siblings, 0 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:47 UTC (permalink / raw)
  To: Ben Hutchings
  Cc: stable, Atsushi Nemoto, linux-mips, Ralf Baechle, Arnd Bergmann

From: Atsushi Nemoto <anemo@mba.ocn.ne.jp>

Commit 32a51c797870e434c2afbfe60399c6497fc524ed upstream.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/7216/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/mips/pci/ops-tx4927.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/mips/pci/ops-tx4927.c b/arch/mips/pci/ops-tx4927.c
index 0e046d82e4e3..d54ea93651ac 100644
--- a/arch/mips/pci/ops-tx4927.c
+++ b/arch/mips/pci/ops-tx4927.c
@@ -199,8 +199,6 @@ static struct {
 
 char *tx4927_pcibios_setup(char *str)
 {
-	unsigned long val;
-
 	if (!strncmp(str, "trdyto=", 7)) {
 		u8 val = 0;
 		if (kstrtou8(str + 7, 0, &val) == 0)
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* [PATCH 3.16-stable 87/87] MIPS: elf2ecoff: Fix warning due to dead code.
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
                   ` (85 preceding siblings ...)
  2017-05-05 19:47 ` [PATCH 3.16-stable 86/87] MIPS: TXx9: Delete an unused variable in tx4927_pcibios_setup Arnd Bergmann
@ 2017-05-05 19:47 ` Arnd Bergmann
  2017-11-06 19:14 ` [PATCH 3.16-stable 00/87] build warnings and errors Ben Hutchings
  87 siblings, 0 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-05 19:47 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: stable, Ralf Baechle, Arnd Bergmann

From: Ralf Baechle <ralf@linux-mips.org>

Commit 8cf6adea726b0e4abcc982b6e7e29915a620c90c upstream.

  HOSTCC  arch/mips/boot/elf2ecoff
arch/mips/boot/elf2ecoff.c: In function ‘main’:
arch/mips/boot/elf2ecoff.c:271:8: warning: variable ‘shstrtab’ set but not used [-Wunused-but-set-variable]
  char *shstrtab;

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/mips/boot/elf2ecoff.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/arch/mips/boot/elf2ecoff.c b/arch/mips/boot/elf2ecoff.c
index 8585078ae50e..bef06453edc0 100644
--- a/arch/mips/boot/elf2ecoff.c
+++ b/arch/mips/boot/elf2ecoff.c
@@ -267,7 +267,6 @@ int main(int argc, char *argv[])
 	Elf32_Ehdr ex;
 	Elf32_Phdr *ph;
 	Elf32_Shdr *sh;
-	char *shstrtab;
 	int i, pad;
 	struct sect text, data, bss;
 	struct filehdr efh;
@@ -335,9 +334,6 @@ int main(int argc, char *argv[])
 				     "sh");
 	if (must_convert_endian)
 		convert_elf_shdrs(sh, ex.e_shnum);
-	/* Read in the section string table. */
-	shstrtab = saveRead(infile, sh[ex.e_shstrndx].sh_offset,
-			    sh[ex.e_shstrndx].sh_size, "shstrtab");
 
 	/* Figure out if we can cram the program header into an ECOFF
 	   header...  Basically, we can't handle anything but loadable
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 104+ messages in thread

* Patch "[PATCH 3.16-stable 31/87] i2o: hide unsafe ioctl on 64-bit" has been added to the 3.18-stable tree
  2017-05-05 19:46 ` [PATCH 3.16-stable 31/87] i2o: hide unsafe ioctl on 64-bit Arnd Bergmann
@ 2017-05-05 20:07   ` gregkh
  0 siblings, 0 replies; 104+ messages in thread
From: gregkh @ 2017-05-05 20:07 UTC (permalink / raw)
  To: arnd, ben, gregkh; +Cc: stable, stable-commits


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

    [PATCH 3.16-stable 31/87] i2o: hide unsafe ioctl on 64-bit

to the 3.18-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:
     i2o-hide-unsafe-ioctl-on-64-bit.patch
and it can be found in the queue-3.18 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From arnd@arndb.de  Fri May  5 13:07:16 2017
From: Arnd Bergmann <arnd@arndb.de>
Date: Fri,  5 May 2017 21:46:49 +0200
Subject: [PATCH 3.16-stable 31/87] i2o: hide unsafe ioctl on 64-bit
To: Ben Hutchings <ben@decadent.org.uk>
Cc: stable@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>
Message-ID: <20170505194745.3627137-32-arnd@arndb.de>

From: Arnd Bergmann <arnd@arndb.de>

We get a warning about a broken pointer conversion on 64-bit architectures:

drivers/message/i2o/i2o_config.c: In function 'i2o_cfg_passthru':
drivers/message/i2o/i2o_config.c:893:19: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
         (p->virt, (void __user *)sg[i].addr_bus,
                   ^
drivers/message/i2o/i2o_config.c:953:10: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
         ((void __user *)sg[j].addr_bus, sg_list[j].virt,
          ^

This has clearly never worked right, so we can add an #ifdef around the code.
The driver was moved to staging in linux-4.0 and finally removed in 4.2,
so upstream does not have a fix for it.

The driver originally got this mostly right, though probably by accident.

Fixes: f4c2c15b930b ("[PATCH] Convert i2o to compat_ioctl")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/message/i2o/i2o_config.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/message/i2o/i2o_config.c
+++ b/drivers/message/i2o/i2o_config.c
@@ -772,7 +772,7 @@ static long i2o_cfg_compat_ioctl(struct
 
 #endif
 
-#ifdef CONFIG_I2O_EXT_ADAPTEC
+#if defined(CONFIG_I2O_EXT_ADAPTEC) && !defined(CONFIG_64BIT)
 static int i2o_cfg_passthru(unsigned long arg)
 {
 	struct i2o_cmd_passthru __user *cmd =
@@ -1045,7 +1045,7 @@ static long i2o_cfg_ioctl(struct file *f
 		ret = i2o_cfg_evt_get(arg, fp);
 		break;
 
-#ifdef CONFIG_I2O_EXT_ADAPTEC
+#if defined(CONFIG_I2O_EXT_ADAPTEC) && !defined(CONFIG_64BIT)
 	case I2OPASSTHRU:
 		ret = i2o_cfg_passthru(arg);
 		break;


Patches currently in stable-queue which might be from arnd@arndb.de are

queue-3.18/ib-iser-fix-sparse-warnings.patch
queue-3.18/i2o-hide-unsafe-ioctl-on-64-bit.patch
queue-3.18/cred-userns-define-current_user_ns-as-a-function.patch
queue-3.18/mips-elf2ecoff-ignore-pt_mips_abiflags-program-headers.patch
queue-3.18/pci-xilinx-fix-harmless-format-string-warning.patch
queue-3.18/arm64-build-vdso-without-libgcov.patch
queue-3.18/arm64-provide-a-namespace-to-ncaps.patch
queue-3.18/alsa-ppc-awacs-shut-up-maybe-uninitialized-warning.patch
queue-3.18/mips-jz4740-fix-build-error-in-irq.h.patch
queue-3.18/modpost-don-t-emit-section-mismatch-warnings-for-compiler-optimizations.patch
queue-3.18/net-tg3-avoid-uninitialized-variable-warning.patch
queue-3.18/tty-isicom-fix-big-endian-compile-warning.patch
queue-3.18/mtd-avoid-stack-overflow-in-mtd-cfi-code.patch
queue-3.18/cpumask_set_cpu_local_first-cpumask_local_spread-lament.patch
queue-3.18/ib-qib-rename-bits_per_page-to-rvt_bits_per_page.patch
queue-3.18/modpost-expand-pattern-matching-to-support-substring-matches.patch
queue-3.18/ips-remove-pointless-warning.patch
queue-3.18/powerpc-ptrace-fix-out-of-bounds-array-access-warning.patch
queue-3.18/scsi-advansys-remove-warning-message.patch
queue-3.18/staging-imx-drm-fix-indentation-warning.patch
queue-3.18/mlx5-avoid-build-warnings-on-32-bit.patch
queue-3.18/mm-cma-silence-warnings-due-to-max-usage.patch
queue-3.18/misdn-avoid-arch-specific-__builtin_return_address-call.patch
queue-3.18/staging-bcm-add-32-bit-host-dependency.patch
queue-3.18/e1000e-fix-call-to-do_div-to-use-u64-arg.patch
queue-3.18/gfs2-remove-is_err_value-abuse.patch
queue-3.18/staging-vt6655-fix-overly-large-stack-usage.patch
queue-3.18/drbd-avoid-redefinition-of-bits_per_page.patch
queue-3.18/infiniband-mlx5-avoid-a-compile-time-warning.patch
queue-3.18/kbuild-mergeconfig-fix-jobserver-unavailable-warning.patch
queue-3.18/arm-cns3xxx-shut-up-frame-size-warning.patch
queue-3.18/ib-ehca-fix-maybe-uninitialized-warnings.patch
queue-3.18/mips-elf2ecoff-fix-warning-due-to-dead-code.patch
queue-3.18/staging-unisys-correctly-handle-return-value-from-queue_delayed_work.patch

^ permalink raw reply	[flat|nested] 104+ messages in thread

* Re: [PATCH 3.16-stable 75/87] ARM: 8221/1: PJ4: allow building in Thumb-2 mode
  2017-05-05 19:47 ` [PATCH 3.16-stable 75/87] ARM: 8221/1: PJ4: allow building in Thumb-2 mode Arnd Bergmann
@ 2017-05-06  7:42   ` Ard Biesheuvel
  2017-05-08 19:47     ` Arnd Bergmann
  0 siblings, 1 reply; 104+ messages in thread
From: Ard Biesheuvel @ 2017-05-06  7:42 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: Ben Hutchings, stable, Russell King

On 5 May 2017 at 20:47, Arnd Bergmann <arnd@arndb.de> wrote:
> From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
>
> Commit 69bbf2ab20389418327484288d8730732e4f3dd0 upstream.
>
> Two files that get included when building the multi_v7_defconfig target
> fail to build when selecting THUMB2_KERNEL for this configuration.
>
> In both cases, we can just build the file as ARM code, as none of its
> symbols are exported to modules, so there are no interworking concerns.
> In the iwmmxt.S case, add ENDPROC() declarations so the symbols are
> annotated as functions, resulting in the linker to emit the appropriate
> mode switches.
>
> Acked-by: Nicolas Pitre <nico@linaro.org>
> Tested-by: Olof Johansson <olof@lixom.net>
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

I think you will want to take 5008efc83bf85b647aa1cbc44718b1675bbb7444
as well. This patch by itself caused problems with ftrace's
instruction patching IIRC.

> ---
>  arch/arm/kernel/Makefile |  1 +
>  arch/arm/kernel/iwmmxt.S | 13 +++++++++++++
>  2 files changed, 14 insertions(+)
>
> diff --git a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile
> index 03120e656aea..2ecc7d15bc09 100644
> --- a/arch/arm/kernel/Makefile
> +++ b/arch/arm/kernel/Makefile
> @@ -84,6 +84,7 @@ obj-$(CONFIG_CPU_PJ4B)                += pj4-cp0.o
>  obj-$(CONFIG_IWMMXT)           += iwmmxt.o
>  obj-$(CONFIG_PERF_EVENTS)      += perf_regs.o
>  obj-$(CONFIG_HW_PERF_EVENTS)   += perf_event.o perf_event_cpu.o
> +CFLAGS_pj4-cp0.o               := -marm
>  AFLAGS_iwmmxt.o                        := -Wa,-mcpu=iwmmxt
>  obj-$(CONFIG_ARM_CPU_TOPOLOGY)  += topology.o
>
> diff --git a/arch/arm/kernel/iwmmxt.S b/arch/arm/kernel/iwmmxt.S
> index 2b32978ae905..d65bb940d797 100644
> --- a/arch/arm/kernel/iwmmxt.S
> +++ b/arch/arm/kernel/iwmmxt.S
> @@ -58,6 +58,7 @@
>  #define MMX_SIZE               (0x98)
>
>         .text
> +       .arm
>
>  /*
>   * Lazy switching of Concan coprocessor context
> @@ -182,6 +183,8 @@ concan_load:
>         tmcr    wCon, r2
>         mov     pc, lr
>
> +ENDPROC(iwmmxt_task_enable)
> +
>  /*
>   * Back up Concan regs to save area and disable access to them
>   * (mainly for gdb or sleep mode usage)
> @@ -232,6 +235,8 @@ ENTRY(iwmmxt_task_disable)
>  1:     msr     cpsr_c, ip                      @ restore interrupt mode
>         ldmfd   sp!, {r4, pc}
>
> +ENDPROC(iwmmxt_task_disable)
> +
>  /*
>   * Copy Concan state to given memory address
>   *
> @@ -268,6 +273,8 @@ ENTRY(iwmmxt_task_copy)
>         msr     cpsr_c, ip                      @ restore interrupt mode
>         mov     pc, r3
>
> +ENDPROC(iwmmxt_task_copy)
> +
>  /*
>   * Restore Concan state from given memory address
>   *
> @@ -304,6 +311,8 @@ ENTRY(iwmmxt_task_restore)
>         msr     cpsr_c, ip                      @ restore interrupt mode
>         mov     pc, r3
>
> +ENDPROC(iwmmxt_task_restore)
> +
>  /*
>   * Concan handling on task switch
>   *
> @@ -335,6 +344,8 @@ ENTRY(iwmmxt_task_switch)
>         mrc     p15, 0, r1, c2, c0, 0
>         sub     pc, lr, r1, lsr #32             @ cpwait and return
>
> +ENDPROC(iwmmxt_task_switch)
> +
>  /*
>   * Remove Concan ownership of given task
>   *
> @@ -353,6 +364,8 @@ ENTRY(iwmmxt_task_release)
>         msr     cpsr_c, r2                      @ restore interrupts
>         mov     pc, lr
>
> +ENDPROC(iwmmxt_task_release)
> +
>         .data
>  concan_owner:
>         .word   0
> --
> 2.9.0
>

^ permalink raw reply	[flat|nested] 104+ messages in thread

* Re: [PATCH 3.16-stable 74/87] ARM: 8383/1: nommu: avoid deprecated source register on mov
  2017-05-05 19:47 ` [PATCH 3.16-stable 74/87] ARM: 8383/1: nommu: avoid deprecated source register on mov Arnd Bergmann
@ 2017-05-06  9:45   ` Arnd Bergmann
  2017-05-06 10:06     ` Russell King - ARM Linux
  0 siblings, 1 reply; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-06  9:45 UTC (permalink / raw)
  To: Ben Hutchings
  Cc: stable, Stefan Agner, Russell King, Arnd Bergmann, Greg Kroah-Hartman

On Fri, May 5, 2017 at 9:47 PM, Arnd Bergmann <arnd@arndb.de> wrote:

> @@ -164,7 +158,11 @@ __after_proc_init:
>  #endif
>         mcr     p15, 0, r0, c1, c0, 0           @ write control reg
>  #endif /* CONFIG_CPU_CP15 */
> +<<<<<<< HEAD
>         mov     pc, r13
> +=======
> +       ret     lr
> +>>>>>>> 12ebe5ca67dc... ARM: 8383/1: nommu: avoid deprecated source register on mov
>  ENDPROC(__after_proc_init)
>         .ltorg
>

This was evidently crap, please ignore this patch.

       Arnd

^ permalink raw reply	[flat|nested] 104+ messages in thread

* Re: [PATCH 3.16-stable 74/87] ARM: 8383/1: nommu: avoid deprecated source register on mov
  2017-05-06  9:45   ` Arnd Bergmann
@ 2017-05-06 10:06     ` Russell King - ARM Linux
  2017-05-08 19:53       ` Arnd Bergmann
  0 siblings, 1 reply; 104+ messages in thread
From: Russell King - ARM Linux @ 2017-05-06 10:06 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: Ben Hutchings, stable, Stefan Agner, Greg Kroah-Hartman

On Sat, May 06, 2017 at 11:45:13AM +0200, Arnd Bergmann wrote:
> On Fri, May 5, 2017 at 9:47 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> 
> > @@ -164,7 +158,11 @@ __after_proc_init:
> >  #endif
> >         mcr     p15, 0, r0, c1, c0, 0           @ write control reg
> >  #endif /* CONFIG_CPU_CP15 */
> > +<<<<<<< HEAD
> >         mov     pc, r13
> > +=======
> > +       ret     lr
> > +>>>>>>> 12ebe5ca67dc... ARM: 8383/1: nommu: avoid deprecated source register on mov
> >  ENDPROC(__after_proc_init)
> >         .ltorg
> >
> 
> This was evidently crap, please ignore this patch.

Maybe a commit hook that checks the files to be committed for unresolved
conflicts may help avoid this?  Maybe something like this (untested) in
.git/hooks/pre-commit?

#!/bin/sh
if git diff-index -u HEAD | grep -nv '^\+\(<<<<<<<\|=======\|>>>>>>>\)'; then
   echo "Your files appear to contain unresolved merges, please fix," >&2
   echo "or override with git commit --no-verify" >&2
   exit 1
fi

-- 
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.

^ permalink raw reply	[flat|nested] 104+ messages in thread

* Re: [PATCH 3.16-stable 75/87] ARM: 8221/1: PJ4: allow building in Thumb-2 mode
  2017-05-06  7:42   ` Ard Biesheuvel
@ 2017-05-08 19:47     ` Arnd Bergmann
  0 siblings, 0 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-08 19:47 UTC (permalink / raw)
  To: Ard Biesheuvel; +Cc: Ben Hutchings, stable, Russell King

On Sat, May 6, 2017 at 9:42 AM, Ard Biesheuvel
<ard.biesheuvel@linaro.org> wrote:
> On 5 May 2017 at 20:47, Arnd Bergmann <arnd@arndb.de> wrote:
>> From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
>>
>> Commit 69bbf2ab20389418327484288d8730732e4f3dd0 upstream.
>>
>> Two files that get included when building the multi_v7_defconfig target
>> fail to build when selecting THUMB2_KERNEL for this configuration.
>>
>> In both cases, we can just build the file as ARM code, as none of its
>> symbols are exported to modules, so there are no interworking concerns.
>> In the iwmmxt.S case, add ENDPROC() declarations so the symbols are
>> annotated as functions, resulting in the linker to emit the appropriate
>> mode switches.
>>
>> Acked-by: Nicolas Pitre <nico@linaro.org>
>> Tested-by: Olof Johansson <olof@lixom.net>
>> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
>> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>
> I think you will want to take 5008efc83bf85b647aa1cbc44718b1675bbb7444
> as well. This patch by itself caused problems with ftrace's
> instruction patching IIRC.

Right, thanks for the reminder. As the original patch was already in 3.18
and 4.4, but the second one was not, I have also submitted 5008efc83bf85
for inclusion in those two stable series now, besides adding it to
my local series here.

       Arnd

^ permalink raw reply	[flat|nested] 104+ messages in thread

* Re: [PATCH 3.16-stable 74/87] ARM: 8383/1: nommu: avoid deprecated source register on mov
  2017-05-06 10:06     ` Russell King - ARM Linux
@ 2017-05-08 19:53       ` Arnd Bergmann
  0 siblings, 0 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-05-08 19:53 UTC (permalink / raw)
  To: Russell King - ARM Linux
  Cc: Ben Hutchings, stable, Stefan Agner, Greg Kroah-Hartman

On Sat, May 6, 2017 at 12:06 PM, Russell King - ARM Linux
<linux@armlinux.org.uk> wrote:
> On Sat, May 06, 2017 at 11:45:13AM +0200, Arnd Bergmann wrote:
>> On Fri, May 5, 2017 at 9:47 PM, Arnd Bergmann <arnd@arndb.de> wrote:
>>
>> > @@ -164,7 +158,11 @@ __after_proc_init:
>> >  #endif
>> >         mcr     p15, 0, r0, c1, c0, 0           @ write control reg
>> >  #endif /* CONFIG_CPU_CP15 */
>> > +<<<<<<< HEAD
>> >         mov     pc, r13
>> > +=======
>> > +       ret     lr
>> > +>>>>>>> 12ebe5ca67dc... ARM: 8383/1: nommu: avoid deprecated source register on mov
>> >  ENDPROC(__after_proc_init)
>> >         .ltorg
>> >
>>
>> This was evidently crap, please ignore this patch.
>
> Maybe a commit hook that checks the files to be committed for unresolved
> conflicts may help avoid this?  Maybe something like this (untested) in
> .git/hooks/pre-commit?
>
> #!/bin/sh
> if git diff-index -u HEAD | grep -nv '^\+\(<<<<<<<\|=======\|>>>>>>>\)'; then
>    echo "Your files appear to contain unresolved merges, please fix," >&2
>    echo "or override with git commit --no-verify" >&2
>    exit 1
> fi

Good idea. It was almost right, 'grep -q' (without -v) did it, and I've
added that now. Thanks,

      Arnd

^ permalink raw reply	[flat|nested] 104+ messages in thread

* Re: [PATCH 3.16-stable 11/87] iio: fix printk format string warning
  2017-05-05 19:46 ` [PATCH 3.16-stable 11/87] iio: fix printk format string warning Arnd Bergmann
@ 2017-11-06 16:55   ` Ben Hutchings
  0 siblings, 0 replies; 104+ messages in thread
From: Ben Hutchings @ 2017-11-06 16:55 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: stable

[-- Attachment #1: Type: text/plain, Size: 1588 bytes --]

On Fri, 2017-05-05 at 21:46 +0200, Arnd Bergmann wrote:
> On 3.16, we get this warning:
> 
> drivers/iio/industrialio-core.c: In function 'iio_format_value':
> drivers/iio/industrialio-core.c:408:30: error: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'long int' [-Werror=format=]
> 
> Upstream commit 8f57e4d930d4 ("include/linux/kernel.h: change abs() macro
> so it uses consistent return type") addressed this in a more verbose
> way, but here we can simply add a type cast to shut up the warning.

I'm skipping this one because I have now cherry-picked that commit.

Ben.

> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  drivers/iio/industrialio-core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c
> index 230cbdda6ce1..669c27d93049 100644
> --- a/drivers/iio/industrialio-core.c
> +++ b/drivers/iio/industrialio-core.c
> @@ -405,7 +405,7 @@ ssize_t iio_format_value(char *buf, unsigned int type, int size, int *vals)
>  	case IIO_VAL_FRACTIONAL:
>  		tmp = div_s64((s64)vals[0] * 1000000000LL, vals[1]);
>  		vals[0] = (int)div_s64_rem(tmp, 1000000000, &vals[1]);
> -		return sprintf(buf, "%d.%09u\n", vals[0], abs(vals[1]));
> +		return sprintf(buf, "%d.%09ld\n", vals[0], abs(vals[1]));
>  	case IIO_VAL_FRACTIONAL_LOG2:
>  		tmp = (s64)vals[0] * 1000000000LL >> vals[1];
>  		vals[1] = do_div(tmp, 1000000000LL);
-- 
Ben Hutchings
It is a miracle that curiosity survives formal education. - Albert
Einstein


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 104+ messages in thread

* Re: [PATCH 3.16-stable 34/87] ips: remove pointless #warning
  2017-05-05 19:46 ` [PATCH 3.16-stable 34/87] ips: remove pointless #warning Arnd Bergmann
@ 2017-11-06 17:31   ` Ben Hutchings
  0 siblings, 0 replies; 104+ messages in thread
From: Ben Hutchings @ 2017-11-06 17:31 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: stable, James Bottomley

[-- Attachment #1: Type: text/plain, Size: 1127 bytes --]

On Fri, 2017-05-05 at 21:46 +0200, Arnd Bergmann wrote:
> From: James Bottomley <JBottomley@Odin.com>
> 
> Commit e03c2da6574223081b786960e39c1e5ecf5d492d upstream.
> 
> non-x86 builds want the #warning in the IPS code about compiling on the wrong
> architecture removed because it keeps triggering on their platforms build
> farms.  Transform from a compile time warning into a runtime one with taint to
> preserve the original intent of the authors.

I'll apply this, but:

[...]
> @@ -6789,6 +6785,11 @@ ips_remove_device(struct pci_dev *pci_dev)
>  static int __init
>  ips_module_init(void)
>  {
> +#if !defined(__i386__) && !defined(__ia64__) && !defined(__x86_64__)
> +	printk(KERN_ERR "ips: This driver has only been tested on the x86/ia64/x86_64 platforms\n");
> +	add_taint(TAINT_CPU_OUT_OF_SPEC, LOCKDEP_STILL_OK);
> +#endif
[...]

This is not the right taint flag to use. 
Documentation/sysctl/kernel.txt says:

   4 - Unsafe SMP processors: SMP with CPUs not designed for SMP.

Ben.

-- 
Ben Hutchings
It is a miracle that curiosity survives formal education. - Albert
Einstein


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 104+ messages in thread

* Re: [PATCH 3.16-stable 37/87] fnic: assign FIP_ALL_FCF_MACS to fcoe_all_fcfs
  2017-05-05 19:46 ` [PATCH 3.16-stable 37/87] fnic: assign FIP_ALL_FCF_MACS to fcoe_all_fcfs Arnd Bergmann
@ 2017-11-06 17:41   ` Ben Hutchings
  0 siblings, 0 replies; 104+ messages in thread
From: Ben Hutchings @ 2017-11-06 17:41 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: stable, Hiral Shah, Sesidhar Baddela, Christoph Hellwig

[-- Attachment #1: Type: text/plain, Size: 3680 bytes --]

On Fri, 2017-05-05 at 21:46 +0200, Arnd Bergmann wrote:
> From: Hiral Shah <hishah@cisco.com>
> 
> Commit fffd96e05f5a23eaff542951e7d3ae4ec2f6258f upstream.
> 
> 1) Assgning FIP_ALL_FCF_MACS to fcoe_all_fcfs allows VLAN request to be sent
> to correct Mac address for VLAN Discovery otherwise VLAN request will be
> sent to invalid address hence FLOGI never happens.
> 
> 2) Simplify the copy_and_format_trace_data code and log the correct Link event
> for fnic control path tracing in case of link status UP->UP.
> 
> 3) Increment Fnic driver version

This commit is doing several different things to a driver that hasn't
had any bug fixes in 3.16-stable.  I'm not comfortable with cherry-
picking one just to fix a warning.

Ben.

> Signed-off-by: Hiral Shah <hishah@cisco.com>
> Signed-off-by: Sesidhar Baddela <sebaddel@cisco.com>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  drivers/scsi/fnic/fnic.h       | 2 +-
>  drivers/scsi/fnic/fnic_fcs.c   | 5 +++--
>  drivers/scsi/fnic/fnic_trace.c | 5 ++---
>  3 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/scsi/fnic/fnic.h b/drivers/scsi/fnic/fnic.h
> index 1d3521e13d77..bf8d34c26f13 100644
> --- a/drivers/scsi/fnic/fnic.h
> +++ b/drivers/scsi/fnic/fnic.h
> @@ -39,7 +39,7 @@
>  
>  #define DRV_NAME		"fnic"
>  #define DRV_DESCRIPTION		"Cisco FCoE HBA Driver"
> -#define DRV_VERSION		"1.6.0.10"
> +#define DRV_VERSION		"1.6.0.11"
>  #define PFX			DRV_NAME ": "
>  #define DFX                     DRV_NAME "%d: "
>  
> diff --git a/drivers/scsi/fnic/fnic_fcs.c b/drivers/scsi/fnic/fnic_fcs.c
> index 1b948f633fc5..f3984b48f8e9 100644
> --- a/drivers/scsi/fnic/fnic_fcs.c
> +++ b/drivers/scsi/fnic/fnic_fcs.c
> @@ -35,7 +35,7 @@
>  #include "cq_enet_desc.h"
>  #include "cq_exch_desc.h"
>  
> -static u8 fcoe_all_fcfs[ETH_ALEN];
> +static u8 fcoe_all_fcfs[ETH_ALEN] = FIP_ALL_FCF_MACS;
>  struct workqueue_struct *fnic_fip_queue;
>  struct workqueue_struct *fnic_event_queue;
>  
> @@ -101,13 +101,14 @@ void fnic_handle_link(struct work_struct *work)
>  				FNIC_FCS_DBG(KERN_DEBUG, fnic->lport->host,
>  					     "link up\n");
>  				fcoe_ctlr_link_up(&fnic->ctlr);
> -			} else
> +			} else {
>  				/* UP -> UP */
>  				spin_unlock_irqrestore(&fnic->fnic_lock, flags);
>  				fnic_fc_trace_set_data(
>  					fnic->lport->host->host_no, FNIC_FC_LE,
>  					"Link Status: UP_UP",
>  					strlen("Link Status: UP_UP"));
> +			}
>  		}
>  	} else if (fnic->link_status) {
>  		/* DOWN -> UP */
> diff --git a/drivers/scsi/fnic/fnic_trace.c b/drivers/scsi/fnic/fnic_trace.c
> index c77285926827..121a5d7e98c4 100644
> --- a/drivers/scsi/fnic/fnic_trace.c
> +++ b/drivers/scsi/fnic/fnic_trace.c
> @@ -743,7 +743,7 @@ void copy_and_format_trace_data(struct fc_trace_hdr *tdata,
>  
>  	fmt = "%02d:%02d:%04ld %02d:%02d:%02d.%09lu ns%8x       %c%8x\t";
>  	len += snprintf(fnic_dbgfs_prt->buffer + len,
> -		(fnic_fc_trace_max_pages * PAGE_SIZE * 3) - len,
> +		max_size - len,
>  		fmt,
>  		tm.tm_mon + 1, tm.tm_mday, tm.tm_year + 1900,
>  		tm.tm_hour, tm.tm_min, tm.tm_sec,
> @@ -767,8 +767,7 @@ void copy_and_format_trace_data(struct fc_trace_hdr *tdata,
>  				j == ethhdr_len + fcoehdr_len + fchdr_len ||
>  				(i > 3 && j%fchdr_len == 0)) {
>  				len += snprintf(fnic_dbgfs_prt->buffer
> -					+ len, (fnic_fc_trace_max_pages
> -					* PAGE_SIZE * 3) - len,
> +					+ len, max_size - len,
>  					"\n\t\t\t\t\t\t\t\t");
>  				i++;
>  			}
-- 
Ben Hutchings
It is a miracle that curiosity survives formal education. - Albert
Einstein


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 104+ messages in thread

* Re: [PATCH 3.16-stable 79/87] arm64: add missing data types in smp_load_acquire/smp_store_release
  2017-05-05 19:47 ` [PATCH 3.16-stable 79/87] arm64: add missing data types in smp_load_acquire/smp_store_release Arnd Bergmann
@ 2017-11-06 18:56   ` Ben Hutchings
  2017-11-06 20:24     ` Arnd Bergmann
  0 siblings, 1 reply; 104+ messages in thread
From: Ben Hutchings @ 2017-11-06 18:56 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: stable, Andre Przywara, Will Deacon

[-- Attachment #1: Type: text/plain, Size: 2539 bytes --]

On Fri, 2017-05-05 at 21:47 +0200, Arnd Bergmann wrote:
> From: Andre Przywara <andre.przywara@arm.com>
> 
> Commit 2427963027aea8d649b69a6956979cc875edfcf3 upstream.
> 
> Commit 8053871d0f7f ("smp: Fix smp_call_function_single_async()
> locking") introduced a call to smp_load_acquire() with a u16 argument,

But the other commit hasn't been backported to 3.16.  Should it be?  Or
is there some other reason we need this one?

Ben.

> but we only cared about u32 and u64 types in that function so far.
> This resulted in a compiler warning fortunately, pointing at an
> uninitialized use. Due to the implementation structure the compiler
> misses that bug in the smp_store_release(), though.
> Add the u16 and u8 variants using ldarh/stlrh and ldarb/stlrb,
> respectively. Together with the compiletime_assert_atomic_type() check
> this should cover all cases now.
>
> Acked-by: Will Deacon <will.deacon@arm.com>
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> Signed-off-by: Will Deacon <will.deacon@arm.com>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  arch/arm64/include/asm/barrier.h | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)
> 
> diff --git a/arch/arm64/include/asm/barrier.h b/arch/arm64/include/asm/barrier.h
> index 6389d60574d9..45548e19c673 100644
> --- a/arch/arm64/include/asm/barrier.h
> +++ b/arch/arm64/include/asm/barrier.h
> @@ -62,6 +62,14 @@ do {									\
>  do {									\
>  	compiletime_assert_atomic_type(*p);				\
>  	switch (sizeof(*p)) {						\
> +	case 1:								\
> +		asm volatile ("stlrb %w1, %0"				\
> +				: "=Q" (*p) : "r" (v) : "memory");	\
> +		break;							\
> +	case 2:								\
> +		asm volatile ("stlrh %w1, %0"				\
> +				: "=Q" (*p) : "r" (v) : "memory");	\
> +		break;							\
>  	case 4:								\
>  		asm volatile ("stlr %w1, %0"				\
>  				: "=Q" (*p) : "r" (v) : "memory");	\
> @@ -78,6 +86,14 @@ do {									\
>  	typeof(*p) ___p1;						\
>  	compiletime_assert_atomic_type(*p);				\
>  	switch (sizeof(*p)) {						\
> +	case 1:								\
> +		asm volatile ("ldarb %w0, %1"				\
> +			: "=r" (___p1) : "Q" (*p) : "memory");		\
> +		break;							\
> +	case 2:								\
> +		asm volatile ("ldarh %w0, %1"				\
> +			: "=r" (___p1) : "Q" (*p) : "memory");		\
> +		break;							\
>  	case 4:								\
>  		asm volatile ("ldar %w0, %1"				\
>  			: "=r" (___p1) : "Q" (*p) : "memory");		\

-- 
Ben Hutchings
It is a miracle that curiosity survives formal education. - Albert
Einstein


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 104+ messages in thread

* Re: [PATCH 3.16-stable 81/87] MIPS: DEC: Avoid la pseudo-instruction in delay slots
  2017-05-05 19:47 ` [PATCH 3.16-stable 81/87] MIPS: DEC: Avoid la pseudo-instruction in delay slots Arnd Bergmann
@ 2017-11-06 19:05   ` Ben Hutchings
  0 siblings, 0 replies; 104+ messages in thread
From: Ben Hutchings @ 2017-11-06 19:05 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: stable, Ralf Baechle

[-- Attachment #1: Type: text/plain, Size: 3170 bytes --]

On Fri, 2017-05-05 at 21:47 +0200, Arnd Bergmann wrote:
> From: Ralf Baechle <ralf@linux-mips.org>
> 
> Commit a4d7f14bd8d3316f847c3e0f7020dad95a8a648a upstream.
> 
> When expanding the la or dla pseudo-instruction in a delay slot the GNU
> assembler will complain should the pseudo-instruction expand to multiple
> actual instructions, since only the first of them will be in the delay
> slot leading to the pseudo-instruction being only partially executed if
> the branch is taken. Use of PTR_LA in the dec int-handler.S leads to
> such warnings:
> 
>   arch/mips/dec/int-handler.S: Assembler messages:
>   arch/mips/dec/int-handler.S:149: Warning: macro instruction expanded into multiple instructions in a branch delay slot
>   arch/mips/dec/int-handler.S:198: Warning: macro instruction expanded into multiple instructions in a branch delay slot
> 
> Avoid this by open coding the PTR_LA macros.

This needed a follow-up fix:

commit 68fe55680d0f3342969f49412fceabb90bdfadba
Author: Maciej W. Rozycki <macro@linux-mips.org>
Date:   Sun Jul 30 21:28:15 2017 +0100

    MIPS: DEC: Fix an int-handler.S CPU_DADDI_WORKAROUNDS regression

which is missing from the 3.12, 3.18 and 4.4 branches.

Ben.

> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  arch/mips/dec/int-handler.S | 40 ++++++++++++++++++++++++++++++++++++++--
>  1 file changed, 38 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/mips/dec/int-handler.S b/arch/mips/dec/int-handler.S
> index 41a2fa1fa12e..c7953f2aca4f 100644
> --- a/arch/mips/dec/int-handler.S
> +++ b/arch/mips/dec/int-handler.S
> @@ -146,7 +146,25 @@
>  		/*
>  		 * Find irq with highest priority
>  		 */
> -		 PTR_LA	t1,cpu_mask_nr_tbl
> +		# open coded PTR_LA t1, cpu_mask_nr_tbl
> +#if (_MIPS_SZPTR == 32)
> +		# open coded la t1, cpu_mask_nr_tbl
> +		lui	t1, %hi(cpu_mask_nr_tbl)
> +		addiu	t1, %lo(cpu_mask_nr_tbl)
> +
> +#endif
> +#if (_MIPS_SZPTR == 64)
> +		# open coded dla t1, cpu_mask_nr_tbl
> +		.set	push
> +		.set	noat
> +		lui	t1, %highest(cpu_mask_nr_tbl)
> +		lui	AT, %hi(cpu_mask_nr_tbl)
> +		daddiu	t1, t1, %higher(cpu_mask_nr_tbl)
> +		daddiu	AT, AT, %lo(cpu_mask_nr_tbl)
> +		dsll	t1, 32
> +		daddu	t1, t1, AT
> +		.set	pop
> +#endif
>  1:		lw	t2,(t1)
>  		nop
>  		and	t2,t0
> @@ -195,7 +213,25 @@
>  		/*
>  		 * Find irq with highest priority
>  		 */
> -		 PTR_LA	t1,asic_mask_nr_tbl
> +		# open coded PTR_LA t1,asic_mask_nr_tbl
> +#if (_MIPS_SZPTR == 32)
> +		# open coded la t1, asic_mask_nr_tbl
> +		lui	t1, %hi(asic_mask_nr_tbl)
> +		addiu	t1, %lo(asic_mask_nr_tbl)
> +
> +#endif
> +#if (_MIPS_SZPTR == 64)
> +		# open coded dla t1, asic_mask_nr_tbl
> +		.set	push
> +		.set	noat
> +		lui	t1, %highest(asic_mask_nr_tbl)
> +		lui	AT, %hi(asic_mask_nr_tbl)
> +		daddiu	t1, t1, %higher(asic_mask_nr_tbl)
> +		daddiu	AT, AT, %lo(asic_mask_nr_tbl)
> +		dsll	t1, 32
> +		daddu	t1, t1, AT
> +		.set	pop
> +#endif
>  2:		lw	t2,(t1)
>  		nop
>  		and	t2,t0
-- 
Ben Hutchings
It is a miracle that curiosity survives formal education. - Albert
Einstein


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 104+ messages in thread

* Re: [PATCH 3.16-stable 82/87] MIPS: ip27: Disable qlge driver in defconfig
  2017-05-05 19:47 ` [PATCH 3.16-stable 82/87] MIPS: ip27: Disable qlge driver in defconfig Arnd Bergmann
@ 2017-11-06 19:08   ` Ben Hutchings
  0 siblings, 0 replies; 104+ messages in thread
From: Ben Hutchings @ 2017-11-06 19:08 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: stable, Ralf Baechle, linux-mips, linux-kernel, James Hogan

[-- Attachment #1: Type: text/plain, Size: 1869 bytes --]

On Fri, 2017-05-05 at 21:47 +0200, Arnd Bergmann wrote:
> Commit c64ebe32d3fc90c52277257d6c9fa7d589877cc2 upstream.
> 
> One of the last remaining failures in kernelci.org is for a gcc bug:
> 
> drivers/net/ethernet/qlogic/qlge/qlge_main.c:4819:1: error: insn does not satisfy its constraints:
> drivers/net/ethernet/qlogic/qlge/qlge_main.c:4819:1: internal compiler error: in extract_constrain_insn, at recog.c:2190
> 
> This is apparently broken in gcc-6 but fixed in gcc-7, and I cannot
> reproduce the problem here. However, it is clear that ip27_defconfig
> does not actually need this driver as the platform has only PCI-X but
> not PCIe, and the qlge adapter in turn is PCIe-only.

You could disable CONFIG_SFC here as well, since it only supports PCIe
devices.

Ben.

> The driver was originally enabled in 2010 along with lots of other
> drivers.
> 
> Fixes: 59d302b342e5 ("MIPS: IP27: Make defconfig useful again.")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Cc: Ralf Baechle <ralf@linux-mips.org>
> Cc: linux-mips@linux-mips.org
> Cc: linux-kernel@vger.kernel.org
> Patchwork: https://patchwork.linux-mips.org/patch/15197/
> Signed-off-by: James Hogan <james.hogan@imgtec.com>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  arch/mips/configs/ip27_defconfig | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/arch/mips/configs/ip27_defconfig b/arch/mips/configs/ip27_defconfig
> index 0e36abcd39cc..7446284dd7b3 100644
> --- a/arch/mips/configs/ip27_defconfig
> +++ b/arch/mips/configs/ip27_defconfig
> @@ -206,7 +206,6 @@ CONFIG_MLX4_EN=m
>  # CONFIG_MLX4_DEBUG is not set
>  CONFIG_TEHUTI=m
>  CONFIG_BNX2X=m
> -CONFIG_QLGE=m
>  CONFIG_SFC=m
>  CONFIG_BE2NET=m
>  CONFIG_LIBERTAS_THINFIRM=m
-- 
Ben Hutchings
It is a miracle that curiosity survives formal education. - Albert
Einstein


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 104+ messages in thread

* Re: [PATCH 3.16-stable 00/87] build warnings and errors
  2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
                   ` (86 preceding siblings ...)
  2017-05-05 19:47 ` [PATCH 3.16-stable 87/87] MIPS: elf2ecoff: Fix warning due to dead code Arnd Bergmann
@ 2017-11-06 19:14 ` Ben Hutchings
  87 siblings, 0 replies; 104+ messages in thread
From: Ben Hutchings @ 2017-11-06 19:14 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: stable

[-- Attachment #1: Type: text/plain, Size: 1207 bytes --]

On Fri, 2017-05-05 at 21:46 +0200, Arnd Bergmann wrote:
> Hi Ben,
> 
> As we are closing in on zero build failures for 3.18-stable, I've gone
> through my earlier list for 3.16 as well, and filled some gaps from patches
> I already backported or created for 3.18, plus a very small number that
> are only needed on 3.16.
> 
> The series is a bit longer than I had hoped for, but it should get us
> fairly close to a clean build on the architecture tested by kernelci
> (ARM, ARM64, x86 and MIPS), and I can address the remaining warnings
> once you have done a release or rc.
> 
> I hope sending the patches as a series makes your life easier than
> a list of commit IDs. I can also provide a git tree for this huge
> set if you prefer.

I prefer a list of commit IDs or an attached mbox that has the original
From and Date headers (like David Miller sends).  A git branch would
also work.

Please double-check your commit IDs; less than half of these were
correct.  Also please put a lower-case 'commit' before them as that's
what my scripts (and probably others) expect.

Ben.

-- 
Ben Hutchings
It is a miracle that curiosity survives formal education. - Albert
Einstein


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 104+ messages in thread

* Re: [PATCH 3.16-stable 79/87] arm64: add missing data types in smp_load_acquire/smp_store_release
  2017-11-06 18:56   ` Ben Hutchings
@ 2017-11-06 20:24     ` Arnd Bergmann
  0 siblings, 0 replies; 104+ messages in thread
From: Arnd Bergmann @ 2017-11-06 20:24 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: # 3.4.x, Andre Przywara, Will Deacon

On Mon, Nov 6, 2017 at 7:56 PM, Ben Hutchings <ben@decadent.org.uk> wrote:
> On Fri, 2017-05-05 at 21:47 +0200, Arnd Bergmann wrote:
>> From: Andre Przywara <andre.przywara@arm.com>
>>
>> Commit 2427963027aea8d649b69a6956979cc875edfcf3 upstream.
>>
>> Commit 8053871d0f7f ("smp: Fix smp_call_function_single_async()
>> locking") introduced a call to smp_load_acquire() with a u16 argument,
>
> But the other commit hasn't been backported to 3.16.  Should it be?  Or
> is there some other reason we need this one?

The 8053871d0f7f  one did not get backported to 3.18. I don't remember
what triggered
this one for the backport list, but it is quite possible that there
was something
else that needed 878a84d5a8a1 too. I also don't know where the
2427963027 number comes from, I see it as
878a84d5a8a18a4ab241d40cebb791d6aedf5605
upstream.

       Arnd

^ permalink raw reply	[flat|nested] 104+ messages in thread

end of thread, other threads:[~2017-11-06 20:24 UTC | newest]

Thread overview: 104+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-05 19:46 [PATCH 3.16-stable 00/87] build warnings and errors Arnd Bergmann
2017-05-05 19:46 ` [PATCH 3.16-stable 01/87] mm/init: fix zone boundary creation Arnd Bergmann
2017-05-05 19:46 ` [PATCH 3.16-stable 02/87] Disable "frame-address" warning Arnd Bergmann
2017-05-05 19:46 ` [PATCH 3.16-stable 03/87] modpost: expand pattern matching to support substring matches Arnd Bergmann
2017-05-05 19:46 ` [PATCH 3.16-stable 04/87] modpost: don't emit section mismatch warnings for compiler optimizations Arnd Bergmann
2017-05-05 19:46 ` [PATCH 3.16-stable 05/87] module: fix types of device tables aliases Arnd Bergmann
2017-05-05 19:46 ` [PATCH 3.16-stable 06/87] MODULE_DEVICE_TABLE: fix some callsites Arnd Bergmann
2017-05-05 19:46 ` [PATCH 3.16-stable 07/87] mm/hugetlb: improve locking in dissolve_free_huge_pages() Arnd Bergmann
2017-05-05 19:46 ` [PATCH 3.16-stable 08/87] cpumask_set_cpu_local_first => cpumask_local_spread, lament Arnd Bergmann
2017-05-05 19:46 ` [PATCH 3.16-stable 09/87] gfs2: avoid uninitialized variable warning Arnd Bergmann
2017-05-05 19:46 ` [PATCH 3.16-stable 10/87] gfs2: remove IS_ERR_VALUE abuse Arnd Bergmann
2017-05-05 19:46 ` [PATCH 3.16-stable 11/87] iio: fix printk format string warning Arnd Bergmann
2017-11-06 16:55   ` Ben Hutchings
2017-05-05 19:46 ` [PATCH 3.16-stable 12/87] iio: adc: fix building on 64-bit Arnd Bergmann
2017-05-05 19:46 ` [PATCH 3.16-stable 13/87] infiniband: mlx5: avoid a compile-time warning Arnd Bergmann
2017-05-05 19:46 ` [PATCH 3.16-stable 14/87] power/reset: xgene-reset: Fix prototype of xgene_restart() Arnd Bergmann
2017-05-05 19:46 ` [PATCH 3.16-stable 15/87] mfd: arizona: Rid data size incompatibility warn when building for 64bit Arnd Bergmann
2017-05-05 19:46 ` [PATCH 3.16-stable 16/87] Input: joystick - use get_cycles on ARMv8 Arnd Bergmann
2017-05-05 19:46 ` [PATCH 3.16-stable 17/87] dma: pl08x: Use correct specifier for size_t values Arnd Bergmann
2017-05-05 19:46 ` [PATCH 3.16-stable 18/87] gpio: drop retval check enforcing from gpiochip_remove() Arnd Bergmann
2017-05-05 19:46 ` [PATCH 3.16-stable 19/87] ASoC: fsl-ssi: fix do_div build warning in fsl_ssi_set_bclk() Arnd Bergmann
2017-05-05 19:46 ` [PATCH 3.16-stable 20/87] ASoC: imx-audmux: Use uintptr_t for port numbers Arnd Bergmann
2017-05-05 19:46 ` [PATCH 3.16-stable 21/87] ASoC: fsl_sai: Set SYNC bit of TCR2 to Asynchronous Mode Arnd Bergmann
2017-05-05 19:46 ` [PATCH 3.16-stable 22/87] ASoC: adau1977: Fix truncation warning on 64 bit architectures Arnd Bergmann
2017-05-05 19:46 ` [PATCH 3.16-stable 23/87] ALSA: oxygen: Fix logical-not-parentheses warning Arnd Bergmann
2017-05-05 19:46 ` [PATCH 3.16-stable 24/87] ata: hpt366: fix constant cast warning Arnd Bergmann
2017-05-05 19:46 ` [PATCH 3.16-stable 25/87] clk/efm32gg: fix dt init prototype Arnd Bergmann
2017-05-05 19:46 ` [PATCH 3.16-stable 26/87] spi: rspi: Remove unused variable in rspi_rz_transfer_one() Arnd Bergmann
2017-05-05 19:46 ` [PATCH 3.16-stable 27/87] spi/atmel: Fix pointer to int conversion warnings on 64 bit builds Arnd Bergmann
2017-05-05 19:46 ` [PATCH 3.16-stable 28/87] spi/pl022: Explicitly truncate large bitmask Arnd Bergmann
2017-05-05 19:46 ` [PATCH 3.16-stable 29/87] tty: nozomi: avoid a harmless gcc warning Arnd Bergmann
2017-05-05 19:46 ` [PATCH 3.16-stable 30/87] tty/isicom: fix big-endian compile warning Arnd Bergmann
2017-05-05 19:46 ` [PATCH 3.16-stable 31/87] i2o: hide unsafe ioctl on 64-bit Arnd Bergmann
2017-05-05 20:07   ` Patch "[PATCH 3.16-stable 31/87] i2o: hide unsafe ioctl on 64-bit" has been added to the 3.18-stable tree gregkh
2017-05-05 19:46 ` [PATCH 3.16-stable 32/87] dm bufio: hide bogus warning Arnd Bergmann
2017-05-05 19:46 ` [PATCH 3.16-stable 33/87] scsi-tgt: fix type conversion warning Arnd Bergmann
2017-05-05 19:46 ` [PATCH 3.16-stable 34/87] ips: remove pointless #warning Arnd Bergmann
2017-11-06 17:31   ` Ben Hutchings
2017-05-05 19:46 ` [PATCH 3.16-stable 35/87] scsi: advansys: remove #warning message Arnd Bergmann
2017-05-05 19:46 ` [PATCH 3.16-stable 36/87] bfa: Fix indentation Arnd Bergmann
2017-05-05 19:46 ` [PATCH 3.16-stable 37/87] fnic: assign FIP_ALL_FCF_MACS to fcoe_all_fcfs Arnd Bergmann
2017-11-06 17:41   ` Ben Hutchings
2017-05-05 19:46 ` [PATCH 3.16-stable 38/87] be2iscsi: Fix bogus WARN_ON length check Arnd Bergmann
2017-05-05 19:46 ` [PATCH 3.16-stable 39/87] mvsas: fix misleading indentation Arnd Bergmann
2017-05-05 19:46 ` [PATCH 3.16-stable 40/87] paride: fix the "verbose" module param Arnd Bergmann
2017-05-05 19:46 ` [PATCH 3.16-stable 41/87] aic94xx: Skip reading user settings if flash is not found Arnd Bergmann
2017-05-05 19:47 ` [PATCH 3.16-stable 42/87] mtd: pmcmsp: use kstrndup instead of kmalloc+strncpy Arnd Bergmann
2017-05-05 19:47 ` [PATCH 3.16-stable 43/87] mtd: maps: rbtx4939-flash: delete an unused variable in rbtx4939_flash_remove Arnd Bergmann
2017-05-05 19:47 ` [PATCH 3.16-stable 44/87] xilinx: Fix compiler warning Arnd Bergmann
2017-05-05 19:47 ` [PATCH 3.16-stable 45/87] i40e: Reduce stack in i40e_dbg_dump_desc Arnd Bergmann
2017-05-05 19:47 ` [PATCH 3.16-stable 46/87] mlx5: avoid build warnings on 32-bit Arnd Bergmann
2017-05-05 19:47 ` [PATCH 3.16-stable 47/87] mISDN: avoid arch specific __builtin_return_address call Arnd Bergmann
2017-05-05 19:47 ` [PATCH 3.16-stable 48/87] cpmac: remove hopeless #warning Arnd Bergmann
2017-05-05 19:47 ` [PATCH 3.16-stable 49/87] net: caif: fix misleading indentation Arnd Bergmann
2017-05-05 19:47 ` [PATCH 3.16-stable 50/87] net: am2150: fix nmclan_cs.c shared interrupt handling Arnd Bergmann
2017-05-05 19:47 ` [PATCH 3.16-stable 51/87] am2150: Update nmclan_cs.c to use update PCMCIA API Arnd Bergmann
2017-05-05 19:47 ` [PATCH 3.16-stable 52/87] net: tulip: turn compile-time warning into dev_warn() Arnd Bergmann
2017-05-05 19:47 ` [PATCH 3.16-stable 53/87] net: vxge: avoid unused function warnings Arnd Bergmann
2017-05-05 19:47 ` [PATCH 3.16-stable 54/87] ethernet: amd: fix pci device ids Arnd Bergmann
2017-05-05 19:47 ` [PATCH 3.16-stable 55/87] drivers/net/ethernet/dec/tulip/uli526x.c: fix misleading indentation in uli526x_timer Arnd Bergmann
2017-05-05 19:47 ` [PATCH 3.16-stable 56/87] hostap: avoid uninitialized variable use in hfa384x_get_rid Arnd Bergmann
2017-05-05 19:47 ` [PATCH 3.16-stable 57/87] iwlegacy: avoid warning about missing braces Arnd Bergmann
2017-05-05 19:47 ` [PATCH 3.16-stable 58/87] brcmfmac: avoid gcc-5.1 warning Arnd Bergmann
2017-05-05 19:47 ` [PATCH 3.16-stable 59/87] netfilter: Fix switch statement warnings with recent gcc Arnd Bergmann
2017-05-05 19:47 ` [PATCH 3.16-stable 60/87] netfilter; Add some missing default cases to switch statements in nft_reject Arnd Bergmann
2017-05-05 19:47 ` [PATCH 3.16-stable 61/87] drm/i915: cleanup some indenting Arnd Bergmann
2017-05-05 19:47 ` [PATCH 3.16-stable 62/87] video: mx3fb: always enable BACKLIGHT_LCD_SUPPORT Arnd Bergmann
2017-05-05 19:47   ` Arnd Bergmann
2017-05-05 19:47 ` [PATCH 3.16-stable 63/87] staging: bcm: add 32-bit host dependency Arnd Bergmann
2017-05-05 19:47 ` [PATCH 3.16-stable 64/87] staging: imx-drm: fix indentation warning Arnd Bergmann
2017-05-05 19:47 ` [PATCH 3.16-stable 65/87] staging: vt6655: fix overly large stack usage Arnd Bergmann
2017-05-05 19:47 ` [PATCH 3.16-stable 66/87] Staging: iio: adc: fix indent on break statement Arnd Bergmann
2017-05-05 19:47 ` [PATCH 3.16-stable 67/87] Staging: lustre: missing curly braces in ll_setattr_raw() Arnd Bergmann
2017-05-05 19:47 ` [PATCH 3.16-stable 68/87] staging: rtl8723au: core: rtw_wlan_util: fix misleading indentation Arnd Bergmann
2017-05-05 19:47 ` [PATCH 3.16-stable 69/87] Staging: wlan-ng: fix sparse warning in prism2fw.c Arnd Bergmann
2017-05-05 19:47 ` [PATCH 3.16-stable 70/87] staging: dgnc: Fix frame size is larger than 1024B Arnd Bergmann
2017-05-05 19:47 ` [PATCH 3.16-stable 71/87] x86/xen: fix upper bound of pmd loop in xen_cleanhighmap() Arnd Bergmann
2017-05-05 19:47 ` [PATCH 3.16-stable 72/87] x86/boot: Add CONFIG_PARAVIRT_SPINLOCKS quirk to arch/x86/boot/compressed/misc.h Arnd Bergmann
2017-05-05 19:47 ` [PATCH 3.16-stable 73/87] ARM: cns3xxx: shut up frame size warning Arnd Bergmann
2017-05-05 19:47 ` [PATCH 3.16-stable 74/87] ARM: 8383/1: nommu: avoid deprecated source register on mov Arnd Bergmann
2017-05-06  9:45   ` Arnd Bergmann
2017-05-06 10:06     ` Russell King - ARM Linux
2017-05-08 19:53       ` Arnd Bergmann
2017-05-05 19:47 ` [PATCH 3.16-stable 75/87] ARM: 8221/1: PJ4: allow building in Thumb-2 mode Arnd Bergmann
2017-05-06  7:42   ` Ard Biesheuvel
2017-05-08 19:47     ` Arnd Bergmann
2017-05-05 19:47 ` [PATCH 3.16-stable 76/87] ARM: OMAP: Fix Kconfig warning for omap1 Arnd Bergmann
2017-05-05 19:47 ` [PATCH 3.16-stable 77/87] ARM: 8160/1: drop warning about return_address not using unwind tables Arnd Bergmann
2017-05-05 19:47 ` [PATCH 3.16-stable 78/87] ARM: 8296/1: cache-l2x0: clean up aurora cache handling Arnd Bergmann
2017-05-05 19:47 ` [PATCH 3.16-stable 79/87] arm64: add missing data types in smp_load_acquire/smp_store_release Arnd Bergmann
2017-11-06 18:56   ` Ben Hutchings
2017-11-06 20:24     ` Arnd Bergmann
     [not found] ` <20170505194745.3627137-1-arnd-r2nGTMty4D4@public.gmane.org>
2017-05-05 19:47   ` [PATCH 3.16-stable 80/87] MIPS: BMIPS: Fix ".previous without corresponding .section" warnings Arnd Bergmann
2017-05-05 19:47     ` Arnd Bergmann
2017-05-05 19:47 ` [PATCH 3.16-stable 81/87] MIPS: DEC: Avoid la pseudo-instruction in delay slots Arnd Bergmann
2017-11-06 19:05   ` Ben Hutchings
2017-05-05 19:47 ` [PATCH 3.16-stable 82/87] MIPS: ip27: Disable qlge driver in defconfig Arnd Bergmann
2017-11-06 19:08   ` Ben Hutchings
2017-05-05 19:47 ` [PATCH 3.16-stable 83/87] MIPS: ip22: Fix ip28 build for modern gcc Arnd Bergmann
2017-05-05 19:47 ` [PATCH 3.16-stable 84/87] MIPS: MSP71xx: remove odd locking in PCI config space access code Arnd Bergmann
2017-05-05 19:47 ` [PATCH 3.16-stable 85/87] MIPS: Fix the build on jz4740 after removing the custom gpio.h Arnd Bergmann
2017-05-05 19:47 ` [PATCH 3.16-stable 86/87] MIPS: TXx9: Delete an unused variable in tx4927_pcibios_setup Arnd Bergmann
2017-05-05 19:47 ` [PATCH 3.16-stable 87/87] MIPS: elf2ecoff: Fix warning due to dead code Arnd Bergmann
2017-11-06 19:14 ` [PATCH 3.16-stable 00/87] build warnings and errors Ben Hutchings

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.