Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754088AbeAGPEm (ORCPT + 1 other); Sun, 7 Jan 2018 10:04:42 -0500 Received: from mail-wr0-f195.google.com ([209.85.128.195]:39920 "EHLO mail-wr0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752986AbeAGPEk (ORCPT ); Sun, 7 Jan 2018 10:04:40 -0500 X-Google-Smtp-Source: ACJfBottF/mmR5V5LNLgC+qUYmjeG3WovP9d8w/MLDhxJpXJw+OsvkmEPttgGzICu97ZFlc+dh2idKWJOBM4EpOnDwY= MIME-Version: 1.0 In-Reply-To: <1514082821-24256-1-git-send-email-nick.desaulniers@gmail.com> References: <1514082821-24256-1-git-send-email-nick.desaulniers@gmail.com> From: Minchan Kim Date: Mon, 8 Jan 2018 00:04:38 +0900 X-Google-Sender-Auth: GkDIoLvIxasf-Tq5L4DY7JqwY6Q Message-ID: Subject: Re: [PATCH] zsmalloc: use U suffix for negative literals being shifted To: Nick Desaulniers Cc: Nitin Gupta , Sergey Senozhatsky , linux-mm , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: Hello, Sorry for the delay. I have missed this until now. ;-( On Sun, Dec 24, 2017 at 11:33 AM, Nick Desaulniers wrote: > 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; -1UL? Please, resend it with including Andrew Morton who merges zsmalloc patch into his tree. Thanks.