________________________________________ From: Bruce Ashfield <bruce.ashfi...@gmail.com> Sent: Friday, 11 June 2021 11:27 To: Zhang, Qiang Cc: linux-yocto@lists.yoctoproject.org Subject: Re: [linux-yocto] [linux-yocto v5.10] [PATCH] x86: Fix warning: argument 2 of type 'u32 *' {aka 'unsigned int *'} declared as a pointer
[Please note: This e-mail is from an EXTERNAL e-mail address] >Can we get a bit more information in the commit log ? > >I assume this is for v5.10/standard/base ? if so, what commit >introduced the warning ? We should log that commit ID and >shortlog in this fixup. Hello Bruce This warning appear in v5.10.38, but in v5.10.41 I didn't find it, I'll keep track. Thanks Qiang > >Bruce In message: [linux-yocto] [linux-yocto v5.10] [PATCH] x86: Fix warning: argument 2 of type 'u32 *' {aka 'unsigned int *'} declared as a pointer on 09/06/2021 qiang.zh...@windriver.com wrote: > From: Zqiang <qiang.zh...@windriver.com> > > arch/x86/lib/msr-smp.c:256:51: warning: argument 2 of type > 'u32 *' {aka 'unsigned int *'} declared as a pointer > [-Warray-parameter=] > 256 | 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]'} > 347 | int rdmsr_safe_regs_on_cpu(unsigned int cpu, u32 regs[8]) > > arch/x86/lib/msr-smp.c:269:51: warning: argument 2 of type > 'u32 *' {aka 'unsigned int *'} declared as a pointer [-Warray-parameter=] > 269 | int wrmsr_safe_regs_on_cpu(unsigned int cpu, u32 *regs) > > arch/x86/include/asm/msr.h:348:50: note: previously declared > as an array 'u32[8]' {aka 'unsigned int[8]'} > 348 | int wrmsr_safe_regs_on_cpu(unsigned int cpu, u32 regs[8]) > > Signed-off-by: Zqiang <qiang.zh...@windriver.com> > --- > arch/x86/include/asm/msr.h | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/arch/x86/include/asm/msr.h b/arch/x86/include/asm/msr.h > index e16cccdd0420..08eb0a72163a 100644 > --- a/arch/x86/include/asm/msr.h > +++ b/arch/x86/include/asm/msr.h > @@ -344,8 +344,8 @@ int rdmsr_safe_on_cpu(unsigned int cpu, u32 msr_no, u32 > *l, u32 *h); > int wrmsr_safe_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h); > int rdmsrl_safe_on_cpu(unsigned int cpu, u32 msr_no, u64 *q); > int wrmsrl_safe_on_cpu(unsigned int cpu, u32 msr_no, u64 q); > -int rdmsr_safe_regs_on_cpu(unsigned int cpu, u32 regs[8]); > -int wrmsr_safe_regs_on_cpu(unsigned int cpu, u32 regs[8]); > +int rdmsr_safe_regs_on_cpu(unsigned int cpu, u32 *regs); > +int wrmsr_safe_regs_on_cpu(unsigned int cpu, u32 *regs); > #else /* CONFIG_SMP */ > static inline int rdmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h) > { > @@ -394,11 +394,11 @@ static inline int wrmsrl_safe_on_cpu(unsigned int cpu, > u32 msr_no, u64 q) > { > return wrmsrl_safe(msr_no, q); > } > -static inline int rdmsr_safe_regs_on_cpu(unsigned int cpu, u32 regs[8]) > +static inline int rdmsr_safe_regs_on_cpu(unsigned int cpu, u32 *regs) > { > return rdmsr_safe_regs(regs); > } > -static inline int wrmsr_safe_regs_on_cpu(unsigned int cpu, u32 regs[8]) > +static inline int wrmsr_safe_regs_on_cpu(unsigned int cpu, u32 *regs) > { > return wrmsr_safe_regs(regs); > } > -- > 2.29.2 >
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#9953): https://lists.yoctoproject.org/g/linux-yocto/message/9953 Mute This Topic: https://lists.yoctoproject.org/mt/83412264/21656 Group Owner: linux-yocto+ow...@lists.yoctoproject.org Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-