mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Roland Dreier <rdreier@cisco.com>
To: Dan Carpenter <error27@gmail.com>
Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [announce] smatch 1.54
Date: Wed, 02 Jun 2010 12:20:46 -0700	[thread overview]
Message-ID: <adahblls0kx.fsf@roland-alpha.cisco.com> (raw)
In-Reply-To: <20100109085325.GE7840@bicker> (Dan Carpenter's message of "Sat, 9 Jan 2010 11:53:25 +0300")

Hi Dan,

I'm trying out smatch on some kernel code now.  Neat stuff, but I'm
seeing some puzzling false positives relating to signedness.  Basically,
if I have code like:

	__be16 foo;
	__u16 bar;

	foo = cpu_to_be16(128);
	bar = cpu_to_be16(128);

then the first line warns about 32768 not fitting into foo, but while
the second line doesn't warn, even though __be16 is just a __bitwise__
__u16.  I don't understand the sparse / smatch internals so I'm not sure
why applying __bitwise__ apparently kills the unsigned modifier.  Maybe
it's an easy fix for you?  Otherwise I'll poke at it a little later.

Thanks,
  Roland
-- 
Roland Dreier <rolandd@cisco.com> || For corporate legal information go to:
http://www.cisco.com/web/about/doing_business/legal/cri/index.html

  reply	other threads:[~2010-06-02 19:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-09  8:53 Dan Carpenter
2010-06-02 19:20 ` Roland Dreier [this message]
2010-06-02 20:41   ` Dan Carpenter
2010-06-03  5:27     ` Roland Dreier

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=adahblls0kx.fsf@roland-alpha.cisco.com \
    --to=rdreier@cisco.com \
    --cc=error27@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@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

Powered by JetHome