diff options
| author | Andy Shevchenko <[email protected]> | 2021-04-20 19:44:25 +0300 |
|---|---|---|
| committer | Mark Brown <[email protected]> | 2021-04-21 15:49:54 +0100 |
| commit | f60d7270c8a3d2beb1c23ae0da42497afa3584c2 (patch) | |
| tree | 546b47407e4e4b72205acb74be341a2c9b518887 /drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | |
| parent | dbaca8e56ea3f23fa215f48c2d46dd03ede06e02 (diff) | |
spi: Avoid undefined behaviour when counting unused native CSs
ffz(), that has been used to count unused native CSs,
might cause undefined behaviour when called against ~0U.
To fix that, open code it with ffs(~value) - 1.
Fixes: 7d93aecdb58d ("spi: Add generic support for unused native cs with cs-gpios")
Signed-off-by: Andy Shevchenko <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mark Brown <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c')
0 files changed, 0 insertions, 0 deletions