]> git.itanic.dy.fi Git - linux-stable/commit
x86/msr: Fix wr/rdmsr_safe_regs_on_cpu() prototypes
authorArnd Bergmann <arnd@arndb.de>
Mon, 22 Mar 2021 16:45:36 +0000 (17:45 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 22 May 2021 08:57:41 +0000 (10:57 +0200)
commitcf083054389fd974368eeab1d50600b4d9c794e4
tree9872cad5e255f18f21a89569f39e4cb43365e94a
parent08250f2920c93aaa946292f122b6190337940230
x86/msr: Fix wr/rdmsr_safe_regs_on_cpu() prototypes

commit 396a66aa1172ef2b78c21651f59b40b87b2e5e1e upstream.

gcc-11 warns about mismatched prototypes here:

  arch/x86/lib/msr-smp.c:255:51: error: argument 2 of type ‘u32 *’ {aka ‘unsigned int *’} declared as a pointer [-Werror=array-parameter=]
    255 | int rdmsr_safe_regs_on_cpu(unsigned int cpu, u32 *regs)
        |                                              ~~~~~^~~~
  arch/x86/include/asm/msr.h:347:50: note: previously declared as an array ‘u32[8]’ {aka ‘unsigned int[8]’}

GCC is right here - fix up the types.

[ mingo: Twiddled the changelog. ]

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20210322164541.912261-1-arnd@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/lib/msr-smp.c