diff options
author | Douglas Anderson <[email protected]> | 2020-04-13 10:04:08 -0700 |
---|---|---|
committer | Bjorn Andersson <[email protected]> | 2020-04-13 22:09:24 -0700 |
commit | 427ef4f72bba5c8d3fb7dce758c3afe99d9db9c6 (patch) | |
tree | 94f038169c62adb99abeb13067a93301cd439a2d /tools/perf/scripts/python/syscall-counts-by-pid.py | |
parent | 1f7dbeb51a4f555db4105dc7927be6c77f0b60fd (diff) |
soc: qcom: rpmh-rsc: Fold tcs_ctrl_write() into its single caller
I was trying to write documentation for the functions in rpmh-rsc and
I got to tcs_ctrl_write(). The documentation for the function would
have been: "This is the core of rpmh_rsc_write_ctrl_data(); all the
caller does is error-check and then call this".
Having the error checks in a separate function doesn't help for
anything since:
- There are no other callers that need to bypass the error checks.
- It's less documenting. When I read tcs_ctrl_write() I kept
wondering if I need to handle cases other than ACTIVE_ONLY or cases
with more commands than could fit in a TCS. This is obvious when
the error checks and code are together.
- The function just isn't that long, so there's no problem
understanding the combined function.
Things were even more confusing because the two functions names didn't
make obvious (at least to me) their relationship.
Simplify by folding one function into the other.
Signed-off-by: Douglas Anderson <[email protected]>
Reviewed-by: Maulik Shah <[email protected]>
Reviewed-by: Stephen Boyd <[email protected]>
Tested-by: Maulik Shah <[email protected]>
Link: https://lore.kernel.org/r/20200413100321.v4.3.Ie88ce5ccfc0c6055903ccca5286ae28ed3b85ed3@changeid
Signed-off-by: Bjorn Andersson <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/syscall-counts-by-pid.py')
0 files changed, 0 insertions, 0 deletions