stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/13] [3.18-stable] backported build fixes
@ 2017-05-04 20:51 Arnd Bergmann
  2017-05-04 20:51 ` [PATCH 01/13] [3.18-stable] ARM: cns3xxx: shut up frame size warning Arnd Bergmann
                   ` (13 more replies)
  0 siblings, 14 replies; 24+ messages in thread
From: Arnd Bergmann @ 2017-05-04 20:51 UTC (permalink / raw)
  To: gregkh; +Cc: stable

Hi Greg,

I've gone through one more set of patches, starting out with Olof's
last build report and looking at the configurations that failed
in 3.18.51.

I could reproduce most of the warnings on my box, and found a couple
of extra ones (one from using newer binutils, and probably one or
two from using a newer gcc). With the set of 13 patches, those all
seem to be fixed for me now.

The first half are new patches that I did to fix warnings for code
that was removed or rewritten between 3.18 and 4.4, or patches
that did not apply cleanly but that I managed to backport anyway.
The rest are backports of upstream patches that I didn't see you
apply yet. If you already have any of those, just ignore them.

The series also addresses some of the warnings that we saw on
the kernelci bot, but some others still remain.

     Arnd

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

* [PATCH 01/13] [3.18-stable] ARM: cns3xxx: shut up frame size warning
  2017-05-04 20:51 [PATCH 00/13] [3.18-stable] backported build fixes Arnd Bergmann
@ 2017-05-04 20:51 ` Arnd Bergmann
  2017-05-04 22:27   ` Greg KH
  2017-05-04 22:37   ` Patch "ARM: cns3xxx: shut up frame size warning" has been added to the 3.18-stable tree gregkh
  2017-05-04 20:51 ` [PATCH 02/13] [3.18-stable] arm64: Provide a namespace to NCAPS Arnd Bergmann
                   ` (12 subsequent siblings)
  13 siblings, 2 replies; 24+ messages in thread
From: Arnd Bergmann @ 2017-05-04 20:51 UTC (permalink / raw)
  To: gregkh; +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] 24+ messages in thread

* [PATCH 02/13] [3.18-stable] arm64: Provide a namespace to NCAPS
  2017-05-04 20:51 [PATCH 00/13] [3.18-stable] backported build fixes Arnd Bergmann
  2017-05-04 20:51 ` [PATCH 01/13] [3.18-stable] ARM: cns3xxx: shut up frame size warning Arnd Bergmann
@ 2017-05-04 20:51 ` Arnd Bergmann
  2017-05-04 20:51 ` [PATCH 03/13] [3.18-stable] staging: vt6655: fix overly large stack usage Arnd Bergmann
                   ` (11 subsequent siblings)
  13 siblings, 0 replies; 24+ messages in thread
From: Arnd Bergmann @ 2017-05-04 20:51 UTC (permalink / raw)
  To: gregkh; +Cc: stable, Fabio Estevam, Will Deacon, Arnd Bergmann

From: Fabio Estevam <fabio.estevam@freescale.com>

Commit 06f9eb884be81431d54d7d37390043e3b5b7f14a upstream.

Building arm64.allmodconfig leads to the following warning:

usb/gadget/function/f_ncm.c:203:0: warning: "NCAPS" redefined
 #define NCAPS (USB_CDC_NCM_NCAP_ETH_FILTER | USB_CDC_NCM_NCAP_CRC_MODE)
 ^
In file included from /home/build/work/batch/arch/arm64/include/asm/io.h:32:0,
                 from /home/build/work/batch/include/linux/clocksource.h:19,
                 from /home/build/work/batch/include/clocksource/arm_arch_timer.h:19,
                 from /home/build/work/batch/arch/arm64/include/asm/arch_timer.h:27,
                 from /home/build/work/batch/arch/arm64/include/asm/timex.h:19,
                 from /home/build/work/batch/include/linux/timex.h:65,
                 from /home/build/work/batch/include/linux/sched.h:19,
                 from /home/build/work/batch/arch/arm64/include/asm/compat.h:25,
                 from /home/build/work/batch/arch/arm64/include/asm/stat.h:23,
                 from /home/build/work/batch/include/linux/stat.h:5,
                 from /home/build/work/batch/include/linux/module.h:10,
                 from /home/build/work/batch/drivers/usb/gadget/function/f_ncm.c:19:
arch/arm64/include/asm/cpufeature.h:27:0: note: this is the location of the previous definition
 #define NCAPS     2

So add a ARM64 prefix to avoid such problem.

Reported-by: Olof's autobuilder <build@lixom.net>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
Slightly adapted for context changes
---
 arch/arm64/include/asm/cpufeature.h | 10 +++++-----
 arch/arm64/kernel/setup.c           |  2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/arm64/include/asm/cpufeature.h b/arch/arm64/include/asm/cpufeature.h
index c008bae718eb..5fe4befda1a5 100644
--- a/arch/arm64/include/asm/cpufeature.h
+++ b/arch/arm64/include/asm/cpufeature.h
@@ -25,11 +25,11 @@
 #define ARM64_WORKAROUND_DEVICE_LOAD_ACQUIRE	1
 #define ARM64_WORKAROUND_845719			2
 
-#define NCAPS					3
+#define ARM64_NCAPS				3
 
 #ifndef __ASSEMBLY__
 
-extern DECLARE_BITMAP(cpu_hwcaps, NCAPS);
+extern DECLARE_BITMAP(cpu_hwcaps, ARM64_NCAPS);
 
 static inline bool cpu_have_feature(unsigned int num)
 {
@@ -38,16 +38,16 @@ static inline bool cpu_have_feature(unsigned int num)
 
 static inline bool cpus_have_cap(unsigned int num)
 {
-	if (num >= NCAPS)
+	if (num >= ARM64_NCAPS)
 		return false;
 	return test_bit(num, cpu_hwcaps);
 }
 
 static inline void cpus_set_cap(unsigned int num)
 {
-	if (num >= NCAPS)
+	if (num >= ARM64_NCAPS)
 		pr_warn("Attempt to set an illegal CPU capability (%d >= %d)\n",
-			num, NCAPS);
+			num, ARM64_NCAPS);
 	else
 		__set_bit(num, cpu_hwcaps);
 }
diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c
index b5853eec2a2d..54e3dd225b44 100644
--- a/arch/arm64/kernel/setup.c
+++ b/arch/arm64/kernel/setup.c
@@ -80,7 +80,7 @@ unsigned int compat_elf_hwcap __read_mostly = COMPAT_ELF_HWCAP_DEFAULT;
 unsigned int compat_elf_hwcap2 __read_mostly;
 #endif
 
-DECLARE_BITMAP(cpu_hwcaps, NCAPS);
+DECLARE_BITMAP(cpu_hwcaps, ARM64_NCAPS);
 
 static const char *cpu_name;
 phys_addr_t __fdt_pointer __initdata;
-- 
2.9.0

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

* [PATCH 03/13] [3.18-stable] staging: vt6655: fix overly large stack usage
  2017-05-04 20:51 [PATCH 00/13] [3.18-stable] backported build fixes Arnd Bergmann
  2017-05-04 20:51 ` [PATCH 01/13] [3.18-stable] ARM: cns3xxx: shut up frame size warning Arnd Bergmann
  2017-05-04 20:51 ` [PATCH 02/13] [3.18-stable] arm64: Provide a namespace to NCAPS Arnd Bergmann
@ 2017-05-04 20:51 ` Arnd Bergmann
  2017-05-04 22:37   ` Patch "staging: vt6655: fix overly large stack usage" has been added to the 3.18-stable tree gregkh
  2017-05-04 20:52 ` [PATCH 04/13] [3.18-stable] staging: imx-drm: fix indentation warning Arnd Bergmann
                   ` (10 subsequent siblings)
  13 siblings, 1 reply; 24+ messages in thread
From: Arnd Bergmann @ 2017-05-04 20:51 UTC (permalink / raw)
  To: gregkh; +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 ea240512cbbb..0670fcb02b4a 100644
--- a/drivers/staging/vt6655/device_main.c
+++ b/drivers/staging/vt6655/device_main.c
@@ -2818,11 +2818,13 @@ static int  device_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
 		pr_debug(" 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,
@@ -2832,6 +2834,7 @@ static int  device_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
 					rc = -EFAULT;
 			}
 		}
+		kfree(buffer);
 	}
 	break;
 
@@ -2878,7 +2881,6 @@ static int  device_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
 		pr_debug(" 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];
 
-- 
2.9.0

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

* [PATCH 04/13] [3.18-stable] staging: imx-drm: fix indentation warning
  2017-05-04 20:51 [PATCH 00/13] [3.18-stable] backported build fixes Arnd Bergmann
                   ` (2 preceding siblings ...)
  2017-05-04 20:51 ` [PATCH 03/13] [3.18-stable] staging: vt6655: fix overly large stack usage Arnd Bergmann
@ 2017-05-04 20:52 ` Arnd Bergmann
  2017-05-04 22:37   ` Patch "staging: imx-drm: fix indentation warning" has been added to the 3.18-stable tree gregkh
  2017-05-04 20:52 ` [PATCH 05/13] [3.18-stable] staging: bcm: add 32-bit host dependency Arnd Bergmann
                   ` (9 subsequent siblings)
  13 siblings, 1 reply; 24+ messages in thread
From: Arnd Bergmann @ 2017-05-04 20:52 UTC (permalink / raw)
  To: gregkh; +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 aaec6b2cdf56..f1475ac718e9 100644
--- a/drivers/staging/imx-drm/imx-hdmi.c
+++ b/drivers/staging/imx-drm/imx-hdmi.c
@@ -967,7 +967,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] 24+ messages in thread

* [PATCH 05/13] [3.18-stable] staging: bcm: add 32-bit host dependency
  2017-05-04 20:51 [PATCH 00/13] [3.18-stable] backported build fixes Arnd Bergmann
                   ` (3 preceding siblings ...)
  2017-05-04 20:52 ` [PATCH 04/13] [3.18-stable] staging: imx-drm: fix indentation warning Arnd Bergmann
@ 2017-05-04 20:52 ` Arnd Bergmann
  2017-05-04 22:37   ` Patch "staging: bcm: add 32-bit host dependency" has been added to the 3.18-stable tree gregkh
  2017-05-04 20:52 ` [PATCH 06/13] [3.18-stable] IB/qib: rename BITS_PER_PAGE to RVT_BITS_PER_PAGE Arnd Bergmann
                   ` (8 subsequent siblings)
  13 siblings, 1 reply; 24+ messages in thread
From: Arnd Bergmann @ 2017-05-04 20:52 UTC (permalink / raw)
  To: gregkh; +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] 24+ messages in thread

* [PATCH 06/13] [3.18-stable] IB/qib: rename BITS_PER_PAGE to RVT_BITS_PER_PAGE
  2017-05-04 20:51 [PATCH 00/13] [3.18-stable] backported build fixes Arnd Bergmann
                   ` (4 preceding siblings ...)
  2017-05-04 20:52 ` [PATCH 05/13] [3.18-stable] staging: bcm: add 32-bit host dependency Arnd Bergmann
@ 2017-05-04 20:52 ` Arnd Bergmann
  2017-05-04 22:37   ` Patch "IB/qib: rename BITS_PER_PAGE to RVT_BITS_PER_PAGE" has been added to the 3.18-stable tree gregkh
  2017-05-04 22:37   ` Patch "IB/qib: rename BITS_PER_PAGE to RVT_BITS_PER_PAGE" has been added to the 4.4-stable tree gregkh
  2017-05-04 20:52 ` [PATCH 07/13] [3.18-stable] IB/ehca: fix maybe-uninitialized warnings Arnd Bergmann
                   ` (7 subsequent siblings)
  13 siblings, 2 replies; 24+ messages in thread
