aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/xen
diff options
context:
space:
mode:
authorJulien Grall <jgrall@amazon.com>2022-06-17 11:30:37 +0100
committerJuergen Gross <jgross@suse.com>2022-06-21 16:36:11 +0200
commitecb6237fa397b7b810d798ad19322eca466dbab1 (patch)
treeac1a1ed213bc53aacff2846986aefbbffba72958 /drivers/xen
parentf9710c357e5bbf64d7ce45ba0bc75a52222491c1 (diff)
downloadlinux-ecb6237fa397b7b810d798ad19322eca466dbab1.tar.gz
x86/xen: Remove undefined behavior in setup_features()
1 << 31 is undefined. So switch to 1U << 31. Fixes: 5ead97c84fa7 ("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>
Diffstat (limited to 'drivers/xen')
-rw-r--r--drivers/xen/features.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/xen/features.c b/drivers/xen/features.c
index 7b591443833c9..87f1828d40d5e 100644
--- a/drivers/xen/features.c
+++ b/drivers/xen/features.c
@@ -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()) {