Re: [patch for 4.0] x86: silence warning in /dev/mem support

2015-04-19 Thread Ingo Molnar
* Pavel Machek wrote: > Hi! > > > > CC arch/x86/mm/ioremap.o > > > arch/x86/mm/ioremap.c: In function ‘xlate_dev_mem_ptr’: > > > arch/x86/mm/ioremap.c:363:10: warning: cast to pointer from integer of > > > different size [-Wint-to-pointer-cast] > > > addr = (void *)((unsigned l

Re: [patch for 4.0] x86: silence warning in /dev/mem support

2015-04-17 Thread Pavel Machek
Hi! > > CC arch/x86/mm/ioremap.o > > arch/x86/mm/ioremap.c: In function ‘xlate_dev_mem_ptr’: > > arch/x86/mm/ioremap.c:363:10: warning: cast to pointer from integer of > > different size [-Wint-to-pointer-cast] > > addr = (void *)((unsigned long)addr | (phys & ~PAGE_MASK)); > >

Re: [patch for 4.0] x86: silence warning in /dev/mem support

2015-04-17 Thread Ingo Molnar
* Pavel Machek wrote: > On Thu 2015-04-16 12:09:54, Ingo Molnar wrote: > > > > * Pavel Machek wrote: > > > > > The compiler is right, the code is tricky, but it is also correct > > > AFAICT. > > > > > > Signed-off-by: Pavel Machek > > > > > > diff --git a/arch/x86/mm/ioremap.c b/arch/x86/m

Re: [patch for 4.0] x86: silence warning in /dev/mem support

2015-04-16 Thread Pavel Machek
On Thu 2015-04-16 12:09:54, Ingo Molnar wrote: > > * Pavel Machek wrote: > > > The compiler is right, the code is tricky, but it is also correct > > AFAICT. > > > > Signed-off-by: Pavel Machek > > > > diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c > > index fdf617c..8a8dce8 100644

Re: [patch for 4.0] x86: silence warning in /dev/mem support

2015-04-16 Thread Ingo Molnar
* Pavel Machek wrote: > The compiler is right, the code is tricky, but it is also correct > AFAICT. > > Signed-off-by: Pavel Machek > > diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c > index fdf617c..8a8dce8 100644 > --- a/arch/x86/mm/ioremap.c > +++ b/arch/x86/mm/ioremap.c > @@ -

[patch for 4.0] x86: silence warning in /dev/mem support

2015-04-16 Thread Pavel Machek
The compiler is right, the code is tricky, but it is also correct AFAICT. Signed-off-by: Pavel Machek diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c index fdf617c..8a8dce8 100644 --- a/arch/x86/mm/ioremap.c +++ b/arch/x86/mm/ioremap.c @@ -341,7 +341,7 @@ void *xlate_dev_mem_ptr(phys_