lkml.org 
[lkml]   [2010]   [Jun]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [announce] smatch 1.54
Date
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


\
 
 \ /
  Last update: 2010-06-02 21:23    [W:0.044 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site