summaryrefslogtreecommitdiffstats
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorSevinj Aghayeva <sevinj.aghayeva@gmail.com>2022-04-03 12:53:25 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-04-05 16:03:11 +0200
commit9f2d13a65d1aca945cfc6845cb100ceab33ddb0d (patch)
tree0115bf99048902de703804886aadc72ec6f8aab2 /tools/perf/scripts/python
parent8a4b1870f8b2e5908536ffad4cea2ae943b9106c (diff)
downloadlinux-9f2d13a65d1aca945cfc6845cb100ceab33ddb0d.tar.gz
linux-9f2d13a65d1aca945cfc6845cb100ceab33ddb0d.zip
staging: rtl8712: simplify control flow
The function iterates an index from 0 to NUM_PMKID_CACHE and returns the first index for which the condition is true. If no such index is found, the function returns -1. Current code has a complex control flow that obfuscates this simple task. Replace it with a loop. Also, given the shortened function body, replace the long variable name psecuritypriv with a short variable name p. Reported by checkpatch: WARNING: else is not generally useful after a break or return Signed-off-by: Sevinj Aghayeva <sevinj.aghayeva@gmail.com> Link: https://lore.kernel.org/r/20220403165325.GA374638@euclid Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions