* checkpatch: false positive "Alignment should match open parenthesis" with struct_group_tagged()
@ 2026-11-21 21:37 Marc Kleine-Budde
0 siblings, 0 replies; only message in thread
From: Marc Kleine-Budde @ 2026-11-21 21:37 UTC (permalink / raw)
To: Andy Whitcroft, Joe Perches; +Cc: linux-kernel, kernel
[-- 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 --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-21 21:37 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-21 21:37 checkpatch: false positive "Alignment should match open parenthesis" with struct_group_tagged() Marc Kleine-Budde
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®