Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757083AbdLXDYl (ORCPT ); Sat, 23 Dec 2017 22:24:41 -0500 Received: from bombadil.infradead.org ([65.50.211.133]:57139 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752087AbdLXDYj (ORCPT ); Sat, 23 Dec 2017 22:24:39 -0500 Date: Sat, 23 Dec 2017 19:24:37 -0800 From: Matthew Wilcox To: Nick Desaulniers Cc: Minchan Kim , Nitin Gupta , Sergey Senozhatsky , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] zsmalloc: use U suffix for negative literals being shifted Message-ID: <20171224032437.GB5273@bombadil.infradead.org> References: <1514082821-24256-1-git-send-email-nick.desaulniers@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1514082821-24256-1-git-send-email-nick.desaulniers@gmail.com> User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 402 Lines: 13 On Sat, Dec 23, 2017 at 09:33:40PM -0500, Nick Desaulniers wrote: > Fixes warnings about shifting unsigned literals being undefined > behavior. Do you mean signed literals? > */ > - link->next = -1 << OBJ_TAG_BITS; > + link->next = -1U << OBJ_TAG_BITS; > } I don't understand what -1U means. Seems like a contradiction in terms, a negative unsigned number. Is this supposed to be ~0U?