From: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
To: Martin Wilck <mwilck@suse.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
Linux SCSI List <linux-scsi@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Hannes Reinecke <hare@suse.de>,
James Bottomley <jejb@linux.vnet.ibm.com>,
Xose Vazquez Perez <xose.vazquez@gmail.com>,
Bart Van Assche <Bart.VanAssche@sandisk.com>,
Ard Biesheuvel <ard.biesheuvel@linaro.org>,
Thomas Gleixner <tglx@linutronix.de>,
Jonathan Corbet <corbet@lwn.net>,
Randy Dunlap <rdunlap@infradead.org>
Subject: Re: [PATCH v3 1/6] ilog2: create truly constant version for sparse
Date: Wed, 18 Apr 2018 10:30:13 +0200 [thread overview]
Message-ID: <20180418083012.3r4z7lwojgpw2lws@ltop.local> (raw)
In-Reply-To: <1524039174.3028.24.camel@suse.com>
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 <mwilck@suse.com>
> > 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
next prev parent reply other threads:[~2018-04-18 8:30 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-17 23:35 [PATCH v3 0/6] scsi: handle special return codes for ABORTED COMMAND Martin Wilck
2018-04-17 23:35 ` [PATCH v3 1/6] ilog2: create truly constant version for sparse Martin Wilck
2018-04-18 0:07 ` Linus Torvalds
2018-04-18 8:12 ` Martin Wilck
2018-04-18 8:30 ` Luc Van Oostenryck [this message]
2018-04-18 21:21 ` Linus Torvalds
2018-04-19 8:19 ` Rasmus Villemoes
2018-04-17 23:35 ` [PATCH v3 2/6] scsi: use const_ilog2 for array indices Martin Wilck
2018-04-17 23:35 ` [PATCH v3 3/6] scsi: devinfo: change blist_flag_t to 64bit Martin Wilck
2018-04-17 23:35 ` [PATCH v3 4/6] scsi: devinfo: warn on undefined blist flags Martin Wilck
2018-04-17 23:35 ` [PATCH v3 5/6] scsi: devinfo: add BLIST_RETRY_ITF for EMC Symmetrix Martin Wilck
2018-04-17 23:35 ` [PATCH v3 6/6] scsi: devinfo: BLIST_RETRY_ASC_C1 for Fujitsu ETERNUS Martin Wilck
2018-04-20 23:15 ` [PATCH v3 0/6] scsi: handle special return codes for ABORTED COMMAND Martin K. Petersen
2018-04-23 9:33 ` Martin Wilck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180418083012.3r4z7lwojgpw2lws@ltop.local \
--to=luc.vanoostenryck@gmail.com \
--cc=Bart.VanAssche@sandisk.com \
--cc=ard.biesheuvel@linaro.org \
--cc=corbet@lwn.net \
--cc=hare@suse.de \
--cc=jejb@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=mwilck@suse.com \
--cc=rdunlap@infradead.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=xose.vazquez@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®