Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756171AbdLXCdy (ORCPT ); Sat, 23 Dec 2017 21:33:54 -0500 Received: from mail-ua0-f195.google.com ([209.85.217.195]:43287 "EHLO mail-ua0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750752AbdLXCdw (ORCPT ); Sat, 23 Dec 2017 21:33:52 -0500 X-Google-Smtp-Source: ACJfBov+D+4tc/0ktILhcg7RCA2m3tdd6WDdVwNqn77Hr3POv4zCzL5llgY83IDyItQslImPcyavVw== From: Nick Desaulniers Cc: Nick Desaulniers , Minchan Kim , Nitin Gupta , Sergey Senozhatsky , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH] zsmalloc: use U suffix for negative literals being shifted Date: Sat, 23 Dec 2017 21:33:40 -0500 Message-Id: <1514082821-24256-1-git-send-email-nick.desaulniers@gmail.com> X-Mailer: git-send-email 2.7.4 To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 658 Lines: 23 Fixes warnings about shifting unsigned literals being undefined behavior. Signed-off-by: Nick Desaulniers --- 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