mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-14 22:44:27 +08:00
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: 9a44c1cc63
("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>
This commit is contained in:
parent
ebbcac3dc2
commit
b8c55ce266
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user