qcacmn: Fix Operands size in a bitwise operation

Bitwise operation on different operands size may lead
to unexpected results, Typecast the constant to
the size of the variable while performing the bitwise
operation.

Change-Id: Ifd9939905cc9df22bb249fa9b1a6a9670cf5f113
CRs-fixed: 2047880
This commit is contained in:
Anurag Chouhan 2017-05-16 15:06:44 +05:30 • committed by snandini
commit 656ec600ac

View file

@ -295,7 +295,7 @@ static inline void __qdf_spin_lock_bh(__qdf_spinlock_t *lock)
static inline void __qdf_spin_unlock_bh(__qdf_spinlock_t *lock)
{
if (unlikely(lock->flags & QDF_LINUX_UNLOCK_BH)) {
lock->flags &= ~QDF_LINUX_UNLOCK_BH;
lock->flags &= (unsigned long)~QDF_LINUX_UNLOCK_BH;
spin_unlock_bh(&lock->spinlock);
} else
spin_unlock(&lock->spinlock);