From: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
To: Steve French <smfrench@gmail.com>
Cc: Paulo Alcantara <paulo@paulo.ac>,
David Howells <dhowells@redhat.com>,
LKML <linux-kernel@vger.kernel.org>,
linux-sparse@vger.kernel.org, CIFS <linux-cifs@vger.kernel.org>
Subject: Re: Many unexpected warnings with current sparse
Date: Wed, 2 Oct 2019 03:35:38 +0200 [thread overview]
Message-ID: <20191002013537.2bfopy3ke5kkmqep@desk.local> (raw)
In-Reply-To: <CAH2r5mtzAgcJTrGuderq4DEHBXtPujcQ8DWJUzM0w=hHX8WbJQ@mail.gmail.com>
On Tue, Oct 01, 2019 at 08:24:45PM -0500, Steve French wrote:
> On Tue, Oct 1, 2019 at 7:19 PM Luc Van Oostenryck
> <luc.vanoostenryck@gmail.com> wrote:
> >
> > On Tue, Oct 01, 2019 at 06:14:23PM -0500, Steve French wrote:
> > > It may be related to the following sparse make warning:
> > >
> > > No rule to make target
> > > '/usr/include/x86_64-linux-gnu/bits/huge_val.h', needed by
> > > 'sparse-llvm.o'
> > >
> > > I don't see huge_val.h in the Ubuntu 19 version of libc6-dev
> >
> > Yes, I've been bitten myself by this. It's fixed since a little while.
> > So, just doing a clean build or removing all the deps (.*.d)
> > should allow you to build sparse.
> >
> > I've verified the problem with asm and __inline in quota.h:
> > it's autodetected by kconfig (CC_HAS_ASM_INLINE) so the exact config
> > doesn't matter (only gcc's version does) but in all cases recent
> > versions of sparse don't have a problem with it
>
> Removed the dependencies and rebuilt as you suggested and it worked ...
> and even better ... with the noise removed I now see two real bugs
Ahh, good!
> (endian conversion missing on two lines) and only one possible problem
> with sparse/gcc itself
>
> Sparse now flags this line from one of Paulo's DFS features merged last year:
>
> struct smb_vol fake_vol = {0};
>
> with
>
> "warning: Using plain integer as NULL pointer"
>
> What is the recommended way to initialize a struct to avoid the sparse warning?
Well, personally, I simply use '{}'. GCC and sparse are happy with it but, IIRC,
it's not allowed by the standard...
> And what about the "namespace" warnings from the fscache (cache.o)
> code that now show up? I hadn't seen those before.
> Any easy way to remove them?
>
> "WARNING: module cifs uses symbol sigprocmask from namespace
> fs/cifs/cache.o: $(deps_/home/sfrench/cifs-2.6/fs/cifs/cache.o), but
> does not import it."
This one is not from sparse, it's from modpost (see EXPORT_SYMBOL_NS).
Cheers,
-- Luc
prev parent reply other threads:[~2019-10-02 1:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAH2r5mspD=iMnO-CuyHMf3jmS0zm7fbqNOXe0cqMcKsXfLAu-Q@mail.gmail.com>
2019-10-01 23:10 ` Many unexpected warnings with current sparse Luc Van Oostenryck
2019-10-01 23:14 ` Steve French
2019-10-02 0:19 ` Luc Van Oostenryck
2019-10-02 1:24 ` Steve French
2019-10-02 1:35 ` Luc Van Oostenryck [this message]
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=20191002013537.2bfopy3ke5kkmqep@desk.local \
--to=luc.vanoostenryck@gmail.com \
--cc=dhowells@redhat.com \
--cc=linux-cifs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sparse@vger.kernel.org \
--cc=paulo@paulo.ac \
--cc=smfrench@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;
as well as URLs for NNTP newsgroup(s).