[Ksummit-discuss] Should we force include <linux/err.h> when compiling all .c files?

Luck, Tony tony.luck at intel.com
Tue Jul 29 15:17:40 UTC 2014

> Perhaps, though see above about the handling of new source files.

Sounds like a job for checkpatch.pl to make sure that <linux/err.h>
is included if a new file uses any of  'IS_ERR\|ERR_PTR\|PTR_ERR\|ERR_CAST'
to help stop this spreading to new files.

It might be harder, but presumably still possible, to have it also check if
any use of those macros is added to a file ... but it couldn't tell just by
looking at the patch ... it would have to peek at the original file to see
if there was already a #include <linux/err.h>

Without a check, or some regular scan, this problem is going to recur.


More information about the Ksummit-discuss mailing list