summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin/stackcollapse-record
diff options
context:
space:
mode:
authorChristophe Leroy (CS GROUP) <chleroy@kernel.org>2026-07-29 11:47:20 +0200
committerBartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>2026-07-31 10:32:47 +0200
commitd761c7e38a000603a9d16270a1af770a0e8efb5e (patch)
tree2afc3ea16eabee8ea0e2987e1933f8937c826390 /tools/perf/scripts/python/bin/stackcollapse-record
parenta02b8950d619123da64f69b70fe1dadef217dfe4 (diff)
gpiolib: Check gc->get_direction() before calling gpiod_get_direction()
According to 'struct gpio_chip' documentation in linux/gpio/driver.h, implementing .get_direction() is recommended but not mandatory. Most places verify that gc->get_direction() exists before calling gpiod_get_direction(), but gpiolib_dbg_show() doesn't. Until commit 471e998c0e31 ("gpiolib: remove redundant callback check") it was also verified by gpiod_get_direction() itself so calling it at all time from gpiolib_dbg_show() was not an issue. But after the check in gpiod_get_direction() has been removed, calling it inconditionaly leads to a big fat warning in gpiochip_get_direction(). In gpiod_get_direction(), verify that gc->get_direction() exists before calling gpiod_get_direction(). Fixes: 471e998c0e31 ("gpiolib: remove redundant callback check") Signed-off-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org> Link: https://patch.msgid.link/ad89f92f91d004e63dd5599bb58e9581f373a601.1785318183.git.chleroy@kernel.org Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-record')
0 files changed, 0 insertions, 0 deletions