Skip to contentSkip to conversation

Checkpatch false positive?

DISCUSSION Matthew Helsley 2 participants 3 messages Aug 1, 2008 – Aug 4, 2008

lore
Share & tools
lore
#0 lore raw

Hello checkpatch.pl maintainers,

I'm adding a new thread flag and I get this apparent checkpatch false
positive:

ERROR: do not modify files in include/asm, change architecture specific files in include/asm-<architecture> #36: +++ linux-2.6.27-rc1-mm1/arch/sparc/include/asm/thread_info_32.h

ERROR: do not modify files in include/asm, change architecture specific files in include/asm-<architecture> #63: +++ linux-2.6.27-rc1-mm1/arch/sparc/include/asm/thread_info_64.h

ERROR: do not modify files in include/asm, change architecture specific files in include/asm-<architecture> #289: +++ linux-2.6.27-rc1-mm1/arch/parisc/include/asm/thread_info.h

patches/0001-Container-Freezer-Add-TIF_FREEZE-flag-to-all-archit.patch total: 3 errors, 0 warnings, 214 lines checked

patches/0001-Container-Freezer-Add-TIF_FREEZE-flag-to-all-archit.patch has style problems, please review. If any of these errors are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

Which happens for every arch where the file has been moved under the
arch/ directory (sparc and parisc so far). Should this check for arch/<foo>/include/asm before giving an ERROR? Should arch/<foo>/include/asm only trigger a WARNING in this case?

Cheers,
-Matt Helsley

#1 lore raw
Quoted 22 lines · Matthew Helsley

Hello checkpatch.pl maintainers,

I'm adding a new thread flag and I get this apparent checkpatch false
positive:

ERROR: do not modify files in include/asm, change architecture specific files in include/asm-<architecture> #36: +++ linux-2.6.27-rc1-mm1/arch/sparc/include/asm/thread_info_32.h

ERROR: do not modify files in include/asm, change architecture specific files in include/asm-<architecture> #63: +++ linux-2.6.27-rc1-mm1/arch/sparc/include/asm/thread_info_64.h

ERROR: do not modify files in include/asm, change architecture specific files in include/asm-<architecture> #289: +++ linux-2.6.27-rc1-mm1/arch/parisc/include/asm/thread_info.h

patches/0001-Container-Freezer-Add-TIF_FREEZE-flag-to-all-archit.patch total: 3 errors, 0 warnings, 214 lines checked

patches/0001-Container-Freezer-Add-TIF_FREEZE-flag-to-all-archit.patch has style problems, please review. If any of these errors are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

Quoted 7 lines

Which happens for every arch where the file has been moved under the
arch/ directory (sparc and parisc so far). Should this check for arch/<foo>/include/asm before giving an ERROR? Should arch/<foo>/include/asm only trigger a WARNING in this case?

Cheers,
-Matt Helsley

Yes, that check isn't very well anchored. I've tightened that up in the latest version. Could you check your patch with the latest testing version for me:

http://www.kernel.org/pub/linux/kernel/people/apw/checkpatch/checkpatch.pl-testing

-apw

#2 lore raw
Quoted 31 lines · Andy Whitcroft
Quoted 22 lines · Matthew Helsley

Hello checkpatch.pl maintainers,

I'm adding a new thread flag and I get this apparent checkpatch false
positive:

ERROR: do not modify files in include/asm, change architecture specific files in include/asm-<architecture> #36: +++ linux-2.6.27-rc1-mm1/arch/sparc/include/asm/thread_info_32.h

ERROR: do not modify files in include/asm, change architecture specific files in include/asm-<architecture> #63: +++ linux-2.6.27-rc1-mm1/arch/sparc/include/asm/thread_info_64.h

ERROR: do not modify files in include/asm, change architecture specific files in include/asm-<architecture> #289: +++ linux-2.6.27-rc1-mm1/arch/parisc/include/asm/thread_info.h

patches/0001-Container-Freezer-Add-TIF_FREEZE-flag-to-all-archit.patch total: 3 errors, 0 warnings, 214 lines checked

patches/0001-Container-Freezer-Add-TIF_FREEZE-flag-to-all-archit.patch has style problems, please review. If any of these errors are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

Quoted 7 lines

Which happens for every arch where the file has been moved under the
arch/ directory (sparc and parisc so far). Should this check for arch/<foo>/include/asm before giving an ERROR? Should arch/<foo>/include/asm only trigger a WARNING in this case?

Cheers,
-Matt Helsley

Quoted 7 lines

Yes, that check isn't very well anchored. I've tightened that up in the latest version. Could you check your patch with the latest testing version for me:

http://www.kernel.org/pub/linux/kernel/people/apw/checkpatch/checkpatch.pl-testing

-apw

Output looks good:

patches/0001-Container-Freezer-Add-TIF_FREEZE-flag-to-all-archit.patch
total: 0 errors, 0 warnings, 152 lines checked

patches/0001-Container-Freezer-Add-TIF_FREEZE-flag-to-all-archit.patch has no obvious style problems and is ready for submission.

Thanks!

Cheers,
-Matt Helsley