From 1fca8ef8e8e3be56e515325166a82ffbafb8def5 Mon Sep 17 00:00:00 2001 From: Erwan Gouriou Date: Thu, 17 Mar 2022 17:55:45 +0100 Subject: [PATCH] scripts/checkpatch: typdefsfile: Derogate on STM32Cube CMSIS *_TypeDef Add a derogation to checkpatch's 'SPACING' rule, which randomly returns the following type of issue when STM32Cube HAL *_TypeDef are used: -:10: ERROR:SPACING: need consistent spacing around '*' (ctx:WxV) #10: FILE: drivers/adc/adc_stm32.c:806: + ADC_TypeDef *adc = config->base; This derogation applies to all _TypDef structures defined in STM32Cube CMSIS descriptions: FMC_Bank1E_6_TypeDef DMA_Channel_TypeDef ADC_TypeDef Signed-off-by: Erwan Gouriou --- scripts/checkpatch/typedefsfile | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/checkpatch/typedefsfile b/scripts/checkpatch/typedefsfile index ef5109b14747f1..6752c8d911076d 100644 --- a/scripts/checkpatch/typedefsfile +++ b/scripts/checkpatch/typedefsfile @@ -4,3 +4,4 @@ mbedtls_pk_context z_arch_esf_t pinctrl_soc_pin_t io_rw_32 +\b[a-zA-Z_][a-zA-Z0-9_]*TypeDef