diff options
author | Nick Desaulniers <nick.desaulniers@gmail.com> | 2018-02-01 01:20:15 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-02-01 02:18:39 +0100 |
commit | 01a6ad9ac80c9b861f63087f81e696f47b481168 (patch) | |
tree | d610f38680edb77a16ec3b15f59a8ea45c1cb245 /mm/zsmalloc.c | |
parent | mm/page_owner.c: clean up init_pages_in_zone() (diff) | |
download | linux-01a6ad9ac80c9b861f63087f81e696f47b481168.tar.xz linux-01a6ad9ac80c9b861f63087f81e696f47b481168.zip |
zsmalloc: use U suffix for negative literals being shifted
Fix warning about shifting unsigned literals being undefined behavior.
Link: http://lkml.kernel.org/r/1515642078-4259-1-git-send-email-nick.desaulniers@gmail.com
Signed-off-by: Nick Desaulniers <nick.desaulniers@gmail.com>
Suggested-by: Minchan Kim <minchan@kernel.org>
Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Nick Desaulniers <nick.desaulniers@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to '')
-rw-r--r-- | mm/zsmalloc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c index f797d8b0d820..c3013505c305 100644 --- a/mm/zsmalloc.c +++ b/mm/zsmalloc.c @@ -1047,7 +1047,7 @@ static void init_zspage(struct size_class *class, struct zspage *zspage) * Reset OBJ_TAG_BITS bit to last link to tell * whether it's allocated object or not. */ - link->next = -1 << OBJ_TAG_BITS; + link->next = -1UL << OBJ_TAG_BITS; } kunmap_atomic(vaddr); page = next_page; |