aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorLight Hsieh <[email protected]>2020-01-22 14:53:09 +0800
committerLinus Walleij <[email protected]>2020-02-14 11:26:29 +0100
commit3de7deefce693bb9783bca4cb42a81653ebec4e9 (patch)
tree21f7a9637068f9ecc5ede55f971b3e342c2f58a1 /tools/perf/scripts/python
parentef1ea54eab0ecb072700f59701387f839c8c760d (diff)
pinctrl: mediatek: Check gpio pin number and use binary search in mtk_hw_pin_field_lookup()
1. Check if gpio pin number is in valid range to prevent from get invalid pointer 'desc' in the following code: desc = (const struct mtk_pin_desc *)&hw->soc->pins[gpio]; 2. Improve mtk_hw_pin_field_lookup() 2.1 Modify mtk_hw_pin_field_lookup() to use binary search for accelerating search. 2.2 Correct message after the following check fail: if (hw->soc->reg_cal && hw->soc->reg_cal[field].range) { rc = &hw->soc->reg_cal[field]; The original message is: "Not support field %d for pin %d (%s)\n" However, the check is on soc chip level, not on pin level yet. So the message is corrected as: "Not support field %d for this soc\n" Signed-off-by: Light Hsieh <[email protected]> Link: https://lore.kernel.org/r/[email protected] Acked-by: Sean Wang <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions