Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c4597fd7 authored by Dan Carpenter's avatar Dan Carpenter Committed by Ingo Molnar
Browse files

x86/apic/uv: Silence a shift wrapping warning



'm_io' is stored in 6 bits so it's a number in the 0-63 range.  Static
analysis tools complain that 1 << 63 will wrap so I have changed it to
1ULL << m_io.

This code is over three years old so presumably the bug doesn't happen
very frequently in real life or someone would have complained by now.

Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Cc: Alex Thorlton <athorlton@sgi.com>
Cc: Dimitri Sivanich <sivanich@sgi.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Travis <travis@sgi.com>
Cc: Nathan Zimmer <nzimmer@sgi.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: kernel-janitors@vger.kernel.org
Fixes: b15cc4a1 ("x86, uv, uv3: Update x2apic Support for SGI UV3")
Link: http://lkml.kernel.org/r/20161123221908.GA23997@mwanda


Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent 7b2dd368
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -815,9 +815,9 @@ static __init void map_mmioh_high_uv3(int index, int min_pnode, int max_pnode)
				l = li;
			}
			addr1 = (base << shift) +
				f * (unsigned long)(1 << m_io);
				f * (1ULL << m_io);
			addr2 = (base << shift) +
				(l + 1) * (unsigned long)(1 << m_io);
				(l + 1) * (1ULL << m_io);
			pr_info("UV: %s[%03d..%03d] NASID 0x%04x ADDR 0x%016lx - 0x%016lx\n",
				id, fi, li, lnasid, addr1, addr2);
			if (max_io < l)