lkml.org 
[lkml]   [2006]   [Jul]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] sched: fix macro -> inline function conversion bug

* Siddha, Suresh B <suresh.b.siddha@intel.com> wrote:

> On Wed, Jul 05, 2006 at 10:02:45PM +0200, Ingo Molnar wrote:
> >
> > * Siddha, Suresh B <suresh.b.siddha@intel.com> wrote:
> >
> > > - if (sd && sd->flags & flag)
> > > + if (sd && !(sd->flags & flag))
> >
> > use test_sd_flag() here, as i did in my fix patch.
> >
> > > -#define test_sd_flag(sd, flag) ((sd && sd->flags & flag) ? 1 : 0)
> > > +#define test_sd_flag(sd, flag) ((sd && (sd->flags & flag)) ? 1 : 0)
> >
> > remove the 'sd' check in test_sd_flag. In the other cases we know that
> > there's an sd. (it's usually a sign of spaghetti code if tests like this
> > include a check for the existence of the object checked)
>
> In other cases, we are passing sd->parent as the first argument to
> test_sd_flag(). We know that there is a 'sd' but not sure about
> sd->parent or sd->child.

ok. But the first issue above should be fixed.

Ingo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-07-05 23:25    [W:0.203 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site