]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.7-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 22 Sep 2016 17:12:20 +0000 (19:12 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 22 Sep 2016 17:12:20 +0000 (19:12 +0200)
added patches:
add-braces-to-avoid-ambiguous-else-compiler-warnings.patch
genirq-msi-fix-broken-debug-output.patch
iwlegacy-avoid-warning-about-missing-braces.patch

queue-4.7/add-braces-to-avoid-ambiguous-else-compiler-warnings.patch [new file with mode: 0644]
queue-4.7/genirq-msi-fix-broken-debug-output.patch [new file with mode: 0644]
queue-4.7/iwlegacy-avoid-warning-about-missing-braces.patch [new file with mode: 0644]
queue-4.7/series

diff --git a/queue-4.7/add-braces-to-avoid-ambiguous-else-compiler-warnings.patch b/queue-4.7/add-braces-to-avoid-ambiguous-else-compiler-warnings.patch
new file mode 100644 (file)
index 0000000..e6e062a
--- /dev/null
@@ -0,0 +1,90 @@
+From 194dc870a5890e855ecffb30f3b80ba7c88f96d6 Mon Sep 17 00:00:00 2001
+From: Linus Torvalds <torvalds@linux-foundation.org>
+Date: Wed, 27 Jul 2016 20:03:31 -0700
+Subject: Add braces to avoid "ambiguous ‘else’" compiler warnings
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Linus Torvalds <torvalds@linux-foundation.org>
+
+commit 194dc870a5890e855ecffb30f3b80ba7c88f96d6 upstream.
+
+Some of our "for_each_xyz()" macro constructs make gcc unhappy about
+lack of braces around if-statements inside or outside the loop, because
+the loop construct itself has a "if-then-else" statement inside of it.
+
+The resulting warnings look something like this:
+
+  drivers/gpu/drm/i915/i915_debugfs.c: In function ‘i915_dump_lrc’:
+  drivers/gpu/drm/i915/i915_debugfs.c:2103:6: warning: suggest explicit braces to avoid ambiguous ‘else’ [-Wparentheses]
+     if (ctx != dev_priv->kernel_context)
+        ^
+
+even if the code itself is fine.
+
+Since the warning is fairly easy to avoid by adding a braces around the
+if-statement near the for_each_xyz() construct, do so, rather than
+disabling the otherwise potentially useful warning.
+
+(The if-then-else statements used in the "for_each_xyz()" constructs are
+designed to be inherently safe even with no braces, but in this case
+it's quite understandable that gcc isn't really able to tell that).
+
+This finally leaves the standard "allmodconfig" build with just a
+handful of remaining warnings, so new and valid warnings hopefully will
+stand out.
+
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/i915/i915_debugfs.c |    3 ++-
+ drivers/iommu/dmar.c                |    3 ++-
+ drivers/iommu/intel-iommu.c         |    3 ++-
+ 3 files changed, 6 insertions(+), 3 deletions(-)
+
+--- a/drivers/gpu/drm/i915/i915_debugfs.c
++++ b/drivers/gpu/drm/i915/i915_debugfs.c
+@@ -2100,9 +2100,10 @@ static int i915_dump_lrc(struct seq_file
+               return ret;
+       list_for_each_entry(ctx, &dev_priv->context_list, link)
+-              if (ctx != dev_priv->kernel_context)
++              if (ctx != dev_priv->kernel_context) {
+                       for_each_engine(engine, dev_priv)
+                               i915_dump_lrc_obj(m, ctx, engine);
++              }
+       mutex_unlock(&dev->struct_mutex);
+--- a/drivers/iommu/dmar.c
++++ b/drivers/iommu/dmar.c
+@@ -1871,10 +1871,11 @@ static int dmar_hp_remove_drhd(struct ac
+       /*
+        * All PCI devices managed by this unit should have been destroyed.
+        */
+-      if (!dmaru->include_all && dmaru->devices && dmaru->devices_cnt)
++      if (!dmaru->include_all && dmaru->devices && dmaru->devices_cnt) {
+               for_each_active_dev_scope(dmaru->devices,
+                                         dmaru->devices_cnt, i, dev)
+                       return -EBUSY;
++      }
+       ret = dmar_ir_hotplug(dmaru, false);
+       if (ret == 0)
+--- a/drivers/iommu/intel-iommu.c
++++ b/drivers/iommu/intel-iommu.c
+@@ -4272,10 +4272,11 @@ int dmar_check_one_atsr(struct acpi_dmar
+       if (!atsru)
+               return 0;
+-      if (!atsru->include_all && atsru->devices && atsru->devices_cnt)
++      if (!atsru->include_all && atsru->devices && atsru->devices_cnt) {
+               for_each_active_dev_scope(atsru->devices, atsru->devices_cnt,
+                                         i, dev)
+                       return -EBUSY;
++      }
+       return 0;
+ }
diff --git a/queue-4.7/genirq-msi-fix-broken-debug-output.patch b/queue-4.7/genirq-msi-fix-broken-debug-output.patch
new file mode 100644 (file)
index 0000000..c80cc7b
--- /dev/null
@@ -0,0 +1,30 @@
+From 4364e1a29be16b2783c0bcbc263f61236af64281 Mon Sep 17 00:00:00 2001
+From: Thomas Gleixner <tglx@linutronix.de>
+Date: Mon, 4 Jul 2016 15:32:25 +0200
+Subject: genirq/msi: Fix broken debug output
+
+From: Thomas Gleixner <tglx@linutronix.de>
+
+commit 4364e1a29be16b2783c0bcbc263f61236af64281 upstream.
+
+virq is not required to be the same for all msi descs. Use the base irq number
+from the desc in the debug printk.
+
+Reported-by: Ingo Molnar <mingo@kernel.org>
+Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ kernel/irq/msi.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/kernel/irq/msi.c
++++ b/kernel/irq/msi.c
+@@ -352,6 +352,7 @@ int msi_domain_alloc_irqs(struct irq_dom
+               ops->msi_finish(&arg, 0);
+       for_each_msi_entry(desc, dev) {
++              virq = desc->irq;
+               if (desc->nvec_used == 1)
+                       dev_dbg(dev, "irq %d for MSI\n", virq);
+               else
diff --git a/queue-4.7/iwlegacy-avoid-warning-about-missing-braces.patch b/queue-4.7/iwlegacy-avoid-warning-about-missing-braces.patch
new file mode 100644 (file)
index 0000000..aa45816
--- /dev/null
@@ -0,0 +1,42 @@
+From 2cce76c3fab410520610a7d2f52faebc3cfcf843 Mon Sep 17 00:00:00 2001
+From: Arnd Bergmann <arnd@arndb.de>
+Date: Thu, 19 May 2016 09:58:49 +0200
+Subject: iwlegacy: avoid warning about missing braces
+
+From: Arnd Bergmann <arnd@arndb.de>
+
+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>
+
+---
+ drivers/net/wireless/intel/iwlegacy/3945.c |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/drivers/net/wireless/intel/iwlegacy/3945.c
++++ b/drivers/net/wireless/intel/iwlegacy/3945.c
+@@ -1019,12 +1019,13 @@ il3945_hw_txq_ctx_free(struct il_priv *i
+       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);
index c47c43aa54dafcd60000aa9f2cd1c1a9c09ede36..ebc3f97b663dc358b591e2c5af17571716481333 100644 (file)
@@ -179,3 +179,6 @@ mn10300-copy_from_user-should-zero-on-access_ok-failure.patch
 sparc32-fix-copy_from_user.patch
 ppc32-fix-copy_from_user.patch
 ia64-copy_from_user-should-zero-the-destination-on-access_ok-failure.patch
+iwlegacy-avoid-warning-about-missing-braces.patch
+genirq-msi-fix-broken-debug-output.patch
+add-braces-to-avoid-ambiguous-else-compiler-warnings.patch