]> www.infradead.org Git - users/jedix/linux-maple.git/commit
gpiolib: read descriptor flags once in gpiolib_dbg_show()
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Sat, 15 Feb 2025 10:08:47 +0000 (11:08 +0100)
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Mon, 24 Feb 2025 09:06:38 +0000 (10:06 +0100)
commit11067f50458a5bb3b72f83c508e03f321e0c0c34
tree6590c2c39c88bf0c163a0bcfe647575d5d329acc
parente623c4303ed112a1fc20aec8427ba8407e2842e6
gpiolib: read descriptor flags once in gpiolib_dbg_show()

For consistency with most other code that can access requested
descriptors: read the flags once atomically and then test individual
bits from the helper variable. This avoids any potential discrepancies
should flags change during the debug print.

Link: https://lore.kernel.org/r/20250215100847.30136-1-brgl@bgdev.pl
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
drivers/gpio/gpiolib.c