Re: [PATCH v2 09/12] mips: fix warnings from CPHYSADDR() macro

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, May 21, 2018 at 05:11:09PM +0200, Sam Ravnborg wrote:
> On Mon, May 21, 2018 at 02:54:35PM +0300, Peter Mamonov wrote:
> > Signed-off-by: Peter Mamonov <pmamonov@xxxxxxxxx>
> > ---
> >  arch/mips/include/asm/addrspace.h | 5 +++++
> >  1 file changed, 5 insertions(+)
> > 
> > diff --git a/arch/mips/include/asm/addrspace.h b/arch/mips/include/asm/addrspace.h
> > index dc44d7f79..688620472 100644
> > --- a/arch/mips/include/asm/addrspace.h
> > +++ b/arch/mips/include/asm/addrspace.h
> > @@ -48,7 +48,12 @@
> >  /*
> >   * Returns the physical address of a CKSEGx / XKPHYS address
> >   */
> > +#ifdef CONFIG_ARCH_DMA_ADDR_T_64BIT
> > +#define CPHYSADDR(a)		((_ACAST64_(a)) & 0x1fffffff)
> > +#else
> >  #define CPHYSADDR(a)		((_ACAST32_(a)) & 0x1fffffff)
> > +#endif
> > +
> >  #define XPHYSADDR(a)            ((_ACAST64_(a)) &			\
> >  				 _CONST64_(0x000000ffffffffff))
> 
> If the above cast to phys_addr_t then no ifdef is required?

Probably, yet Linux uses those _ACAST*_ macros... I have to dig a little bit to
find why and how. Let's skip this this patch for a while since it just fixes a
warning and there are much more of them when you build for 64 bit MIPS...

Regards,
Peter

> 
> 	Sam

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux