diff options
| author | Alex Elder <elder@linaro.org> | 2021-02-12 17:34:00 +0300 | 
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2021-02-13 03:54:17 +0300 | 
| commit | 2d65ed76924bc772d3974b0894d870b1aa63b34a (patch) | |
| tree | ceecafa621693cc3763ae3c4aeb9cdbf90fcb98e /tools/perf/scripts/python/compaction-times.py | |
| parent | 4c7ccfcd09fdc7f9edd1e453340be188f4044d8c (diff) | |
| download | linux-2d65ed76924bc772d3974b0894d870b1aa63b34a.tar.xz | |
net: ipa: fix register write command validation
In ipa_cmd_register_write_valid() we verify that values we will
supply to a REGISTER_WRITE IPA immediate command will fit in
the fields that need to hold them.  This patch fixes some issues
in that function and ipa_cmd_register_write_offset_valid().
The dev_err() call in ipa_cmd_register_write_offset_valid() has
some printf format errors:
  - The name of the register (corresponding to the string format
    specifier) was not supplied.
  - The IPA base offset and offset need to be supplied separately to
    match the other format specifiers.
Also make the ~0 constant used there to compute the maximum
supported offset value explicitly unsigned.
There are two other issues in ipa_cmd_register_write_valid():
  - There's no need to check the hash flush register for platforms
    (like IPA v4.2) that do not support hashed tables
  - The highest possible endpoint number, whose status register
    offset is computed, is COUNT - 1, not COUNT.
Fix these problems, and add some additional commentary.
Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/perf/scripts/python/compaction-times.py')
0 files changed, 0 insertions, 0 deletions
