All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joe Simmons-Talbott <joetalbott@gmail.com>
To: Andy Whitcroft <apw@canonical.com>, Joe Perches <joe@perches.com>,
	Dwaipayan Ray <dwaipayanray1@gmail.com>,
	Lukas Bulwahn <lukas.bulwahn@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: checkpatch.pl bug for EXPORT_SYMBOL when struct initialization follows define
Date: Tue, 28 Jun 2022 18:10:38 -0400	[thread overview]
Message-ID: <Yrt8XgMe+mMIlHxM@spruce> (raw)

I believe I've found a bug in checkpatch.pl where an EXPORT_SYMBOL for
an initialized struct following a simple #define without an intervening
blank line falsely reports that EXPORT_SYMBOL doesn't follow the symbol
definition.  Here's an example:

	#define SOMETHING_ELSE 1
	struct blah foo = {
		.a = 1
	};
	EXPORT_SYMBOL(foo);

You can see from the debug print that the full statement has not been
identified.

	FOO A<+EXPORT_SYMBOL(foo);> stat<+      .a = 1
	 };> name<foo>

Unfortunately my perl skills were not sufficient to find a fix.

Thanks,
Joe

             reply	other threads:[~2022-06-28 22:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-28 22:10 Joe Simmons-Talbott [this message]
2022-08-18 14:54 ` checkpatch.pl bug for EXPORT_SYMBOL when struct initialization follows define Joe Simmons-Talbott

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=Yrt8XgMe+mMIlHxM@spruce \
    --to=joetalbott@gmail.com \
    --cc=apw@canonical.com \
    --cc=dwaipayanray1@gmail.com \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lukas.bulwahn@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.