[lvc-project] (subset) [PATCH] mfd: sm501: switch to BIT() to mitigate integer overflows

Lee Jones lee at kernel.org
Mon Feb 10 19:46:34 MSK 2025


On Wed, 15 Jan 2025 09:12:06 -0800, Nikita Zhandarovich wrote:
> 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.
> 
> [...]

Applied, thanks!

[1/1] mfd: sm501: switch to BIT() to mitigate integer overflows
      commit: 987c19d733bb099daf9f13e3c84947a611219797

--
Lee Jones [李琼斯]




More information about the lvc-project mailing list