summaryrefslogtreecommitdiff
path: root/tools/lib/python/kdoc
diff options
context:
space:
mode:
authorNikita Zhandarovich <n.zhandarovich@fintech.ru>2025-01-15 09:12:06 -0800
committerLee Jones <lee@kernel.org>2025-03-14 08:59:05 +0000
commit2d8cb9ffe18c2f1e5bd07a19cbce85b26c1d0cf0 (patch)
tree5e22f88236c1e98336a305b416b0d06c410e5aa3 /tools/lib/python/kdoc
parent9675c059e489ced89aa894214afdaa2605bc9559 (diff)
mfd: sm501: Switch to BIT() to mitigate integer overflows
If offset end up being high enough, right hand expression in functions like sm501_gpio_set() shifted left for that number of bits, may not fit in int type. Just in case, fix that by using BIT() both as an option safe from overflow issues and to make this step look similar to other gpio drivers. Found by Linux Verification Center (linuxtesting.org) with static analysis tool SVACE. Fixes: f61be273d369 ("sm501: add gpiolib support") Signed-off-by: Nikita Zhandarovich <n.zhandarovich@fintech.ru> Link: https://lore.kernel.org/r/20250115171206.20308-1-n.zhandarovich@fintech.ru Signed-off-by: Lee Jones <lee@kernel.org>
Diffstat (limited to 'tools/lib/python/kdoc')
0 files changed, 0 insertions, 0 deletions