checkpatch: false positive "Alignment should match open parenthesis" with struct_group_tagged()

From: Marc Kleine-Budde

Date: Sat Nov 21 2026 - 16:37:56 EST


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: signature.asc
Description: PGP signature