Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp2196348pxb; Sat, 21 Nov 2020 12:30:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJxOno5PmmS3veFUfBkZWa6L0upt0YOvy65O7GXIjbTICUkCbxCcIyzeF1G2GO2YdOShASip X-Received: by 2002:a50:af65:: with SMTP id g92mr25923625edd.273.1605990635530; Sat, 21 Nov 2020 12:30:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605990635; cv=none; d=google.com; s=arc-20160816; b=xYI6Q/R0eeS1Eb1weHcDId/vV+HFcncrPhph3DL8lQVh5iXuiyZWI0GBUBWFk5EfUN RbvJAZI4T2mIP8CAhSOZZvjDKCpKay3z3CDqDwzco8jj5ehWzC6W+k9OIvw8X18e3UGt ba6TVrlsHTY1ymNW0aOT5rh8ldi/j0usTFPtGzh3MCh3RCYtI9XNbOSrf9YOyfAmWLfS KoKibiRsT7JWJreSO1xRnK/Xh+GcLAL/lce/AlE03t3c4+6OUhuenMm6OJGCzv2UqdcN gEMDg4jnUclU9GikPGRXEwDR+5BNfBTN7R7LW1CElqS2egpGALDK+xRWBiLCPd/3QVB+ vzuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=cIlxWROZ/jX5ijD+ybZzGsb8o4y9rDeaqVRFhgzbx8g=; b=VWzN1wEY8XN7j6lImTcrAL1euIbZ+UMXq8NmHHji7bYny59sdqixaTC0uJQzTPnG6n SLmBWqx0aeFMroDl5RBa8PdXBP22uY/g/tSP24bLbBfdOcM8HkuvKph0hNmIJtLENKSo X0GZqFtK6bcRS4BBYgCqEIpErnFjldOO9WQRJcqg35OygVoloYrc+WsnSukQHAqyNDBS c7Dcuf2xWBCxK8cuQN0JEXq60VLbZNM+nPphn4Xe8QfSHDOOJTVfdVpeH1jiBSAKTmTN ZAQ5JBgnc30Hn00XYpfYOZZoSUBDQEz2J+7tUy5PlHZUZrPz/33FLIsfw3rBtMILtwsY f6Jg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=msdPTscN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v14si3883813edb.336.2020.11.21.12.29.58; Sat, 21 Nov 2020 12:30:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=msdPTscN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728472AbgKUUXP (ORCPT + 99 others); Sat, 21 Nov 2020 15:23:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54094 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728402AbgKUUXO (ORCPT ); Sat, 21 Nov 2020 15:23:14 -0500 Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3902CC0613CF for ; Sat, 21 Nov 2020 12:23:14 -0800 (PST) Received: by mail-wr1-x441.google.com with SMTP id m6so14438261wrg.7 for ; Sat, 21 Nov 2020 12:23:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=cIlxWROZ/jX5ijD+ybZzGsb8o4y9rDeaqVRFhgzbx8g=; b=msdPTscNk+AowY88OkPMriDrcY+kF7FKyh51+fIQt2YRMsFqgoC2B0Q7SghAW7fT/C jrP/M2DObSziClBGpkgg+e2qhbZn4Ct9QkrE8jhnhay0L/x9DQU9QVUGsxVyDLmdzJWZ OdVipyqu8GK95LKmXuZ/Almi6C+07psKaH147C3rD/7P7XsTZHwn4VGeo9N9yzpjS5BG 413wcAJVO/L2qfAVRM3mYyT2e2sTgH07RHdQ0ljKQxS52EJIuVW7HYXdq+WnZGeO7rvJ woqFiepWAxd1AVvJqkLXFie0JU1hkelaSUhv9ouw4YRyNZMZCyTCyLN1TotYM5oYaBsk SD4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=cIlxWROZ/jX5ijD+ybZzGsb8o4y9rDeaqVRFhgzbx8g=; b=dfdBraHxGVVGhaf3W83udsCpX6GEIdl7sOyAJfQ9BClTxtnHVxFStL2oAmSVUqTplh DJ01YEXl6+cadhp0RXngJwMC3ZhwplN4PEPMY6e9fBUeSUOFNWcnymNlj/PHMPy4wYpu HLtNNqJCAjkIdcdclstF3xKvyJQ8M3qcUhVOBT4A0Fxz2igy5A2bskDUly69wh5C3/Bf EMMxkDtQh+E84kX5KMcS2pfQavkJpyLip6BT7JGCppwbK1YH9HJlXisVLary53wmkDDs IUVESJ6RHuilYagN1TEKQN+6YzhUFXyueoM/eB3oDaTqc9Lut+AiFzFBIhlnsDDA4RM7 XpZw== X-Gm-Message-State: AOAM533ilB/G7gP6LfTHry37zVnAlH3/a6OBiDcd69bX5aPooCFAZdkx 6PcfwBCg9AYG5wAQ/b80Kbg= X-Received: by 2002:adf:f3d1:: with SMTP id g17mr23804900wrp.156.1605990191909; Sat, 21 Nov 2020 12:23:11 -0800 (PST) Received: from ltop.local ([2a02:a03f:b7fe:f700:dcb6:7e9c:ccbf:c450]) by smtp.gmail.com with ESMTPSA id v189sm8821276wmg.14.2020.11.21.12.23.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Nov 2020 12:23:11 -0800 (PST) Date: Sat, 21 Nov 2020 21:23:10 +0100 From: Luc Van Oostenryck To: Peter Zijlstra Cc: Andrew Morton , Linus Torvalds , linux-kernel@vger.kernel.org, christophe.leroy@csgroup.eu, Jakub Jelinek , rdunlap@infradead.org Subject: Re: [PATCH] ilog2: Improve ilog2 for constant arguments Message-ID: <20201121202310.lx2iqqebal3fmmmo@ltop.local> References: <20201120125154.GB3040@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201120125154.GB3040@hirez.programming.kicks-ass.net> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 20, 2020 at 01:51:54PM +0100, Peter Zijlstra wrote: > > Other option would be to change the const_ilog2 macro, though as the > description says it is meant to be used also in C constant expressions, > and while GCC will fold it to constant with constant argument even in > those, perhaps it is better to avoid using extensions in that case. Just for info, the description is outdated and Sparse is just fine with __builtin_clzll() and friends in constant expressions (since Feb 2017) -- Luc