mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Igor Stoppa <igor.stoppa@gmail.com>
To: Andy Whitcroft <apw@canonical.com>, Joe Perches <joe@perches.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: CHECKPATCH: strange warning on alignment modifier
Date: Mon, 8 Oct 2018 10:56:10 +0300	[thread overview]
Message-ID: <15d77776-0551-5b7d-935e-16496c3800e2@gmail.com> (raw)

Hi,

I have the following fragment of code:

+struct my_struct {
+       atomic_long_t l __aligned(sizeof(atomic_long_t));
+} __aligned(sizeof(atomic_long_t));


triggering this warning, when fed to checkpatch.pl:

WARNING: function definition argument 'atomic_long_t' should also have 
an identifier name
#19: FILE: path/to/file.h
+	atomic_long_t l __aligned(sizeof(atomic_long_t));


gcc [(Ubuntu 7.3.0-16ubuntu3) 7.3.0] seems to be happy about it

I am using the HEAD from mainline.

My intent is to specify the alignment of both the field and the 
structure (yes, probably redundant in this single-field case).

If I am doing something wrong, I can't figure out what it is, but I 
don't understand why the WARNING is mentioning a function definition.

--
igor

             reply	other threads:[~2018-10-08  7:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-08  7:56 Igor Stoppa [this message]
2018-10-09  2:07 ` Joe Perches

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=15d77776-0551-5b7d-935e-16496c3800e2@gmail.com \
    --to=igor.stoppa@gmail.com \
    --cc=apw@canonical.com \
    --cc=joe@perches.com \
    --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®