Commit 8ee18e2a authored by Christophe JAILLET's avatar Christophe JAILLET Committed by David S. Miller

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: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 030f21ba
...@@ -47,7 +47,7 @@ enum caif_states { ...@@ -47,7 +47,7 @@ enum caif_states {
struct caifsock { struct caifsock {
struct sock sk; /* must be first member */ struct sock sk; /* must be first member */
struct cflayer layer; struct cflayer layer;
u32 flow_state; unsigned long flow_state;
struct caif_connect_request conn_req; struct caif_connect_request conn_req;
struct mutex readlock; struct mutex readlock;
struct dentry *debugfs_socket_dir; struct dentry *debugfs_socket_dir;
...@@ -56,38 +56,32 @@ struct caifsock { ...@@ -56,38 +56,32 @@ struct caifsock {
static int rx_flow_is_on(struct caifsock *cf_sk) static int rx_flow_is_on(struct caifsock *cf_sk)
{ {
return test_bit(RX_FLOW_ON_BIT, return test_bit(RX_FLOW_ON_BIT, &cf_sk->flow_state);
(void *) &cf_sk->flow_state);
} }
static int tx_flow_is_on(struct caifsock *cf_sk) static int tx_flow_is_on(struct caifsock *cf_sk)
{ {
return test_bit(TX_FLOW_ON_BIT, return test_bit(TX_FLOW_ON_BIT, &cf_sk->flow_state);
(void *) &cf_sk->flow_state);
} }
static void set_rx_flow_off(struct caifsock *cf_sk) static void set_rx_flow_off(struct caifsock *cf_sk)
{ {
clear_bit(RX_FLOW_ON_BIT, clear_bit(RX_FLOW_ON_BIT, &cf_sk->flow_state);
(void *) &cf_sk->flow_state);
} }
static void set_rx_flow_on(struct caifsock *cf_sk) static void set_rx_flow_on(struct caifsock *cf_sk)
{ {
set_bit(RX_FLOW_ON_BIT, set_bit(RX_FLOW_ON_BIT, &cf_sk->flow_state);
(void *) &cf_sk->flow_state);
} }
static void set_tx_flow_off(struct caifsock *cf_sk) static void set_tx_flow_off(struct caifsock *cf_sk)
{ {
clear_bit(TX_FLOW_ON_BIT, clear_bit(TX_FLOW_ON_BIT, &cf_sk->flow_state);
(void *) &cf_sk->flow_state);
} }
static void set_tx_flow_on(struct caifsock *cf_sk) static void set_tx_flow_on(struct caifsock *cf_sk)
{ {
set_bit(TX_FLOW_ON_BIT, set_bit(TX_FLOW_ON_BIT, &cf_sk->flow_state);
(void *) &cf_sk->flow_state);
} }
static void caif_read_lock(struct sock *sk) static void caif_read_lock(struct sock *sk)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment