qcacmn: Fix negative shift operand
Fix to avoid negative shift. Change-Id: Idff0836e7e5ded0aeca400b057790df26c1c67fd CRs-Fixed: 3609048
This commit is contained in:

committed by
Rahul Choudhary

parent
29b3272233
commit
6bb232bd38
@@ -1465,6 +1465,8 @@ static inline int dp_log2_ceil(unsigned int value)
|
||||
unsigned int tmp = value;
|
||||
int log2 = -1;
|
||||
|
||||
if (qdf_unlikely(value == 0))
|
||||
return 0;
|
||||
while (tmp) {
|
||||
log2++;
|
||||
tmp >>= 1;
|
||||
|
Reference in New Issue
Block a user