[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1514082821-24256-1-git-send-email-nick.desaulniers@gmail.com>
Date: Sat, 23 Dec 2017 21:33:40 -0500
From: Nick Desaulniers <nick.desaulniers@...il.com>
To: unlisted-recipients:; (no To-header on input)
Cc: Nick Desaulniers <nick.desaulniers@...il.com>,
Minchan Kim <minchan@...nel.org>,
Nitin Gupta <ngupta@...are.org>,
Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>,
linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: [PATCH] zsmalloc: use U suffix for negative literals being shifted
Fixes warnings about shifting unsigned literals being undefined
behavior.
Signed-off-by: Nick Desaulniers <nick.desaulniers@...il.com>
---
mm/zsmalloc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
index 685049a..5d31458 100644
--- a/mm/zsmalloc.c
+++ b/mm/zsmalloc.c
@@ -1056,7 +1056,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 = -1U << OBJ_TAG_BITS;
}
kunmap_atomic(vaddr);
page = next_page;
--
2.7.4
Powered by blists - more mailing lists