lkml.org 
[lkml]   [2006]   [Sep]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] mpparse.c:231: warning: comparison is always false
On Fri, 15 Sep 2006 10:11:23 +0200
Jarek Poplawski <jarkao2@o2.pl> wrote:

> On Thu, Sep 14, 2006 at 06:17:54PM -0700, Andrew Morton wrote:
> > On Wed, 13 Sep 2006 08:50:10 +0200
> > Jarek Poplawski <jarkao2@o2.pl> wrote:
> >
> > > Hello,
> > >
> > > Probably after 2.6.18-rc6-git1 there is this cc warning:
> > > "arch/i386/kernel/mpparse.c:231: warning: comparison is
> > > always false due to limited range of data type".
> > > Maybe this patch will be helpful.
> > >
> >
> > Thanks. Andi has already queued a similar patch.
> >
> > Andi, you might as well scoot that upstream, otherwise we'll get lots of
> > emails about it.
> ...
> > > +#if 0xFF >= MAX_MP_BUSSES
> > > if (m->mpc_busid >= MAX_MP_BUSSES) {
>
> As a matter of fact today I think my patch is wrong.

No, I think it's OK. Well, you had an off-by-one...

> I don't know how Andi has fixed it,

Same thing. (He has `#if MAX_MP_BUSSES < 256').

> but after rethinking
> the question of Dave Jones I see it's fixing the result
> instead of the source of a problem (char or not char).

The mpc_busid field is set to eight-bits by BIOS; there's nothing we can do
about that...

-
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-09-15 10:25    [W:0.582 / U:0.212 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site