* checkpatch: false positive "Alignment should match open parenthesis" with struct_group_tagged()
@ 2026-11-21 21:37 Marc Kleine-Budde
2026-11-21 21:51 ` Joe Perches
0 siblings, 1 reply; 2+ messages 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] 2+ messages in thread* Re: checkpatch: false positive "Alignment should match open parenthesis" with struct_group_tagged()
2026-11-21 21:37 checkpatch: false positive "Alignment should match open parenthesis" with struct_group_tagged() Marc Kleine-Budde
@ 2026-11-21 21:51 ` Joe Perches
0 siblings, 0 replies; 2+ messages in thread
From: Joe Perches @ 2026-11-21 21:51 UTC (permalink / raw)
To: Marc Kleine-Budde, Andy Whitcroft; +Cc: linux-kernel, kernel
On Sat, 2026-11-21 at 22:37 +0100, Marc Kleine-Budde wrote:
> Hello,
Hello to you.
> 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;
> > );
Thanks for the report, but I don't care.
It's just an unusual macro mechanism.
include/linux/stddef.h:#define struct_group_tagged(TAG, NAME, MEMBERS...) \
etc..,
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-21 21:51 UTC | newest]
Thread overview: 2+ messages (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
2026-11-21 21:51 ` Joe Perches
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®