On Fri, May 27, 2016 at 10:23 AM, Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote: > > This code: > > if (IS_ERR(hash)) > return PTR_ERR(hash); > > is obviously "return non-zero" to a kernel developer (because that's > how our error codes work), but to a compiler that "return PTR_ERR()" > ends up casting a "long" to an "int" return value. It doesn't help that gfs2 is using the IS_ERR_VALUE() macro on an "int", whih is bogus to begin with. It happens to *work*, but by the time you've cast an error pointer to "int", you've lost enough bits that "IS_ERR_VALUE()" isn't a valid thing to do. You should just check against zero (possibly against negative). But fixing that and just checking against a non-zero int doesn't actually fix the warning. Linus -- To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html