]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
kgdboc: Fix restrict error
authorLaura Abbott <labbott@redhat.com>
Mon, 10 Sep 2018 23:20:14 +0000 (16:20 -0700)
committerSultan Alsawaf <sultan.alsawaf@canonical.com>
Wed, 24 Jul 2019 15:45:01 +0000 (09:45 -0600)
commitef9a6976c156eb3b02532daf2ebfbbd8eaf6819e
treed43d1b3f5d41f036da10b2f46b41111bfabe8e47
parent416c90919f4b535f5797a66235d23278c8ee7d5f
kgdboc: Fix restrict error

BugLink: https://bugs.launchpad.net/bugs/1837161
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>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/tty/serial/kgdboc.c