linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] zsmalloc: use U suffix for negative literals being shifted
@ 2017-12-24  2:33 Nick Desaulniers
  2017-12-24  3:24 ` Matthew Wilcox
  2018-01-07 15:04 ` Minchan Kim
  0 siblings, 2 replies; 10+ messages in thread
From: Nick Desaulniers @ 2017-12-24  2:33 UTC (permalink / raw)
  Cc: Nick Desaulniers, Minchan Kim, Nitin Gupta, Sergey Senozhatsky,
	linux-mm, linux-kernel

Fixes warnings about shifting unsigned literals being undefined
behavior.

Signed-off-by: Nick Desaulniers <nick.desaulniers@gmail.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

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2018-01-11  7:06 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-24  2:33 [PATCH] zsmalloc: use U suffix for negative literals being shifted Nick Desaulniers
2017-12-24  3:24 ` Matthew Wilcox
2017-12-24  3:28   ` Nick Desaulniers
2018-01-06 20:40     ` Nick Desaulniers
2018-01-07 15:04 ` Minchan Kim
2018-01-07 23:02   ` Andy Shevchenko
2018-01-09  4:35     ` Nick Desaulniers
2018-01-10  5:53       ` Minchan Kim
2018-01-11  3:41         ` [PATCH v2] " Nick Desaulniers
2018-01-11  7:06           ` Sergey Senozhatsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).