Message ID | 20220617103037.57828-1-julien@xen.org (mailing list archive) |
---|---|
State | Accepted |
Commit | ecb6237fa397b7b810d798ad19322eca466dbab1 |
Headers | show |
Series | x86/xen: Remove undefined behavior in setup_features() | expand |
On 17.06.22 12:30, Julien Grall wrote: > From: Julien Grall <jgrall@amazon.com> > > 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> Juergen
On 17.06.22 12:30, Julien Grall wrote: > From: Julien Grall <jgrall@amazon.com> > > 1 << 31 is undefined. So switch to 1U << 31. > > Fixes: 5ead97c84fa7 ("xen: Core Xen implementation") > Signed-off-by: Julien Grall <jgrall@amazon.com> Pushed to xen/tip.git for-linus-5.19a Juergen
diff --git a/drivers/xen/features.c b/drivers/xen/features.c index 7b591443833c..87f1828d40d5 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()) {