mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-27 06:04:23 +08:00
caif: Fix bitmap data type in "struct caifsock"
Bitmap are "unsigned long", so use it instead of a "u32" to make things more explicit. While at it, remove some useless cast (and leading spaces) when using the bitmap API. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
030f21ba2a
commit
8ee18e2a9e
@ -47,7 +47,7 @@ enum caif_states {
|
||||
struct caifsock {
|
||||
struct sock sk; /* must be first member */
|
||||
struct cflayer layer;
|
||||
u32 flow_state;
|
||||
unsigned long flow_state;
|
||||
struct caif_connect_request conn_req;
|
||||
struct mutex readlock;
|
||||
struct dentry *debugfs_socket_dir;
|
||||
@ -56,38 +56,32 @@ struct caifsock {
|
||||
|
||||
static int rx_flow_is_on(struct caifsock *cf_sk)
|
||||
{
|
||||
return test_bit(RX_FLOW_ON_BIT,
|
||||
(void *) &cf_sk->flow_state);
|
||||
return test_bit(RX_FLOW_ON_BIT, &cf_sk->flow_state);
|
||||
}
|
||||
|
||||
static int tx_flow_is_on(struct caifsock *cf_sk)
|
||||
{
|
||||
return test_bit(TX_FLOW_ON_BIT,
|
||||
(void *) &cf_sk->flow_state);
|
||||
return test_bit(TX_FLOW_ON_BIT, &cf_sk->flow_state);
|
||||
}
|
||||
|
||||
static void set_rx_flow_off(struct caifsock *cf_sk)
|
||||
{
|
||||
clear_bit(RX_FLOW_ON_BIT,
|
||||
(void *) &cf_sk->flow_state);
|
||||
clear_bit(RX_FLOW_ON_BIT, &cf_sk->flow_state);
|
||||
}
|
||||
|
||||
static void set_rx_flow_on(struct caifsock *cf_sk)
|
||||
{
|
||||
set_bit(RX_FLOW_ON_BIT,
|
||||
(void *) &cf_sk->flow_state);
|
||||
set_bit(RX_FLOW_ON_BIT, &cf_sk->flow_state);
|
||||
}
|
||||
|
||||
static void set_tx_flow_off(struct caifsock *cf_sk)
|
||||
{
|
||||
clear_bit(TX_FLOW_ON_BIT,
|
||||
(void *) &cf_sk->flow_state);
|
||||
clear_bit(TX_FLOW_ON_BIT, &cf_sk->flow_state);
|
||||
}
|
||||
|
||||
static void set_tx_flow_on(struct caifsock *cf_sk)
|
||||
{
|
||||
set_bit(TX_FLOW_ON_BIT,
|
||||
(void *) &cf_sk->flow_state);
|
||||
set_bit(TX_FLOW_ON_BIT, &cf_sk->flow_state);
|
||||
}
|
||||
|
||||
static void caif_read_lock(struct sock *sk)
|
||||
|
Loading…
Reference in New Issue
Block a user