Skip to content

fix(mp21x/drivers/usb): missing opening parenthesis in USB_OTG_GCCFG_FSVMINUS_Msk#5

Closed
7086cmd wants to merge 1 commit intoSTMicroelectronics:mainfrom
7086cmd:main
Closed

fix(mp21x/drivers/usb): missing opening parenthesis in USB_OTG_GCCFG_FSVMINUS_Msk#5
7086cmd wants to merge 1 commit intoSTMicroelectronics:mainfrom
7086cmd:main

Conversation

@7086cmd
Copy link

@7086cmd 7086cmd commented Feb 17, 2026

This PR fixes a syntax error/precedence risk in the USB_OTG_GCCFG_FSVMINUS_Msk macro definition.

I don't know whether this code works without the left parentheses, but it breaks some automated code-generation tools and static analyzers that parse these header files. Ensuring the left parentheses may also guarantee the order of operations.

I am new to ST's MPUs, and I'm willing to help.

Changes:

  • From: #define USB_OTG_GCCFG_FSVMINUS_Msk 0x1UL << USB_OTG_GCCFG_FSVMINUS_Pos)
  • To: #define USB_OTG_GCCFG_FSVMINUS_Msk (0x1UL << USB_OTG_GCCFG_FSVMINUS_Pos)

Copilot AI review requested due to automatic review settings February 17, 2026 08:48
@ST-dot-com
Copy link

Dear User,
Your pull request has been closed because the "Contribution License Agreement" (CLA) has not yet been signed.
Please sign the CLA) and resubmit your pull request.
Best regards,
P.S.: The CLA only needs to be signed once; you will not be asked to sign it again for future pull requests.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes a malformed USB_OTG_GCCFG_FSVMINUS_Msk macro definition by adding the missing opening parenthesis, removing a syntax error and avoiding precedence/parsing issues for tooling.

Changes:

  • Corrected USB_OTG_GCCFG_FSVMINUS_Msk to wrap the shift expression in parentheses across STM32MP2xx header variants.
  • Ensured the macro formatting matches adjacent *_Msk definitions (e.g., FSVPLUS_Msk).

Reviewed changes

Copilot reviewed 24 out of 24 changed files in this pull request and generated no comments.

Show a summary per file
File Description
Drivers/CMSIS/Device/ST/STM32MP2xx/Include/stm32mp215fxx_cm33.h Fixes malformed USB_OTG_GCCFG_FSVMINUS_Msk macro by adding missing (.
Drivers/CMSIS/Device/ST/STM32MP2xx/Include/stm32mp215fxx_ca35.h Same macro fix for CA35 header variant.
Drivers/CMSIS/Device/ST/STM32MP2xx/Include/stm32mp215dxx_cm33.h Same macro fix for CM33 header variant.
Drivers/CMSIS/Device/ST/STM32MP2xx/Include/stm32mp215dxx_ca35.h Same macro fix for CA35 header variant.
Drivers/CMSIS/Device/ST/STM32MP2xx/Include/stm32mp215cxx_cm33.h Same macro fix for CM33 header variant.
Drivers/CMSIS/Device/ST/STM32MP2xx/Include/stm32mp215cxx_ca35.h Same macro fix for CA35 header variant.
Drivers/CMSIS/Device/ST/STM32MP2xx/Include/stm32mp215axx_cm33.h Same macro fix for CM33 header variant.
Drivers/CMSIS/Device/ST/STM32MP2xx/Include/stm32mp215axx_ca35.h Same macro fix for CA35 header variant.
Drivers/CMSIS/Device/ST/STM32MP2xx/Include/stm32mp213fxx_cm33.h Same macro fix for CM33 header variant.
Drivers/CMSIS/Device/ST/STM32MP2xx/Include/stm32mp213fxx_ca35.h Same macro fix for CA35 header variant.
Drivers/CMSIS/Device/ST/STM32MP2xx/Include/stm32mp213dxx_cm33.h Same macro fix for CM33 header variant.
Drivers/CMSIS/Device/ST/STM32MP2xx/Include/stm32mp213dxx_ca35.h Same macro fix for CA35 header variant.
Drivers/CMSIS/Device/ST/STM32MP2xx/Include/stm32mp213cxx_cm33.h Same macro fix for CM33 header variant.
Drivers/CMSIS/Device/ST/STM32MP2xx/Include/stm32mp213cxx_ca35.h Same macro fix for CA35 header variant.
Drivers/CMSIS/Device/ST/STM32MP2xx/Include/stm32mp213axx_cm33.h Same macro fix for CM33 header variant.
Drivers/CMSIS/Device/ST/STM32MP2xx/Include/stm32mp213axx_ca35.h Same macro fix for CA35 header variant.
Drivers/CMSIS/Device/ST/STM32MP2xx/Include/stm32mp211fxx_cm33.h Same macro fix for CM33 header variant.
Drivers/CMSIS/Device/ST/STM32MP2xx/Include/stm32mp211fxx_ca35.h Same macro fix for CA35 header variant.
Drivers/CMSIS/Device/ST/STM32MP2xx/Include/stm32mp211dxx_cm33.h Same macro fix for CM33 header variant.
Drivers/CMSIS/Device/ST/STM32MP2xx/Include/stm32mp211dxx_ca35.h Same macro fix for CA35 header variant.
Drivers/CMSIS/Device/ST/STM32MP2xx/Include/stm32mp211cxx_cm33.h Same macro fix for CM33 header variant.
Drivers/CMSIS/Device/ST/STM32MP2xx/Include/stm32mp211cxx_ca35.h Same macro fix for CA35 header variant.
Drivers/CMSIS/Device/ST/STM32MP2xx/Include/stm32mp211axx_cm33.h Same macro fix for CM33 header variant.
Drivers/CMSIS/Device/ST/STM32MP2xx/Include/stm32mp211axx_ca35.h Same macro fix for CA35 header variant.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants