Skip to content

Commit

Permalink
scripts/checkpatch: typdefsfile: Derogate on STM32Cube CMSIS *_TypeDef
Browse files Browse the repository at this point in the history
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 <erwan.gouriou@linaro.org>
  • Loading branch information
erwango authored and carlescufi committed Mar 21, 2022
1 parent bc72fb6 commit 3b45440
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions scripts/checkpatch/typedefsfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 3b45440

Please sign in to comment.