mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2024-12-28 16:52:18 +00:00
x86/xen: Remove undefined behavior in setup_features()
1 << 31 is undefined. So switch to 1U << 31.
Fixes: 5ead97c84f
("xen: Core Xen implementation")
Signed-off-by: Julien Grall <jgrall@amazon.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Link: https://lore.kernel.org/r/20220617103037.57828-1-julien@xen.org
Signed-off-by: Juergen Gross <jgross@suse.com>
This commit is contained in:
parent
f9710c357e
commit
ecb6237fa3
@ -42,7 +42,7 @@ void xen_setup_features(void)
|
||||
if (HYPERVISOR_xen_version(XENVER_get_features, &fi) < 0)
|
||||
break;
|
||||
for (j = 0; j < 32; j++)
|
||||
xen_features[i * 32 + j] = !!(fi.submap & 1<<j);
|
||||
xen_features[i * 32 + j] = !!(fi.submap & 1U << j);
|
||||
}
|
||||
|
||||
if (xen_pv_domain()) {
|
||||
|
Loading…
Reference in New Issue
Block a user