diff options
author | Sergey Shtylyov <s.shtylyov@omp.ru> | 2024-10-15 23:15:04 +0300 |
---|---|---|
committer | Rob Herring (Arm) <robh@kernel.org> | 2024-10-16 12:00:10 -0500 |
commit | 2e030910fa90a1e46333c092c8bd00746a911be5 (patch) | |
tree | 886f380f2f74a315a40f08d28da0feb752f79071 /tools/perf/scripts/python/gecko.py | |
parent | 00c9a452a235c61f099504783badd9a7675ff5a5 (diff) | |
download | linux-2e030910fa90a1e46333c092c8bd00746a911be5.tar.gz linux-2e030910fa90a1e46333c092c8bd00746a911be5.tar.bz2 linux-2e030910fa90a1e46333c092c8bd00746a911be5.zip |
of: module: remove strlen() call in of_modalias()
In of_modalias(), there's no dire need to call strlen() (and then add 1
to its result to account for the 'C' char preceding the compat string).
Replace that strlen() with snprintf() (currently below it) -- this way,
we always try to print the compat string but then only advance the str
and len parameters iff the compat string fit into the remaining buffer
space...
Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
Link: https://lore.kernel.org/r/471418be-5d2f-4d14-bd9e-9e8f0526241f@omp.ru
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/gecko.py')
0 files changed, 0 insertions, 0 deletions