]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.9-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 22 Jul 2017 12:45:46 +0000 (14:45 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 22 Jul 2017 12:45:46 +0000 (14:45 +0200)
added patches:
dm-mpath-cleanup-wbool-operation-warning-in-choose_pgpath.patch
ir-core-fix-gcc-7-warning-on-bool-arithmetic.patch
s5p-jpeg-don-t-return-a-random-width-height.patch

queue-4.9/dm-mpath-cleanup-wbool-operation-warning-in-choose_pgpath.patch [new file with mode: 0644]
queue-4.9/ir-core-fix-gcc-7-warning-on-bool-arithmetic.patch [new file with mode: 0644]
queue-4.9/s5p-jpeg-don-t-return-a-random-width-height.patch [new file with mode: 0644]
queue-4.9/series

diff --git a/queue-4.9/dm-mpath-cleanup-wbool-operation-warning-in-choose_pgpath.patch b/queue-4.9/dm-mpath-cleanup-wbool-operation-warning-in-choose_pgpath.patch
new file mode 100644 (file)
index 0000000..cbae1b7
--- /dev/null
@@ -0,0 +1,37 @@
+From d19a55ccad15a486ffe03030570744e5d5bd9f8e Mon Sep 17 00:00:00 2001
+From: Mike Snitzer <snitzer@redhat.com>
+Date: Fri, 6 Jan 2017 15:33:14 -0500
+Subject: dm mpath: cleanup -Wbool-operation warning in choose_pgpath()
+
+From: Mike Snitzer <snitzer@redhat.com>
+
+commit d19a55ccad15a486ffe03030570744e5d5bd9f8e upstream.
+
+Reported-by: David Binderman <dcb314@hotmail.com>
+Signed-off-by: Mike Snitzer <snitzer@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/md/dm-mpath.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/md/dm-mpath.c
++++ b/drivers/md/dm-mpath.c
+@@ -431,7 +431,7 @@ static struct pgpath *choose_pgpath(stru
+       unsigned long flags;
+       struct priority_group *pg;
+       struct pgpath *pgpath;
+-      bool bypassed = true;
++      unsigned bypassed = 1;
+       if (!atomic_read(&m->nr_valid_paths)) {
+               clear_bit(MPATHF_QUEUE_IO, &m->flags);
+@@ -470,7 +470,7 @@ check_current_pg:
+        */
+       do {
+               list_for_each_entry(pg, &m->priority_groups, list) {
+-                      if (pg->bypassed == bypassed)
++                      if (pg->bypassed == !!bypassed)
+                               continue;
+                       pgpath = choose_path_in_pg(m, pg, nr_bytes);
+                       if (!IS_ERR_OR_NULL(pgpath)) {
diff --git a/queue-4.9/ir-core-fix-gcc-7-warning-on-bool-arithmetic.patch b/queue-4.9/ir-core-fix-gcc-7-warning-on-bool-arithmetic.patch
new file mode 100644 (file)
index 0000000..6a07895
--- /dev/null
@@ -0,0 +1,41 @@
+From bd7e31bbade02bc1e92aa00d5cf2cee2da66838a Mon Sep 17 00:00:00 2001
+From: Arnd Bergmann <arnd@arndb.de>
+Date: Thu, 11 May 2017 08:46:44 -0300
+Subject: [media] ir-core: fix gcc-7 warning on bool arithmetic
+
+From: Arnd Bergmann <arnd@arndb.de>
+
+commit bd7e31bbade02bc1e92aa00d5cf2cee2da66838a upstream.
+
+gcc-7 suggests that an expression using a bitwise not and a bitmask
+on a 'bool' variable is better written using boolean logic:
+
+drivers/media/rc/imon.c: In function 'imon_incoming_scancode':
+drivers/media/rc/imon.c:1725:22: error: '~' on a boolean expression [-Werror=bool-operation]
+    ictx->pad_mouse = ~(ictx->pad_mouse) & 0x1;
+                      ^
+drivers/media/rc/imon.c:1725:22: note: did you mean to use logical not?
+
+I agree.
+
+Fixes: 21677cfc562a ("V4L/DVB: ir-core: add imon driver")
+
+Signed-off-by: Arnd Bergmann <arnd@arndb.de>
+Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/media/rc/imon.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/media/rc/imon.c
++++ b/drivers/media/rc/imon.c
+@@ -1629,7 +1629,7 @@ static void imon_incoming_packet(struct
+       if (kc == KEY_KEYBOARD && !ictx->release_code) {
+               ictx->last_keycode = kc;
+               if (!nomouse) {
+-                      ictx->pad_mouse = ~(ictx->pad_mouse) & 0x1;
++                      ictx->pad_mouse = !ictx->pad_mouse;
+                       dev_dbg(dev, "toggling to %s mode\n",
+                               ictx->pad_mouse ? "mouse" : "keyboard");
+                       spin_unlock_irqrestore(&ictx->kc_lock, flags);
diff --git a/queue-4.9/s5p-jpeg-don-t-return-a-random-width-height.patch b/queue-4.9/s5p-jpeg-don-t-return-a-random-width-height.patch
new file mode 100644 (file)
index 0000000..f496647
--- /dev/null
@@ -0,0 +1,48 @@
+From a16e37726c444cbda91e73ed5f742e717bfe866f Mon Sep 17 00:00:00 2001
+From: Mauro Carvalho Chehab <mchehab@s-opensource.com>
+Date: Thu, 18 May 2017 10:40:00 -0300
+Subject: [media] s5p-jpeg: don't return a random width/height
+
+From: Mauro Carvalho Chehab <mchehab@s-opensource.com>
+
+commit a16e37726c444cbda91e73ed5f742e717bfe866f upstream.
+
+Gcc 7.1 complains about:
+
+drivers/media/platform/s5p-jpeg/jpeg-core.c: In function 's5p_jpeg_parse_hdr.isra.9':
+drivers/media/platform/s5p-jpeg/jpeg-core.c:1207:12: warning: 'width' may be used uninitialized in this function [-Wmaybe-uninitialized]
+  result->w = width;
+  ~~~~~~~~~~^~~~~~~
+drivers/media/platform/s5p-jpeg/jpeg-core.c:1208:12: warning: 'height' may be used uninitialized in this function [-Wmaybe-uninitialized]
+  result->h = height;
+  ~~~~~~~~~~^~~~~~~~
+
+Indeed the code would allow it to return a random value (although
+it shouldn't happen, in practice). So, explicitly set both to zero,
+just in case.
+
+Acked-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
+Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/media/platform/s5p-jpeg/jpeg-core.c |    8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+--- a/drivers/media/platform/s5p-jpeg/jpeg-core.c
++++ b/drivers/media/platform/s5p-jpeg/jpeg-core.c
+@@ -1099,10 +1099,10 @@ static bool s5p_jpeg_parse_hdr(struct s5
+                              struct s5p_jpeg_ctx *ctx)
+ {
+       int c, components = 0, notfound, n_dht = 0, n_dqt = 0;
+-      unsigned int height, width, word, subsampling = 0, sos = 0, sof = 0,
+-                   sof_len = 0;
+-      unsigned int dht[S5P_JPEG_MAX_MARKER], dht_len[S5P_JPEG_MAX_MARKER],
+-                   dqt[S5P_JPEG_MAX_MARKER], dqt_len[S5P_JPEG_MAX_MARKER];
++      unsigned int height = 0, width = 0, word, subsampling = 0;
++      unsigned int sos = 0, sof = 0, sof_len = 0;
++      unsigned int dht[S5P_JPEG_MAX_MARKER], dht_len[S5P_JPEG_MAX_MARKER];
++      unsigned int dqt[S5P_JPEG_MAX_MARKER], dqt_len[S5P_JPEG_MAX_MARKER];
+       long length;
+       struct s5p_jpeg_buffer jpeg_buffer;
index 736d57e1418e5e75ee27e2bc17e68c66d0b137b5..39cf7bc1af1d96718b369f700eb30546a8948539 100644 (file)
@@ -1 +1,4 @@
 disable-new-gcc-7.1.1-warnings-for-now.patch
+ir-core-fix-gcc-7-warning-on-bool-arithmetic.patch
+dm-mpath-cleanup-wbool-operation-warning-in-choose_pgpath.patch
+s5p-jpeg-don-t-return-a-random-width-height.patch