Re: [PATCH v2] checkpatch: Add context-analysis attributes
From: Marc Kleine-Budde
Date: Tue Nov 17 2026 - 00:27:09 EST
On 16.11.2026 17:28:36, Vincent Donnefort wrote:
> Checkpatch doesn't know about the context-analysis attributes and
> misparses annotated declarations (e.g. mistaking __guarded_by() fields
> for extern prototypes). Add them to the known attributes list with
> support for a single nested set of parentheses.
>
> Handle context-analysis attributes with parentheses like __attribute__
> in annotate_values() so unary '&' in their arguments is not mistaken for
> binary bitwise AND.
>
> Cc: Marco Elver <elver@xxxxxxxxxx>
> Signed-off-by: Vincent Donnefort <vdonnefort@xxxxxxxxxx>
Tested-by: Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx>
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