lkml.org 
[lkml]   [2013]   [Jan]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: coccinelle and bitmask arithmetic (was: Re: [patch] TTY: synclink, small cleanup in dtr_rts())
On Tue, Jan 29, 2013 at 05:19:43PM +0100, Julia Lawall wrote:
> If the definition of a bitmask is an identifier in all capital letters,
> that would be easy. Another possibility is such an identifier that is
> defined to a value expressed beginning with 0x. Another possibility is
> such an identifier that is sometimes used with & and | and sometimes used
> with an arithmetic operation. I will give them a try.
>

Oddly enough, this thread started because I wrote a script to do
this in Smatch. It turns out not as useful as I had hoped, so I
wasn't planning to push it.

Anyway, I've gzipped it and attached it. It's 350k because it has
a list of 50k macros which were used as bit masks. Hopefully, it's
helpful.

It generates 350 warnings, but they are almost all false positives.
I have sent two patches based on the output.

regards,
dan carpenter

[unhandled content-type:application/octet-stream]
\
 
 \ /
  Last update: 2013-01-29 19:02    [W:0.318 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site