From 0022a2af62e994eeba31289bba4be70684a1e94a Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Sat, 22 Jul 2017 14:45:46 +0200 Subject: [PATCH] 4.9-stable patches 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 --- ...l-operation-warning-in-choose_pgpath.patch | 37 ++++++++++++++ ...fix-gcc-7-warning-on-bool-arithmetic.patch | 41 ++++++++++++++++ ...g-don-t-return-a-random-width-height.patch | 48 +++++++++++++++++++ queue-4.9/series | 3 ++ 4 files changed, 129 insertions(+) create mode 100644 queue-4.9/dm-mpath-cleanup-wbool-operation-warning-in-choose_pgpath.patch create mode 100644 queue-4.9/ir-core-fix-gcc-7-warning-on-bool-arithmetic.patch create mode 100644 queue-4.9/s5p-jpeg-don-t-return-a-random-width-height.patch 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 index 00000000000..cbae1b77ae2 --- /dev/null +++ b/queue-4.9/dm-mpath-cleanup-wbool-operation-warning-in-choose_pgpath.patch @@ -0,0 +1,37 @@ +From d19a55ccad15a486ffe03030570744e5d5bd9f8e Mon Sep 17 00:00:00 2001 +From: Mike Snitzer +Date: Fri, 6 Jan 2017 15:33:14 -0500 +Subject: dm mpath: cleanup -Wbool-operation warning in choose_pgpath() + +From: Mike Snitzer + +commit d19a55ccad15a486ffe03030570744e5d5bd9f8e upstream. + +Reported-by: David Binderman +Signed-off-by: Mike Snitzer +Signed-off-by: Greg Kroah-Hartman + +--- + 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 index 00000000000..6a07895a879 --- /dev/null +++ b/queue-4.9/ir-core-fix-gcc-7-warning-on-bool-arithmetic.patch @@ -0,0 +1,41 @@ +From bd7e31bbade02bc1e92aa00d5cf2cee2da66838a Mon Sep 17 00:00:00 2001 +From: Arnd Bergmann +Date: Thu, 11 May 2017 08:46:44 -0300 +Subject: [media] ir-core: fix gcc-7 warning on bool arithmetic + +From: Arnd Bergmann + +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 +Signed-off-by: Mauro Carvalho Chehab +Signed-off-by: Greg Kroah-Hartman + +--- + 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 index 00000000000..f496647fc1f --- /dev/null +++ b/queue-4.9/s5p-jpeg-don-t-return-a-random-width-height.patch @@ -0,0 +1,48 @@ +From a16e37726c444cbda91e73ed5f742e717bfe866f Mon Sep 17 00:00:00 2001 +From: Mauro Carvalho Chehab +Date: Thu, 18 May 2017 10:40:00 -0300 +Subject: [media] s5p-jpeg: don't return a random width/height + +From: Mauro Carvalho Chehab + +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 +Signed-off-by: Mauro Carvalho Chehab +Signed-off-by: Greg Kroah-Hartman + +--- + 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; + diff --git a/queue-4.9/series b/queue-4.9/series index 736d57e1418..39cf7bc1af1 100644 --- a/queue-4.9/series +++ b/queue-4.9/series @@ -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 -- 2.47.3