aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLoic Poulain <loic.poulain@linaro.org>2021-04-20 20:49:31 +0200
committerLoic Poulain <loic.poulain@linaro.org>2021-04-22 14:42:58 +0200
commit6f547a3470625250f0dd510e44093935eeeb1d48 (patch)
tree1943ffd524ee421a62a2606a0faadc61397a5a70
parent23b223ee9de4d52aa6ddde5cac172f7f89c52fec (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>
-rw-r--r--drivers/net/wwan/mhi_wwan_ctrl.c8
-rw-r--r--drivers/net/wwan/wwan_core.c2
2 files changed, 6 insertions, 4 deletions
diff --git a/drivers/net/wwan/mhi_wwan_ctrl.c b/drivers/net/wwan/mhi_wwan_ctrl.c
index 1fc237651a00..1bc6b69aa530 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
diff --git a/drivers/net/wwan/wwan_core.c b/drivers/net/wwan/wwan_core.c
index b618b7937846..5be5e1e3534c 100644
--- a/drivers/net/wwan/wwan_core.c
+++ b/drivers/net/wwan/wwan_core.c
@@ -26,7 +26,7 @@ static int wwan_major;
#define to_wwan_port(d) container_of(d, struct wwan_port, dev)
/* WWAN port flags */
-#define WWAN_PORT_TX_OFF BIT(0)
+#define WWAN_PORT_TX_OFF 0
/**
* struct wwan_device - The structure that defines a WWAN device