diff options
43 files changed, 181 insertions, 2447 deletions
diff --git a/0000-cover-letter.patch b/0000-cover-letter.patch deleted file mode 100644 index 7c83ade60e1b7e..00000000000000 --- a/0000-cover-letter.patch +++ /dev/null @@ -1,268 +0,0 @@ -Subject: [PATCH 00/12] Add kdbus implementation - -kdbus is a kernel-level IPC implementation that aims for resemblance to -the the protocol layer with the existing userspace D-Bus daemon while -enabling some features that couldn't be implemented before in userspace. - -The documentation added by the first patch in this series is meant to -explain all protocol and API details comprehensively, but here's a terse -list of the kdbus key features: - - * Implemented as a char driver, which creates devices on demand when - they are created. - - * Message transfer over shared memory areas in each of the peer's - task to avoid unnecessary extra data copies during message exchanges. - - * Optional passing of file descriptors and sealed memfds along with - messages. - - * No demarshalling of any message content from inside the kernel; - the driver stays entirely agnostic to the transported payload. - - * Support for multiple domains, completely separated from each other, - allowing multiple virtualized instances to be used at the same time. - - * Support for peer-to-peer unicast and multicast messages. - - * Attachment of trustable metadata to each message on demand, such as - the sending peer's timestamp, creds, auxgroups, comm, exe, cmdline, - cgroup path, capabilities, security label, audit information, etc, - each taken at the time the sender issued the ioctl to send the - message. Which of those are actually recorded and attached is - controlled by the receiving peer. - - * Bloom filters as measure to pre-filter broadcast messages and to - mitigate unnecessary task wakeups. On the side kernel, however, this - is just a cheap &-operation, hash functions are left to be - implemented by userspace. - - * Optional message dequeuing by priority, allowing multiple types of - payloads of different priorities to be transported over the same - connection. - - * Global, domain-wide guaranteed message ordering. - - * Eavesdropping for buses for debugging - - * Adressing of remote peers by their numerical unique ID, or by a - well-known name. - - * Built-in name registry for atomic name ownership lookups, claims, - releases and take-overs from one peer to another. - - * Simple policy database to restrict peers from seeing or talking to - each other, and to control name ownership. - - * Custom bus endpoints in addition to the default ones. Those allow - to upload extra policy rules, and can act as a protocol-filtering - bus firewall. - - * Kernel-generated notifications on connected and disconnected peers, - claimed and released well-known-names, and exceeded reply timeouts. - -This is the first submission of kdbus by the kernel community. It was -developed in its own repository for well more than a year, and has been -tested on x64-64, i686 and ARM architectures in various use cases. The -driver is totally non-intrusive and doesn't touch a single line of -existing kernel code. - -kdbus has been worked on collaboratively by many people contributing -code and suggestions during its development. Below is a list of all -involved individuals, in alphabetical order. - - Alban Crequy, Arnd Bergmann, Christian S., Daniel Kowalski, - Daniel Mack, David Herrmann, Djalal Harouni, Govindarajulu - Varadarajan, Greg Kroah-Hartman, Harald Hoyer, Hristo Venev, - Ingo van Lil, Jacek Janczyk, Jason A. Donenfeld, John de - la Garza, Kay Sievers, Lennart Poettering, Lukasz Skalski, - Maciej Wereski, Marc-Antoine Perennou, Marcel Holtmann, - Michal Eljasiewicz, Michele Curti, Przemyslaw Kedzierski, - Radoslaw Pajak, Ryan Lortie, Simon McVittie, Simon Peeters, - Stefan Beller, Ted Feng, Tejun Heo, Tero Roponen, Thomas - Andersen, Torstein Husebø, Vasiliy Balyasnyy. - -Some statistics: the driver itself has a little more than 11k lines, -with ~25% of the lines being comments. Our test suite weights in for -another 6k lines, and the API documentation file currently has >1800 -lines. The loaded kernel module has ~70kB of text size. - -Patches #3 to #10 carry the driver implementation in digestable bites, -but only #11 adds the Makefile to actually compile them. That division -can of course be changed, and the patches be squashed and reordered -later. - -The rest should be pretty much self-explanatory - the individual commit -logs and Documentation/kdbus.txt contain detailed information on the -driver's inner life. - -While we consider the kernel API/ABI mostly stable at this point, we're -still in the process of fixing up some ends in userspace, such as -compatibility layers and the D-Bus spec, but that shouldn't affect the -kernel side much anymore. - -As for maintainership, Daniel Mack, David Herrmann, Djalal Harouni and -myself would be taking care for it in the future. - -I'll also be keeping this in a git tree, the kdbus branch of -char-misc.git at: - https://git.kernel.org/cgit/linux/kernel/git/gregkh/char-misc.git/ - -thanks, - -greg k-h - -Daniel Mack (12): - kdbus: add documentation - kdbus: add header file - kdbus: add driver skeleton, ioctl entry points and utility functions - kdbus: add connection pool implementation - kdbus: add connection, queue handling and message validation code - kdbus: add code to gather metadata - kdbus: add code for notifications and matches - kdbus: add code for buses, domains and endpoints - kdbus: add name registry implementation - kdbus: add policy database implementation - kdbus: add Makefile, Kconfig and MAINTAINERS entry - kdbus: add selftests - - Documentation/ioctl/ioctl-number.txt | 1 + - Documentation/kdbus.txt | 1815 ++++++++++++++++++++++ - MAINTAINERS | 12 + - drivers/misc/Kconfig | 1 + - drivers/misc/Makefile | 1 + - drivers/misc/kdbus/Kconfig | 11 + - drivers/misc/kdbus/Makefile | 19 + - drivers/misc/kdbus/bus.c | 450 ++++++ - drivers/misc/kdbus/bus.h | 107 ++ - drivers/misc/kdbus/connection.c | 1751 +++++++++++++++++++++ - drivers/misc/kdbus/connection.h | 177 +++ - drivers/misc/kdbus/domain.c | 477 ++++++ - drivers/misc/kdbus/domain.h | 105 ++ - drivers/misc/kdbus/endpoint.c | 567 +++++++ - drivers/misc/kdbus/endpoint.h | 94 ++ - drivers/misc/kdbus/handle.c | 1221 +++++++++++++++ - drivers/misc/kdbus/handle.h | 46 + - drivers/misc/kdbus/item.c | 256 +++ - drivers/misc/kdbus/item.h | 40 + - drivers/misc/kdbus/limits.h | 77 + - drivers/misc/kdbus/main.c | 70 + - drivers/misc/kdbus/match.c | 521 +++++++ - drivers/misc/kdbus/match.h | 30 + - drivers/misc/kdbus/message.c | 420 +++++ - drivers/misc/kdbus/message.h | 72 + - drivers/misc/kdbus/metadata.c | 626 ++++++++ - drivers/misc/kdbus/metadata.h | 51 + - drivers/misc/kdbus/names.c | 920 +++++++++++ - drivers/misc/kdbus/names.h | 81 + - drivers/misc/kdbus/notify.c | 235 +++ - drivers/misc/kdbus/notify.h | 28 + - drivers/misc/kdbus/policy.c | 617 ++++++++ - drivers/misc/kdbus/policy.h | 60 + - drivers/misc/kdbus/pool.c | 728 +++++++++ - drivers/misc/kdbus/pool.h | 43 + - drivers/misc/kdbus/queue.c | 602 +++++++ - drivers/misc/kdbus/queue.h | 82 + - drivers/misc/kdbus/util.c | 108 ++ - drivers/misc/kdbus/util.h | 94 ++ - include/uapi/linux/kdbus.h | 918 +++++++++++ - tools/testing/selftests/Makefile | 1 + - tools/testing/selftests/kdbus/.gitignore | 11 + - tools/testing/selftests/kdbus/Makefile | 46 + - tools/testing/selftests/kdbus/kdbus-enum.c | 90 ++ - tools/testing/selftests/kdbus/kdbus-enum.h | 14 + - tools/testing/selftests/kdbus/kdbus-test.c | 474 ++++++ - tools/testing/selftests/kdbus/kdbus-test.h | 79 + - tools/testing/selftests/kdbus/kdbus-util.c | 1173 ++++++++++++++ - tools/testing/selftests/kdbus/kdbus-util.h | 139 ++ - tools/testing/selftests/kdbus/test-activator.c | 317 ++++ - tools/testing/selftests/kdbus/test-benchmark.c | 417 +++++ - tools/testing/selftests/kdbus/test-bus.c | 117 ++ - tools/testing/selftests/kdbus/test-chat.c | 123 ++ - tools/testing/selftests/kdbus/test-connection.c | 258 +++ - tools/testing/selftests/kdbus/test-daemon.c | 66 + - tools/testing/selftests/kdbus/test-domain.c | 65 + - tools/testing/selftests/kdbus/test-endpoint.c | 221 +++ - tools/testing/selftests/kdbus/test-fd.c | 473 ++++++ - tools/testing/selftests/kdbus/test-free.c | 34 + - tools/testing/selftests/kdbus/test-match.c | 385 +++++ - tools/testing/selftests/kdbus/test-message.c | 126 ++ - tools/testing/selftests/kdbus/test-metadata-ns.c | 236 +++ - tools/testing/selftests/kdbus/test-monitor.c | 156 ++ - tools/testing/selftests/kdbus/test-names.c | 184 +++ - tools/testing/selftests/kdbus/test-policy-ns.c | 578 +++++++ - tools/testing/selftests/kdbus/test-policy-priv.c | 1168 ++++++++++++++ - tools/testing/selftests/kdbus/test-policy.c | 81 + - tools/testing/selftests/kdbus/test-race.c | 313 ++++ - tools/testing/selftests/kdbus/test-sync.c | 241 +++ - tools/testing/selftests/kdbus/test-timeout.c | 97 ++ - 70 files changed, 21217 insertions(+) - create mode 100644 Documentation/kdbus.txt - create mode 100644 drivers/misc/kdbus/Kconfig - create mode 100644 drivers/misc/kdbus/Makefile - create mode 100644 drivers/misc/kdbus/bus.c - create mode 100644 drivers/misc/kdbus/bus.h - create mode 100644 drivers/misc/kdbus/connection.c - create mode 100644 drivers/misc/kdbus/connection.h - create mode 100644 drivers/misc/kdbus/domain.c - create mode 100644 drivers/misc/kdbus/domain.h - create mode 100644 drivers/misc/kdbus/endpoint.c - create mode 100644 drivers/misc/kdbus/endpoint.h - create mode 100644 drivers/misc/kdbus/handle.c - create mode 100644 drivers/misc/kdbus/handle.h - create mode 100644 drivers/misc/kdbus/item.c - create mode 100644 drivers/misc/kdbus/item.h - create mode 100644 drivers/misc/kdbus/limits.h - create mode 100644 drivers/misc/kdbus/main.c - create mode 100644 drivers/misc/kdbus/match.c - create mode 100644 drivers/misc/kdbus/match.h - create mode 100644 drivers/misc/kdbus/message.c - create mode 100644 drivers/misc/kdbus/message.h - create mode 100644 drivers/misc/kdbus/metadata.c - create mode 100644 drivers/misc/kdbus/metadata.h - create mode 100644 drivers/misc/kdbus/names.c - create mode 100644 drivers/misc/kdbus/names.h - create mode 100644 drivers/misc/kdbus/notify.c - create mode 100644 drivers/misc/kdbus/notify.h - create mode 100644 drivers/misc/kdbus/policy.c - create mode 100644 drivers/misc/kdbus/policy.h - create mode 100644 drivers/misc/kdbus/pool.c - create mode 100644 drivers/misc/kdbus/pool.h - create mode 100644 drivers/misc/kdbus/queue.c - create mode 100644 drivers/misc/kdbus/queue.h - create mode 100644 drivers/misc/kdbus/util.c - create mode 100644 drivers/misc/kdbus/util.h - create mode 100644 include/uapi/linux/kdbus.h - create mode 100644 tools/testing/selftests/kdbus/.gitignore - create mode 100644 tools/testing/selftests/kdbus/Makefile - create mode 100644 tools/testing/selftests/kdbus/kdbus-enum.c - create mode 100644 tools/testing/selftests/kdbus/kdbus-enum.h - create mode 100644 tools/testing/selftests/kdbus/kdbus-test.c - create mode 100644 tools/testing/selftests/kdbus/kdbus-test.h - create mode 100644 tools/testing/selftests/kdbus/kdbus-util.c - create mode 100644 tools/testing/selftests/kdbus/kdbus-util.h - create mode 100644 tools/testing/selftests/kdbus/test-activator.c - create mode 100644 tools/testing/selftests/kdbus/test-benchmark.c - create mode 100644 tools/testing/selftests/kdbus/test-bus.c - create mode 100644 tools/testing/selftests/kdbus/test-chat.c - create mode 100644 tools/testing/selftests/kdbus/test-connection.c - create mode 100644 tools/testing/selftests/kdbus/test-daemon.c - create mode 100644 tools/testing/selftests/kdbus/test-domain.c - create mode 100644 tools/testing/selftests/kdbus/test-endpoint.c - create mode 100644 tools/testing/selftests/kdbus/test-fd.c - create mode 100644 tools/testing/selftests/kdbus/test-free.c - create mode 100644 tools/testing/selftests/kdbus/test-match.c - create mode 100644 tools/testing/selftests/kdbus/test-message.c - create mode 100644 tools/testing/selftests/kdbus/test-metadata-ns.c - create mode 100644 tools/testing/selftests/kdbus/test-monitor.c - create mode 100644 tools/testing/selftests/kdbus/test-names.c - create mode 100644 tools/testing/selftests/kdbus/test-policy-ns.c - create mode 100644 tools/testing/selftests/kdbus/test-policy-priv.c - create mode 100644 tools/testing/selftests/kdbus/test-policy.c - create mode 100644 tools/testing/selftests/kdbus/test-race.c - create mode 100644 tools/testing/selftests/kdbus/test-sync.c - create mode 100644 tools/testing/selftests/kdbus/test-timeout.c - --- -2.1.0 - diff --git a/0001-iop.c-move-assignment-out-of-if-block.patch b/0001-iop.c-move-assignment-out-of-if-block.patch deleted file mode 100644 index b391e293efcde3..00000000000000 --- a/0001-iop.c-move-assignment-out-of-if-block.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 9640c5c953103d87f30d548274bc4e6d8ac3e549 Mon Sep 17 00:00:00 2001 -From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -Date: Wed, 29 Apr 2015 16:21:59 +0200 -Subject: [PATCH 01/36] Staging: iop.c: move assignment out of if () block - -We should not be doing assignments within an if () block -so fix up the code to not do this. - -change was created using Coccinelle. - -CC: Supriya Karanth <iskaranth@gmail.com> -CC: Somya Anand <somyaanand214@gmail.com> -CC: Alan Cox <alan@linux.intel.com> -Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> ---- - drivers/staging/i2o/iop.c | 9 ++++++--- - 1 file changed, 6 insertions(+), 3 deletions(-) - ---- a/drivers/staging/i2o/iop.c -+++ b/drivers/staging/i2o/iop.c -@@ -300,7 +300,8 @@ static int i2o_iop_quiesce(struct i2o_co - ADAPTER_TID); - - /* Long timeout needed for quiesce if lots of devices */ -- if ((rc = i2o_msg_post_wait(c, msg, 240))) -+ rc = i2o_msg_post_wait(c, msg, 240); -+ if (rc) - osm_info("%s: Unable to quiesce (status=%#x).\n", c->name, -rc); - else - osm_debug("%s: Quiesced.\n", c->name); -@@ -340,7 +341,8 @@ static int i2o_iop_enable(struct i2o_con - ADAPTER_TID); - - /* How long of a timeout do we need? */ -- if ((rc = i2o_msg_post_wait(c, msg, 240))) -+ rc = i2o_msg_post_wait(c, msg, 240); -+ if (rc) - osm_err("%s: Could not enable (status=%#x).\n", c->name, -rc); - else - osm_debug("%s: Enabled.\n", c->name); -@@ -406,7 +408,8 @@ static int i2o_iop_clear(struct i2o_cont - cpu_to_le32(I2O_CMD_ADAPTER_CLEAR << 24 | HOST_TID << 12 | - ADAPTER_TID); - -- if ((rc = i2o_msg_post_wait(c, msg, 30))) -+ rc = i2o_msg_post_wait(c, msg, 30); -+ if (rc) - osm_info("%s: Unable to clear (status=%#x).\n", c->name, -rc); - else - osm_debug("%s: Cleared.\n", c->name); diff --git a/0002-amiserial.c-move-assignment-out-of-if-block.patch b/0002-amiserial.c-move-assignment-out-of-if-block.patch deleted file mode 100644 index 10a12a727e1249..00000000000000 --- a/0002-amiserial.c-move-assignment-out-of-if-block.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 7d99b4864316e37368a83069907302cabc1a9f62 Mon Sep 17 00:00:00 2001 -From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -Date: Wed, 29 Apr 2015 16:22:00 +0200 -Subject: [PATCH 02/36] tty: amiserial.c: move assignment out of if () block - -We should not be doing assignments within an if () block -so fix up the code to not do this. - -change was created using Coccinelle. - -CC: Jiri Slaby <jslaby@suse.cz> -Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> ---- - drivers/tty/amiserial.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - ---- a/drivers/tty/amiserial.c -+++ b/drivers/tty/amiserial.c -@@ -1786,7 +1786,8 @@ static int __exit amiga_serial_remove(st - struct serial_state *state = platform_get_drvdata(pdev); - - /* printk("Unloading %s: version %s\n", serial_name, serial_version); */ -- if ((error = tty_unregister_driver(serial_driver))) -+ error = tty_unregister_driver(serial_driver); -+ if (error) - printk("SERIAL: failed to unregister serial driver (%d)\n", - error); - put_tty_driver(serial_driver); diff --git a/0003-hvc_console.c-move-assignment-out-of-if-block.patch b/0003-hvc_console.c-move-assignment-out-of-if-block.patch deleted file mode 100644 index 400ec4aca1ac07..00000000000000 --- a/0003-hvc_console.c-move-assignment-out-of-if-block.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 653778364ba17237ea794ab00e92ed04b98aec42 Mon Sep 17 00:00:00 2001 -From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -Date: Wed, 29 Apr 2015 16:22:02 +0200 -Subject: [PATCH 03/36] tty: hvc_console.c: move assignment out of if () block - -We should not be doing assignments within an if () block -so fix up the code to not do this. - -change was created using Coccinelle. - -CC: Jiri Slaby <jslaby@suse.cz> -CC: Tomoki Sekiyama <tomoki.sekiyama@hds.com> -CC: Benjamin Herrenschmidt <benh@kernel.crashing.org> -Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> ---- - drivers/tty/hvc/hvc_console.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/drivers/tty/hvc/hvc_console.c b/drivers/tty/hvc/hvc_console.c -index 4fcec1d793a7..4e9c4cc9e1b5 100644 ---- a/drivers/tty/hvc/hvc_console.c -+++ b/drivers/tty/hvc/hvc_console.c -@@ -319,7 +319,8 @@ static int hvc_install(struct tty_driver *driver, struct tty_struct *tty) - int rc; - - /* Auto increments kref reference if found. */ -- if (!(hp = hvc_get_by_index(tty->index))) -+ hp = hvc_get_by_index(tty->index); -+ if (!hp) - return -ENODEV; - - tty->driver_data = hp; --- -2.3.7 - diff --git a/0004-hvcs.c-move-assignment-out-of-if-block.patch b/0004-hvcs.c-move-assignment-out-of-if-block.patch deleted file mode 100644 index 52e040363b524d..00000000000000 --- a/0004-hvcs.c-move-assignment-out-of-if-block.patch +++ /dev/null @@ -1,35 +0,0 @@ -From c7e61966f54c02d32a22e523c55d13a7b5304c3b Mon Sep 17 00:00:00 2001 -From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -Date: Wed, 29 Apr 2015 16:22:04 +0200 -Subject: [PATCH 04/36] tty: hvcs.c: move assignment out of if () block - -We should not be doing assignments within an if () block -so fix up the code to not do this. - -change was created using Coccinelle. - -CC: Jiri Slaby <jslaby@suse.cz> -CC: Masanari Iida <standby24x7@gmail.com> -Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> ---- - drivers/tty/hvc/hvcs.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/drivers/tty/hvc/hvcs.c b/drivers/tty/hvc/hvcs.c -index 81ff7e1bfb1a..f7ff97c0ad34 100644 ---- a/drivers/tty/hvc/hvcs.c -+++ b/drivers/tty/hvc/hvcs.c -@@ -1044,8 +1044,8 @@ static int hvcs_enable_device(struct hvcs_struct *hvcsd, uint32_t unit_address, - * It is possible that the vty-server was removed between the time that - * the conn was registered and now. - */ -- if (!(rc = request_irq(irq, &hvcs_handle_interrupt, -- 0, "ibmhvcs", hvcsd))) { -+ rc = request_irq(irq, &hvcs_handle_interrupt, 0, "ibmhvcs", hvcsd); -+ if (!rc) { - /* - * It is possible the vty-server was removed after the irq was - * requested but before we have time to enable interrupts. --- -2.3.7 - diff --git a/0005-68328serial.c-move-assignment-out-of-if-block.patch b/0005-68328serial.c-move-assignment-out-of-if-block.patch deleted file mode 100644 index 24b1db1ee68bae..00000000000000 --- a/0005-68328serial.c-move-assignment-out-of-if-block.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 5ce8eba21f28738d0fb9359897d893efd99c1c50 Mon Sep 17 00:00:00 2001 -From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -Date: Wed, 29 Apr 2015 16:22:05 +0200 -Subject: [PATCH 05/36] tty: 68328serial.c: move assignment out of if () block - -We should not be doing assignments within an if () block -so fix up the code to not do this. - -change was created using Coccinelle. - -CC: Jiri Slaby <jslaby@suse.cz> -Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> ---- - drivers/tty/serial/68328serial.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/drivers/tty/serial/68328serial.c b/drivers/tty/serial/68328serial.c -index 5dc9c4bfa66e..748c18f8c8cd 100644 ---- a/drivers/tty/serial/68328serial.c -+++ b/drivers/tty/serial/68328serial.c -@@ -508,7 +508,8 @@ static void change_speed(struct m68k_serial *info, struct tty_struct *tty) - int i; - - cflag = tty->termios.c_cflag; -- if (!(port = info->port)) -+ port = info->port; -+ if (!port) - return; - - ustcnt = uart->ustcnt; --- -2.3.7 - diff --git a/0006-crisv10.c-move-assignment-out-of-if-block.patch b/0006-crisv10.c-move-assignment-out-of-if-block.patch deleted file mode 100644 index db1b5e826bb3cd..00000000000000 --- a/0006-crisv10.c-move-assignment-out-of-if-block.patch +++ /dev/null @@ -1,65 +0,0 @@ -From 9a3031c4490510d4a860f857526293f6638528a1 Mon Sep 17 00:00:00 2001 -From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -Date: Wed, 29 Apr 2015 16:22:05 +0200 -Subject: [PATCH 06/36] tty: crisv10.c: move assignment out of if () block - -We should not be doing assignments within an if () block -so fix up the code to not do this. - -change was created using Coccinelle. - -CC: Mikael Starvik <starvik@axis.com> -CC: Jesper Nilsson <jesper.nilsson@axis.com> -CC: Jiri Slaby <jslaby@suse.cz> -Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> ---- - drivers/tty/serial/crisv10.c | 12 ++++++++---- - 1 file changed, 8 insertions(+), 4 deletions(-) - -diff --git a/drivers/tty/serial/crisv10.c b/drivers/tty/serial/crisv10.c -index 0c1825b0b41d..135021314a71 100644 ---- a/drivers/tty/serial/crisv10.c -+++ b/drivers/tty/serial/crisv10.c -@@ -1676,7 +1676,8 @@ alloc_recv_buffer(unsigned int size) - { - struct etrax_recv_buffer *buffer; - -- if (!(buffer = kmalloc(sizeof *buffer + size, GFP_ATOMIC))) -+ buffer = kmalloc(sizeof *buffer + size, GFP_ATOMIC); -+ if (!buffer) - return NULL; - - buffer->next = NULL; -@@ -1712,7 +1713,8 @@ add_char_and_flag(struct e100_serial *info, unsigned char data, unsigned char fl - { - struct etrax_recv_buffer *buffer; - if (info->uses_dma_in) { -- if (!(buffer = alloc_recv_buffer(4))) -+ buffer = alloc_recv_buffer(4); -+ if (!buffer) - return 0; - - buffer->length = 1; -@@ -1750,7 +1752,8 @@ static unsigned int handle_descr_data(struct e100_serial *info, - - append_recv_buffer(info, buffer); - -- if (!(buffer = alloc_recv_buffer(SERIAL_DESCR_BUF_SIZE))) -+ buffer = alloc_recv_buffer(SERIAL_DESCR_BUF_SIZE); -+ if (!buffer) - panic("%s: Failed to allocate memory for receive buffer!\n", __func__); - - descr->buf = virt_to_phys(buffer->buffer); -@@ -1867,7 +1870,8 @@ static int start_recv_dma(struct e100_serial *info) - - /* Set up the receiving descriptors */ - for (i = 0; i < SERIAL_RECV_DESCRIPTORS; i++) { -- if (!(buffer = alloc_recv_buffer(SERIAL_DESCR_BUF_SIZE))) -+ buffer = alloc_recv_buffer(SERIAL_DESCR_BUF_SIZE); -+ if (!buffer) - panic("%s: Failed to allocate memory for receive buffer!\n", __func__); - - descr[i].ctrl = d_int; --- -2.3.7 - diff --git a/0007-icom.c-move-assignment-out-of-if-block.patch b/0007-icom.c-move-assignment-out-of-if-block.patch deleted file mode 100644 index 6d148be0c9cb7c..00000000000000 --- a/0007-icom.c-move-assignment-out-of-if-block.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 1f917aadd8a9092baf8f9112951e27334764af1f Mon Sep 17 00:00:00 2001 -From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -Date: Wed, 29 Apr 2015 16:22:06 +0200 -Subject: [PATCH 07/36] tty: icom.c: move assignment out of if () block - -We should not be doing assignments within an if () block -so fix up the code to not do this. - -change was created using Coccinelle. - -CC: Jiri Slaby <jslaby@suse.cz> -Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> ---- - drivers/tty/serial/icom.c | 11 ++++++----- - 1 file changed, 6 insertions(+), 5 deletions(-) - -diff --git a/drivers/tty/serial/icom.c b/drivers/tty/serial/icom.c -index 45fc323b95e6..ffc7cb2585a6 100644 ---- a/drivers/tty/serial/icom.c -+++ b/drivers/tty/serial/icom.c -@@ -1504,7 +1504,8 @@ static int icom_probe(struct pci_dev *dev, - return retval; - } - -- if ( (retval = pci_request_regions(dev, "icom"))) { -+ retval = pci_request_regions(dev, "icom"); -+ if (retval) { - dev_err(&dev->dev, "pci_request_regions FAILED\n"); - pci_disable_device(dev); - return retval; -@@ -1512,7 +1513,8 @@ static int icom_probe(struct pci_dev *dev, - - pci_set_master(dev); - -- if ( (retval = pci_read_config_dword(dev, PCI_COMMAND, &command_reg))) { -+ retval = pci_read_config_dword(dev, PCI_COMMAND, &command_reg); -+ if (retval) { - dev_err(&dev->dev, "PCI Config read FAILED\n"); - return retval; - } -@@ -1556,9 +1558,8 @@ static int icom_probe(struct pci_dev *dev, - } - - /* save off irq and request irq line */ -- if ( (retval = request_irq(dev->irq, icom_interrupt, -- IRQF_SHARED, ICOM_DRIVER_NAME, -- (void *) icom_adapter))) { -+ retval = request_irq(dev->irq, icom_interrupt, IRQF_SHARED, ICOM_DRIVER_NAME, (void *)icom_adapter); -+ if (retval) { - goto probe_exit2; - } - --- -2.3.7 - diff --git a/0008-ioc3_serial.c-move-assignment-out-of-if-block.patch b/0008-ioc3_serial.c-move-assignment-out-of-if-block.patch deleted file mode 100644 index 30dbd875ef40d5..00000000000000 --- a/0008-ioc3_serial.c-move-assignment-out-of-if-block.patch +++ /dev/null @@ -1,34 +0,0 @@ -From cdf92482f0381097283312e3e2d0781d6333ab8d Mon Sep 17 00:00:00 2001 -From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -Date: Wed, 29 Apr 2015 16:22:06 +0200 -Subject: [PATCH 08/36] tty: ioc3_serial.c: move assignment out of if () block - -We should not be doing assignments within an if () block -so fix up the code to not do this. - -change was created using Coccinelle. - -CC: Pat Gefre <pfg@sgi.com> -CC: Jiri Slaby <jslaby@suse.cz> -Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> ---- - drivers/tty/serial/ioc3_serial.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/drivers/tty/serial/ioc3_serial.c b/drivers/tty/serial/ioc3_serial.c -index abd7ea26ed9a..27b5fefac171 100644 ---- a/drivers/tty/serial/ioc3_serial.c -+++ b/drivers/tty/serial/ioc3_serial.c -@@ -2137,7 +2137,8 @@ ioc3uart_probe(struct ioc3_submodule *is, struct ioc3_driver_data *idd) - - /* register port with the serial core */ - -- if ((ret = ioc3_serial_core_attach(is, idd))) -+ ret = ioc3_serial_core_attach(is, idd); -+ if (ret) - goto out4; - - Num_of_ioc3_cards++; --- -2.3.7 - diff --git a/0009-ioc4_serial.c-move-assignment-out-of-if-block.patch b/0009-ioc4_serial.c-move-assignment-out-of-if-block.patch deleted file mode 100644 index f4670283f6e0f1..00000000000000 --- a/0009-ioc4_serial.c-move-assignment-out-of-if-block.patch +++ /dev/null @@ -1,49 +0,0 @@ -From e5e6f43422bf355ced0e328b7073f68bdb6b37cf Mon Sep 17 00:00:00 2001 -From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -Date: Wed, 29 Apr 2015 16:22:07 +0200 -Subject: [PATCH 09/36] tty: ioc4_serial.c: move assignment out of if () block - -We should not be doing assignments within an if () block -so fix up the code to not do this. - -change was created using Coccinelle. - -CC: Pat Gefre <pfg@sgi.com> -CC: Jiri Slaby <jslaby@suse.cz> -Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> ---- - drivers/tty/serial/ioc4_serial.c | 9 ++++++--- - 1 file changed, 6 insertions(+), 3 deletions(-) - -diff --git a/drivers/tty/serial/ioc4_serial.c b/drivers/tty/serial/ioc4_serial.c -index aa28209f44c1..e5c42fef69d2 100644 ---- a/drivers/tty/serial/ioc4_serial.c -+++ b/drivers/tty/serial/ioc4_serial.c -@@ -1011,7 +1011,8 @@ static irqreturn_t ioc4_intr(int irq, void *arg) - */ - for (xx = 0; xx < num_intrs; xx++) { - intr_info = &soft->is_intr_type[intr_type].is_intr_info[xx]; -- if ((this_mir = this_ir & intr_info->sd_bits)) { -+ this_mir = this_ir & intr_info->sd_bits; -+ if (this_mir) { - /* Disable owned interrupts, call handler */ - handled++; - write_ireg(soft, intr_info->sd_bits, IOC4_W_IEC, -@@ -2865,10 +2866,12 @@ ioc4_serial_attach_one(struct ioc4_driver_data *idd) - - /* register port with the serial core - 1 rs232, 1 rs422 */ - -- if ((ret = ioc4_serial_core_attach(idd->idd_pdev, PROTO_RS232))) -+ ret = ioc4_serial_core_attach(idd->idd_pdev, PROTO_RS232); -+ if (ret) - goto out4; - -- if ((ret = ioc4_serial_core_attach(idd->idd_pdev, PROTO_RS422))) -+ ret = ioc4_serial_core_attach(idd->idd_pdev, PROTO_RS422); -+ if (ret) - goto out5; - - Num_of_ioc4_cards++; --- -2.3.7 - diff --git a/0010-mpsc.c-move-assignment-out-of-if-block.patch b/0010-mpsc.c-move-assignment-out-of-if-block.patch deleted file mode 100644 index a5914092fa671a..00000000000000 --- a/0010-mpsc.c-move-assignment-out-of-if-block.patch +++ /dev/null @@ -1,80 +0,0 @@ -From ef42121bf5e347941ee421f78f351d76f4b8ed84 Mon Sep 17 00:00:00 2001 -From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -Date: Wed, 29 Apr 2015 16:22:07 +0200 -Subject: [PATCH 10/36] tty: mpsc.c: move assignment out of if () block - -We should not be doing assignments within an if () block -so fix up the code to not do this. - -change was created using Coccinelle. - -CC: Jiri Slaby <jslaby@suse.cz> -Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> ---- - drivers/tty/serial/mpsc.c | 25 ++++++++++++++++--------- - 1 file changed, 16 insertions(+), 9 deletions(-) - -diff --git a/drivers/tty/serial/mpsc.c b/drivers/tty/serial/mpsc.c -index 856fd5a5fa3c..82bb6d1fe23b 100644 ---- a/drivers/tty/serial/mpsc.c -+++ b/drivers/tty/serial/mpsc.c -@@ -913,7 +913,8 @@ static int mpsc_make_ready(struct mpsc_port_info *pi) - - if (!pi->ready) { - mpsc_init_hw(pi); -- if ((rc = mpsc_alloc_ring_mem(pi))) -+ rc = mpsc_alloc_ring_mem(pi); -+ if (rc) - return rc; - mpsc_init_rings(pi); - pi->ready = 1; -@@ -1895,7 +1896,8 @@ static int mpsc_shared_drv_probe(struct platform_device *dev) - int rc = -ENODEV; - - if (dev->id == 0) { -- if (!(rc = mpsc_shared_map_regs(dev))) { -+ rc = mpsc_shared_map_regs(dev); -+ if (!rc) { - pdata = (struct mpsc_shared_pdata *) - dev_get_platdata(&dev->dev); - -@@ -2081,14 +2083,16 @@ static int mpsc_drv_probe(struct platform_device *dev) - if (dev->id < MPSC_NUM_CTLRS) { - pi = &mpsc_ports[dev->id]; - -- if (!(rc = mpsc_drv_map_regs(pi, dev))) { -+ rc = mpsc_drv_map_regs(pi, dev); -+ if (!rc) { - mpsc_drv_get_platform_data(pi, dev, dev->id); - pi->port.dev = &dev->dev; - -- if (!(rc = mpsc_make_ready(pi))) { -+ rc = mpsc_make_ready(pi); -+ if (!rc) { - spin_lock_init(&pi->tx_lock); -- if (!(rc = uart_add_one_port(&mpsc_reg, -- &pi->port))) { -+ rc = uart_add_one_port(&mpsc_reg, &pi->port); -+ if (!rc) { - rc = 0; - } else { - mpsc_release_port((struct uart_port *) -@@ -2136,9 +2140,12 @@ static int __init mpsc_drv_init(void) - memset(mpsc_ports, 0, sizeof(mpsc_ports)); - memset(&mpsc_shared_regs, 0, sizeof(mpsc_shared_regs)); - -- if (!(rc = uart_register_driver(&mpsc_reg))) { -- if (!(rc = platform_driver_register(&mpsc_shared_driver))) { -- if ((rc = platform_driver_register(&mpsc_driver))) { -+ rc = uart_register_driver(&mpsc_reg); -+ if (!rc) { -+ rc = platform_driver_register(&mpsc_shared_driver); -+ if (!rc) { -+ rc = platform_driver_register(&mpsc_driver); -+ if (rc) { - platform_driver_unregister(&mpsc_shared_driver); - uart_unregister_driver(&mpsc_reg); - } --- -2.3.7 - diff --git a/0011-synclink.c-move-assignment-out-of-if-block.patch b/0011-synclink.c-move-assignment-out-of-if-block.patch deleted file mode 100644 index dbca08e1525064..00000000000000 --- a/0011-synclink.c-move-assignment-out-of-if-block.patch +++ /dev/null @@ -1,73 +0,0 @@ -From cc9562d7ce941cb6517f4fd8e93ae9e165887958 Mon Sep 17 00:00:00 2001 -From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -Date: Wed, 29 Apr 2015 16:22:08 +0200 -Subject: [PATCH 11/36] tty: synclink.c: move assignment out of if () block - -We should not be doing assignments within an if () block -so fix up the code to not do this. - -change was created using Coccinelle. - -CC: Jiri Slaby <jslaby@suse.cz> -Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> ---- - drivers/tty/synclink.c | 15 ++++++++++----- - 1 file changed, 10 insertions(+), 5 deletions(-) - -diff --git a/drivers/tty/synclink.c b/drivers/tty/synclink.c -index b7991707ffc0..2fac7123b274 100644 ---- a/drivers/tty/synclink.c -+++ b/drivers/tty/synclink.c -@@ -4410,7 +4410,8 @@ static void synclink_cleanup(void) - printk("Unloading %s: %s\n", driver_name, driver_version); - - if (serial_driver) { -- if ((rc = tty_unregister_driver(serial_driver))) -+ rc = tty_unregister_driver(serial_driver); -+ if (rc) - printk("%s(%d) failed to unregister tty driver err=%d\n", - __FILE__,__LINE__,rc); - put_tty_driver(serial_driver); -@@ -7751,7 +7752,8 @@ static int hdlcdev_open(struct net_device *dev) - printk("%s:hdlcdev_open(%s)\n",__FILE__,dev->name); - - /* generic HDLC layer open processing */ -- if ((rc = hdlc_open(dev))) -+ rc = hdlc_open(dev); -+ if (rc) - return rc; - - /* arbitrate between network and tty opens */ -@@ -8018,7 +8020,8 @@ static int hdlcdev_init(struct mgsl_struct *info) - - /* allocate and initialize network and HDLC layer objects */ - -- if (!(dev = alloc_hdlcdev(info))) { -+ dev = alloc_hdlcdev(info); -+ if (!dev) { - printk(KERN_ERR "%s:hdlc device allocation failure\n",__FILE__); - return -ENOMEM; - } -@@ -8039,7 +8042,8 @@ static int hdlcdev_init(struct mgsl_struct *info) - hdlc->xmit = hdlcdev_xmit; - - /* register objects with HDLC layer */ -- if ((rc = register_hdlc_device(dev))) { -+ rc = register_hdlc_device(dev); -+ if (rc) { - printk(KERN_WARNING "%s:unable to register hdlc device\n",__FILE__); - free_netdev(dev); - return rc; -@@ -8075,7 +8079,8 @@ static int synclink_init_one (struct pci_dev *dev, - return -EIO; - } - -- if (!(info = mgsl_allocate_device())) { -+ info = mgsl_allocate_device(); -+ if (!info) { - printk("can't allocate device instance data.\n"); - return -EIO; - } --- -2.3.7 - diff --git a/0012-synclink_gt.c-move-assignment-out-of-if-block.patch b/0012-synclink_gt.c-move-assignment-out-of-if-block.patch deleted file mode 100644 index 897470758e14a8..00000000000000 --- a/0012-synclink_gt.c-move-assignment-out-of-if-block.patch +++ /dev/null @@ -1,73 +0,0 @@ -From 1989ebb4bdb26b1c90a74fd64c7407222e8e2fee Mon Sep 17 00:00:00 2001 -From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -Date: Wed, 29 Apr 2015 16:22:08 +0200 -Subject: [PATCH 12/36] tty: synclink_gt.c: move assignment out of if () block - -We should not be doing assignments within an if () block -so fix up the code to not do this. - -change was created using Coccinelle. - -CC: Jiri Slaby <jslaby@suse.cz> -Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> ---- - drivers/tty/synclink_gt.c | 15 ++++++++++----- - 1 file changed, 10 insertions(+), 5 deletions(-) - -diff --git a/drivers/tty/synclink_gt.c b/drivers/tty/synclink_gt.c -index 0e8c39b6ccd4..0ea8eee00178 100644 ---- a/drivers/tty/synclink_gt.c -+++ b/drivers/tty/synclink_gt.c -@@ -1539,7 +1539,8 @@ static int hdlcdev_open(struct net_device *dev) - DBGINFO(("%s hdlcdev_open\n", dev->name)); - - /* generic HDLC layer open processing */ -- if ((rc = hdlc_open(dev))) -+ rc = hdlc_open(dev); -+ if (rc) - return rc; - - /* arbitrate between network and tty opens */ -@@ -1803,7 +1804,8 @@ static int hdlcdev_init(struct slgt_info *info) - - /* allocate and initialize network and HDLC layer objects */ - -- if (!(dev = alloc_hdlcdev(info))) { -+ dev = alloc_hdlcdev(info); -+ if (!dev) { - printk(KERN_ERR "%s hdlc device alloc failure\n", info->device_name); - return -ENOMEM; - } -@@ -1824,7 +1826,8 @@ static int hdlcdev_init(struct slgt_info *info) - hdlc->xmit = hdlcdev_xmit; - - /* register objects with HDLC layer */ -- if ((rc = register_hdlc_device(dev))) { -+ rc = register_hdlc_device(dev); -+ if (rc) { - printk(KERN_WARNING "%s:unable to register hdlc device\n",__FILE__); - free_netdev(dev); - return rc; -@@ -1879,7 +1882,8 @@ static void rx_async(struct slgt_info *info) - - stat = 0; - -- if ((status = *(p+1) & (BIT1 + BIT0))) { -+ status = *(p + 1) & (BIT1 + BIT0); -+ if (status) { - if (status & BIT1) - icount->parity++; - else if (status & BIT0) -@@ -3755,7 +3759,8 @@ static void slgt_cleanup(void) - if (serial_driver) { - for (info=slgt_device_list ; info != NULL ; info=info->next_device) - tty_unregister_device(serial_driver, info->line); -- if ((rc = tty_unregister_driver(serial_driver))) -+ rc = tty_unregister_driver(serial_driver); -+ if (rc) - DBGERR(("tty_unregister_driver error=%d\n", rc)); - put_tty_driver(serial_driver); - } --- -2.3.7 - diff --git a/0013-synclinkmp.c-move-assignment-out-of-if-block.patch b/0013-synclinkmp.c-move-assignment-out-of-if-block.patch deleted file mode 100644 index ad14e2d91bbae6..00000000000000 --- a/0013-synclinkmp.c-move-assignment-out-of-if-block.patch +++ /dev/null @@ -1,63 +0,0 @@ -From 81823a3d3e8062b6556db720bac0d3ab15b5b81e Mon Sep 17 00:00:00 2001 -From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -Date: Wed, 29 Apr 2015 16:22:08 +0200 -Subject: [PATCH 13/36] tty: synclinkmp.c: move assignment out of if () block - -We should not be doing assignments within an if () block -so fix up the code to not do this. - -change was created using Coccinelle. - -CC: Jiri Slaby <jslaby@suse.cz> -Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> ---- - drivers/tty/synclinkmp.c | 12 ++++++++---- - 1 file changed, 8 insertions(+), 4 deletions(-) - -diff --git a/drivers/tty/synclinkmp.c b/drivers/tty/synclinkmp.c -index c3f90910fed9..08633a8139ff 100644 ---- a/drivers/tty/synclinkmp.c -+++ b/drivers/tty/synclinkmp.c -@@ -1655,7 +1655,8 @@ static int hdlcdev_open(struct net_device *dev) - printk("%s:hdlcdev_open(%s)\n",__FILE__,dev->name); - - /* generic HDLC layer open processing */ -- if ((rc = hdlc_open(dev))) -+ rc = hdlc_open(dev); -+ if (rc) - return rc; - - /* arbitrate between network and tty opens */ -@@ -1922,7 +1923,8 @@ static int hdlcdev_init(SLMP_INFO *info) - - /* allocate and initialize network and HDLC layer objects */ - -- if (!(dev = alloc_hdlcdev(info))) { -+ dev = alloc_hdlcdev(info); -+ if (!dev) { - printk(KERN_ERR "%s:hdlc device allocation failure\n",__FILE__); - return -ENOMEM; - } -@@ -1943,7 +1945,8 @@ static int hdlcdev_init(SLMP_INFO *info) - hdlc->xmit = hdlcdev_xmit; - - /* register objects with HDLC layer */ -- if ((rc = register_hdlc_device(dev))) { -+ rc = register_hdlc_device(dev); -+ if (rc) { - printk(KERN_WARNING "%s:unable to register hdlc device\n",__FILE__); - free_netdev(dev); - return rc; -@@ -3920,7 +3923,8 @@ static void synclinkmp_cleanup(void) - printk("Unloading %s %s\n", driver_name, driver_version); - - if (serial_driver) { -- if ((rc = tty_unregister_driver(serial_driver))) -+ rc = tty_unregister_driver(serial_driver); -+ if (rc) - printk("%s(%d) failed to unregister tty driver err=%d\n", - __FILE__,__LINE__,rc); - put_tty_driver(serial_driver); --- -2.3.7 - diff --git a/0014-tty_buffer.c-move-assignment-out-of-if-block.patch b/0014-tty_buffer.c-move-assignment-out-of-if-block.patch deleted file mode 100644 index aa64c3a5b46a37..00000000000000 --- a/0014-tty_buffer.c-move-assignment-out-of-if-block.patch +++ /dev/null @@ -1,33 +0,0 @@ -From dcf24946ecbcdc07ef7fe3cdd2d7c8bde0dc7ee4 Mon Sep 17 00:00:00 2001 -From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -Date: Wed, 29 Apr 2015 16:22:09 +0200 -Subject: [PATCH 14/36] tty: tty_buffer.c: move assignment out of if () block - -We should not be doing assignments within an if () block -so fix up the code to not do this. - -change was created using Coccinelle. - -CC: Jiri Slaby <jslaby@suse.cz> -Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> ---- - drivers/tty/tty_buffer.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/drivers/tty/tty_buffer.c b/drivers/tty/tty_buffer.c -index 75661641f5fe..5b2b0ffdde28 100644 ---- a/drivers/tty/tty_buffer.c -+++ b/drivers/tty/tty_buffer.c -@@ -262,7 +262,8 @@ static int __tty_buffer_request_room(struct tty_port *port, size_t size, - change = (b->flags & TTYB_NORMAL) && (~flags & TTYB_NORMAL); - if (change || left < size) { - /* This is the slow path - looking for new buffers to use */ -- if ((n = tty_buffer_alloc(port, size)) != NULL) { -+ n = tty_buffer_alloc(port, size); -+ if (n != NULL) { - n->flags = flags; - buf->tail = n; - b->commit = b->used; --- -2.3.7 - diff --git a/0015-tty_ldsem.c-move-assignment-out-of-if-block.patch b/0015-tty_ldsem.c-move-assignment-out-of-if-block.patch deleted file mode 100644 index e5b4ff36a40bc3..00000000000000 --- a/0015-tty_ldsem.c-move-assignment-out-of-if-block.patch +++ /dev/null @@ -1,33 +0,0 @@ -From d87ee8fe3fa67484312b43aed924a469611e39a4 Mon Sep 17 00:00:00 2001 -From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -Date: Wed, 29 Apr 2015 16:22:09 +0200 -Subject: [PATCH 15/36] tty: tty_ldsem.c: move assignment out of if () block - -We should not be doing assignments within an if () block -so fix up the code to not do this. - -change was created using Coccinelle. - -CC: Jiri Slaby <jslaby@suse.cz> -Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> ---- - drivers/tty/tty_ldsem.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/drivers/tty/tty_ldsem.c b/drivers/tty/tty_ldsem.c -index 0ffb0cbe2823..ad7eba5ca380 100644 ---- a/drivers/tty/tty_ldsem.c -+++ b/drivers/tty/tty_ldsem.c -@@ -299,7 +299,8 @@ down_write_failed(struct ld_semaphore *sem, long count, long timeout) - timeout = schedule_timeout(timeout); - raw_spin_lock_irq(&sem->wait_lock); - set_task_state(tsk, TASK_UNINTERRUPTIBLE); -- if ((locked = writer_trylock(sem))) -+ locked = writer_trylock(sem); -+ if (locked) - break; - } - --- -2.3.7 - diff --git a/0016-consolemap.c-move-assignment-out-of-if-block.patch b/0016-consolemap.c-move-assignment-out-of-if-block.patch deleted file mode 100644 index abf0668d9d7836..00000000000000 --- a/0016-consolemap.c-move-assignment-out-of-if-block.patch +++ /dev/null @@ -1,144 +0,0 @@ -From 63b51628e8140adabb1a3d4ece779f2a432ab948 Mon Sep 17 00:00:00 2001 -From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -Date: Wed, 29 Apr 2015 16:22:12 +0200 -Subject: [PATCH 16/36] tty: consolemap.c: move assignment out of if () block - -We should not be doing assignments within an if () block -so fix up the code to not do this. - -change was created using Coccinelle. - -CC: Jiri Slaby <jslaby@suse.cz> -CC: Takashi Iwai <tiwai@suse.de> -CC: Imre Deak <imre.deak@intel.com> -Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> ---- - drivers/tty/vt/consolemap.c | 60 ++++++++++++++++++++++++++++----------------- - 1 file changed, 37 insertions(+), 23 deletions(-) - -diff --git a/drivers/tty/vt/consolemap.c b/drivers/tty/vt/consolemap.c -index 59b25e039968..c8c91f0476a2 100644 ---- a/drivers/tty/vt/consolemap.c -+++ b/drivers/tty/vt/consolemap.c -@@ -261,19 +261,22 @@ u16 inverse_translate(struct vc_data *conp, int glyph, int use_unicode) - int m; - if (glyph < 0 || glyph >= MAX_GLYPH) - return 0; -- else if (!(p = *conp->vc_uni_pagedir_loc)) -- return glyph; -- else if (use_unicode) { -- if (!p->inverse_trans_unicode) -+ else { -+ p = *conp->vc_uni_pagedir_loc; -+ if (!p) - return glyph; -- else -- return p->inverse_trans_unicode[glyph]; -- } else { -- m = inv_translate[conp->vc_num]; -- if (!p->inverse_translations[m]) -- return glyph; -- else -- return p->inverse_translations[m][glyph]; -+ else if (use_unicode) { -+ if (!p->inverse_trans_unicode) -+ return glyph; -+ else -+ return p->inverse_trans_unicode[glyph]; -+ } else { -+ m = inv_translate[conp->vc_num]; -+ if (!p->inverse_translations[m]) -+ return glyph; -+ else -+ return p->inverse_translations[m][glyph]; -+ } - } - } - EXPORT_SYMBOL_GPL(inverse_translate); -@@ -397,7 +400,8 @@ static void con_release_unimap(struct uni_pagedir *p) - - if (p == dflt) dflt = NULL; - for (i = 0; i < 32; i++) { -- if ((p1 = p->uni_pgdir[i]) != NULL) { -+ p1 = p->uni_pgdir[i]; -+ if (p1 != NULL) { - for (j = 0; j < 32; j++) - kfree(p1[j]); - kfree(p1); -@@ -473,14 +477,16 @@ con_insert_unipair(struct uni_pagedir *p, u_short unicode, u_short fontpos) - int i, n; - u16 **p1, *p2; - -- if (!(p1 = p->uni_pgdir[n = unicode >> 11])) { -+ p1 = p->uni_pgdir[n = unicode >> 11]; -+ if (!p1) { - p1 = p->uni_pgdir[n] = kmalloc(32*sizeof(u16 *), GFP_KERNEL); - if (!p1) return -ENOMEM; - for (i = 0; i < 32; i++) - p1[i] = NULL; - } - -- if (!(p2 = p1[n = (unicode >> 6) & 0x1f])) { -+ p2 = p1[n = (unicode >> 6) & 0x1f]; -+ if (!p2) { - p2 = p1[n] = kmalloc(64*sizeof(u16), GFP_KERNEL); - if (!p2) return -ENOMEM; - memset(p2, 0xff, 64*sizeof(u16)); /* No glyphs for the characters (yet) */ -@@ -569,10 +575,12 @@ int con_set_unimap(struct vc_data *vc, ushort ct, struct unipair __user *list) - * entries from "p" (old) to "q" (new). - */ - l = 0; /* unicode value */ -- for (i = 0; i < 32; i++) -- if ((p1 = p->uni_pgdir[i])) -- for (j = 0; j < 32; j++) -- if ((p2 = p1[j])) { -+ for (i = 0; i < 32; i++) { -+ p1 = p->uni_pgdir[i]; -+ if (p1) -+ for (j = 0; j < 32; j++) { -+ p2 = p1[j]; -+ if (p2) { - for (k = 0; k < 64; k++, l++) - if (p2[k] != 0xffff) { - /* -@@ -593,9 +601,11 @@ int con_set_unimap(struct vc_data *vc, ushort ct, struct unipair __user *list) - /* Account for row of 64 empty entries */ - l += 64; - } -+ } - else - /* Account for empty table */ - l += 32 * 64; -+ } - - /* - * Finished copying font table, set vc_uni_pagedir to new table -@@ -735,10 +745,12 @@ int con_get_unimap(struct vc_data *vc, ushort ct, ushort __user *uct, struct uni - ect = 0; - if (*vc->vc_uni_pagedir_loc) { - p = *vc->vc_uni_pagedir_loc; -- for (i = 0; i < 32; i++) -- if ((p1 = p->uni_pgdir[i])) -- for (j = 0; j < 32; j++) -- if ((p2 = *(p1++))) -+ for (i = 0; i < 32; i++) { -+ p1 = p->uni_pgdir[i]; -+ if (p1) -+ for (j = 0; j < 32; j++) { -+ p2 = *(p1++); -+ if (p2) - for (k = 0; k < 64; k++) { - if (*p2 < MAX_GLYPH && ect++ < ct) { - __put_user((u_short)((i<<11)+(j<<6)+k), -@@ -749,6 +761,8 @@ int con_get_unimap(struct vc_data *vc, ushort ct, ushort __user *uct, struct uni - } - p2++; - } -+ } -+ } - } - __put_user(ect, uct); - console_unlock(); --- -2.3.7 - diff --git a/0017-speedtch.c-move-assignment-out-of-if-block.patch b/0017-speedtch.c-move-assignment-out-of-if-block.patch deleted file mode 100644 index 076fa68687c201..00000000000000 --- a/0017-speedtch.c-move-assignment-out-of-if-block.patch +++ /dev/null @@ -1,79 +0,0 @@ -From 621ba9de84b27122635c9198b8db5c7b87dd811f Mon Sep 17 00:00:00 2001 -From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -Date: Wed, 29 Apr 2015 16:22:12 +0200 -Subject: [PATCH 17/36] USB: speedtch.c: move assignment out of if () block - -We should not be doing assignments within an if () block -so fix up the code to not do this. - -change was created using Coccinelle. - -CC: Duncan Sands <duncan.sands@free.fr> -Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> ---- - drivers/usb/atm/speedtch.c | 18 ++++++++++++------ - 1 file changed, 12 insertions(+), 6 deletions(-) - -diff --git a/drivers/usb/atm/speedtch.c b/drivers/usb/atm/speedtch.c -index 0dc8c06a7b5f..0270d1312f83 100644 ---- a/drivers/usb/atm/speedtch.c -+++ b/drivers/usb/atm/speedtch.c -@@ -255,7 +255,8 @@ static int speedtch_upload_firmware(struct speedtch_instance_data *instance, - - usb_dbg(usbatm, "%s entered\n", __func__); - -- if (!(buffer = (unsigned char *)__get_free_page(GFP_KERNEL))) { -+ buffer = (unsigned char *)__get_free_page(GFP_KERNEL); -+ if (!buffer) { - ret = -ENOMEM; - usb_dbg(usbatm, "%s: no memory for buffer!\n", __func__); - goto out; -@@ -638,7 +639,8 @@ static void speedtch_handle_int(struct urb *int_urb) - goto fail; - } - -- if ((int_urb = instance->int_urb)) { -+ int_urb = instance->int_urb; -+ if (int_urb) { - ret = usb_submit_urb(int_urb, GFP_ATOMIC); - schedule_work(&instance->status_check_work); - if (ret < 0) { -@@ -650,7 +652,8 @@ static void speedtch_handle_int(struct urb *int_urb) - return; - - fail: -- if ((int_urb = instance->int_urb)) -+ int_urb = instance->int_urb; -+ if (int_urb) - mod_timer(&instance->resubmit_timer, jiffies + msecs_to_jiffies(RESUBMIT_DELAY)); - } - -@@ -759,11 +762,13 @@ static void speedtch_release_interfaces(struct usb_device *usb_dev, - struct usb_interface *cur_intf; - int i; - -- for (i = 0; i < num_interfaces; i++) -- if ((cur_intf = usb_ifnum_to_if(usb_dev, i))) { -+ for (i = 0; i < num_interfaces; i++) { -+ cur_intf = usb_ifnum_to_if(usb_dev, i); -+ if (cur_intf) { - usb_set_intfdata(cur_intf, NULL); - usb_driver_release_interface(&speedtch_usb_driver, cur_intf); - } -+ } - } - - static int speedtch_bind(struct usbatm_data *usbatm, -@@ -787,7 +792,8 @@ static int speedtch_bind(struct usbatm_data *usbatm, - return -ENODEV; - } - -- if (!(data_intf = usb_ifnum_to_if(usb_dev, INTERFACE_DATA))) { -+ data_intf = usb_ifnum_to_if(usb_dev, INTERFACE_DATA); -+ if (!data_intf) { - usb_err(usbatm, "%s: data interface not found!\n", __func__); - return -ENODEV; - } --- -2.3.7 - diff --git a/0018-usbatm.c-move-assignment-out-of-if-block.patch b/0018-usbatm.c-move-assignment-out-of-if-block.patch deleted file mode 100644 index cd1a389aecc5ee..00000000000000 --- a/0018-usbatm.c-move-assignment-out-of-if-block.patch +++ /dev/null @@ -1,43 +0,0 @@ -From d920ae9726cfa2552f91845e7acd5b97797d7bed Mon Sep 17 00:00:00 2001 -From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -Date: Wed, 29 Apr 2015 16:22:12 +0200 -Subject: [PATCH 18/36] USB: usbatm.c: move assignment out of if () block - -We should not be doing assignments within an if () block -so fix up the code to not do this. - -change was created using Coccinelle. - -CC: Duncan Sands <duncan.sands@free.fr> -Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> ---- - drivers/usb/atm/usbatm.c | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/drivers/usb/atm/usbatm.c b/drivers/usb/atm/usbatm.c -index dada0146cd7f..db322d9ccb6e 100644 ---- a/drivers/usb/atm/usbatm.c -+++ b/drivers/usb/atm/usbatm.c -@@ -382,7 +382,8 @@ static void usbatm_extract_one_cell(struct usbatm_data *instance, unsigned char - "%s: got packet (length: %u, pdu_length: %u, vcc: 0x%p)", - __func__, length, pdu_length, vcc); - -- if (!(skb = dev_alloc_skb(length))) { -+ skb = dev_alloc_skb(length); -+ if (!skb) { - if (printk_ratelimit()) - atm_err(instance, "%s: no memory for skb (length: %u)!\n", - __func__, length); -@@ -816,7 +817,8 @@ static int usbatm_atm_open(struct atm_vcc *vcc) - goto fail; - } - -- if (!(new = kzalloc(sizeof(struct usbatm_vcc_data), GFP_KERNEL))) { -+ new = kzalloc(sizeof(struct usbatm_vcc_data), GFP_KERNEL); -+ if (!new) { - atm_err(instance, "%s: no memory for vcc_data!\n", __func__); - ret = -ENOMEM; - goto fail; --- -2.3.7 - diff --git a/0019-xusbatm.c-move-assignment-out-of-if-block.patch b/0019-xusbatm.c-move-assignment-out-of-if-block.patch deleted file mode 100644 index 5476dcb71fd079..00000000000000 --- a/0019-xusbatm.c-move-assignment-out-of-if-block.patch +++ /dev/null @@ -1,42 +0,0 @@ -From c4f66c75001c1221c50f19532cbacba6c6ba640e Mon Sep 17 00:00:00 2001 -From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -Date: Wed, 29 Apr 2015 16:22:15 +0200 -Subject: [PATCH 19/36] USB: xusbatm.c: move assignment out of if () block - -We should not be doing assignments within an if () block -so fix up the code to not do this. - -change was created using Coccinelle. - -Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> ---- - drivers/usb/atm/xusbatm.c | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/drivers/usb/atm/xusbatm.c b/drivers/usb/atm/xusbatm.c -index b3b1bb78b2ef..a87597f88a84 100644 ---- a/drivers/usb/atm/xusbatm.c -+++ b/drivers/usb/atm/xusbatm.c -@@ -73,7 +73,8 @@ static int xusbatm_capture_intf(struct usbatm_data *usbatm, struct usb_device *u - usb_err(usbatm, "%s: failed to claim interface %2d (%d)!\n", __func__, ifnum, ret); - return ret; - } -- if ((ret = usb_set_interface(usb_dev, ifnum, altsetting))) { -+ ret = usb_set_interface(usb_dev, ifnum, altsetting); -+ if (ret) { - usb_err(usbatm, "%s: altsetting %2d for interface %2d failed (%d)!\n", __func__, altsetting, ifnum, ret); - return ret; - } -@@ -128,7 +129,8 @@ static int xusbatm_bind(struct usbatm_data *usbatm, - rx_intf->altsetting->desc.bInterfaceNumber, - tx_intf->altsetting->desc.bInterfaceNumber); - -- if ((ret = xusbatm_capture_intf(usbatm, usb_dev, rx_intf, rx_alt, rx_intf != intf))) -+ ret = xusbatm_capture_intf(usbatm, usb_dev, rx_intf, rx_alt, rx_intf != intf); -+ if (ret) - return ret; - - if ((tx_intf != rx_intf) && (ret = xusbatm_capture_intf(usbatm, usb_dev, tx_intf, tx_alt, tx_intf != intf))) { --- -2.3.7 - diff --git a/0020-usblp.c-move-assignment-out-of-if-block.patch b/0020-usblp.c-move-assignment-out-of-if-block.patch deleted file mode 100644 index 134463d3c13474..00000000000000 --- a/0020-usblp.c-move-assignment-out-of-if-block.patch +++ /dev/null @@ -1,67 +0,0 @@ -From de1affd1e2fd57f99f168e2d100bb16456b93a51 Mon Sep 17 00:00:00 2001 -From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -Date: Wed, 29 Apr 2015 16:22:15 +0200 -Subject: [PATCH 20/36] USB: usblp.c: move assignment out of if () block - -We should not be doing assignments within an if () block -so fix up the code to not do this. - -change was created using Coccinelle. - -CC: Pete Zaitcev <zaitcev@redhat.com> -Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> ---- - drivers/usb/class/usblp.c | 15 ++++++++++----- - 1 file changed, 10 insertions(+), 5 deletions(-) - -diff --git a/drivers/usb/class/usblp.c b/drivers/usb/class/usblp.c -index 0924ee40a966..f38e875a3fb1 100644 ---- a/drivers/usb/class/usblp.c -+++ b/drivers/usb/class/usblp.c -@@ -660,7 +660,8 @@ static long usblp_ioctl(struct file *file, unsigned int cmd, unsigned long arg) - switch (cmd) { - - case LPGETSTATUS: -- if ((retval = usblp_read_status(usblp, usblp->statusbuf))) { -+ retval = usblp_read_status(usblp, usblp->statusbuf); -+ if (retval) { - printk_ratelimited(KERN_ERR "usblp%d:" - "failed reading printer status (%d)\n", - usblp->minor, retval); -@@ -693,9 +694,11 @@ static struct urb *usblp_new_writeurb(struct usblp *usblp, int transfer_length) - struct urb *urb; - char *writebuf; - -- if ((writebuf = kmalloc(transfer_length, GFP_KERNEL)) == NULL) -+ writebuf = kmalloc(transfer_length, GFP_KERNEL); -+ if (writebuf == NULL) - return NULL; -- if ((urb = usb_alloc_urb(0, GFP_KERNEL)) == NULL) { -+ urb = usb_alloc_urb(0, GFP_KERNEL); -+ if (urb == NULL) { - kfree(writebuf); - return NULL; - } -@@ -732,7 +735,8 @@ static ssize_t usblp_write(struct file *file, const char __user *buffer, size_t - transfer_length = USBLP_BUF_SIZE; - - rv = -ENOMEM; -- if ((writeurb = usblp_new_writeurb(usblp, transfer_length)) == NULL) -+ writeurb = usblp_new_writeurb(usblp, transfer_length); -+ if (writeurb == NULL) - goto raise_urb; - usb_anchor_urb(writeurb, &usblp->urbs); - -@@ -980,7 +984,8 @@ static int usblp_submit_read(struct usblp *usblp) - int rc; - - rc = -ENOMEM; -- if ((urb = usb_alloc_urb(0, GFP_KERNEL)) == NULL) -+ urb = usb_alloc_urb(0, GFP_KERNEL); -+ if (urb == NULL) - goto raise_urb; - - usb_fill_bulk_urb(urb, usblp->dev, --- -2.3.7 - diff --git a/0021-devio.c-move-assignment-out-of-if-block.patch b/0021-devio.c-move-assignment-out-of-if-block.patch deleted file mode 100644 index 2c244decfa3ff6..00000000000000 --- a/0021-devio.c-move-assignment-out-of-if-block.patch +++ /dev/null @@ -1,122 +0,0 @@ -From cce8f17bc680374f46397985858b612327a92f12 Mon Sep 17 00:00:00 2001 -From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -Date: Wed, 29 Apr 2015 16:22:17 +0200 -Subject: [PATCH 21/36] USB: devio.c: move assignment out of if () block - -We should not be doing assignments within an if () block -so fix up the code to not do this. - -change was created using Coccinelle. - -CC: Alan Stern <stern@rowland.harvard.edu> -CC: Chase Metzger <chasemetzger15@gmail.com> -CC: Hans de Goede <hdegoede@redhat.com> -CC: Oliver Neukum <oneukum@suse.de> -Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> ---- - drivers/usb/core/devio.c | 60 ++++++++++++++++++++++++++---------------------- - 1 file changed, 33 insertions(+), 27 deletions(-) - -diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c -index 4b0448c26810..584f3eaa1862 100644 ---- a/drivers/usb/core/devio.c -+++ b/drivers/usb/core/devio.c -@@ -1082,7 +1082,8 @@ static int proc_bulk(struct usb_dev_state *ps, void __user *arg) - ret = usbfs_increase_memory_usage(len1 + sizeof(struct urb)); - if (ret) - return ret; -- if (!(tbuf = kmalloc(len1, GFP_KERNEL))) { -+ tbuf = kmalloc(len1, GFP_KERNEL); -+ if (!tbuf) { - ret = -ENOMEM; - goto done; - } -@@ -1224,7 +1225,8 @@ static int proc_setintf(struct usb_dev_state *ps, void __user *arg) - - if (copy_from_user(&setintf, arg, sizeof(setintf))) - return -EFAULT; -- if ((ret = checkintf(ps, setintf.interface))) -+ ret = checkintf(ps, setintf.interface); -+ if (ret) - return ret; - - destroy_async_on_interface(ps, setintf.interface); -@@ -1393,7 +1395,8 @@ static int proc_do_submiturb(struct usb_dev_state *ps, struct usbdevfs_urb *uurb - number_of_packets = uurb->number_of_packets; - isofrmlen = sizeof(struct usbdevfs_iso_packet_desc) * - number_of_packets; -- if (!(isopkt = kmalloc(isofrmlen, GFP_KERNEL))) -+ isopkt = kmalloc(isofrmlen, GFP_KERNEL); -+ if (!isopkt) - return -ENOMEM; - if (copy_from_user(isopkt, iso_frame_desc, isofrmlen)) { - ret = -EFAULT; -@@ -1940,38 +1943,41 @@ static int proc_ioctl(struct usb_dev_state *ps, struct usbdevfs_ioctl *ctl) - - if (ps->dev->state != USB_STATE_CONFIGURED) - retval = -EHOSTUNREACH; -- else if (!(intf = usb_ifnum_to_if(ps->dev, ctl->ifno))) -- retval = -EINVAL; -- else switch (ctl->ioctl_code) { -+ else { -+ intf = usb_ifnum_to_if(ps->dev, ctl->ifno); -+ if (!intf) -+ retval = -EINVAL; -+ else switch (ctl->ioctl_code) { - - /* disconnect kernel driver from interface */ -- case USBDEVFS_DISCONNECT: -- if (intf->dev.driver) { -- driver = to_usb_driver(intf->dev.driver); -- dev_dbg(&intf->dev, "disconnect by usbfs\n"); -- usb_driver_release_interface(driver, intf); -- } else -- retval = -ENODATA; -- break; -+ case USBDEVFS_DISCONNECT: -+ if (intf->dev.driver) { -+ driver = to_usb_driver(intf->dev.driver); -+ dev_dbg(&intf->dev, "disconnect by usbfs\n"); -+ usb_driver_release_interface(driver, intf); -+ } else -+ retval = -ENODATA; -+ break; - - /* let kernel drivers try to (re)bind to the interface */ -- case USBDEVFS_CONNECT: -- if (!intf->dev.driver) -- retval = device_attach(&intf->dev); -- else -- retval = -EBUSY; -- break; -+ case USBDEVFS_CONNECT: -+ if (!intf->dev.driver) -+ retval = device_attach(&intf->dev); -+ else -+ retval = -EBUSY; -+ break; - - /* talk directly to the interface's driver */ - default: -- if (intf->dev.driver) -- driver = to_usb_driver(intf->dev.driver); -- if (driver == NULL || driver->unlocked_ioctl == NULL) { -- retval = -ENOTTY; -- } else { -- retval = driver->unlocked_ioctl(intf, ctl->ioctl_code, buf); -- if (retval == -ENOIOCTLCMD) -+ if (intf->dev.driver) -+ driver = to_usb_driver(intf->dev.driver); -+ if (driver == NULL || driver->unlocked_ioctl == NULL) { - retval = -ENOTTY; -+ } else { -+ retval = driver->unlocked_ioctl(intf, ctl->ioctl_code, buf); -+ if (retval == -ENOIOCTLCMD) -+ retval = -ENOTTY; -+ } - } - } - --- -2.3.7 - diff --git a/0022-hcd.c-move-assignment-out-of-if-block.patch b/0022-hcd.c-move-assignment-out-of-if-block.patch deleted file mode 100644 index 804263422353ee..00000000000000 --- a/0022-hcd.c-move-assignment-out-of-if-block.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 05b4a29d4ff1bef8aaaa42acbccb2ed22e400432 Mon Sep 17 00:00:00 2001 -From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -Date: Wed, 29 Apr 2015 16:22:20 +0200 -Subject: [PATCH 22/36] USB: hcd.c: move assignment out of if () block - -We should not be doing assignments within an if () block -so fix up the code to not do this. - -change was created using Coccinelle. - -CC: Alan Stern <stern@rowland.harvard.edu> -CC: Felipe Balbi <balbi@ti.com> -CC: Dan Williams <dan.j.williams@intel.com> -CC: Antoine Tenart <antoine.tenart@free-electrons.com> -CC: Petr Mladek <pmladek@suse.cz> -CC: Michal Sojka <sojka@merica.cz> -CC: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com> -CC: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> -Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> ---- - drivers/usb/core/hcd.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c -index 45a915ccd71c..be5b2074f906 100644 ---- a/drivers/usb/core/hcd.c -+++ b/drivers/usb/core/hcd.c -@@ -2691,7 +2691,8 @@ int usb_add_hcd(struct usb_hcd *hcd, - if ((retval = usb_register_bus(&hcd->self)) < 0) - goto err_register_bus; - -- if ((rhdev = usb_alloc_dev(NULL, &hcd->self, 0)) == NULL) { -+ rhdev = usb_alloc_dev(NULL, &hcd->self, 0); -+ if (rhdev == NULL) { - dev_err(hcd->self.controller, "unable to allocate root hub\n"); - retval = -ENOMEM; - goto err_allocate_root_hub; --- -2.3.7 - diff --git a/0023-hub.c-move-assignment-out-of-if-block.patch b/0023-hub.c-move-assignment-out-of-if-block.patch deleted file mode 100644 index 0ed0ca2abb677f..00000000000000 --- a/0023-hub.c-move-assignment-out-of-if-block.patch +++ /dev/null @@ -1,36 +0,0 @@ -From ef578ef0909f074287986f865173be92d7028213 Mon Sep 17 00:00:00 2001 -From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -Date: Wed, 29 Apr 2015 16:22:22 +0200 -Subject: [PATCH 23/36] USB: hub.c: move assignment out of if () block - -We should not be doing assignments within an if () block -so fix up the code to not do this. - -change was created using Coccinelle. - -CC: Alan Stern <stern@rowland.harvard.edu> -CC: Dan Williams <dan.j.williams@intel.com> -CC: Petr Mladek <pmladek@suse.cz> -CC: Peter Chen <peter.chen@freescale.com> -Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> ---- - drivers/usb/core/hub.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c -index 3b7151687776..329073c8ede2 100644 ---- a/drivers/usb/core/hub.c -+++ b/drivers/usb/core/hub.c -@@ -795,7 +795,8 @@ int usb_hub_clear_tt_buffer(struct urb *urb) - * since each TT has "at least two" buffers that can need it (and - * there can be many TTs per hub). even if they're uncommon. - */ -- if ((clear = kmalloc (sizeof *clear, GFP_ATOMIC)) == NULL) { -+ clear = kmalloc(sizeof *clear, GFP_ATOMIC); -+ if (clear == NULL) { - dev_err (&udev->dev, "can't save CLEAR_TT_BUFFER state\n"); - /* FIXME recover somehow ... RESET_TT? */ - return -ENOMEM; --- -2.3.7 - diff --git a/0024-inode.c-move-assignment-out-of-if-block.patch b/0024-inode.c-move-assignment-out-of-if-block.patch deleted file mode 100644 index 29496461b3023e..00000000000000 --- a/0024-inode.c-move-assignment-out-of-if-block.patch +++ /dev/null @@ -1,45 +0,0 @@ -From d6c11e0e4a89f6c5e5b941cd170c3166d72b40e5 Mon Sep 17 00:00:00 2001 -From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -Date: Wed, 29 Apr 2015 16:22:24 +0200 -Subject: [PATCH 24/36] USB: inode.c: move assignment out of if () block - -We should not be doing assignments within an if () block -so fix up the code to not do this. - -change was created using Coccinelle. - -CC: Felipe Balbi <balbi@ti.com> -CC: Al Viro <viro@zeniv.linux.org.uk> -CC: Christoph Hellwig <hch@lst.de> -CC: Peter Chen <peter.chen@freescale.com> -CC: Alan Stern <stern@rowland.harvard.edu> -CC: Andrzej Pietrasiewicz <andrzej.p@samsung.com> -CC: Paul Bolle <pebolle@tiscali.nl> -Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> ---- - drivers/usb/gadget/legacy/inode.c | 9 ++++++--- - 1 file changed, 6 insertions(+), 3 deletions(-) - -diff --git a/drivers/usb/gadget/legacy/inode.c b/drivers/usb/gadget/legacy/inode.c -index 2030565c6789..f454c7af489c 100644 ---- a/drivers/usb/gadget/legacy/inode.c -+++ b/drivers/usb/gadget/legacy/inode.c -@@ -769,9 +769,12 @@ ep_config (struct ep_data *data, const char *buf, size_t len) - if (data->dev->state == STATE_DEV_UNBOUND) { - value = -ENOENT; - goto gone; -- } else if ((ep = data->ep) == NULL) { -- value = -ENODEV; -- goto gone; -+ } else { -+ ep = data->ep; -+ if (ep == NULL) { -+ value = -ENODEV; -+ goto gone; -+ } - } - switch (data->dev->gadget->speed) { - case USB_SPEED_LOW: --- -2.3.7 - diff --git a/0025-ehci-dbg.c-move-assignment-out-of-if-block.patch b/0025-ehci-dbg.c-move-assignment-out-of-if-block.patch deleted file mode 100644 index 7e80dcd23885f3..00000000000000 --- a/0025-ehci-dbg.c-move-assignment-out-of-if-block.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 3737858648328276d4894d33d70adf81d4d8347d Mon Sep 17 00:00:00 2001 -From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -Date: Wed, 29 Apr 2015 16:22:25 +0200 -Subject: [PATCH 25/36] USB: ehci-dbg.c: move assignment out of if () block - -We should not be doing assignments within an if () block -so fix up the code to not do this. - -change was created using Coccinelle. - -CC: Alan Stern <stern@rowland.harvard.edu> -Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> ---- - drivers/usb/host/ehci-dbg.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/drivers/usb/host/ehci-dbg.c b/drivers/usb/host/ehci-dbg.c -index 524cbf26d992..b26b96e25a13 100644 ---- a/drivers/usb/host/ehci-dbg.c -+++ b/drivers/usb/host/ehci-dbg.c -@@ -628,7 +628,8 @@ static ssize_t fill_periodic_buffer(struct debug_buffer *buf) - unsigned i; - __hc32 tag; - -- if (!(seen = kmalloc (DBG_SCHED_LIMIT * sizeof *seen, GFP_ATOMIC))) -+ seen = kmalloc(DBG_SCHED_LIMIT * sizeof *seen, GFP_ATOMIC); -+ if (!seen) - return 0; - seen_count = 0; - --- -2.3.7 - diff --git a/0026-fusbh200-hcd.c-move-assignment-out-of-if-block.patch b/0026-fusbh200-hcd.c-move-assignment-out-of-if-block.patch deleted file mode 100644 index 761041eeb6585b..00000000000000 --- a/0026-fusbh200-hcd.c-move-assignment-out-of-if-block.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 4e4b3ca0b5b8be99c6588e0291dc4bb14275bd88 Mon Sep 17 00:00:00 2001 -From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -Date: Wed, 29 Apr 2015 16:22:27 +0200 -Subject: [PATCH 26/36] USB: fusbh200-hcd.c: move assignment out of if () block - -We should not be doing assignments within an if () block -so fix up the code to not do this. - -change was created using Coccinelle. - -CC: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> -CC: Alan Stern <stern@rowland.harvard.edu> -CC: Petr Mladek <pmladek@suse.cz> -CC: Randy Dunlap <rdunlap@infradead.org> -CC: Felipe Balbi <balbi@ti.com> -CC: Masanari Iida <standby24x7@gmail.com> -Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> ---- - drivers/usb/host/fusbh200-hcd.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/drivers/usb/host/fusbh200-hcd.c b/drivers/usb/host/fusbh200-hcd.c -index 00e492eaba6a..1fd8718a9f11 100644 ---- a/drivers/usb/host/fusbh200-hcd.c -+++ b/drivers/usb/host/fusbh200-hcd.c -@@ -499,7 +499,8 @@ static ssize_t fill_periodic_buffer(struct debug_buffer *buf) - unsigned i; - __hc32 tag; - -- if (!(seen = kmalloc (DBG_SCHED_LIMIT * sizeof *seen, GFP_ATOMIC))) -+ seen = kmalloc(DBG_SCHED_LIMIT * sizeof *seen, GFP_ATOMIC); -+ if (!seen) - return 0; - seen_count = 0; - --- -2.3.7 - diff --git a/0027-isp116x-hcd.c-move-assignment-out-of-if-block.patch b/0027-isp116x-hcd.c-move-assignment-out-of-if-block.patch deleted file mode 100644 index 1baf0716bac0da..00000000000000 --- a/0027-isp116x-hcd.c-move-assignment-out-of-if-block.patch +++ /dev/null @@ -1,33 +0,0 @@ -From fa1a7880be18b26b5cf545feabf444f1f4a1a929 Mon Sep 17 00:00:00 2001 -From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -Date: Wed, 29 Apr 2015 16:22:27 +0200 -Subject: [PATCH 27/36] USB: isp116x-hcd.c: move assignment out of if () block - -We should not be doing assignments within an if () block -so fix up the code to not do this. - -change was created using Coccinelle. - -CC: Olav Kongas <ok@artecdesign.ee> -Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> ---- - drivers/usb/host/isp116x-hcd.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/drivers/usb/host/isp116x-hcd.c b/drivers/usb/host/isp116x-hcd.c -index 13181dcd9820..d089b3fb7a13 100644 ---- a/drivers/usb/host/isp116x-hcd.c -+++ b/drivers/usb/host/isp116x-hcd.c -@@ -500,7 +500,8 @@ static void start_atl_transfers(struct isp116x *isp116x) - if (isp116x->periodic_count) { - isp116x->fmindex = index = - (isp116x->fmindex + 1) & (PERIODIC_SIZE - 1); -- if ((load = isp116x->load[index])) { -+ load = isp116x->load[index]; -+ if (load) { - /* Bring all int transfers for this frame - into the active queue */ - isp116x->atl_active = last_ep = --- -2.3.7 - diff --git a/0028-ohci-dbg.c-move-assignment-out-of-if-block.patch b/0028-ohci-dbg.c-move-assignment-out-of-if-block.patch deleted file mode 100644 index b7a1636476b27a..00000000000000 --- a/0028-ohci-dbg.c-move-assignment-out-of-if-block.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 12ed2c821d231d5e83e9fdccbacfed4b2604994e Mon Sep 17 00:00:00 2001 -From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -Date: Wed, 29 Apr 2015 16:22:28 +0200 -Subject: [PATCH 28/36] USB: ohci-dbg.c: move assignment out of if () block - -We should not be doing assignments within an if () block -so fix up the code to not do this. - -change was created using Coccinelle. - -CC: Alan Stern <stern@rowland.harvard.edu> -Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> ---- - drivers/usb/host/ohci-dbg.c | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/drivers/usb/host/ohci-dbg.c b/drivers/usb/host/ohci-dbg.c -index 04f2186939d2..c3eded317495 100644 ---- a/drivers/usb/host/ohci-dbg.c -+++ b/drivers/usb/host/ohci-dbg.c -@@ -491,7 +491,8 @@ static ssize_t fill_periodic_buffer(struct debug_buffer *buf) - char *next; - unsigned i; - -- if (!(seen = kmalloc (DBG_SCHED_LIMIT * sizeof *seen, GFP_ATOMIC))) -+ seen = kmalloc(DBG_SCHED_LIMIT * sizeof *seen, GFP_ATOMIC); -+ if (!seen) - return 0; - seen_count = 0; - -@@ -506,7 +507,8 @@ static ssize_t fill_periodic_buffer(struct debug_buffer *buf) - /* dump a snapshot of the periodic schedule (and load) */ - spin_lock_irqsave (&ohci->lock, flags); - for (i = 0; i < NUM_INTS; i++) { -- if (!(ed = ohci->periodic [i])) -+ ed = ohci->periodic[i]; -+ if (!ed) - continue; - - temp = scnprintf (next, size, "%2d [%3d]:", i, ohci->load [i]); --- -2.3.7 - diff --git a/0029-ohci-hcd.c-move-assignment-out-of-if-block.patch b/0029-ohci-hcd.c-move-assignment-out-of-if-block.patch deleted file mode 100644 index fedb7526dc328d..00000000000000 --- a/0029-ohci-hcd.c-move-assignment-out-of-if-block.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 9d89910bb254d2686d58aeaa91c818abdae25e52 Mon Sep 17 00:00:00 2001 -From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -Date: Wed, 29 Apr 2015 16:22:28 +0200 -Subject: [PATCH 29/36] USB: ohci-hcd.c: move assignment out of if () block - -We should not be doing assignments within an if () block -so fix up the code to not do this. - -change was created using Coccinelle. - -CC: Alan Stern <stern@rowland.harvard.edu> -Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> ---- - drivers/usb/host/ohci-hcd.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c -index 1dab9dfbca6a..760cb57e954e 100644 ---- a/drivers/usb/host/ohci-hcd.c -+++ b/drivers/usb/host/ohci-hcd.c -@@ -155,7 +155,8 @@ static int ohci_urb_enqueue ( - int retval = 0; - - /* every endpoint has a ed, locate and maybe (re)initialize it */ -- if (! (ed = ed_get (ohci, urb->ep, urb->dev, pipe, urb->interval))) -+ ed = ed_get(ohci, urb->ep, urb->dev, pipe, urb->interval); -+ if (! ed) - return -ENOMEM; - - /* for the private part of the URB we need the number of TDs (size) */ --- -2.3.7 - diff --git a/0030-ohci-q.c-move-assignment-out-of-if-block.patch b/0030-ohci-q.c-move-assignment-out-of-if-block.patch deleted file mode 100644 index ac6cb2be37bd31..00000000000000 --- a/0030-ohci-q.c-move-assignment-out-of-if-block.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 655a7aabfe2c282e713ded9bee60e38bf2cdc7e6 Mon Sep 17 00:00:00 2001 -From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -Date: Wed, 29 Apr 2015 16:22:29 +0200 -Subject: [PATCH 30/36] USB: ohci-q.c: move assignment out of if () block - -We should not be doing assignments within an if () block -so fix up the code to not do this. - -change was created using Coccinelle. - -CC: Alan Stern <stern@rowland.harvard.edu> -Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> ---- - drivers/usb/host/ohci-q.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/drivers/usb/host/ohci-q.c b/drivers/usb/host/ohci-q.c -index 1463c398d322..f7d561ed3c23 100644 ---- a/drivers/usb/host/ohci-q.c -+++ b/drivers/usb/host/ohci-q.c -@@ -407,7 +407,8 @@ static struct ed *ed_get ( - - spin_lock_irqsave (&ohci->lock, flags); - -- if (!(ed = ep->hcpriv)) { -+ ed = ep->hcpriv; -+ if (!ed) { - struct td *td; - int is_out; - u32 info; --- -2.3.7 - diff --git a/0031-sisusb.c-move-assignment-out-of-if-block.patch b/0031-sisusb.c-move-assignment-out-of-if-block.patch deleted file mode 100644 index 3dbad710d12e78..00000000000000 --- a/0031-sisusb.c-move-assignment-out-of-if-block.patch +++ /dev/null @@ -1,144 +0,0 @@ -From 6e547c2240493813cc3bff47ab4b7e82ebf2548f Mon Sep 17 00:00:00 2001 -From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -Date: Wed, 29 Apr 2015 16:22:29 +0200 -Subject: [PATCH 31/36] USB: sisusb.c: move assignment out of if () block - -We should not be doing assignments within an if () block -so fix up the code to not do this. - -change was created using Coccinelle. - -CC: Thomas Winischhofer <thomas@winischhofer.net> -Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> ---- - drivers/usb/misc/sisusbvga/sisusb.c | 39 ++++++++++++++++++++++++------------- - 1 file changed, 26 insertions(+), 13 deletions(-) - -diff --git a/drivers/usb/misc/sisusbvga/sisusb.c b/drivers/usb/misc/sisusbvga/sisusb.c -index 022dc0008f2a..306d6852ebc7 100644 ---- a/drivers/usb/misc/sisusbvga/sisusb.c -+++ b/drivers/usb/misc/sisusbvga/sisusb.c -@@ -2316,10 +2316,12 @@ sisusb_reset_text_mode(struct sisusb_usb_data *sisusb, int init) - /* Set mode 0x03 */ - SiSUSBSetMode(sisusb->SiS_Pr, 0x03); - -- if (!(myfont = find_font("VGA8x16"))) -+ myfont = find_font("VGA8x16"); -+ if (!myfont) - return 1; - -- if (!(tempbuf = vmalloc(8192))) -+ tempbuf = vmalloc(8192); -+ if (!tempbuf) - return 1; - - for (i = 0; i < 256; i++) -@@ -2342,7 +2344,8 @@ sisusb_reset_text_mode(struct sisusb_usb_data *sisusb, int init) - - if (init && !sisusb->scrbuf) { - -- if ((tempbuf = vmalloc(8192))) { -+ tempbuf = vmalloc(8192); -+ if (tempbuf) { - - i = 4096; - tempbufb = (u16 *)tempbuf; -@@ -2417,11 +2420,13 @@ sisusb_open(struct inode *inode, struct file *file) - struct usb_interface *interface; - int subminor = iminor(inode); - -- if (!(interface = usb_find_interface(&sisusb_driver, subminor))) { -+ interface = usb_find_interface(&sisusb_driver, subminor); -+ if (!interface) { - return -ENODEV; - } - -- if (!(sisusb = usb_get_intfdata(interface))) { -+ sisusb = usb_get_intfdata(interface); -+ if (!sisusb) { - return -ENODEV; - } - -@@ -2488,7 +2493,8 @@ sisusb_release(struct inode *inode, struct file *file) - { - struct sisusb_usb_data *sisusb; - -- if (!(sisusb = file->private_data)) -+ sisusb = file->private_data; -+ if (!sisusb) - return -ENODEV; - - mutex_lock(&sisusb->lock); -@@ -2520,7 +2526,8 @@ sisusb_read(struct file *file, char __user *buffer, size_t count, loff_t *ppos) - u16 buf16; - u32 buf32, address; - -- if (!(sisusb = file->private_data)) -+ sisusb = file->private_data; -+ if (!sisusb) - return -ENODEV; - - mutex_lock(&sisusb->lock); -@@ -2662,7 +2669,8 @@ sisusb_write(struct file *file, const char __user *buffer, size_t count, - u16 buf16; - u32 buf32, address; - -- if (!(sisusb = file->private_data)) -+ sisusb = file->private_data; -+ if (!sisusb) - return -ENODEV; - - mutex_lock(&sisusb->lock); -@@ -2805,7 +2813,8 @@ sisusb_lseek(struct file *file, loff_t offset, int orig) - struct sisusb_usb_data *sisusb; - loff_t ret; - -- if (!(sisusb = file->private_data)) -+ sisusb = file->private_data; -+ if (!sisusb) - return -ENODEV; - - mutex_lock(&sisusb->lock); -@@ -2970,7 +2979,8 @@ sisusb_ioctl(struct file *file, unsigned int cmd, unsigned long arg) - long retval = 0; - u32 __user *argp = (u32 __user *)arg; - -- if (!(sisusb = file->private_data)) -+ sisusb = file->private_data; -+ if (!sisusb) - return -ENODEV; - - mutex_lock(&sisusb->lock); -@@ -3084,7 +3094,8 @@ static int sisusb_probe(struct usb_interface *intf, - dev->devnum); - - /* Allocate memory for our private */ -- if (!(sisusb = kzalloc(sizeof(*sisusb), GFP_KERNEL))) { -+ sisusb = kzalloc(sizeof(*sisusb), GFP_KERNEL); -+ if (!sisusb) { - dev_err(&dev->dev, "Failed to allocate memory for private data\n"); - return -ENOMEM; - } -@@ -3093,7 +3104,8 @@ static int sisusb_probe(struct usb_interface *intf, - mutex_init(&(sisusb->lock)); - - /* Register device */ -- if ((retval = usb_register_dev(intf, &usb_sisusb_class))) { -+ retval = usb_register_dev(intf, &usb_sisusb_class); -+ if (retval) { - dev_err(&sisusb->sisusb_dev->dev, "Failed to get a minor for device %d\n", - dev->devnum); - retval = -ENODEV; -@@ -3214,7 +3226,8 @@ static void sisusb_disconnect(struct usb_interface *intf) - struct sisusb_usb_data *sisusb; - - /* This should *not* happen */ -- if (!(sisusb = usb_get_intfdata(intf))) -+ sisusb = usb_get_intfdata(intf); -+ if (!sisusb) - return; - - #ifdef INCL_SISUSB_CON --- -2.3.7 - diff --git a/0032-sisusb_con.c-move-assignment-out-of-if-block.patch b/0032-sisusb_con.c-move-assignment-out-of-if-block.patch deleted file mode 100644 index ae0c6512b9c992..00000000000000 --- a/0032-sisusb_con.c-move-assignment-out-of-if-block.patch +++ /dev/null @@ -1,203 +0,0 @@ -From 55b8ab857bc6f4c2180264aa605a2eeb1296d359 Mon Sep 17 00:00:00 2001 -From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -Date: Wed, 29 Apr 2015 16:22:30 +0200 -Subject: [PATCH 32/36] USB: sisusb_con.c: move assignment out of if () block - -We should not be doing assignments within an if () block -so fix up the code to not do this. - -change was created using Coccinelle. - -CC: Thomas Winischhofer <thomas@winischhofer.net> -Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> ---- - drivers/usb/misc/sisusbvga/sisusb_con.c | 54 ++++++++++++++++++++++----------- - 1 file changed, 36 insertions(+), 18 deletions(-) - -diff --git a/drivers/usb/misc/sisusbvga/sisusb_con.c b/drivers/usb/misc/sisusbvga/sisusb_con.c -index a638c4e9a947..ace343088915 100644 ---- a/drivers/usb/misc/sisusbvga/sisusb_con.c -+++ b/drivers/usb/misc/sisusbvga/sisusb_con.c -@@ -169,7 +169,8 @@ sisusb_get_sisusb_lock_and_check(unsigned short console) - if (in_atomic()) - return NULL; - -- if (!(sisusb = sisusb_get_sisusb(console))) -+ sisusb = sisusb_get_sisusb(console); -+ if (!sisusb) - return NULL; - - mutex_lock(&sisusb->lock); -@@ -214,7 +215,8 @@ sisusbcon_init(struct vc_data *c, int init) - * are set up/restored. - */ - -- if (!(sisusb = sisusb_get_sisusb(c->vc_num))) -+ sisusb = sisusb_get_sisusb(c->vc_num); -+ if (!sisusb) - return; - - mutex_lock(&sisusb->lock); -@@ -277,7 +279,8 @@ sisusbcon_deinit(struct vc_data *c) - * and others, ie not under our control. - */ - -- if (!(sisusb = sisusb_get_sisusb(c->vc_num))) -+ sisusb = sisusb_get_sisusb(c->vc_num); -+ if (!sisusb) - return; - - mutex_lock(&sisusb->lock); -@@ -369,7 +372,8 @@ sisusbcon_putc(struct vc_data *c, int ch, int y, int x) - struct sisusb_usb_data *sisusb; - ssize_t written; - -- if (!(sisusb = sisusb_get_sisusb_lock_and_check(c->vc_num))) -+ sisusb = sisusb_get_sisusb_lock_and_check(c->vc_num); -+ if (!sisusb) - return; - - /* sisusb->lock is down */ -@@ -395,7 +399,8 @@ sisusbcon_putcs(struct vc_data *c, const unsigned short *s, - u16 *dest; - int i; - -- if (!(sisusb = sisusb_get_sisusb_lock_and_check(c->vc_num))) -+ sisusb = sisusb_get_sisusb_lock_and_check(c->vc_num); -+ if (!sisusb) - return; - - /* sisusb->lock is down */ -@@ -433,7 +438,8 @@ sisusbcon_clear(struct vc_data *c, int y, int x, int height, int width) - if (width <= 0 || height <= 0) - return; - -- if (!(sisusb = sisusb_get_sisusb_lock_and_check(c->vc_num))) -+ sisusb = sisusb_get_sisusb_lock_and_check(c->vc_num); -+ if (!sisusb) - return; - - /* sisusb->lock is down */ -@@ -486,7 +492,8 @@ sisusbcon_bmove(struct vc_data *c, int sy, int sx, - if (width <= 0 || height <= 0) - return; - -- if (!(sisusb = sisusb_get_sisusb_lock_and_check(c->vc_num))) -+ sisusb = sisusb_get_sisusb_lock_and_check(c->vc_num); -+ if (!sisusb) - return; - - /* sisusb->lock is down */ -@@ -520,7 +527,8 @@ sisusbcon_switch(struct vc_data *c) - * Returnvalue != 0 naturally means the opposite. - */ - -- if (!(sisusb = sisusb_get_sisusb_lock_and_check(c->vc_num))) -+ sisusb = sisusb_get_sisusb_lock_and_check(c->vc_num); -+ if (!sisusb) - return 0; - - /* sisusb->lock is down */ -@@ -569,7 +577,8 @@ sisusbcon_save_screen(struct vc_data *c) - * buffer. - */ - -- if (!(sisusb = sisusb_get_sisusb_lock_and_check(c->vc_num))) -+ sisusb = sisusb_get_sisusb_lock_and_check(c->vc_num); -+ if (!sisusb) - return; - - /* sisusb->lock is down */ -@@ -602,7 +611,8 @@ sisusbcon_set_palette(struct vc_data *c, unsigned char *table) - if (!CON_IS_VISIBLE(c)) - return -EINVAL; - -- if (!(sisusb = sisusb_get_sisusb_lock_and_check(c->vc_num))) -+ sisusb = sisusb_get_sisusb_lock_and_check(c->vc_num); -+ if (!sisusb) - return -EINVAL; - - /* sisusb->lock is down */ -@@ -637,7 +647,8 @@ sisusbcon_blank(struct vc_data *c, int blank, int mode_switch) - ssize_t written; - int ret = 0; - -- if (!(sisusb = sisusb_get_sisusb_lock_and_check(c->vc_num))) -+ sisusb = sisusb_get_sisusb_lock_and_check(c->vc_num); -+ if (!sisusb) - return 0; - - /* sisusb->lock is down */ -@@ -721,7 +732,8 @@ sisusbcon_scrolldelta(struct vc_data *c, int lines) - - /* The return value does not seem to be used */ - -- if (!(sisusb = sisusb_get_sisusb_lock_and_check(c->vc_num))) -+ sisusb = sisusb_get_sisusb_lock_and_check(c->vc_num); -+ if (!sisusb) - return 0; - - /* sisusb->lock is down */ -@@ -779,7 +791,8 @@ sisusbcon_cursor(struct vc_data *c, int mode) - struct sisusb_usb_data *sisusb; - int from, to, baseline; - -- if (!(sisusb = sisusb_get_sisusb_lock_and_check(c->vc_num))) -+ sisusb = sisusb_get_sisusb_lock_and_check(c->vc_num); -+ if (!sisusb) - return; - - /* sisusb->lock is down */ -@@ -906,7 +919,8 @@ sisusbcon_scroll(struct vc_data *c, int t, int b, int dir, int lines) - if (!lines) - return 1; - -- if (!(sisusb = sisusb_get_sisusb_lock_and_check(c->vc_num))) -+ sisusb = sisusb_get_sisusb_lock_and_check(c->vc_num); -+ if (!sisusb) - return 0; - - /* sisusb->lock is down */ -@@ -1018,7 +1032,8 @@ sisusbcon_set_origin(struct vc_data *c) - * screenbuffer as the origin. - */ - -- if (!(sisusb = sisusb_get_sisusb_lock_and_check(c->vc_num))) -+ sisusb = sisusb_get_sisusb_lock_and_check(c->vc_num); -+ if (!sisusb) - return 0; - - /* sisusb->lock is down */ -@@ -1047,7 +1062,8 @@ sisusbcon_resize(struct vc_data *c, unsigned int newcols, unsigned int newrows, - struct sisusb_usb_data *sisusb; - int fh; - -- if (!(sisusb = sisusb_get_sisusb_lock_and_check(c->vc_num))) -+ sisusb = sisusb_get_sisusb_lock_and_check(c->vc_num); -+ if (!sisusb) - return -ENODEV; - - fh = sisusb->current_font_height; -@@ -1286,7 +1302,8 @@ sisusbcon_font_set(struct vc_data *c, struct console_font *font, - if (font->width != 8 || (charcount != 256 && charcount != 512)) - return -EINVAL; - -- if (!(sisusb = sisusb_get_sisusb_lock_and_check(c->vc_num))) -+ sisusb = sisusb_get_sisusb_lock_and_check(c->vc_num); -+ if (!sisusb) - return -ENODEV; - - /* sisusb->lock is down */ -@@ -1326,7 +1343,8 @@ sisusbcon_font_get(struct vc_data *c, struct console_font *font) - { - struct sisusb_usb_data *sisusb; - -- if (!(sisusb = sisusb_get_sisusb_lock_and_check(c->vc_num))) -+ sisusb = sisusb_get_sisusb_lock_and_check(c->vc_num); -+ if (!sisusb) - return -ENODEV; - - /* sisusb->lock is down */ --- -2.3.7 - diff --git a/0033-uss720.c-move-assignment-out-of-if-block.patch b/0033-uss720.c-move-assignment-out-of-if-block.patch deleted file mode 100644 index f7de59b3a05baa..00000000000000 --- a/0033-uss720.c-move-assignment-out-of-if-block.patch +++ /dev/null @@ -1,43 +0,0 @@ -From eda9a7e388cbf13b7fbabeb7d903f3aae5523944 Mon Sep 17 00:00:00 2001 -From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -Date: Wed, 29 Apr 2015 16:22:32 +0200 -Subject: [PATCH 33/36] USB: uss720.c: move assignment out of if () block - -We should not be doing assignments within an if () block -so fix up the code to not do this. - -change was created using Coccinelle. - -CC: Andy Shevchenko <andriy.shevchenko@linux.intel.com> -Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> ---- - drivers/usb/misc/uss720.c | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/drivers/usb/misc/uss720.c b/drivers/usb/misc/uss720.c -index 588d62a73e1a..bbd029c9c725 100644 ---- a/drivers/usb/misc/uss720.c -+++ b/drivers/usb/misc/uss720.c -@@ -714,7 +714,8 @@ static int uss720_probe(struct usb_interface *intf, - /* - * Allocate parport interface - */ -- if (!(priv = kzalloc(sizeof(struct parport_uss720_private), GFP_KERNEL))) { -+ priv = kzalloc(sizeof(struct parport_uss720_private), GFP_KERNEL); -+ if (!priv) { - usb_put_dev(usbdev); - return -ENOMEM; - } -@@ -723,7 +724,8 @@ static int uss720_probe(struct usb_interface *intf, - kref_init(&priv->ref_count); - spin_lock_init(&priv->asynclock); - INIT_LIST_HEAD(&priv->asynclist); -- if (!(pp = parport_register_port(0, PARPORT_IRQ_NONE, PARPORT_DMA_NONE, &parport_uss720_ops))) { -+ pp = parport_register_port(0, PARPORT_IRQ_NONE, PARPORT_DMA_NONE, &parport_uss720_ops); -+ if (!pp) { - printk(KERN_WARNING "uss720: could not register parport\n"); - goto probe_abort; - } --- -2.3.7 - diff --git a/0034-mon_bin.c-move-assignment-out-of-if-block.patch b/0034-mon_bin.c-move-assignment-out-of-if-block.patch deleted file mode 100644 index 0d0fd75d429794..00000000000000 --- a/0034-mon_bin.c-move-assignment-out-of-if-block.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 5e6c9f9aecf7e9fc69394ebfeff4b7234bd2c9d5 Mon Sep 17 00:00:00 2001 -From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -Date: Wed, 29 Apr 2015 16:22:34 +0200 -Subject: [PATCH 34/36] USB: mon_bin.c: move assignment out of if () block - -We should not be doing assignments within an if () block -so fix up the code to not do this. - -change was created using Coccinelle. - -Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> ---- - drivers/usb/mon/mon_bin.c | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) - -diff --git a/drivers/usb/mon/mon_bin.c b/drivers/usb/mon/mon_bin.c -index 9a62e89d6dc0..3598f1a62673 100644 ---- a/drivers/usb/mon/mon_bin.c -+++ b/drivers/usb/mon/mon_bin.c -@@ -675,7 +675,8 @@ static int mon_bin_open(struct inode *inode, struct file *file) - int rc; - - mutex_lock(&mon_lock); -- if ((mbus = mon_bus_lookup(iminor(inode))) == NULL) { -+ mbus = mon_bus_lookup(iminor(inode)); -+ if (mbus == NULL) { - mutex_unlock(&mon_lock); - return -ENODEV; - } -@@ -1018,8 +1019,8 @@ static long mon_bin_ioctl(struct file *file, unsigned int cmd, unsigned long arg - return -EINVAL; - - size = CHUNK_ALIGN(arg); -- if ((vec = kzalloc(sizeof(struct mon_pgmap) * (size/CHUNK_SIZE), -- GFP_KERNEL)) == NULL) { -+ vec = kzalloc(sizeof(struct mon_pgmap) * (size / CHUNK_SIZE), GFP_KERNEL); -+ if (vec == NULL) { - ret = -ENOMEM; - break; - } --- -2.3.7 - diff --git a/0035-mon_main.c-move-assignment-out-of-if-block.patch b/0035-mon_main.c-move-assignment-out-of-if-block.patch deleted file mode 100644 index e8f517172fca15..00000000000000 --- a/0035-mon_main.c-move-assignment-out-of-if-block.patch +++ /dev/null @@ -1,62 +0,0 @@ -From ed1aa46db7d2fa1b00838fac9ba71e85d22b0931 Mon Sep 17 00:00:00 2001 -From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -Date: Wed, 29 Apr 2015 16:22:36 +0200 -Subject: [PATCH 35/36] USB: mon_main.c: move assignment out of if () block - -We should not be doing assignments within an if () block -so fix up the code to not do this. - -change was created using Coccinelle. - -Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> ---- - drivers/usb/mon/mon_main.c | 12 ++++++++---- - 1 file changed, 8 insertions(+), 4 deletions(-) - -diff --git a/drivers/usb/mon/mon_main.c b/drivers/usb/mon/mon_main.c -index 10405119985c..f7c292f4891e 100644 ---- a/drivers/usb/mon/mon_main.c -+++ b/drivers/usb/mon/mon_main.c -@@ -96,7 +96,8 @@ static void mon_submit(struct usb_bus *ubus, struct urb *urb) - { - struct mon_bus *mbus; - -- if ((mbus = ubus->mon_bus) != NULL) -+ mbus = ubus->mon_bus; -+ if (mbus != NULL) - mon_bus_submit(mbus, urb); - mon_bus_submit(&mon_bus0, urb); - } -@@ -122,7 +123,8 @@ static void mon_submit_error(struct usb_bus *ubus, struct urb *urb, int error) - { - struct mon_bus *mbus; - -- if ((mbus = ubus->mon_bus) != NULL) -+ mbus = ubus->mon_bus; -+ if (mbus != NULL) - mon_bus_submit_error(mbus, urb, error); - mon_bus_submit_error(&mon_bus0, urb, error); - } -@@ -148,7 +150,8 @@ static void mon_complete(struct usb_bus *ubus, struct urb *urb, int status) - { - struct mon_bus *mbus; - -- if ((mbus = ubus->mon_bus) != NULL) -+ mbus = ubus->mon_bus; -+ if (mbus != NULL) - mon_bus_complete(mbus, urb, status); - mon_bus_complete(&mon_bus0, urb, status); - } -@@ -280,7 +283,8 @@ static void mon_bus_init(struct usb_bus *ubus) - { - struct mon_bus *mbus; - -- if ((mbus = kzalloc(sizeof(struct mon_bus), GFP_KERNEL)) == NULL) -+ mbus = kzalloc(sizeof(struct mon_bus), GFP_KERNEL); -+ if (mbus == NULL) - goto err_alloc; - kref_init(&mbus->ref); - spin_lock_init(&mbus->lock); --- -2.3.7 - diff --git a/0036-mon_stat.c-move-assignment-out-of-if-block.patch b/0036-mon_stat.c-move-assignment-out-of-if-block.patch deleted file mode 100644 index c831e083acde08..00000000000000 --- a/0036-mon_stat.c-move-assignment-out-of-if-block.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 912396218c26521b94c90db5ef54ee1ebb829a42 Mon Sep 17 00:00:00 2001 -From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -Date: Wed, 29 Apr 2015 16:22:38 +0200 -Subject: [PATCH 36/36] mon_stat.c: move assignment out of if () block - -We should not be doing assignments within an if () block -so fix up the code to not do this. - -change was created using Coccinelle. - -Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> ---- - drivers/usb/mon/mon_stat.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/drivers/usb/mon/mon_stat.c b/drivers/usb/mon/mon_stat.c -index ebd6189a5014..5388a339cfb8 100644 ---- a/drivers/usb/mon/mon_stat.c -+++ b/drivers/usb/mon/mon_stat.c -@@ -28,7 +28,8 @@ static int mon_stat_open(struct inode *inode, struct file *file) - struct mon_bus *mbus; - struct snap *sp; - -- if ((sp = kmalloc(sizeof(struct snap), GFP_KERNEL)) == NULL) -+ sp = kmalloc(sizeof(struct snap), GFP_KERNEL); -+ if (sp == NULL) - return -ENOMEM; - - mbus = inode->i_private; --- -2.3.7 - diff --git a/csdio2.patch b/csdio2.patch index af44611e9d5b84..8e3e75db3e6601 100644 --- a/csdio2.patch +++ b/csdio2.patch @@ -240,7 +240,7 @@ Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> +connected to different SDIO hosts. --- a/drivers/char/Kconfig +++ b/drivers/char/Kconfig -@@ -611,5 +611,28 @@ config TILE_SROM +@@ -590,5 +590,28 @@ config TILE_SROM source "drivers/char/xillybus/Kconfig" @@ -271,11 +271,14 @@ Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> --- a/drivers/char/Makefile +++ b/drivers/char/Makefile -@@ -62,3 +62,4 @@ js-rtc-y = rtc.o - - obj-$(CONFIG_TILE_SROM) += tile-srom.o - obj-$(CONFIG_XILLYBUS) += xillybus/ +@@ -44,6 +44,7 @@ obj-$(CONFIG_PC8736x_GPIO) += pc8736x_gp + obj-$(CONFIG_NSC_GPIO) += nsc_gpio.o + obj-$(CONFIG_GPIO_TB0219) += tb0219.o + obj-$(CONFIG_TELCLOCK) += tlclk.o +obj-$(CONFIG_MMC_GENERIC_CSDIO) += csdio.o + + obj-$(CONFIG_MWAVE) += mwave/ + obj-y += agp/ --- /dev/null +++ b/drivers/char/csdio.c @@ -0,0 +1,1070 @@ @@ -1,39 +1,7 @@ -0001-iop.c-move-assignment-out-of-if-block.patch -0002-amiserial.c-move-assignment-out-of-if-block.patch -0003-hvc_console.c-move-assignment-out-of-if-block.patch -0004-hvcs.c-move-assignment-out-of-if-block.patch -0005-68328serial.c-move-assignment-out-of-if-block.patch -0006-crisv10.c-move-assignment-out-of-if-block.patch -0007-icom.c-move-assignment-out-of-if-block.patch -0008-ioc3_serial.c-move-assignment-out-of-if-block.patch -0009-ioc4_serial.c-move-assignment-out-of-if-block.patch -0010-mpsc.c-move-assignment-out-of-if-block.patch -0011-synclink.c-move-assignment-out-of-if-block.patch -0012-synclink_gt.c-move-assignment-out-of-if-block.patch -0013-synclinkmp.c-move-assignment-out-of-if-block.patch -0014-tty_buffer.c-move-assignment-out-of-if-block.patch -0015-tty_ldsem.c-move-assignment-out-of-if-block.patch -0016-consolemap.c-move-assignment-out-of-if-block.patch -0017-speedtch.c-move-assignment-out-of-if-block.patch -0018-usbatm.c-move-assignment-out-of-if-block.patch -0019-xusbatm.c-move-assignment-out-of-if-block.patch -0020-usblp.c-move-assignment-out-of-if-block.patch -0021-devio.c-move-assignment-out-of-if-block.patch -0022-hcd.c-move-assignment-out-of-if-block.patch -0023-hub.c-move-assignment-out-of-if-block.patch -0024-inode.c-move-assignment-out-of-if-block.patch -0025-ehci-dbg.c-move-assignment-out-of-if-block.patch -0026-fusbh200-hcd.c-move-assignment-out-of-if-block.patch -0027-isp116x-hcd.c-move-assignment-out-of-if-block.patch -0028-ohci-dbg.c-move-assignment-out-of-if-block.patch -0029-ohci-hcd.c-move-assignment-out-of-if-block.patch -0030-ohci-q.c-move-assignment-out-of-if-block.patch -0031-sisusb.c-move-assignment-out-of-if-block.patch -0032-sisusb_con.c-move-assignment-out-of-if-block.patch -0033-uss720.c-move-assignment-out-of-if-block.patch -0034-mon_bin.c-move-assignment-out-of-if-block.patch -0035-mon_main.c-move-assignment-out-of-if-block.patch -0036-mon_stat.c-move-assignment-out-of-if-block.patch +usb-core-add-missing-license-information.patch + +# broken patch! + csdio2.patch #input-xpad-set-the-leds-properly-on-xbox-wireless-controllers.patch #defer-input-nodes-and-led-support @@ -52,7 +20,6 @@ staging-exfat-truncage_pagecache-api-change.patch staging-exfat-readdir-to-iterate-change.patch staging-exfat-kuid-fixes.patch -xen-disable-clock-timer-when-shutting-down.patch # patches already in my git trees, but still here so I don't loose them. diff --git a/simulate-fake-fn-key-on-ps-2-keyboards-w-o-one-eg.-chromebook-pixel.patch b/simulate-fake-fn-key-on-ps-2-keyboards-w-o-one-eg.-chromebook-pixel.patch index 50e12e96e797a2..e032b0f2987886 100644 --- a/simulate-fake-fn-key-on-ps-2-keyboards-w-o-one-eg.-chromebook-pixel.patch +++ b/simulate-fake-fn-key-on-ps-2-keyboards-w-o-one-eg.-chromebook-pixel.patch @@ -135,10 +135,10 @@ Signed-off-by: Dirk Hohndel <dirk@hohndel.org> + return 1; +} + - static const struct dmi_system_id atkbd_dmi_quirk_table[] __initconst = { - { - .matches = { -@@ -1796,6 +1867,15 @@ static const struct dmi_system_id atkbd_ + /* + * NOTE: do not add any more "force release" quirks to this table. The + * task of adjusting list of keys that should be "released" automatically +@@ -1802,6 +1873,15 @@ static const struct dmi_system_id atkbd_ }, .callback = atkbd_deactivate_fixup, }, diff --git a/staging-exfat-add-filesystem-to-the-build.patch b/staging-exfat-add-filesystem-to-the-build.patch index f16ca496f85f85..941279698080cb 100644 --- a/staging-exfat-add-filesystem-to-the-build.patch +++ b/staging-exfat-add-filesystem-to-the-build.patch @@ -18,19 +18,19 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> --- a/drivers/staging/Kconfig +++ b/drivers/staging/Kconfig -@@ -108,4 +108,6 @@ source "drivers/staging/fbtft/Kconfig" +@@ -104,4 +104,6 @@ source "drivers/staging/i4l/Kconfig" - source "drivers/staging/i2o/Kconfig" + source "drivers/staging/ks7010/Kconfig" +source "drivers/staging/exfat/Kconfig" + endif # STAGING --- a/drivers/staging/Makefile +++ b/drivers/staging/Makefile -@@ -46,3 +46,4 @@ obj-$(CONFIG_UNISYSSPAR) += unisys/ - obj-$(CONFIG_COMMON_CLK_XLNX_CLKWZRD) += clocking-wizard/ - obj-$(CONFIG_FB_TFT) += fbtft/ - obj-$(CONFIG_I2O) += i2o/ +@@ -41,3 +41,4 @@ obj-$(CONFIG_WILC1000) += wilc1000/ + obj-$(CONFIG_MOST) += most/ + obj-$(CONFIG_ISDN_I4L) += i4l/ + obj-$(CONFIG_KS7010) += ks7010/ +obj-$(CONFIG_EXFAT_FS) += exfat/ --- /dev/null +++ b/drivers/staging/exfat/Kconfig diff --git a/usb-core-add-missing-license-information.patch b/usb-core-add-missing-license-information.patch new file mode 100644 index 00000000000000..bcc8a0e9217ba7 --- /dev/null +++ b/usb-core-add-missing-license-information.patch @@ -0,0 +1,159 @@ +From foo@baz Sun Aug 21 16:22:06 CEST 2016 +Date: Sun, 21 Aug 2016 16:22:06 +0200 +To: Greg KH <gregkh@linuxfoundation.org> +From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> +Subject: [PATCH] USB: core: add missing license information + +Some of the USB core files were missing explicit license information. +As all files in the kernel tree are implicitly licensed under the +GPLv2-only, be explicit in case someone get confused looking at +individual files. + +Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> + +--- + drivers/usb/core/buffer.c | 2 ++ + drivers/usb/core/config.c | 2 ++ + drivers/usb/core/driver.c | 2 ++ + drivers/usb/core/endpoint.c | 3 ++- + drivers/usb/core/file.c | 1 + + drivers/usb/core/generic.c | 1 + + drivers/usb/core/hub.c | 1 + + drivers/usb/core/message.c | 2 ++ + drivers/usb/core/notify.c | 1 + + drivers/usb/core/sysfs.c | 1 + + drivers/usb/core/urb.c | 2 ++ + drivers/usb/core/usb.c | 2 ++ + drivers/usb/core/usb.h | 2 ++ + 13 files changed, 21 insertions(+), 1 deletion(-) + +--- a/drivers/usb/core/buffer.c ++++ b/drivers/usb/core/buffer.c +@@ -3,6 +3,8 @@ + * + * This implementation plugs in through generic "usb_bus" level methods, + * and should work with all USB controllers, regardless of bus type. ++ * ++ * Released under the GPLv2 only. + */ + + #include <linux/module.h> +--- a/drivers/usb/core/config.c ++++ b/drivers/usb/core/config.c +@@ -1,3 +1,5 @@ ++/* Released under the GPLv2 only. */ ++ + #include <linux/usb.h> + #include <linux/usb/ch9.h> + #include <linux/usb/hcd.h> +--- a/drivers/usb/core/driver.c ++++ b/drivers/usb/core/driver.c +@@ -15,6 +15,8 @@ + * (usb_device_id matching changes by Adam J. Richter) + * (C) Copyright Greg Kroah-Hartman 2002-2003 + * ++ * Released under the GPLv2 only. ++ * + * NOTE! This is not actually a driver at all, rather this is + * just a collection of helper routines that implement the + * matching, probing, releasing, suspending and resuming for +--- a/drivers/usb/core/endpoint.c ++++ b/drivers/usb/core/endpoint.c +@@ -5,8 +5,9 @@ + * (C) Copyright 2002,2004 IBM Corp. + * (C) Copyright 2006 Novell Inc. + * +- * Endpoint sysfs stuff ++ * Released under the GPLv2 only. + * ++ * Endpoint sysfs stuff + */ + + #include <linux/kernel.h> +--- a/drivers/usb/core/file.c ++++ b/drivers/usb/core/file.c +@@ -13,6 +13,7 @@ + * (usb_device_id matching changes by Adam J. Richter) + * (C) Copyright Greg Kroah-Hartman 2002-2003 + * ++ * Released under the GPLv2 only. + */ + + #include <linux/module.h> +--- a/drivers/usb/core/generic.c ++++ b/drivers/usb/core/generic.c +@@ -15,6 +15,7 @@ + * (usb_device_id matching changes by Adam J. Richter) + * (C) Copyright Greg Kroah-Hartman 2002-2003 + * ++ * Released under the GPLv2 only. + */ + + #include <linux/usb.h> +--- a/drivers/usb/core/hub.c ++++ b/drivers/usb/core/hub.c +@@ -6,6 +6,7 @@ + * (C) Copyright 1999 Gregory P. Smith + * (C) Copyright 2001 Brad Hards (bhards@bigpond.net.au) + * ++ * Released under the GPLv2 only. + */ + + #include <linux/kernel.h> +--- a/drivers/usb/core/message.c ++++ b/drivers/usb/core/message.c +@@ -1,5 +1,7 @@ + /* + * message.c - synchronous message handling ++ * ++ * Released under the GPLv2 only. + */ + + #include <linux/pci.h> /* for scatterlist macros */ +--- a/drivers/usb/core/notify.c ++++ b/drivers/usb/core/notify.c +@@ -6,6 +6,7 @@ + * notifier functions originally based on those in kernel/sys.c + * but fixed up to not be so broken. + * ++ * Released under the GPLv2 only. + */ + + +--- a/drivers/usb/core/sysfs.c ++++ b/drivers/usb/core/sysfs.c +@@ -7,6 +7,7 @@ + * + * All of the sysfs file attributes for usb devices and interfaces. + * ++ * Released under the GPLv2 only. + */ + + +--- a/drivers/usb/core/urb.c ++++ b/drivers/usb/core/urb.c +@@ -1,3 +1,5 @@ ++/* Released under the GPLv2 only. */ ++ + #include <linux/module.h> + #include <linux/string.h> + #include <linux/bitops.h> +--- a/drivers/usb/core/usb.c ++++ b/drivers/usb/core/usb.c +@@ -12,6 +12,8 @@ + * (usb_device_id matching changes by Adam J. Richter) + * (C) Copyright Greg Kroah-Hartman 2002-2003 + * ++ * Released under the GPLv2 only. ++ * + * NOTE! This is not actually a driver at all, rather this is + * just a collection of helper routines that implement the + * generic USB things that the real drivers can use.. +--- a/drivers/usb/core/usb.h ++++ b/drivers/usb/core/usb.h +@@ -1,3 +1,5 @@ ++/* Released under the GPLv2 only. */ ++ + #include <linux/pm.h> + #include <linux/acpi.h> + diff --git a/xen-disable-clock-timer-when-shutting-down.patch b/xen-disable-clock-timer-when-shutting-down.patch deleted file mode 100644 index c1c59384769016..00000000000000 --- a/xen-disable-clock-timer-when-shutting-down.patch +++ /dev/null @@ -1,30 +0,0 @@ -From: Daniel Kiper <dkiper@net-space.pl> -Subject: xen: disable clock timer when shutting down. - -This is needed as some Amazon EC2 machines can't restart the timer -properly in the kexec-ed kernel, as jiffies are not being incremented. - -Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> - ---- - arch/x86/xen/time.c | 8 ++++++++ - 1 file changed, 8 insertions(+) - ---- a/arch/x86/xen/time.c -+++ b/arch/x86/xen/time.c -@@ -289,7 +289,15 @@ static void xen_timerop_set_mode(enum cl - - case CLOCK_EVT_MODE_UNUSED: - case CLOCK_EVT_MODE_SHUTDOWN: -+#if 0 -+ /* -+ * Disabled due to some Amazon EC2 machines are not able to -+ * restart timer properly in crash kernel. If this happens then -+ * it hangs in loop in calibrate_delay_direct() because jiffies -+ * are not incremented. -+ */ - HYPERVISOR_set_timer_op(0); /* cancel timeout */ -+#endif - break; - } - } |