[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMuHMdXMwnBqAM64yvhFNsbcnwOHRyN9c02GRyxATMwuMOKnUw@mail.gmail.com>
Date: Mon, 2 Sep 2013 22:51:00 +0200
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Joe Perches <joe@...ches.com>
Cc: David Howells <dhowells@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>,
hannes@...essinduktion.org,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
David Woodhouse <dwmw2@...radead.org>
Subject: Re: [PATCH] checkpatch: Make extern in .h prototypes quieter.
On Mon, Sep 2, 2013 at 6:21 PM, Joe Perches <joe@...ches.com> wrote:
> The use of extern in .h files is a bit contentious.
>
> Make it emitted only when --strict is used on the
> command-line.
IIRC, the original intention was to always use "extern" in external function or
data declarations, and then complain if any "extern" keyword was found
in *.c files. Always using the "extern" keyword makes it easier to flag those.
> - if (WARN("AVOID_EXTERNS",
> - "extern prototypes should be avoided in .h files\n" . $herecurr) &&
> + if (CHK("AVOID_EXTERNS",
> + "extern prototypes should be avoided in .h files\n" . $herecurr) &&
I know it's not the subject of this patch, but shouldn't "extern prototypes"
be "extern keywords"?
> $fix) {
> $fixed[$linenr - 1] =~ s/(.*)\bextern\s+(.*)/$1$2/;
> }
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists