Received: by 10.192.165.156 with SMTP id m28csp973036imm; Wed, 18 Apr 2018 01:31:37 -0700 (PDT) X-Google-Smtp-Source: AIpwx48S8btMMpS5CiEQsr4NIL9LdnJeLIhBpfehH1osvfJDsJ0w62HibyBVxA9eJ+Nq67FbBLg6 X-Received: by 10.99.99.196 with SMTP id x187mr1023275pgb.154.1524040297695; Wed, 18 Apr 2018 01:31:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524040297; cv=none; d=google.com; s=arc-20160816; b=e3gO3VlteGysCCbbXCkz/EJE9/4FaWdUSAWB5XfONInCR3t9bZk4oT8hkNUaoqy8kN NfucovaA5LdEJatkECGNOR2p5rAlT5tC8G76Oar2TjshRmutDHj0HryxT8Y0fs/6Ozcs QxWbr1iACsWFXWoj/O10Y0/ye9NQ+NAK309aqI15c01JOwhkDpFsjpA0cdCpUveAJPSF Hh1L5QnD32cywScCSE2L7jyW9Gg4GlPst8CuEB/OEzrxbjY7GY+rOFYEm60forrv4ikJ ihYOjionRBNHhDk9Y414pVoPNCLSZIxWJYyMBpZlFDobZkuZeRatTjszNiKbna+Zhrnt 9UzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=fShr17tGJEr4zjuE4sIgUZgSYH/NFlll0ylkAXt0A9U=; b=fdbObohzv9M0qCC1MX2p0d/qd02rpMABK051W2MpXU08BVl9ILhf3n605YoFQhki2S 0Sgw71o3DmEHRyXGs/LY9/lGk8q5q1L49JWwec2NRQaGJq1AHl8U8ffwPeVhjcaiXyPi qIH9RRr8iaspHvDIBxuVwUbG40k/z3KJLGQjqUmBuwy/EeypH1YkyiI5kT/2vqxKnlbm oSO0HqoOh8gP08K6Krt9SQ5RuNJllRfyCaEDwI1vlLWs70CELoik6IvcSn7gLg2BgrGL 0BNN7rppP6a1GzHqZFkxBVaAswzMnA7R5JLbpU1eCsLs4Qwne9YUix3PfSX/xjUgFD4u q0Ag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=DN2WxoPm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id j4-v6si784501plt.58.2018.04.18.01.31.23; Wed, 18 Apr 2018 01:31:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=DN2WxoPm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1753362AbeDRIaT (ORCPT + 99 others); Wed, 18 Apr 2018 04:30:19 -0400 Received: from mail-wr0-f182.google.com ([209.85.128.182]:45843 "EHLO mail-wr0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753080AbeDRIaR (ORCPT ); Wed, 18 Apr 2018 04:30:17 -0400 Received: by mail-wr0-f182.google.com with SMTP id u11-v6so2349042wri.12; Wed, 18 Apr 2018 01:30:16 -0700 (PDT) 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:user-agent; bh=fShr17tGJEr4zjuE4sIgUZgSYH/NFlll0ylkAXt0A9U=; b=DN2WxoPmHAOwrcSQx/JL+BFAE1BX8nOnA0xcdQSL4m8wZfzpZQGRSHEic6/n/bNDNr UkwuAyN1dOfhg61wmtevgT3PoRm4UZFGsCLYiLYg7V6sFSUByNHDEZE9Oh9qCk9jVFeV q5vpi41RhozGufcnE8WvxUri1ZhOjzpRa9docuQwxDotveLoSjN/H5ceJ9LAN7w5+bhJ SVZQSblb91X3Sy47GRmYtOnaNP+ncBy+ItVDeMk/V2O/lSRoitQw0yTe0TTVSLF1+M8F ZOfAd5VgLm4Y/7i9BOXDYS4hiXQOCL17ZmRcYPbppkmA1hYlohaUGsrTUrC4Nihz3VL1 op6g== 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:user-agent; bh=fShr17tGJEr4zjuE4sIgUZgSYH/NFlll0ylkAXt0A9U=; b=f1Ec4fvfZyd/AFIJj05dGsK2KCwdojPeocGxwsePaFHK+b72iys9MXkqrXB4lCh1JJ Kvxv5rhSSqaBh8KCWKf3uiA6ejR+Kc6l7287d4LVnzyeB5f/AB/tWJDwllHFjcT0Ttag GfGNW4dunUBTOD77NHlWsC431zGiSGvKaDDjSz/ap7gGkvynPQylTtslVtftWSJVrrqy u+gHzzp79uea4jAuaMsRYdXC7IoejkhVbdlzDLAmSi37EiX7heK8TJL2tAI/tc7N7Bpx Ob6asm0meRpbI15Tj9WK07IwvPTQgM6fctZESg+fkeQ8tU95mWfl7OCFqbTBExSzRVxU yorQ== X-Gm-Message-State: ALQs6tAWlWWhPCAqIj4PCQmmVGQhFIqFbVc/79KAMqn2OO1M2u88fG1B hCYu96/MtiBrSnRGpeeh4XOCIBkV X-Received: by 10.80.231.5 with SMTP id a5mr1952978edn.109.1524040215774; Wed, 18 Apr 2018 01:30:15 -0700 (PDT) Received: from ltop.local ([2a02:a03f:4028:3a00:154:aa49:332:cecc]) by smtp.gmail.com with ESMTPSA id b43sm750745edc.34.2018.04.18.01.30.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 18 Apr 2018 01:30:15 -0700 (PDT) Date: Wed, 18 Apr 2018 10:30:13 +0200 From: Luc Van Oostenryck To: Martin Wilck Cc: Linus Torvalds , "Martin K. Petersen" , Linux SCSI List , Linux Kernel Mailing List , Hannes Reinecke , James Bottomley , Xose Vazquez Perez , Bart Van Assche , Ard Biesheuvel , Thomas Gleixner , Jonathan Corbet , Randy Dunlap Subject: Re: [PATCH v3 1/6] ilog2: create truly constant version for sparse Message-ID: <20180418083012.3r4z7lwojgpw2lws@ltop.local> References: <20180417233511.6573-1-mwilck@suse.com> <20180417233511.6573-2-mwilck@suse.com> <1524039174.3028.24.camel@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1524039174.3028.24.camel@suse.com> User-Agent: NeoMutt/20180323 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 18, 2018 at 10:12:54AM +0200, Martin Wilck wrote: > On Tue, 2018-04-17 at 17:07 -0700, Linus Torvalds wrote: > > On Tue, Apr 17, 2018 at 4:35 PM, Martin Wilck > > wrote: > > > Sparse emits errors about ilog2() in array indices because of the > > > use of > > > __ilog2_32() and __ilog2_64(), > > > > If sparse warns about it, then presumably gcc with -Wvla warns about > > it too? > > No, it doesn't (gcc 7.3.0). -> https://paste.opensuse.org/27471594 > It doesn't even warn on an expression like this: > > #define SIZE (1<<10) > static int foo[ilog2(SIZE)]; > > sparse 0.5.2 doesn't warn about that either. It emits "error: bad > integer constant expression" only if ilog2 is used in an array sparse supports VLAs at syntaxic level but not much more. Anything needing directly or indirectly the array size will give this error. -- Luc Van Oostenryck