diff options
author | Andy Shevchenko <[email protected]> | 2020-02-25 13:47:25 +0200 |
---|---|---|
committer | Linus Walleij <[email protected]> | 2020-02-28 23:58:56 +0100 |
commit | 869233f81337bfb33c79f1e7539147d52c0ba383 (patch) | |
tree | be3ae5f88bd48cd5e86d948f4698e9be05806e8e /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | 63636d956c455c0fbe2118078a03f563ddd6bf6e (diff) |
gpiolib: Optimize gpiochip_remove() when check for requested line
Here are the following optimizations have been done:
- break the loop after first found requested line
- due to above, drop redundant boolean variable
- replace open coded variant of gpiochip_is_requested()
- due to above, drop redundant pointer to struct gpio_desc
- use 'unsigned int' instead of 'unsigned' for loop counter
Note, pointer to struct gpio_chip followed by pointer to struct gpio_device
is still valid, back link is not.
Signed-off-by: Andy Shevchenko <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Linus Walleij <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions