AVR32 code: Mismatching comparison

From: Thomas Jarosch
Date: Thu Nov 17 2011 - 15:50:39 EST


Hi Haavard,

consider this piece of code from
arch/avr32/kernel/module.c:

....
case R_AVR32_GOT18SW:
if ((relocation & 0xfffe0003) != 0
&& (relocation & 0xfffc0003) != 0xffff0000)
return reloc_overflow(module, "R_AVR32_GOT18SW",
relocation);
relocation >>= 2;
/* fall through */
...

cppcheck reports for line 267:
"Mismatching comparison, the result is always true"

This probably needs a fix.

Cheers,
Thomas
--
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/