summaryrefslogtreecommitdiff
path: root/include/linux/timerqueue.h
diff options
context:
space:
mode:
authorLi RongQing <lirongqing@baidu.com>2026-05-14 20:55:52 -0400
committerManivannan Sadhasivam <mani@kernel.org>2026-06-09 19:14:35 +0530
commit282305d7e9c0e27fd8b4df34b7cd5506a1eccdd6 (patch)
tree6711c80d807abee08d7fe177c95d0e30acea537b /include/linux/timerqueue.h
parent254f49634ee16a731174d2ae34bc50bd5f45e731 (diff)
PCI: mediatek: Fix operator precedence in PCIE_FTS_NUM_L0 macro
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. Fixes: 637cfacae96f ("PCI: mediatek: Add MediaTek PCIe host controller support") Signed-off-by: Li RongQing <lirongqing@baidu.com> [mani: added the bitfield header include spotted by Sashiko] Signed-off-by: Manivannan Sadhasivam <mani@kernel.org> Reviewed-by: Krzysztof WilczyƄski <kwilczynski@kernel.org> Link: https://patch.msgid.link/20260515005552.2343-1-lirongqing@baidu.com
Diffstat (limited to 'include/linux/timerqueue.h')
0 files changed, 0 insertions, 0 deletions