lkml.org 
[lkml]   [2009]   [Jul]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] kmemcheck: fix sparse warning
From
Date
On Wed, 2009-07-08 at 21:28 +0200, Vegard Nossum wrote:

> > #define kmemcheck_annotate_bitfield(ptr, name) \
> > - do if (ptr) { \
> > + do { if (ptr) { \
> > int _n = (long) &((ptr)->name##_end) \
> > - (long) &((ptr)->name##_begin); \
> > BUILD_BUG_ON(_n < 0); \
> > \
> > kmemcheck_mark_initialized(&((ptr)->name##_begin), _n); \
> > - } while (0)
> > + } } while (0)
> >
> > #define kmemcheck_annotate_variable(var) \
> > do { \
> >
> >
> >
>
> I'll change the patch title to "kmemcheck: work around bogus sparse
> warning" and fix the indentation, sounds ok?

Well, it's debatable whether it's bogus or not, but I don't care as long
as it gets fixed.

> Meanwhile, I Cced sparse mailing list in case somebody else knows
> anything else about this warning (what it means, whether it's
> justified in this case, whether it should be fixed in sparse, etc.).

Everybody take me off the CC please then :) This has been discussed far
too many times already. In this special case, the warning probably isn't
all that useful, but ISTR Linus saying that he wanted it this way.

johannes
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2009-07-08 21:43    [W:0.122 / U:1.360 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site