All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch for 4.0] x86: silence warning in /dev/mem support
@ 2015-04-16  8:04 Pavel Machek
  2015-04-16 10:09 ` Ingo Molnar
  2015-04-20 10:13 ` [tip:x86/urgent] x86/mm: Clean up types in xlate_dev_mem_ptr() tip-bot for Ingo Molnar
  0 siblings, 2 replies; 7+ messages in thread
From: Pavel Machek @ 2015-04-16  8:04 UTC (permalink / raw)
  To: tglx, mingo, hpa, jgross, roland, akpm, linux-kernel

The compiler is right, the code is tricky, but it is also correct
AFAICT.

Signed-off-by: Pavel Machek <pavel@ucw.cz>

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_addr_t phys)
 
 	addr = (void __force *)ioremap_cache(start, PAGE_SIZE);
 	if (addr)
-		addr = (void *)((unsigned long)addr | (phys & ~PAGE_MASK));
+		addr = (void *)((unsigned long)addr | (unsigned long) (phys & ~PAGE_MASK));
 
 	return addr;
 }


-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-04-20 10:13 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-16  8:04 [patch for 4.0] x86: silence warning in /dev/mem support Pavel Machek
2015-04-16 10:09 ` Ingo Molnar
2015-04-16 10:15   ` Pavel Machek
2015-04-17  8:39     ` Ingo Molnar
2015-04-17  8:48       ` Pavel Machek
2015-04-20  6:52         ` Ingo Molnar
2015-04-20 10:13 ` [tip:x86/urgent] x86/mm: Clean up types in xlate_dev_mem_ptr() tip-bot for Ingo Molnar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.