From: Hans Verkuil <hverkuil@xs4all.nl>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Christopher Li <sparse@chrisli.org>,
Linux-Sparse <linux-sparse@vger.kernel.org>,
Linux Media Mailing List <linux-media@vger.kernel.org>
Subject: Re: sparse: ARRAY_SIZE and sparse array initialization
Date: Sun, 30 Mar 2014 19:03:48 +0200 [thread overview]
Message-ID: <53384E74.1050307@xs4all.nl> (raw)
In-Reply-To: <CA+55aFy8y6ctXcc8qcqVkRDAL=ZWU0DAfuZ4zQcP6uqzPmb-AA@mail.gmail.com>
On 03/30/2014 06:48 PM, Linus Torvalds wrote:
> On Sun, Mar 30, 2014 at 5:03 AM, Hans Verkuil <hverkuil@xs4all.nl> wrote:
>>
>> which is clearly a sparse bug somewhere.
>
> Yes. What is going on is that we create separate symbols for each
> declaration, and we tie them all together (and warn if they have
> conflicting types).
>
> But then when we look up a symbol, we only look at the latest one, so
> when we size the array, we look at that "extern" declaration, and
> don't see the size that was created with the initializer.
>
> I'll think about how to fix it cleanly. Expect a patch shortly.
Great!
Tomorrow I'll try to write test cases for the two other sparse problems
I found.
Regards,
Hans
next prev parent reply other threads:[~2014-03-30 17:03 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-15 12:09 sparse: ARRAY_SIZE and sparse array initialization Hans Verkuil
2014-03-15 12:12 ` Hans Verkuil
2014-03-28 10:50 ` Hans Verkuil
2014-03-30 6:10 ` Christopher Li
2014-03-30 12:03 ` Hans Verkuil
2014-03-30 16:48 ` Linus Torvalds
2014-03-30 17:03 ` Hans Verkuil [this message]
2014-03-30 17:16 ` Christopher Li
2014-03-30 17:24 ` Linus Torvalds
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=53384E74.1050307@xs4all.nl \
--to=hverkuil@xs4all.nl \
--cc=linux-media@vger.kernel.org \
--cc=linux-sparse@vger.kernel.org \
--cc=sparse@chrisli.org \
--cc=torvalds@linux-foundation.org \
/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;
as well as URLs for NNTP newsgroup(s).