diff options
author | Loic Poulain | 2021-04-20 21:09:57 +0200 |
---|---|---|
committer | David S. Miller | 2021-04-20 16:52:56 -0700 |
commit | b8c55ce266dee09b0e359ff9af885eb94e11480a (patch) | |
tree | 08d8c11824022a9d02b85ec317f590163c0c2fa6 /drivers/net/wwan/mhi_wwan_ctrl.c | |
parent | ebbcac3dc26b51d8eeaa228cc2a969cfe4cc5bb3 (diff) |
net: wwan: Fix bit ops double shift
bit operation helpers such as test_bit, clear_bit, etc take bit
position as parameter and not value. Current usage causes double
shift => BIT(BIT(0)). Fix that in wwan_core and mhi_wwan_ctrl.
Fixes: 9a44c1cc6388 ("net: Add a WWAN subsystem")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wwan/mhi_wwan_ctrl.c')
-rw-r--r-- | drivers/net/wwan/mhi_wwan_ctrl.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/net/wwan/mhi_wwan_ctrl.c b/drivers/net/wwan/mhi_wwan_ctrl.c index 11475ade4be5..416ae6abafb7 100644 --- a/drivers/net/wwan/mhi_wwan_ctrl.c +++ b/drivers/net/wwan/mhi_wwan_ctrl.c @@ -7,9 +7,11 @@ #include <linux/wwan.h> /* MHI wwan flags */ -#define MHI_WWAN_DL_CAP BIT(0) -#define MHI_WWAN_UL_CAP BIT(1) -#define MHI_WWAN_RX_REFILL BIT(2) +enum mhi_wwan_flags { + MHI_WWAN_DL_CAP, + MHI_WWAN_UL_CAP, + MHI_WWAN_RX_REFILL, +}; #define MHI_WWAN_MAX_MTU 0x8000 |