On Fri, Jun 11, 2021 at 4:45 AM Zhang, Qiang <[email protected]> wrote:
>
>
>
> ________________________________________
> From: Bruce Ashfield <[email protected]>
> Sent: Friday, 11 June 2021 11:27
> To: Zhang, Qiang
> Cc: [email protected]
> 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.

Sounds good.

I've sent .42 for merging, so let's see if it stays fixed.

I won't do any more with this patch until you ping and let me know it
is needed. (or if I see the warning myself).

Bruce

>
> 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 [email protected] wrote:
>
> > From: Zqiang <[email protected]>
> >
> > 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 <[email protected]>
> > ---
> >  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
> >



-- 
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#9956): 
https://lists.yoctoproject.org/g/linux-yocto/message/9956
Mute This Topic: https://lists.yoctoproject.org/mt/83412264/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to