]> git.itanic.dy.fi Git - linux-stable/commit
kgdboc: Fix restrict error
authorLaura Abbott <labbott@redhat.com>
Mon, 10 Sep 2018 23:20:14 +0000 (16:20 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Dec 2018 08:21:30 +0000 (09:21 +0100)
commitfa8d814aba4a53fab1b6d2cbc8575a8132fc10df
tree3a0380c997ad3199d02ac5cac584e41bb45da656
parent81ff3e2f640f664582f982d6f3e2e4deacb04e81
kgdboc: Fix restrict error

commit 2dd453168643d9475028cd867c57e65956a0f7f9 upstream.

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>
drivers/tty/serial/kgdboc.c