Skip to content

Commit b91c092

Browse files
committed
x86/fpu: Cleanup variable shadowing
Addresses: warning: Local variable 'mask' shadows outer variable Remove extra variable declaration and switch the bit mask assignment to use BIT_ULL() while at it. Fixes: 522e927 ("x86/fpu: Deduplicate copy_uabi_from_user/kernel_to_xstate()") Reported-by: kernel test robot <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Link: https://lore.kernel.org/lkml/[email protected]
1 parent 8ad7e8f commit b91c092

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/kernel/fpu/xstate.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1233,7 +1233,7 @@ static int copy_uabi_to_xstate(struct fpstate *fpstate, const void *kbuf,
12331233
}
12341234

12351235
for (i = 0; i < XFEATURE_MAX; i++) {
1236-
u64 mask = ((u64)1 << i);
1236+
mask = BIT_ULL(i);
12371237

12381238
if (hdr.xfeatures & mask) {
12391239
void *dst = __raw_xsave_addr(xsave, i);

0 commit comments

Comments
 (0)