summaryrefslogtreecommitdiff
path: root/lib/test-string_helpers.c
diff options
context:
space:
mode:
authorAlex Elder <elder@linaro.org>2021-02-12 08:34:00 -0600
committerDavid S. Miller <davem@davemloft.net>2021-02-12 16:54:17 -0800
commit2d65ed76924bc772d3974b0894d870b1aa63b34a (patch)
treeceecafa621693cc3763ae3c4aeb9cdbf90fcb98e /lib/test-string_helpers.c
parent4c7ccfcd09fdc7f9edd1e453340be188f4044d8c (diff)
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 'lib/test-string_helpers.c')
0 files changed, 0 insertions, 0 deletions