net: dst.h: Fix shifting signed 32-bit value by 31 bits problem
authorVandana BN <bnvandana@gmail.com>
Mon, 1 Jul 2019 11:55:39 +0000 (17:25 +0530)
committerDavid S. Miller <davem@davemloft.net>
Mon, 1 Jul 2019 17:48:34 +0000 (10:48 -0700)
Fix DST_FEATURE_ECN_CA to use "U" cast to avoid shifting signed
32-bit value by 31 bits problem.

Signed-off-by: Vandana BN <bnvandana@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/dst.h

index f8206d3..fe62fe2 100644 (file)
@@ -183,7 +183,7 @@ static inline void dst_metric_set(struct dst_entry *dst, int metric, u32 val)
 }
 
 /* Kernel-internal feature bits that are unallocated in user space. */
-#define DST_FEATURE_ECN_CA     (1 << 31)
+#define DST_FEATURE_ECN_CA     (1U << 31)
 
 #define DST_FEATURE_MASK       (DST_FEATURE_ECN_CA)
 #define DST_FEATURE_ECN_MASK   (DST_FEATURE_ECN_CA | RTAX_FEATURE_ECN)