diff options
author | Alex Elder <elder@linaro.org> | 2022-09-23 00:20:53 +0200 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-09-24 05:56:27 +0200 |
commit | a50d37b7565e13613e2797eabcf82c2c685578d0 (patch) | |
tree | c7e3a68f766974fcb20b6da200cacc319f0e64e0 /drivers/net/ipa | |
parent | Merge tag 'linux-can-next-for-6.1-20220923' of git://git.kernel.org/pub/scm/l... (diff) | |
download | linux-a50d37b7565e13613e2797eabcf82c2c685578d0.tar.xz linux-a50d37b7565e13613e2797eabcf82c2c685578d0.zip |
net: ipa: don't use u32p_replace_bits()
In two spots we use u32_replace_bits() to replace a set of bits in a
register while preserving the rest. Both of those cases just zero
the bits being replaced, and this can be done more simply without
using that function.
Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ipa')
-rw-r--r-- | drivers/net/ipa/ipa_table.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ipa/ipa_table.c b/drivers/net/ipa/ipa_table.c index 69efe672ca52..037cec2fd594 100644 --- a/drivers/net/ipa/ipa_table.c +++ b/drivers/net/ipa/ipa_table.c @@ -524,7 +524,7 @@ static void ipa_filter_tuple_zero(struct ipa_endpoint *endpoint) val = ioread32(endpoint->ipa->reg_virt + offset); /* Zero all filter-related fields, preserving the rest */ - u32p_replace_bits(&val, 0, IPA_REG_ENDP_FILTER_HASH_MSK_ALL); + val &= ~IPA_REG_ENDP_FILTER_HASH_MSK_ALL; iowrite32(val, endpoint->ipa->reg_virt + offset); } @@ -571,7 +571,7 @@ static void ipa_route_tuple_zero(struct ipa *ipa, u32 route_id) val = ioread32(ipa->reg_virt + offset); /* Zero all route-related fields, preserving the rest */ - u32p_replace_bits(&val, 0, IPA_REG_ENDP_ROUTER_HASH_MSK_ALL); + val &= ~IPA_REG_ENDP_ROUTER_HASH_MSK_ALL; iowrite32(val, ipa->reg_virt + offset); } |