Skip to content

Commit 01a6ad9

Browse files
nickdesaulnierstorvalds
authored andcommitted
zsmalloc: use U suffix for negative literals being shifted
Fix warning about shifting unsigned literals being undefined behavior. Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Nick Desaulniers <[email protected]> Suggested-by: Minchan Kim <[email protected]> Reviewed-by: Sergey Senozhatsky <[email protected]> Cc: Andy Shevchenko <[email protected]> Cc: Matthew Wilcox <[email protected]> Cc: Nick Desaulniers <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 6787c1d commit 01a6ad9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mm/zsmalloc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1047,7 +1047,7 @@ static void init_zspage(struct size_class *class, struct zspage *zspage)
10471047
* Reset OBJ_TAG_BITS bit to last link to tell
10481048
* whether it's allocated object or not.
10491049
*/
1050-
link->next = -1 << OBJ_TAG_BITS;
1050+
link->next = -1UL << OBJ_TAG_BITS;
10511051
}
10521052
kunmap_atomic(vaddr);
10531053
page = next_page;

0 commit comments

Comments
 (0)