generic: fix compiler error in OpenWrt's kexec patch
authorDaniel Golle <daniel@makrotopia.org>
Sat, 4 Jan 2020 09:47:50 +0000 (11:47 +0200)
committerDaniel Golle <daniel@makrotopia.org>
Sat, 4 Jan 2020 14:23:21 +0000 (16:23 +0200)
commitf64c64a91c86e07a9d34ff268df77b9625e11bd1
tree0d511a8b9acb0788540337582bb52e853ad21257
parente98e046f06f388e49c12e52b3a333a7e77c008cd
generic: fix compiler error in OpenWrt's kexec patch

330-MIPS-kexec-Accept-command-line-parameters-from-users.patch causes
problems when building with -Werror=unused-result.

arch/mips/kernel/machine_kexec.c: In function 'machine_kexec_init_argv':
arch/mips/kernel/machine_kexec.c:76:2: error: ignoring return value of 'copy_from_user', declared with attribute warn_unused_result [-Werror=unused-result]
  copy_from_user(kexec_argv_buf, buf, size);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

Fix this by handling the return value in an appropriate way.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
target/linux/generic/pending-4.14/330-MIPS-kexec-Accept-command-line-parameters-from-users.patch
target/linux/generic/pending-4.19/330-MIPS-kexec-Accept-command-line-parameters-from-users.patch
target/linux/generic/pending-4.9/330-MIPS-kexec-Accept-command-line-parameters-from-users.patch