mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nishanth Aravamudan <nacc@us.ibm.com>
To: apw@shadowen.org
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: false negative in checpatch for asm/ vs. linux/
Date: Tue, 29 Apr 2008 09:49:18 -0700	[thread overview]
Message-ID: <20080429164918.GB24967@us.ibm.com> (raw)

Hi Andy,

I think the following:

#warn if <asm/foo.h> is #included and <linux/foo.h> is available (uses RAW line)
                if ($tree && $rawline =~ m{^.\#\s*include\s*\<asm\/(.*)\.h\>}) {
                        my $checkfile = "$root/include/linux/$1.h";
                        if (-f $checkfile && $1 ne 'irq') {
                                WARN("Use #include <linux/$1.h> instead of <asm/$1.h>\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 <linux/hugetlb.h> instead of <asm/hugetlb.h>
#17: FILE: include/linux/hugetlb.h:8:
+#include <asm/hugetlb.h>

Thanks,
Nish

-- 
Nishanth Aravamudan <nacc@us.ibm.com>
IBM Linux Technology Center

             reply	other threads:[~2008-04-29 16:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-29 16:49 Nishanth Aravamudan [this message]
2008-05-01 10:24 ` Andy Whitcroft

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080429164918.GB24967@us.ibm.com \
    --to=nacc@us.ibm.com \
    --cc=apw@shadowen.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®