linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@poochiereds.net>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: linux-kernel@vger.kernel.org, linux-sparse@vger.kernel.org,
	Jeff Layton <jlayton@primarydata.com>
Subject: Re: [PATCH][RFC] err.h: silence sparse warning: dereference of noderef expression
Date: Wed, 11 Jun 2014 07:06:32 -0400	[thread overview]
Message-ID: <20140611070632.639e07ce@f20.localdomain> (raw)
In-Reply-To: <20140611052040.GM5500@mwanda>

On Wed, 11 Jun 2014 08:45:18 +0300
Dan Carpenter <dan.carpenter@oracle.com> wrote:

> On Tue, Jun 10, 2014 at 05:38:49PM -0400, Jeff Layton wrote:
> > From: Jeff Layton <jlayton@primarydata.com>
> > 
> > Lately, when I do a make with C=1, I get *tons* of these warnings:
> > 
> >     include/linux/err.h:35:16: warning: dereference of noderef expression
> >     include/linux/err.h:30:23: warning: dereference of noderef expression
> 
> Which version of Sparse, which version of the kernel and which .c file
> can I compile to reproduce this?
> 
> I built fs/cifs/ and I didn't see the sparse warning.
> 
> regards,
> dan carpenter
> 

$ rpm -q sparse
sparse-0.5.0-1.fc20.x86_64

I see it all over the tree, but an easy example is fs/locks.c:

$ make fs/locks.o C=1
make[1]: Nothing to be done for `all'.
make[1]: Nothing to be done for `relocs'.
  CHK     include/config/kernel.release
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
  CALL    scripts/checksyscalls.sh
  CHECK   fs/locks.c
include/linux/err.h:35:16: warning: dereference of noderef expression
include/linux/err.h:30:23: warning: dereference of noderef expression
include/linux/err.h:35:16: warning: dereference of noderef expression
include/linux/err.h:30:23: warning: dereference of noderef expression
  CC      fs/locks.o

It has two IS_ERR calls and two PTR_ERR calls, and each generates the
warning.

-- 
Jeff Layton <jlayton@poochiereds.net>

  reply	other threads:[~2014-06-11 11:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-10 21:38 [PATCH][RFC] err.h: silence sparse warning: dereference of noderef expression Jeff Layton
2014-06-11  5:45 ` Dan Carpenter
2014-06-11 11:06   ` Jeff Layton [this message]
2014-06-11 13:11     ` Dan Carpenter
2014-06-11 13:51       ` Jeff Layton
2014-06-12  8:06         ` Vitaly Osipov
2014-06-13 12:05           ` Jeff Layton
2014-06-13 15:56             ` Josh Triplett
2014-06-14 13:44               ` Jeff Layton
2014-06-14 14:05                 ` Vitaly Osipov
2014-06-14 16:47                   ` Jeff Layton

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=20140611070632.639e07ce@f20.localdomain \
    --to=jlayton@poochiereds.net \
    --cc=dan.carpenter@oracle.com \
    --cc=jlayton@primarydata.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sparse@vger.kernel.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).