Re: [PATCH] i386, nmi: signed vs unsigned mixup

From: Andrew Morton
Date: Sat Nov 19 2005 - 20:08:36 EST


Jesper Juhl <jesper.juhl@xxxxxxxxx> wrote:
>
> > -ETOOTRIVIAL. The code as-is works OK, and we have these sorts of things
> > all over the tee.
> >
> Fair enough.
>
> Would a patch to clean this sort of stuff up in bulk all over be of
> interrest or should I just leave it alone?

Such a patchset would be pretty intrusive and it's not exactly trivial - at
each site we need to decide whether we should be using signed or unsigned,
then change one or the other, then do a full-scope check to see what the
implications of that change are.

I think the two risks of signedness sloppiness are a) inadvertent or
premature overflow and b) comparisons, where the signed quantity went
negative.

Problem b) is more serious, and `gcc -Wsigned-compare' may be used to
identify possible problems. There are quite a lot of places need checking,
iirc.

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