]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
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)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 18 Jun 2021 13:02:22 +0000 (15:02 +0200)
BugLink: https://bugs.launchpad.net/bugs/1931158
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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
arch/x86/lib/msr-smp.c

index fee8b9c0520c9954e3cf9093332e1a9b53009b8b..9009393f44c78214b2290320af33baf60b134111 100644 (file)
@@ -253,7 +253,7 @@ static void __wrmsr_safe_regs_on_cpu(void *info)
        rv->err = wrmsr_safe_regs(rv->regs);
 }
 
-int rdmsr_safe_regs_on_cpu(unsigned int cpu, u32 *regs)
+int rdmsr_safe_regs_on_cpu(unsigned int cpu, u32 regs[8])
 {
        int err;
        struct msr_regs_info rv;
@@ -266,7 +266,7 @@ int rdmsr_safe_regs_on_cpu(unsigned int cpu, u32 *regs)
 }
 EXPORT_SYMBOL(rdmsr_safe_regs_on_cpu);
 
-int wrmsr_safe_regs_on_cpu(unsigned int cpu, u32 *regs)
+int wrmsr_safe_regs_on_cpu(unsigned int cpu, u32 regs[8])
 {
        int err;
        struct msr_regs_info rv;