diff options
author | Stephen Boyd <[email protected]> | 2019-05-17 14:09:22 -0700 |
---|---|---|
committer | Bjorn Andersson <[email protected]> | 2019-07-22 16:25:20 -0700 |
commit | af311ff9a69189a03548efd5a47d4bb44644fd45 (patch) | |
tree | dbec828a3c446ae0b0420ef78222e223f8111fab /net/switchdev/switchdev.c | |
parent | c8b08fc0d6f83427973b94694b7ec8855d2d1e37 (diff) |
firmware: qcom_scm: Cleanup code in qcom_scm_assign_mem()
There are some questionable coding styles in this function. It looks
quite odd to deref a pointer with array indexing that only uses the
first element. Also, destroying an input/output variable halfway through
the function and then overwriting it on success is not clear. It's
better to use a local variable and the kernel macros to step through
each bit set in a bitmask and clearly show where outputs are set.
Cc: Ian Jackson <[email protected]>
Cc: Julien Grall <[email protected]>
Cc: Bjorn Andersson <[email protected]>
Cc: Avaneesh Kumar Dwivedi <[email protected]>
Tested-by: Bjorn Andersson <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
[bjorn: Changed for_each_set_bit() size to BITS_PER_LONG]
Signed-off-by: Bjorn Andersson <[email protected]>
Diffstat (limited to 'net/switchdev/switchdev.c')
0 files changed, 0 insertions, 0 deletions