mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Andy Whitcroft <apw@canonical.com>, Joe Perches <joe@perches.com>
Cc: linux-kernel@vger.kernel.org, kernel@pengutronix.de
Subject: checkpatch: false positive "Alignment should match open parenthesis" with struct_group_tagged()
Date: Sat, 21 Nov 2026 22:37:46 +0100	[thread overview]
Message-ID: <20261121-gifted-cryptic-mouse-9362cf-mkl@pengutronix.de> (raw)

[-- Attachment #1: Type: text/plain, Size: 1244 bytes --]

Hello,

it seems that all users of struct_group_tagged() in the kernel indent
with 1 tab, like this:

| struct gs_host_frame {
| 	struct_group_tagged(gs_host_frame_header, header,
| 		u32 echo_id;
| 		__le32 can_id;
|
| 		u8 can_dlc;
| 		u8 channel;
| 		u8 flags;
| 		u8 reserved;
| 	);
|
| 	union {
| 		DECLARE_FLEX_ARRAY(struct classic_can, classic_can);
| 		DECLARE_FLEX_ARRAY(struct classic_can_ts, classic_can_ts);
| 		DECLARE_FLEX_ARRAY(struct classic_can_quirk, classic_can_quirk);
| 		DECLARE_FLEX_ARRAY(struct canfd, canfd);
| 		DECLARE_FLEX_ARRAY(struct canfd_ts, canfd_ts);
| 		DECLARE_FLEX_ARRAY(struct canfd_quirk, canfd_quirk);
| 	};
| } __packed;

But checkpatch doesn't like this and warns:

● 06b928706f7e: can: gs_usb: gs_usb_get_gs_can(): introduce new function to consolidate validation of struct gs_can
  ● checkpatch.pl: drivers/net/can/usb/gs_usb.c:271: CHECK: Alignment should match open parenthesis

regards,
Marc

-- 
Pengutronix e.K.                 | Marc Kleine-Budde          |
Embedded Linux                   | https://www.pengutronix.de |
Vertretung Nürnberg              | Phone: +49-5121-206917-129 |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-9   |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

             reply	other threads:[~2026-11-21 21:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-21 21:37 Marc Kleine-Budde [this message]
2026-11-21 21:51 ` 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=20261121-gifted-cryptic-mouse-9362cf-mkl@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=apw@canonical.com \
    --cc=joe@perches.com \
    --cc=kernel@pengutronix.de \
    --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®