]> git.baikalelectronics.ru Git - kernel.git/commit
make IS_ERR_VALUE() complain about non-pointer-sized arguments
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 27 May 2016 23:03:22 +0000 (16:03 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 27 May 2016 23:03:22 +0000 (16:03 -0700)
commit9ac4c554ee50bf4b04b4093ed0f6003e7228050d
tree6dd91f62751407ea50e64c37f7e8a09bde803134
parent38691d1db4733850c6723e1fa4ebf720bcfa6bdb
make IS_ERR_VALUE() complain about non-pointer-sized arguments

Now that the allmodconfig x86-64 build is clean wrt IS_ERR_VALUE() uses
on integers, add a cast to a pointer and back to the argument, so that
any new mis-uses of IS_ERR_VALUE() will cause warnings like

   warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]

so that we don't re-introduce any bogus uses.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/err.h