6.5.7(5): The result of E1 >> E2 is E1 right-shifted E2 bit positions. ... If E1 has a signed type and a negative value, the resulting value is implementation defined.
So, cast -1 to unsigned type to make result well-defined. Signed-off-by: Alexey Dobriyan <[EMAIL PROTECTED]> --- drivers/atm/ambassador.c | 2 +- drivers/atm/firestream.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) --- a/drivers/atm/ambassador.c +++ b/drivers/atm/ambassador.c @@ -972,7 +972,7 @@ static int make_rate (unsigned int rate, } case round_up: { // check all bits that we are discarding - if (man & (-1>>9)) { + if (man & ((unsigned int)-1>>9)) { man = (man>>(32-9)) + 1; if (man == (1<<9)) { // no need to check for round up outside of range --- a/drivers/atm/firestream.c +++ b/drivers/atm/firestream.c @@ -512,7 +512,7 @@ static unsigned int make_rate (unsigned } case ROUND_UP: { /* check all bits that we are discarding */ - if (man & (-1>>9)) { + if (man & ((unsigned int)-1>>9)) { man = (man>>(32-9)) + 1; if (man == (1<<9)) { /* no need to check for round up outside of range */ - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html