From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1762490AbYD2QuA (ORCPT ); Tue, 29 Apr 2008 12:50:00 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754375AbYD2Qtw (ORCPT ); Tue, 29 Apr 2008 12:49:52 -0400 Received: from e33.co.us.ibm.com ([32.97.110.151]:40340 "EHLO e33.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754656AbYD2Qtu (ORCPT ); Tue, 29 Apr 2008 12:49:50 -0400 Date: Tue, 29 Apr 2008 09:49:18 -0700 From: Nishanth Aravamudan To: apw@shadowen.org Cc: LKML Subject: false negative in checpatch for asm/ vs. linux/ Message-ID: <20080429164918.GB24967@us.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Operating-System: Linux 2.6.25-mm1-00017-g1feb4e5-dirty (x86_64) User-Agent: Mutt/1.5.17+20080114 (2008-01-14) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Andy, I think the following: #warn if is #included and is available (uses RAW line) if ($tree && $rawline =~ m{^.\#\s*include\s*\}) { my $checkfile = "$root/include/linux/$1.h"; if (-f $checkfile && $1 ne 'irq') { WARN("Use #include instead of \n" . $herecurr); } } in checkpatch.pl can lead to false positives for asm/ includes from within linux/ files? e.g., I have a patch which moves the asm/hugetlb.h #include up to the top of include/linux/hugetlb.h, but I get: [09:46:27]nacc@arkanoid:~/linux/views/linux-2.6-work$ git show HEAD | ./scripts/checkpatch.pl - WARNING: Use #include instead of #17: FILE: include/linux/hugetlb.h:8: +#include Thanks, Nish -- Nishanth Aravamudan IBM Linux Technology Center