Home Home > GIT Browse > SLE15-AZURE
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-02-14 11:57:30 +0100
committerTakashi Iwai <tiwai@suse.de>2019-02-14 11:57:31 +0100
commit3aab6bcc22ca7e9eb08be8d2b842b4cc94043b02 (patch)
tree14ff00b5eda0f0359b704448032c163d6437e677
parent48b9214a34c5db0a9e97f6249c1f79da43d9a0f9 (diff)
kgdboc: Fix restrict error (bsc#1051510).
-rw-r--r--patches.fixes/kgdboc-Fix-restrict-error.patch57
-rw-r--r--series.conf1
2 files changed, 58 insertions, 0 deletions
diff --git a/patches.fixes/kgdboc-Fix-restrict-error.patch b/patches.fixes/kgdboc-Fix-restrict-error.patch
new file mode 100644
index 0000000000..02eb006cc8
--- /dev/null
+++ b/patches.fixes/kgdboc-Fix-restrict-error.patch
@@ -0,0 +1,57 @@
+From 2dd453168643d9475028cd867c57e65956a0f7f9 Mon Sep 17 00:00:00 2001
+From: Laura Abbott <labbott@redhat.com>
+Date: Mon, 10 Sep 2018 16:20:14 -0700
+Subject: [PATCH] kgdboc: Fix restrict error
+Mime-version: 1.0
+Content-type: text/plain; charset=UTF-8
+Content-transfer-encoding: 8bit
+Git-commit: 2dd453168643d9475028cd867c57e65956a0f7f9
+Patch-mainline: v4.20-rc1
+References: bsc#1051510
+
+There's an error when compiled with restrict:
+
+Drivers/tty/serial/kgdboc.c: In function ‘configure_kgdboc’:
+drivers/tty/serial/kgdboc.c:137:2: error: ‘strcpy’ source argument is the same
+as destination [-Werror=restrict]
+ strcpy(config, opt);
+ ^~~~~~~~~~~~~~~~~~~
+
+As the error implies, this is from trying to use config as both source and
+destination. Drop the call to the function where config is the argument
+since nothing else happens in the function.
+
+Signed-off-by: Laura Abbott <labbott@redhat.com>
+Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Acked-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ drivers/tty/serial/kgdboc.c | 6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+
+diff --git a/drivers/tty/serial/kgdboc.c b/drivers/tty/serial/kgdboc.c
+index 371357d5e216..e9a83bb5bee5 100644
+--- a/drivers/tty/serial/kgdboc.c
++++ b/drivers/tty/serial/kgdboc.c
+@@ -162,15 +162,13 @@ static int configure_kgdboc(void)
+ {
+ struct tty_driver *p;
+ int tty_line = 0;
+- int err;
++ int err = -ENODEV;
+ char *cptr = config;
+ struct console *cons;
+
+- err = kgdboc_option_setup(config);
+- if (err || !strlen(config) || isspace(config[0]))
++ if (!strlen(config) || isspace(config[0]))
+ goto noconfig;
+
+- err = -ENODEV;
+ kgdboc_io_ops.is_console = 0;
+ kgdb_tty_driver = NULL;
+
+--
+2.16.4
+
diff --git a/series.conf b/series.conf
index 63f7c6fbdb..603c9afa67 100644
--- a/series.conf
+++ b/series.conf
@@ -19341,6 +19341,7 @@
patches.drivers/iio-ad5064-Fix-regulator-handling.patch
patches.drivers/staging-comedi-ni_mio_common-protect-register-write-.patch
patches.drivers/kgdboc-Passing-ekgdboc-to-command-line-causes-panic.patch
+ patches.fixes/kgdboc-Fix-restrict-error.patch
patches.drivers/serial-8250-Fix-clearing-FIFOs-in-RS485-mode-again.patch
patches.drivers/sc16is7xx-Fix-for-multi-channel-stall.patch
patches.drivers/tty-wipe-buffer.patch