Fix the incorrect placing of brackets to calculate stats.

This corrects the "(a | b) << 32"  to  "a | (b << 32)"

Fixes: e62a3f4183f1 ("bus/dpaa: fix statistics reading")
Cc: sta...@dpdk.org

Signed-off-by: Hemant Agrawal <hemant.agra...@nxp.com>
---
 drivers/bus/dpaa/base/fman/fman_hw.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/bus/dpaa/base/fman/fman_hw.c 
b/drivers/bus/dpaa/base/fman/fman_hw.c
index 24a99f7235..97e792806f 100644
--- a/drivers/bus/dpaa/base/fman/fman_hw.c
+++ b/drivers/bus/dpaa/base/fman/fman_hw.c
@@ -243,10 +243,11 @@ fman_if_stats_get_all(struct fman_if *p, uint64_t *value, 
int n)
        int i;
        uint64_t base_offset = offsetof(struct memac_regs, reoct_l);
 
-       for (i = 0; i < n; i++)
-               value[i] = (((u64)in_be32((char *)regs + base_offset + 8 * i) |
-                               (u64)in_be32((char *)regs + base_offset +
-                               8 * i + 4)) << 32);
+       for (i = 0; i < n; i++) {
+               uint64_t a = in_be32((char *)regs + base_offset + 8 * i);
+               uint64_t b = in_be32((char *)regs + base_offset + 8 * i + 4);
+               value[i] = a | b << 32;
+       }
 }
 
 void
-- 
2.25.1

Reply via email to