From: Arnd Bergmann @ 2017-05-04 20:52 UTC (permalink / raw)
  To: gregkh; +Cc: stable, Arnd Bergmann

We get this build warning on arm64

drivers/infiniband/hw/qib/qib_qp.c:44:0: error: "BITS_PER_PAGE" redefined [-Werror]
 #define BITS_PER_PAGE           (PAGE_SIZE*BITS_PER_BYTE)

This is fixed upstream in commit 898fa52b4ac3 ("IB/qib: Remove qpn, qp tables and
related variables from qib"), which does a lot of other things as well.

Instead, I just backport the rename of the local BITS_PER_PAGE definition to
RVT_BITS_PER_PAGE.

The driver first showed up in linux-2.6.35, and the fixup should still apply
to that. The upstream fix went into v4.6, so we could apply this workaround
to both 3.18 and 4.4.

Fixes: f931551bafe1 ("IB/qib: Add new qib driver for QLogic PCIe InfiniBand adapters")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/infiniband/hw/qib/qib_qp.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/infiniband/hw/qib/qib_qp.c b/drivers/infiniband/hw/qib/qib_qp.c
index c5b6e60ccad4..c231313bc3be 100644
--- a/drivers/infiniband/hw/qib/qib_qp.c
+++ b/drivers/infiniband/hw/qib/qib_qp.c
@@ -41,13 +41,13 @@
 
 #include "qib.h"
 
-#define BITS_PER_PAGE           (PAGE_SIZE*BITS_PER_BYTE)
-#define BITS_PER_PAGE_MASK      (BITS_PER_PAGE-1)
+#define RVT_BITS_PER_PAGE           (PAGE_SIZE*BITS_PER_BYTE)
+#define RVT_BITS_PER_PAGE_MASK      (RVT_BITS_PER_PAGE-1)
 
 static inline unsigned mk_qpn(struct qib_qpn_table *qpt,
 			      struct qpn_map *map, unsigned off)
 {
-	return (map - qpt->map) * BITS_PER_PAGE + off;
+	return (map - qpt->map) * RVT_BITS_PER_PAGE + off;
 }
 
 static inline unsigned find_next_offset(struct qib_qpn_table *qpt,
@@ -59,7 +59,7 @@ static inline unsigned find_next_offset(struct qib_qpn_table *qpt,
 		if (((off & qpt->mask) >> 1) >= n)
 			off = (off | qpt->mask) + 2;
 	} else
-		off = find_next_zero_bit(map->page, BITS_PER_PAGE, off);
+		off = find_next_zero_bit(map->page, RVT_BITS_PER_PAGE, off);
 	return off;
 }
 
@@ -147,8 +147,8 @@ static int alloc_qpn(struct qib_devdata *dd, struct qib_qpn_table *qpt,
 		qpn = 2;
 	if (qpt->mask && ((qpn & qpt->mask) >> 1) >= dd->n_krcv_queues)
 		qpn = (qpn | qpt->mask) + 2;
-	offset = qpn & BITS_PER_PAGE_MASK;
-	map = &qpt->map[qpn / BITS_PER_PAGE];
+	offset = qpn & RVT_BITS_PER_PAGE_MASK;
+	map = &qpt->map[qpn / RVT_BITS_PER_PAGE];
 	max_scan = qpt->nmaps - !offset;
 	for (i = 0;;) {
 		if (unlikely(!map->page)) {
@@ -173,7 +173,7 @@ static int alloc_qpn(struct qib_devdata *dd, struct qib_qpn_table *qpt,
 			 * We just need to be sure we don't loop
 			 * forever.
 			 */
-		} while (offset < BITS_PER_PAGE && qpn < QPN_MAX);
+		} while (offset < RVT_BITS_PER_PAGE && qpn < QPN_MAX);
 		/*
 		 * In order to keep the number of pages allocated to a
 		 * minimum, we scan the all existing pages before increasing
@@ -204,9 +204,9 @@ static void free_qpn(struct qib_qpn_table *qpt, u32 qpn)
 {
 	struct qpn_map *map;
 
-	map = qpt->map + qpn / BITS_PER_PAGE;
+	map = qpt->map + qpn / RVT_BITS_PER_PAGE;
 	if (map->page)
-		clear_bit(qpn & BITS_PER_PAGE_MASK, map->page);
+		clear_bit(qpn & RVT_BITS_PER_PAGE_MASK, map->page);
 }
 
 static inline unsigned qpn_hash(struct qib_ibdev *dev, u32 qpn)
-- 
2.9.0

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

* [PATCH 07/13] [3.18-stable] IB/ehca: fix maybe-uninitialized warnings
  2017-05-04 20:51 [PATCH 00/13] [3.18-stable] backported build fixes Arnd Bergmann
                   ` (5 preceding siblings ...)
  2017-05-04 20:52 ` [PATCH 06/13] [3.18-stable] IB/qib: rename BITS_PER_PAGE to RVT_BITS_PER_PAGE Arnd Bergmann
@ 2017-05-04 20:52 ` Arnd Bergmann
  2017-05-04 22:37   ` Patch "IB/ehca: fix maybe-uninitialized warnings" has been added to the 3.18-stable tree gregkh
  2017-05-04 22:37   ` Patch "IB/ehca: fix maybe-uninitialized warnings" has been added to the 4.4-stable tree gregkh
  2017-05-04 20:52 ` [PATCH 08/13] [3.18-stable] tty/isicom: fix big-endian compile warning Arnd Bergmann
                   ` (6 subsequent siblings)
  13 siblings, 2 replies; 24+ messages in thread
From: Arnd Bergmann @ 2017-05-04 20:52 UTC (permalink / raw)
  To: gregkh; +Cc: stable, Arnd Bergmann

The driver causes two warnings about possibly uninitialized variables:

drivers/infiniband/hw/ehca/ehca_mrmw.c: In function 'ehca_set_pagebuf':
drivers/infiniband/hw/ehca/ehca_mrmw.c:1908:4: warning: 'prev_pgaddr' may be used uninitialized in this function [-Wmaybe-uninitialized]
drivers/infiniband/hw/ehca/ehca_mrmw.c:1924:14: note: 'prev_pgaddr' was declared here
drivers/infiniband/hw/ehca/ehca_mrmw.c: In function 'ehca_reg_mr':
drivers/infiniband/hw/ehca/ehca_mrmw.c:2430:5: warning: 'hret' may be used uninitialized in this function [-Wmaybe-uninitialized]

The first one is definitely a false positive, the second one may or may not
be one. In both cases, adding an intialization is the safe and easy
workaround.

The driver was removed in mainline in commit e581d111dad3
("staging/rdma: remove deprecated ehca driver"), in linux-4.6.
In 4.4, the file is located in drivers/staging/rdma/ehca/ehca_mrmw.c,
and the fix still applies.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/infiniband/hw/ehca/ehca_mrmw.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/infiniband/hw/ehca/ehca_mrmw.c b/drivers/infiniband/hw/ehca/ehca_mrmw.c
index 3488e8c9fcb4..62b61e9b60ce 100644
--- a/drivers/infiniband/hw/ehca/ehca_mrmw.c
+++ b/drivers/infiniband/hw/ehca/ehca_mrmw.c
@@ -1921,7 +1921,7 @@ static int ehca_set_pagebuf_user2(struct ehca_mr_pginfo *pginfo,
 				  u64 *kpage)
 {
 	int ret = 0;
-	u64 pgaddr, prev_pgaddr;
+	u64 pgaddr, prev_pgaddr = 0;
 	u32 j = 0;
 	int kpages_per_hwpage = pginfo->hwpage_size / PAGE_SIZE;
 	int nr_kpages = kpages_per_hwpage;
@@ -2417,6 +2417,7 @@ static int ehca_reg_bmap_mr_rpages(struct ehca_shca *shca,
 		ehca_err(&shca->ib_device, "kpage alloc failed");
 		return -ENOMEM;
 	}
+	hret = H_SUCCESS;
 	for (top = 0; top < EHCA_MAP_ENTRIES; top++) {
 		if (!ehca_bmap_valid(ehca_bmap->top[top]))
 			continue;
-- 
2.9.0

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

* [PATCH 08/13] [3.18-stable] tty/isicom: fix big-endian compile warning
  2017-05-04 20:51 [PATCH 00/13] [3.18-stable] backported build fixes Arnd Bergmann
                   ` (6 preceding siblings ...)
  2017-05-04 20:52 ` [PATCH 07/13] [3.18-stable] IB/ehca: fix maybe-uninitialized warnings Arnd Bergmann
@ 2017-05-04 20:52 ` Arnd Bergmann
  2017-05-04 20:52 ` [PATCH 09/13] [3.18-stable] infiniband: mlx5: avoid a compile-time warning Arnd Bergmann
                   ` (5 subsequent siblings)
  13 siblings, 0 replies; 24+ messages in thread
From: Arnd Bergmann @ 2017-05-04 20:52 UTC (permalink / raw)
  To: gregkh; +Cc: stable, Arnd Bergmann

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] 24+ messages in thread

* [PATCH 09/13] [3.18-stable] infiniband: mlx5: avoid a compile-time warning
  2017-05-04 20:51 [PATCH 00/13] [3.18-stable] backported build fixes Arnd Bergmann
                   ` (7 preceding siblings ...)
  2017-05-04 20:52 ` [PATCH 08/13] [3.18-stable] tty/isicom: fix big-endian compile warning Arnd Bergmann
@ 2017-05-04 20:52 ` Arnd Bergmann
  2017-05-04 20:52 ` [PATCH 10/13] [3.18-stable] ips: remove pointless #warning Arnd Bergmann
                   ` (4 subsequent siblings)
  13 siblings, 0 replies; 24+ messages in thread
From: Arnd Bergmann @ 2017-05-04 20:52 UTC (permalink / raw)
  To: gregkh; +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 dae07eae9507..0a9b2ae93874 100644
--- a/drivers/infiniband/hw/mlx5/mem.c
+++ b/drivers/infiniband/hw/mlx5/mem.c
@@ -69,7 +69,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] 24+ messages in thread

* [PATCH 10/13] [3.18-stable] ips: remove pointless #warning
  2017-05-04 20:51 [PATCH 00/13] [3.18-stable] backported build fixes Arnd Bergmann
                   ` (8 preceding siblings ...)
  2017-05-04 20:52 ` [PATCH 09/13] [3.18-stable] infiniband: mlx5: avoid a compile-time warning Arnd Bergmann
@ 2017-05-04 20:52 ` Arnd Bergmann
  2017-05-04 20:52 ` [PATCH 11/13] [3.18-stable] mISDN: avoid arch specific __builtin_return_address call Arnd Bergmann
                   ` (3 subsequent siblings)
  13 siblings, 0 replies; 24+ messages in thread
From: Arnd Bergmann @ 2017-05-04 20:52 UTC (permalink / raw)
  To: gregkh; +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 e5afc3884d74..b4ee611d41d6 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] 24+ messages in thread

* [PATCH 11/13] [3.18-stable] mISDN: avoid arch specific __builtin_return_address call
  2017-05-04 20:51 [PATCH 00/13] [3.18-stable] backported build fixes Arnd Bergmann
                   ` (9 preceding siblings ...)
  2017-05-04 20:52 ` [PATCH 10/13] [3.18-stable] ips: remove pointless #warning Arnd Bergmann
@ 2017-05-04 20:52 ` Arnd Bergmann
  2017-05-04 20:52 ` [PATCH 12/13] [3.18-stable] arm64: build vdso without libgcov Arnd Bergmann
                   ` (2 subsequent siblings)
  13 siblings, 0 replies; 24+ messages in thread
From: Arnd Bergmann @ 2017-05-04 20:52 UTC (permalink / raw)
  To: gregkh; +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 ccd7d851be26..a77eea594b69 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"};
@@ -1548,7 +1554,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] 24+ messages in thread

* [PATCH 12/13] [3.18-stable] arm64: build vdso without libgcov
  2017-05-04 20:51 [PATCH 00/13] [3.18-stable] backported build fixes Arnd Bergmann
                   ` (10 preceding siblings ...)
  2017-05-04 20:52 ` [PATCH 11/13] [3.18-stable] mISDN: avoid arch specific __builtin_return_address call Arnd Bergmann
@ 2017-05-04 20:52 ` Arnd Bergmann
  2017-05-04 20:52 ` [PATCH 13/13] [3.18-stable] mm/cma: silence warnings due to max() usage Arnd Bergmann
  2017-05-04 22:39 ` [PATCH 00/13] [3.18-stable] backported build fixes Greg KH
  13 siblings, 0 replies; 24+ messages in thread
From: Arnd Bergmann @ 2017-05-04 20:52 UTC (permalink / raw)
  To: gregkh; +Cc: stable, Arnd Bergmann, Catalin Marinas

Commit 543097843ca7c9ac3758d0b5879ea2a6f44089de upstream.

On a cross-toolchain without glibc support, libgcov may not be
available, and attempting to build an arm64 kernel with GCOV
enabled then results in a build error:

/home/arnd/cross-gcc/lib/gcc/aarch64-linux/5.2.1/../../../../aarch64-linux/bin/ld: cannot find -lgcov

We don't really want to link libgcov into the vdso anyway, so
this patch just disables GCOV in the vdso directory, just as
we do for most other architectures.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm64/kernel/vdso/Makefile | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm64/kernel/vdso/Makefile b/arch/arm64/kernel/vdso/Makefile
index f6fe17d88da5..b467fd0a384b 100644
--- a/arch/arm64/kernel/vdso/Makefile
+++ b/arch/arm64/kernel/vdso/Makefile
@@ -15,6 +15,9 @@ ccflags-y := -shared -fno-common -fno-builtin
 ccflags-y += -nostdlib -Wl,-soname=linux-vdso.so.1 \
 		$(call cc-ldoption, -Wl$(comma)--hash-style=sysv)
 
+# Disable gcov profiling for VDSO code
+GCOV_PROFILE := n
+
 # Workaround for bare-metal (ELF) toolchains that neglect to pass -shared
 # down to collect2, resulting in silent corruption of the vDSO image.
 ccflags-y += -Wl,-shared
-- 
2.9.0

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

* [PATCH 13/13] [3.18-stable] mm/cma: silence warnings due to max() usage
  2017-05-04 20:51 [PATCH 00/13] [3.18-stable] backported build fixes Arnd Bergmann
                   ` (11 preceding siblings ...)
  2017-05-04 20:52 ` [PATCH 12/13] [3.18-stable] arm64: build vdso without libgcov Arnd Bergmann
@ 2017-05-04 20:52 ` Arnd Bergmann
  2017-05-04 22:39 ` [PATCH 00/13] [3.18-stable] backported build fixes Greg KH
  13 siblings, 0 replies; 24+ messages in thread
From: Arnd Bergmann @ 2017-05-04 20:52 UTC (permalink / raw)
  To: gregkh
  Cc: stable, Stephen Rothwell, Andrew Morton, Linus Torvalds,
	Arnd Bergmann

From: Stephen Rothwell <sfr@canb.auug.org.au>

Commit badbda53e505089062e194c614e6f23450bc98b2 upstream.

pageblock_order can be (at least) an unsigned int or an unsigned long
depending on the kernel config and architecture, so use max_t(unsigned
long, ...) when comparing it.

fixes these warnings:

In file included from include/asm-generic/bug.h:13:0,
                 from arch/powerpc/include/asm/bug.h:127,
                 from include/linux/bug.h:4,
                 from include/linux/mmdebug.h:4,
                 from include/linux/mm.h:8,
                 from include/linux/memblock.h:18,
                 from mm/cma.c:28:
mm/cma.c: In function 'cma_init_reserved_mem':
include/linux/kernel.h:748:17: warning: comparison of distinct pointer types lacks a cast
  (void) (&_max1 == &_max2);                   ^
mm/cma.c:186:27: note: in expansion of macro 'max'
  alignment = PAGE_SIZE << max(MAX_ORDER - 1, pageblock_order);
                           ^
mm/cma.c: In function 'cma_declare_contiguous':
include/linux/kernel.h:748:17: warning: comparison of distinct pointer types lacks a cast
  (void) (&_max1 == &_max2);                   ^
include/linux/kernel.h:747:9: note: in definition of macro 'max'
  typeof(y) _max2 = (y);            ^
mm/cma.c:270:29: note: in expansion of macro 'max'
   (phys_addr_t)PAGE_SIZE << max(MAX_ORDER - 1, pageblock_order));
                             ^
include/linux/kernel.h:748:17: warning: comparison of distinct pointer types lacks a cast
  (void) (&_max1 == &_max2);                   ^
include/linux/kernel.h:747:21: note: in definition of macro 'max'
  typeof(y) _max2 = (y);                        ^
mm/cma.c:270:29: note: in expansion of macro 'max'
   (phys_addr_t)PAGE_SIZE << max(MAX_ORDER - 1, pageblock_order));
                             ^

[akpm@linux-foundation.org: coding-style fixes]
Link: http://lkml.kernel.org/r/20160526150748.5be38a4f@canb.auug.org.au
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
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/cma.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/mm/cma.c b/mm/cma.c
index 8e9ec13d31db..0f4549cf796f 100644
--- a/mm/cma.c
+++ b/mm/cma.c
@@ -168,7 +168,8 @@ int __init cma_init_reserved_mem(phys_addr_t base, phys_addr_t size,
 		return -EINVAL;
 
 	/* ensure minimal alignment requied by mm core */
-	alignment = PAGE_SIZE << max(MAX_ORDER - 1, pageblock_order);
+	alignment = PAGE_SIZE <<
+			max_t(unsigned long, MAX_ORDER - 1, pageblock_order);
 
 	/* alignment should be aligned with order_per_bit */
 	if (!IS_ALIGNED(alignment >> PAGE_SHIFT, 1 << order_per_bit))
@@ -250,8 +251,8 @@ int __init cma_declare_contiguous(phys_addr_t base,
 	 * migratetype page by page allocator's buddy algorithm. In the case,
 	 * you couldn't get a contiguous memory, which is not what we want.
 	 */
-	alignment = max(alignment,
-		(phys_addr_t)PAGE_SIZE << max(MAX_ORDER - 1, pageblock_order));
+	alignment = max(alignment,  (phys_addr_t)PAGE_SIZE <<
+			  max_t(unsigned long, MAX_ORDER - 1, pageblock_order));
 	base = ALIGN(base, alignment);
 	size = ALIGN(size, alignment);
 	limit &= ~(alignment - 1);
-- 
2.9.0

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

* Re: [PATCH 01/13] [3.18-stable] ARM: cns3xxx: shut up frame size warning
  2017-05-04 20:51 ` [PATCH 01/13] [3.18-stable] ARM: cns3xxx: shut up frame size warning Arnd Bergmann
@ 2017-05-04 22:27   ` Greg KH
  2017-05-04 22:37   ` Patch "ARM: cns3xxx: shut up frame size warning" has been added to the 3.18-stable tree gregkh
  1 sibling, 0 replies; 24+ messages in thread
From: Greg KH @ 2017-05-04 22:27 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: stable

On Thu, May 04, 2017 at 10:51:57PM +0200, Arnd Bergmann wrote:
> 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.

That's already there, thanks.

greg k-h

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

* Patch "ARM: cns3xxx: shut up frame size warning" has been added to the 3.18-stable tree
  2017-05-04 20:51 ` [PATCH 01/13] [3.18-stable] ARM: cns3xxx: shut up frame size warning Arnd Bergmann
  2017-05-04 22:27   ` Greg KH
@ 2017-05-04 22:37   ` gregkh
  1 sibling, 0 replies; 24+ messages in thread
From: gregkh @ 2017-05-04 22:37 UTC (permalink / raw)
  To: arnd, gregkh; +Cc: stable, stable-commits


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

    ARM: cns3xxx: shut up frame size warning

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:
     arm-cns3xxx-shut-up-frame-size-warning.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  Thu May  4 15:27:13 2017
From: Arnd Bergmann <arnd@arndb.de>
Date: Thu,  4 May 2017 22:51:57 +0200
Subject: ARM: cns3xxx: shut up frame size warning
To: gregkh@linuxfoundation.org
Cc: stable@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>
Message-ID: <20170504205209.498721-2-arnd@arndb.de>

From: Arnd Bergmann <arnd@arndb.de>

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
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(+)

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


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/cred-userns-define-current_user_ns-as-a-function.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/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/ib-qib-rename-bits_per_page-to-rvt_bits_per_page.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/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/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/arm-cns3xxx-shut-up-frame-size-warning.patch
queue-3.18/ib-ehca-fix-maybe-uninitialized-warnings.patch

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

* Patch "IB/ehca: fix maybe-uninitialized warnings" has been added to the 3.18-stable tree
  2017-05-04 20:52 ` [PATCH 07/13] [3.18-stable] IB/ehca: fix maybe-uninitialized warnings Arnd Bergmann
@ 2017-05-04 22:37   ` gregkh
  2017-05-04 22:37   ` Patch "IB/ehca: fix maybe-uninitialized warnings" has been added to the 4.4-stable tree gregkh
  1 sibling, 0 replies; 24+ messages in thread
From: gregkh @ 2017-05-04 22:37 UTC (permalink / raw)
  To: arnd, gregkh; +Cc: stable, stable-commits


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

    IB/ehca: fix maybe-uninitialized warnings

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:
     ib-ehca-fix-maybe-uninitialized-warnings.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  Thu May  4 15:31:46 2017
From: Arnd Bergmann <arnd@arndb.de>
Date: Thu,  4 May 2017 22:52:03 +0200
Subject: IB/ehca: fix maybe-uninitialized warnings
To: gregkh@linuxfoundation.org
Cc: stable@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>
Message-ID: <20170504205209.498721-8-arnd@arndb.de>

From: Arnd Bergmann <arnd@arndb.de>

The driver causes two warnings about possibly uninitialized variables:

drivers/infiniband/hw/ehca/ehca_mrmw.c: In function 'ehca_set_pagebuf':
drivers/infiniband/hw/ehca/ehca_mrmw.c:1908:4: warning: 'prev_pgaddr' may be used uninitialized in this function [-Wmaybe-uninitialized]
drivers/infiniband/hw/ehca/ehca_mrmw.c:1924:14: note: 'prev_pgaddr' was declared here
drivers/infiniband/hw/ehca/ehca_mrmw.c: In function 'ehca_reg_mr':
drivers/infiniband/hw/ehca/ehca_mrmw.c:2430:5: warning: 'hret' may be used uninitialized in this function [-Wmaybe-uninitialized]

The first one is definitely a false positive, the second one may or may not
be one. In both cases, adding an intialization is the safe and easy
workaround.

The driver was removed in mainline in commit e581d111dad3
("staging/rdma: remove deprecated ehca driver"), in linux-4.6.
In 4.4, the file is located in drivers/staging/rdma/ehca/ehca_mrmw.c,
and the fix still applies.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/infiniband/hw/ehca/ehca_mrmw.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/drivers/infiniband/hw/ehca/ehca_mrmw.c
+++ b/drivers/infiniband/hw/ehca/ehca_mrmw.c
@@ -1921,7 +1921,7 @@ static int ehca_set_pagebuf_user2(struct
 				  u64 *kpage)
 {
 	int ret = 0;
-	u64 pgaddr, prev_pgaddr;
+	u64 pgaddr, prev_pgaddr = 0;
 	u32 j = 0;
 	int kpages_per_hwpage = pginfo->hwpage_size / PAGE_SIZE;
 	int nr_kpages = kpages_per_hwpage;
@@ -2417,6 +2417,7 @@ static int ehca_reg_bmap_mr_rpages(struc
 		ehca_err(&shca->ib_device, "kpage alloc failed");
 		return -ENOMEM;
 	}
+	hret = H_SUCCESS;
 	for (top = 0; top < EHCA_MAP_ENTRIES; top++) {
 		if (!ehca_bmap_valid(ehca_bmap->top[top]))
 			continue;


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/cred-userns-define-current_user_ns-as-a-function.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/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/ib-qib-rename-bits_per_page-to-rvt_bits_per_page.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/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/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/arm-cns3xxx-shut-up-frame-size-warning.patch
queue-3.18/ib-ehca-fix-maybe-uninitialized-warnings.patch

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

* Patch "IB/qib: rename BITS_PER_PAGE to RVT_BITS_PER_PAGE" has been added to the 3.18-stable tree
  2017-05-04 20:52 ` [PATCH 06/13] [3.18-stable] IB/qib: rename BITS_PER_PAGE to RVT_BITS_PER_PAGE Arnd Bergmann
@ 2017-05-04 22:37   ` gregkh
  2017-05-04 22:37   ` Patch "IB/qib: rename BITS_PER_PAGE to RVT_BITS_PER_PAGE" has been added to the 4.4-stable tree gregkh
  1 sibling, 0 replies; 24+ messages in thread
From: gregkh @ 2017-05-04 22:37 UTC (permalink / raw)
  To: arnd, gregkh; +Cc: stable, stable-commits


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

    IB/qib: rename BITS_PER_PAGE to RVT_BITS_PER_PAGE

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:
     ib-qib-rename-bits_per_page-to-rvt_bits_per_page.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  Thu May  4 15:29:57 2017
From: Arnd Bergmann <arnd@arndb.de>
Date: Thu,  4 May 2017 22:52:02 +0200
Subject: IB/qib: rename BITS_PER_PAGE to RVT_BITS_PER_PAGE
To: gregkh@linuxfoundation.org
Cc: stable@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>
Message-ID: <20170504205209.498721-7-arnd@arndb.de>

From: Arnd Bergmann <arnd@arndb.de>

We get this build warning on arm64

drivers/infiniband/hw/qib/qib_qp.c:44:0: error: "BITS_PER_PAGE" redefined [-Werror]
 #define BITS_PER_PAGE           (PAGE_SIZE*BITS_PER_BYTE)

This is fixed upstream in commit 898fa52b4ac3 ("IB/qib: Remove qpn, qp tables and
related variables from qib"), which does a lot of other things as well.

Instead, I just backport the rename of the local BITS_PER_PAGE definition to
RVT_BITS_PER_PAGE.

The driver first showed up in linux-2.6.35, and the fixup should still apply
to that. The upstream fix went into v4.6, so we could apply this workaround
to both 3.18 and 4.4.

Fixes: f931551bafe1 ("IB/qib: Add new qib driver for QLogic PCIe InfiniBand adapters")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/infiniband/hw/qib/qib_qp.c |   18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

--- a/drivers/infiniband/hw/qib/qib_qp.c
+++ b/drivers/infiniband/hw/qib/qib_qp.c
@@ -41,13 +41,13 @@
 
 #include "qib.h"
 
-#define BITS_PER_PAGE           (PAGE_SIZE*BITS_PER_BYTE)
-#define BITS_PER_PAGE_MASK      (BITS_PER_PAGE-1)
+#define RVT_BITS_PER_PAGE           (PAGE_SIZE*BITS_PER_BYTE)
+#define RVT_BITS_PER_PAGE_MASK      (RVT_BITS_PER_PAGE-1)
 
 static inline unsigned mk_qpn(struct qib_qpn_table *qpt,
 			      struct qpn_map *map, unsigned off)
 {
-	return (map - qpt->map) * BITS_PER_PAGE + off;
+	return (map - qpt->map) * RVT_BITS_PER_PAGE + off;
 }
 
 static inline unsigned find_next_offset(struct qib_qpn_table *qpt,
@@ -59,7 +59,7 @@ static inline unsigned find_next_offset(
 		if (((off & qpt->mask) >> 1) >= n)
 			off = (off | qpt->mask) + 2;
 	} else
-		off = find_next_zero_bit(map->page, BITS_PER_PAGE, off);
+		off = find_next_zero_bit(map->page, RVT_BITS_PER_PAGE, off);
 	return off;
 }
 
@@ -147,8 +147,8 @@ static int alloc_qpn(struct qib_devdata
 		qpn = 2;
 	if (qpt->mask && ((qpn & qpt->mask) >> 1) >= dd->n_krcv_queues)
 		qpn = (qpn | qpt->mask) + 2;
-	offset = qpn & BITS_PER_PAGE_MASK;
-	map = &qpt->map[qpn / BITS_PER_PAGE];
+	offset = qpn & RVT_BITS_PER_PAGE_MASK;
+	map = &qpt->map[qpn / RVT_BITS_PER_PAGE];
 	max_scan = qpt->nmaps - !offset;
 	for (i = 0;;) {
 		if (unlikely(!map->page)) {
@@ -173,7 +173,7 @@ static int alloc_qpn(struct qib_devdata
 			 * We just need to be sure we don't loop
 			 * forever.
 			 */
-		} while (offset < BITS_PER_PAGE && qpn < QPN_MAX);
+		} while (offset < RVT_BITS_PER_PAGE && qpn < QPN_MAX);
 		/*
 		 * In order to keep the number of pages allocated to a
 		 * minimum, we scan the all existing pages before increasing
@@ -204,9 +204,9 @@ static void free_qpn(struct qib_qpn_tabl
 {
 	struct qpn_map *map;
 
-	map = qpt->map + qpn / BITS_PER_PAGE;
+	map = qpt->map + qpn / RVT_BITS_PER_PAGE;
 	if (map->page)
-		clear_bit(qpn & BITS_PER_PAGE_MASK, map->page);
+		clear_bit(qpn & RVT_BITS_PER_PAGE_MASK, map->page);
 }
 
 static inline unsigned qpn_hash(struct qib_ibdev *dev, u32 qpn)


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/cred-userns-define-current_user_ns-as-a-function.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/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/ib-qib-rename-bits_per_page-to-rvt_bits_per_page.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/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/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/arm-cns3xxx-shut-up-frame-size-warning.patch
queue-3.18/ib-ehca-fix-maybe-uninitialized-warnings.patch

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

* Patch "staging: bcm: add 32-bit host dependency" has been added to the 3.18-stable tree
  2017-05-04 20:52 ` [PATCH 05/13] [3.18-stable] staging: bcm: add 32-bit host dependency Arnd Bergmann
@ 2017-05-04 22:37   ` gregkh
  0 siblings, 0 replies; 24+ messages in thread
From: gregkh @ 2017-05-04 22:37 UTC (permalink / raw)
  To: arnd, gregkh; +Cc: stable, stable-commits


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

    staging: bcm: add 32-bit host dependency

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:
     staging-bcm-add-32-bit-host-dependency.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  Thu May  4 15:29:20 2017
From: Arnd Bergmann <arnd@arndb.de>
Date: Thu,  4 May 2017 22:52:01 +0200
Subject: staging: bcm: add 32-bit host dependency
To: gregkh@linuxfoundation.org
Cc: stable@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>
Message-ID: <20170504205209.498721-6-arnd@arndb.de>

From: Arnd Bergmann <arnd@arndb.de>

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/staging/bcm/Kconfig |    1 +
 1 file changed, 1 insertion(+)

--- 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.


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/cred-userns-define-current_user_ns-as-a-function.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/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/ib-qib-rename-bits_per_page-to-rvt_bits_per_page.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/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/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/arm-cns3xxx-shut-up-frame-size-warning.patch
queue-3.18/ib-ehca-fix-maybe-uninitialized-warnings.patch

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

* Patch "staging: imx-drm: fix indentation warning" has been added to the 3.18-stable tree
  2017-05-04 20:52 ` [PATCH 04/13] [3.18-stable] staging: imx-drm: fix indentation warning Arnd Bergmann
@ 2017-05-04 22:37   ` gregkh
  0 siblings, 0 replies; 24+ messages in thread
From: gregkh @ 2017-05-04 22:37 UTC (permalink / raw)
  To: arnd, gregkh; +Cc: stable, stable-commits


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

    staging: imx-drm: fix indentation warning

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:
     staging-imx-drm-fix-indentation-warning.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  Thu May  4 15:29:03 2017
From: Arnd Bergmann <arnd@arndb.de>
Date: Thu,  4 May 2017 22:52:00 +0200
Subject: staging: imx-drm: fix indentation warning
To: gregkh@linuxfoundation.org
Cc: stable@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>
Message-ID: <20170504205209.498721-5-arnd@arndb.de>

From: Arnd Bergmann <arnd@arndb.de>

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/staging/imx-drm/imx-hdmi.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/staging/imx-drm/imx-hdmi.c
+++ b/drivers/staging/imx-drm/imx-hdmi.c
@@ -967,7 +967,7 @@ static void hdmi_config_AVI(struct imx_h
 	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.


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/cred-userns-define-current_user_ns-as-a-function.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/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/ib-qib-rename-bits_per_page-to-rvt_bits_per_page.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/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/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/arm-cns3xxx-shut-up-frame-size-warning.patch
queue-3.18/ib-ehca-fix-maybe-uninitialized-warnings.patch

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

* Patch "staging: vt6655: fix overly large stack usage" has been added to the 3.18-stable tree
  2017-05-04 20:51 ` [PATCH 03/13] [3.18-stable] staging: vt6655: fix overly large stack usage Arnd Bergmann
@ 2017-05-04 22:37   ` gregkh
  0 siblings, 0 replies; 24+ messages in thread
From: gregkh @ 2017-05-04 22:37 UTC (permalink / raw)
  To: arnd, gregkh; +Cc: stable, stable-commits


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

    staging: vt6655: fix overly large stack usage

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:
     staging-vt6655-fix-overly-large-stack-usage.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  Thu May  4 15:28:39 2017
From: Arnd Bergmann <arnd@arndb.de>
Date: Thu,  4 May 2017 22:51:59 +0200
Subject: staging: vt6655: fix overly large stack usage
To: gregkh@linuxfoundation.org
Cc: stable@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>
Message-ID: <20170504205209.498721-4-arnd@arndb.de>

From: Arnd Bergmann <arnd@arndb.de>

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/staging/vt6655/device_main.c |   10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

--- a/drivers/staging/vt6655/device_main.c
+++ b/drivers/staging/vt6655/device_main.c
@@ -2818,11 +2818,13 @@ static int  device_ioctl(struct net_devi
 		pr_debug(" 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,
@@ -2832,6 +2834,7 @@ static int  device_ioctl(struct net_devi
 					rc = -EFAULT;
 			}
 		}
+		kfree(buffer);
 	}
 	break;
 
@@ -2878,7 +2881,6 @@ static int  device_ioctl(struct net_devi
 		pr_debug(" 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];
 


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/cred-userns-define-current_user_ns-as-a-function.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/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/ib-qib-rename-bits_per_page-to-rvt_bits_per_page.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/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/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/arm-cns3xxx-shut-up-frame-size-warning.patch
queue-3.18/ib-ehca-fix-maybe-uninitialized-warnings.patch

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

* Patch "IB/ehca: fix maybe-uninitialized warnings" has been added to the 4.4-stable tree
  2017-05-04 20:52 ` [PATCH 07/13] [3.18-stable] IB/ehca: fix maybe-uninitialized warnings Arnd Bergmann
  2017-05-04 22:37   ` Patch "IB/ehca: fix maybe-uninitialized warnings" has been added to the 3.18-stable tree gregkh
@ 2017-05-04 22:37   ` gregkh
  1 sibling, 0 replies; 24+ messages in thread
From: gregkh @ 2017-05-04 22:37 UTC (permalink / raw)
  To: arnd, gregkh; +Cc: stable, stable-commits


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

    IB/ehca: fix maybe-uninitialized warnings

to the 4.4-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:
     ib-ehca-fix-maybe-uninitialized-warnings.patch
and it can be found in the queue-4.4 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  Thu May  4 15:31:46 2017
From: Arnd Bergmann <arnd@arndb.de>
Date: Thu,  4 May 2017 22:52:03 +0200
Subject: IB/ehca: fix maybe-uninitialized warnings
To: gregkh@linuxfoundation.org
Cc: stable@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>
Message-ID: <20170504205209.498721-8-arnd@arndb.de>

From: Arnd Bergmann <arnd@arndb.de>

The driver causes two warnings about possibly uninitialized variables:

drivers/infiniband/hw/ehca/ehca_mrmw.c: In function 'ehca_set_pagebuf':
drivers/infiniband/hw/ehca/ehca_mrmw.c:1908:4: warning: 'prev_pgaddr' may be used uninitialized in this function [-Wmaybe-uninitialized]
drivers/infiniband/hw/ehca/ehca_mrmw.c:1924:14: note: 'prev_pgaddr' was declared here
drivers/infiniband/hw/ehca/ehca_mrmw.c: In function 'ehca_reg_mr':
drivers/infiniband/hw/ehca/ehca_mrmw.c:2430:5: warning: 'hret' may be used uninitialized in this function [-Wmaybe-uninitialized]

The first one is definitely a false positive, the second one may or may not
be one. In both cases, adding an intialization is the safe and easy
workaround.

The driver was removed in mainline in commit e581d111dad3
("staging/rdma: remove deprecated ehca driver"), in linux-4.6.
In 4.4, the file is located in drivers/staging/rdma/ehca/ehca_mrmw.c,
and the fix still applies.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/staging/rdma/ehca/ehca_mrmw.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/drivers/staging/rdma/ehca/ehca_mrmw.c
+++ b/drivers/staging/rdma/ehca/ehca_mrmw.c
@@ -1921,7 +1921,7 @@ static int ehca_set_pagebuf_user2(struct
 				  u64 *kpage)
 {
 	int ret = 0;
-	u64 pgaddr, prev_pgaddr;
+	u64 pgaddr, prev_pgaddr = 0;
 	u32 j = 0;
 	int kpages_per_hwpage = pginfo->hwpage_size / PAGE_SIZE;
 	int nr_kpages = kpages_per_hwpage;
@@ -2417,6 +2417,7 @@ static int ehca_reg_bmap_mr_rpages(struc
 		ehca_err(&shca->ib_device, "kpage alloc failed");
 		return -ENOMEM;
 	}
+	hret = H_SUCCESS;
 	for (top = 0; top < EHCA_MAP_ENTRIES; top++) {
 		if (!ehca_bmap_valid(ehca_bmap->top[top]))
 			continue;


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

queue-4.4/alsa-ppc-awacs-shut-up-maybe-uninitialized-warning.patch
queue-4.4/net-tg3-avoid-uninitialized-variable-warning.patch
queue-4.4/mtd-avoid-stack-overflow-in-mtd-cfi-code.patch
queue-4.4/ib-qib-rename-bits_per_page-to-rvt_bits_per_page.patch
queue-4.4/drbd-avoid-redefinition-of-bits_per_page.patch
queue-4.4/ib-ehca-fix-maybe-uninitialized-warnings.patch

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

* Patch "IB/qib: rename BITS_PER_PAGE to RVT_BITS_PER_PAGE" has been added to the 4.4-stable tree
  2017-05-04 20:52 ` [PATCH 06/13] [3.18-stable] IB/qib: rename BITS_PER_PAGE to RVT_BITS_PER_PAGE Arnd Bergmann
  2017-05-04 22:37   ` Patch "IB/qib: rename BITS_PER_PAGE to RVT_BITS_PER_PAGE" has been added to the 3.18-stable tree gregkh
@ 2017-05-04 22:37   ` gregkh
  1 sibling, 0 replies; 24+ messages in thread
From: gregkh @ 2017-05-04 22:37 UTC (permalink / raw)
  To: arnd, gregkh; +Cc: stable, stable-commits


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

    IB/qib: rename BITS_PER_PAGE to RVT_BITS_PER_PAGE

to the 4.4-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:
     ib-qib-rename-bits_per_page-to-rvt_bits_per_page.patch
and it can be found in the queue-4.4 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  Thu May  4 15:29:57 2017
From: Arnd Bergmann <arnd@arndb.de>
Date: Thu,  4 May 2017 22:52:02 +0200
Subject: IB/qib: rename BITS_PER_PAGE to RVT_BITS_PER_PAGE
To: gregkh@linuxfoundation.org
Cc: stable@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>
Message-ID: <20170504205209.498721-7-arnd@arndb.de>

From: Arnd Bergmann <arnd@arndb.de>

We get this build warning on arm64

drivers/infiniband/hw/qib/qib_qp.c:44:0: error: "BITS_PER_PAGE" redefined [-Werror]
 #define BITS_PER_PAGE           (PAGE_SIZE*BITS_PER_BYTE)

This is fixed upstream in commit 898fa52b4ac3 ("IB/qib: Remove qpn, qp tables and
related variables from qib"), which does a lot of other things as well.

Instead, I just backport the rename of the local BITS_PER_PAGE definition to
RVT_BITS_PER_PAGE.

The driver first showed up in linux-2.6.35, and the fixup should still apply
to that. The upstream fix went into v4.6, so we could apply this workaround
to both 3.18 and 4.4.

Fixes: f931551bafe1 ("IB/qib: Add new qib driver for QLogic PCIe InfiniBand adapters")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/infiniband/hw/qib/qib_qp.c |   18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

--- a/drivers/infiniband/hw/qib/qib_qp.c
+++ b/drivers/infiniband/hw/qib/qib_qp.c
@@ -41,13 +41,13 @@
 
 #include "qib.h"
 
-#define BITS_PER_PAGE           (PAGE_SIZE*BITS_PER_BYTE)
-#define BITS_PER_PAGE_MASK      (BITS_PER_PAGE-1)
+#define RVT_BITS_PER_PAGE           (PAGE_SIZE*BITS_PER_BYTE)
+#define RVT_BITS_PER_PAGE_MASK      (RVT_BITS_PER_PAGE-1)
 
 static inline unsigned mk_qpn(struct qib_qpn_table *qpt,
 			      struct qpn_map *map, unsigned off)
 {
-	return (map - qpt->map) * BITS_PER_PAGE + off;
+	return (map - qpt->map) * RVT_BITS_PER_PAGE + off;
 }
 
 static inline unsigned find_next_offset(struct qib_qpn_table *qpt,
@@ -59,7 +59,7 @@ static inline unsigned find_next_offset(
 		if (((off & qpt->mask) >> 1) >= n)
 			off = (off | qpt->mask) + 2;
 	} else
-		off = find_next_zero_bit(map->page, BITS_PER_PAGE, off);
+		off = find_next_zero_bit(map->page, RVT_BITS_PER_PAGE, off);
 	return off;
 }
 
@@ -147,8 +147,8 @@ static int alloc_qpn(struct qib_devdata
 		qpn = 2;
 	if (qpt->mask && ((qpn & qpt->mask) >> 1) >= dd->n_krcv_queues)
 		qpn = (qpn | qpt->mask) + 2;
-	offset = qpn & BITS_PER_PAGE_MASK;
-	map = &qpt->map[qpn / BITS_PER_PAGE];
+	offset = qpn & RVT_BITS_PER_PAGE_MASK;
+	map = &qpt->map[qpn / RVT_BITS_PER_PAGE];
 	max_scan = qpt->nmaps - !offset;
 	for (i = 0;;) {
 		if (unlikely(!map->page)) {
@@ -173,7 +173,7 @@ static int alloc_qpn(struct qib_devdata
 			 * We just need to be sure we don't loop
 			 * forever.
 			 */
-		} while (offset < BITS_PER_PAGE && qpn < QPN_MAX);
+		} while (offset < RVT_BITS_PER_PAGE && qpn < QPN_MAX);
 		/*
 		 * In order to keep the number of pages allocated to a
 		 * minimum, we scan the all existing pages before increasing
@@ -204,9 +204,9 @@ static void free_qpn(struct qib_qpn_tabl
 {
 	struct qpn_map *map;
 
-	map = qpt->map + qpn / BITS_PER_PAGE;
+	map = qpt->map + qpn / RVT_BITS_PER_PAGE;
 	if (map->page)
-		clear_bit(qpn & BITS_PER_PAGE_MASK, map->page);
+		clear_bit(qpn & RVT_BITS_PER_PAGE_MASK, map->page);
 }
 
 static inline unsigned qpn_hash(struct qib_ibdev *dev, u32 qpn)


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

queue-4.4/alsa-ppc-awacs-shut-up-maybe-uninitialized-warning.patch
queue-4.4/net-tg3-avoid-uninitialized-variable-warning.patch
queue-4.4/mtd-avoid-stack-overflow-in-mtd-cfi-code.patch
queue-4.4/ib-qib-rename-bits_per_page-to-rvt_bits_per_page.patch
queue-4.4/drbd-avoid-redefinition-of-bits_per_page.patch
queue-4.4/ib-ehca-fix-maybe-uninitialized-warnings.patch

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

* Re: [PATCH 00/13] [3.18-stable] backported build fixes
  2017-05-04 20:51 [PATCH 00/13] [3.18-stable] backported build fixes Arnd Bergmann
                   ` (12 preceding siblings ...)
  2017-05-04 20:52 ` [PATCH 13/13] [3.18-stable] mm/cma: silence warnings due to max() usage Arnd Bergmann
@ 2017-05-04 22:39 ` Greg KH
  13 siblings, 0 replies; 24+ messages in thread
From: Greg KH @ 2017-05-04 22:39 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: stable

On Thu, May 04, 2017 at 10:51:56PM +0200, Arnd Bergmann wrote:
> Hi Greg,
> 
> I've gone through one more set of patches, starting out with Olof's
> last build report and looking at the configurations that failed
> in 3.18.51.
> 
> I could reproduce most of the warnings on my box, and found a couple
> of extra ones (one from using newer binutils, and probably one or
> two from using a newer gcc). With the set of 13 patches, those all
> seem to be fixed for me now.
> 
> The first half are new patches that I did to fix warnings for code
> that was removed or rewritten between 3.18 and 4.4, or patches
> that did not apply cleanly but that I managed to backport anyway.
> The rest are backports of upstream patches that I didn't see you
> apply yet. If you already have any of those, just ignore them.
> 
> The series also addresses some of the warnings that we saw on
> the kernelci bot, but some others still remain.

Many thanks for all of these, now all applied.

greg k-h

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

end of thread, other threads:[~2017-05-04 22:39 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-04 20:51 [PATCH 00/13] [3.18-stable] backported build fixes Arnd Bergmann
2017-05-04 20:51 ` [PATCH 01/13] [3.18-stable] ARM: cns3xxx: shut up frame size warning Arnd Bergmann
2017-05-04 22:27   ` Greg KH
2017-05-04 22:37   ` Patch "ARM: cns3xxx: shut up frame size warning" has been added to the 3.18-stable tree gregkh
2017-05-04 20:51 ` [PATCH 02/13] [3.18-stable] arm64: Provide a namespace to NCAPS Arnd Bergmann
2017-05-04 20:51 ` [PATCH 03/13] [3.18-stable] staging: vt6655: fix overly large stack usage Arnd Bergmann
2017-05-04 22:37   ` Patch "staging: vt6655: fix overly large stack usage" has been added to the 3.18-stable tree gregkh
2017-05-04 20:52 ` [PATCH 04/13] [3.18-stable] staging: imx-drm: fix indentation warning Arnd Bergmann
2017-05-04 22:37   ` Patch "staging: imx-drm: fix indentation warning" has been added to the 3.18-stable tree gregkh
2017-05-04 20:52 ` [PATCH 05/13] [3.18-stable] staging: bcm: add 32-bit host dependency Arnd Bergmann
2017-05-04 22:37   ` Patch "staging: bcm: add 32-bit host dependency" has been added to the 3.18-stable tree gregkh
2017-05-04 20:52 ` [PATCH 06/13] [3.18-stable] IB/qib: rename BITS_PER_PAGE to RVT_BITS_PER_PAGE Arnd Bergmann
2017-05-04 22:37   ` Patch "IB/qib: rename BITS_PER_PAGE to RVT_BITS_PER_PAGE" has been added to the 3.18-stable tree gregkh
2017-05-04 22:37   ` Patch "IB/qib: rename BITS_PER_PAGE to RVT_BITS_PER_PAGE" has been added to the 4.4-stable tree gregkh
2017-05-04 20:52 ` [PATCH 07/13] [3.18-stable] IB/ehca: fix maybe-uninitialized warnings Arnd Bergmann
2017-05-04 22:37   ` Patch "IB/ehca: fix maybe-uninitialized warnings" has been added to the 3.18-stable tree gregkh
2017-05-04 22:37   ` Patch "IB/ehca: fix maybe-uninitialized warnings" has been added to the 4.4-stable tree gregkh
2017-05-04 20:52 ` [PATCH 08/13] [3.18-stable] tty/isicom: fix big-endian compile warning Arnd Bergmann
2017-05-04 20:52 ` [PATCH 09/13] [3.18-stable] infiniband: mlx5: avoid a compile-time warning Arnd Bergmann
2017-05-04 20:52 ` [PATCH 10/13] [3.18-stable] ips: remove pointless #warning Arnd Bergmann
2017-05-04 20:52 ` [PATCH 11/13] [3.18-stable] mISDN: avoid arch specific __builtin_return_address call Arnd Bergmann
2017-05-04 20:52 ` [PATCH 12/13] [3.18-stable] arm64: build vdso without libgcov Arnd Bergmann
2017-05-04 20:52 ` [PATCH 13/13] [3.18-stable] mm/cma: silence warnings due to max() usage Arnd Bergmann
2017-05-04 22:39 ` [PATCH 00/13] [3.18-stable] backported build fixes Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).