[PATCH] PCI: mediatek: Fix operator precedence in PCIE_FTS_NUM_L0 macro

Manivannan Sadhasivam manivannan.sadhasivam at oss.qualcomm.com
Tue Jun 9 06:46:01 PDT 2026


On Thu, 14 May 2026 20:55:52 -0400, lirongqing wrote:
> The original PCIE_FTS_NUM_L0(x) macro was buggy due to improper operator
> precedence, where ((x) & 0xff << 8) was evaluated as ((x) & 0xff00).
> 
> Instead of just fixing the parentheses, use the standard FIELD_PREP()
> macro. This makes the code more robust by automatically handling masks
> and shifts, while also adding compile-time type and range checking to
> ensure the value fits within PCIE_FTS_NUM_MASK.
> 
> [...]

Applied, thanks!

[1/1] PCI: mediatek: Fix operator precedence in PCIE_FTS_NUM_L0 macro
      commit: 282305d7e9c0e27fd8b4df34b7cd5506a1eccdd6

Best regards,
-- 
Manivannan Sadhasivam <mani at kernel.org>




More information about the linux-arm-kernel mailing list