From: Danylo Vodopianov <dvo-...@napatech.com>

Add unsigned long long type to the value to ensure that
the value 1 is explicitly treated as a 64-bit unsigned integer.

Signed-off-by: Danylo Vodopianov <dvo-...@napatech.com>
---
 .../nthw/flow_api/profile_inline/flow_api_profile_inline.c      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/drivers/net/ntnic/nthw/flow_api/profile_inline/flow_api_profile_inline.c 
b/drivers/net/ntnic/nthw/flow_api/profile_inline/flow_api_profile_inline.c
index c674531396..3fb867c993 100644
--- a/drivers/net/ntnic/nthw/flow_api/profile_inline/flow_api_profile_inline.c
+++ b/drivers/net/ntnic/nthw/flow_api/profile_inline/flow_api_profile_inline.c
@@ -114,7 +114,7 @@ static inline uint64_t convert_policing_parameter(uint64_t 
value)
        }
 
        if (shift != 0) {
-               uint64_t tmp = POLICING_PARAMETER_OFFSET * (1 << (shift - 1));
+               uint64_t tmp = POLICING_PARAMETER_OFFSET * (1ULL << (shift - 
1ULL));
 
                if (tmp > value) {
                        res = 0;
-- 
2.47.1

Reply via email to