diff options
author | Christophe Leroy <christophe.leroy@c-s.fr> | 2017-12-18 11:08:33 +0100 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2017-12-20 10:34:01 +0100 |
commit | 7a94b88cb7087aa3184161bedccfea25e5502c62 (patch) | |
tree | 834dd94fd037c9b6edb3ba890e38df1af6cb77e1 /drivers/misc/ioc4.c | |
parent | 9295c01253b4eda5dc0b5a5b2e0fd321fe57010c (diff) | |
download | linux-stable-7a94b88cb7087aa3184161bedccfea25e5502c62.tar.gz linux-stable-7a94b88cb7087aa3184161bedccfea25e5502c62.tar.bz2 linux-stable-7a94b88cb7087aa3184161bedccfea25e5502c62.zip |
gpio: sysfs: don't use sprintf() for 'value' attribute
A bench with 'perf record' shows that most of time spent in value_show()
is spent in sprintf()
--42.41%--sysfs_kf_read
|
|--39.73%--dev_attr_show
| |
| |--38.23%--value_show
| | |
| | |--29.22%--sprintf
| | |
| | |--2.94%--gpiod_get_value_cansleep
| | |
value_show() only returns "0\n" or "1\n", therefore the use of
sprintf() can be avoided
With this patch we get the following result with 'perf record'
--13.89%--sysfs_kf_read
|
|--10.72%--dev_attr_show
| |
| |--9.44%--value_show
| | |
| | |--4.61%--gpiod_get_value_cansleep
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/misc/ioc4.c')
0 files changed, 0 insertions, 0 deletions