net: atl1c: Change variable type to bool
Subsystems (7)
PATCH v2 8/19 net: atl1c: Change variable type to bool
The variable ret is only assigned the values true and false. The function atl1c_read_eeprom already returns bool. Change ret type to bool.
The simplified semantic patch that find this problem is as follows (http://coccinelle.lip6.fr/):
@exists@
type T;
identifier b;
@@
- T
+ bool
b = ...;
... when any
b = \(true\|false\)
---
Changes from v1:
- Added subsystem prefix to shortlog
drivers/net/ethernet/atheros/atl1c/atl1c_hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/atheros/atl1c/atl1c_hw.c +1 -1
@@ -153,7 +153,7 @@ static int atl1c_get_permanent_address(struct atl1c_hw *hw)bool atl1c_read_eeprom (struct atl1c_hw *hw,u32 offset,u32 *p_value) {int i; -int ret = false; +bool ret = false;u32 otp_ctrl_data;u32 control;u32 data;
Signature · 1 line
1.8.3.1
PATCH v2 9/19 net: bnx2x: Change variable type to bool
The variable rc is only assigned the values true and false. The function bnx2x_prev_is_path_marked already returns bool. Change rc type to bool.
The simplified semantic patch that find this problem is as follows (http://coccinelle.lip6.fr/):
@exists@
type T;
identifier b;
@@
- T
+ bool
b = ...;
... when any
b = \(true\|false\)
---
Changes from v1:
- Added subsystem prefix to shortlog
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c +1 -1
@@ -9874,7 +9874,7 @@ static int bnx2x_prev_path_mark_eeh(struct bnx2x *bp)static bool bnx2x_prev_is_path_marked (struct bnx2x *bp) {struct bnx2x_prev_path_list *tmp_list; -int rc = false; +bool rc = false;if (down_trylock (&bnx2x_prev_sem))return false;
Signature · 1 line
1.8.3.1
Re: [PATCH 09/19 v2] net: bnx2x: Change variable type to bool
From: Peter Senna Tschudin <[email protected]>
Date: Wed, 2 Oct 2013 14:19:49 +0200
Quoted 17 lines
The variable rc is only assigned the values true and false. The function
bnx2x_prev_is_path_markedalready returns bool. Change rc type to bool.The simplified semantic patch that find this problem is as follows (http://coccinelle.lip6.fr/):
@exists@
type T;
identifier b;
@@
- T
+ bool
b = ...;
... when any
b = \(true\|false\)
Quoted 1 line
Signed-off-by Peter Senna Tschudin <[email protected]>
Applied.
PATCH v2 10/19 net: myri10ge: Change variable type to bool
In reply to Peter Senna TschudinThere is the rc variable on both myri10ge_ss_lock_napi and myri10ge_ss_lock_poll functions. In both cases rc is only assigned the values true and false. Both functions already return bool. Change rc type to bool.
The simplified semantic patch that find this problem is as follows (http://coccinelle.lip6.fr/):
@exists@
type T;
identifier b;
@@
- T
+ bool
b = ...;
... when any
b = \(true\|false\)
---
Changes from v1:
- Added subsystem prefix to shortlog
drivers/net/ethernet/myricom/myri10ge/myri10ge.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/myricom/myri10ge/myri10ge.c +2 -2
@@ -934,7 +934,7 @@ static inline void myri10ge_ss_init_lock(struct myri10ge_slice_state *ss)static inline bool myri10ge_ss_lock_napi (struct myri10ge_slice_state *ss) { -int rc = true; +bool rc = true;spin_lock (&ss->lock);if ((ss->state &SLICE_LOCKED )) {WARN_ON ((ss->state &SLICE_STATE_NAPI ));
@@ -957,7 +957,7 @@ static inline void myri10ge_ss_unlock_napi(struct myri10ge_slice_state *ss)static inline bool myri10ge_ss_lock_poll (struct myri10ge_slice_state *ss) { -int rc = true; +bool rc = true;spin_lock_bh (&ss->lock);if ((ss->state &SLICE_LOCKED )) { ss->state |=SLICE_STATE_POLL_YIELD ;
Signature · 1 line
1.8.3.1
Re: [PATCH 10/19 v2] net: myri10ge: Change variable type to bool
From: Peter Senna Tschudin <[email protected]>
Date: Wed, 2 Oct 2013 14:19:50 +0200
Quoted 18 lines
There is the rc variable on both
myri10ge_ss_lock_napiandmyri10ge_ss_lock_pollfunctions. In both cases rc is only assigned the values true and false. Both functions already return bool. Change rc type to bool.The simplified semantic patch that find this problem is as follows (http://coccinelle.lip6.fr/):
@exists@
type T;
identifier b;
@@
- T
+ bool
b = ...;
... when any
b = \(true\|false\)
Quoted 1 line
Signed-off-by Peter Senna Tschudin <[email protected]>
Applied.
PATCH v2 19/19 net: ipv4: Change variable type to bool
In reply to Peter Senna TschudinThe variable fully_acked is only assigned the values true and false. Change its type to bool.
The simplified semantic patch that find this problem is as follows (http://coccinelle.lip6.fr/):
@exists@
type T;
identifier b;
@@
- T
+ bool
b = ...;
... when any
b = \(true\|false\)
---
Changes from v1:
- Added subsystem prefix to shortlog
net/ipv4/tcp_input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/ipv4/tcp_input.c +1 -1
@@ -2970,7 +2970,7 @@ static int tcp_clean_rtx_queue(struct sock *sk, int prior_fackets,const struct inet_connection_sock *icsk =inet_csk (sk);struct sk_buff *skb;u32 now = tcp_time_stamp; -int fully_acked = true; +bool fully_acked = true;int flag =0 ;u32 pkts_acked =0 ;u32 reord = tp->packets_out;
Signature · 1 line
1.8.3.1
Re: [PATCH 19/19 v2] net: ipv4: Change variable type to bool
From: Peter Senna Tschudin <[email protected]>
Date: Wed, 2 Oct 2013 14:19:51 +0200
Quoted 16 lines
The variable
fully_ackedis only assigned the values true and false. Change its type to bool.The simplified semantic patch that find this problem is as follows (http://coccinelle.lip6.fr/):
@exists@
type T;
identifier b;
@@
- T
+ bool
b = ...;
... when any
b = \(true\|false\)
Quoted 1 line
Signed-off-by Peter Senna Tschudin <[email protected]>
Applied.
From: Peter Senna Tschudin <[email protected]>
Date: Wed, 2 Oct 2013 14:19:48 +0200
Quoted 17 lines
The variable ret is only assigned the values true and false. The function
atl1c_read_eepromalready returns bool. Change ret type to bool.The simplified semantic patch that find this problem is as follows (http://coccinelle.lip6.fr/):
@exists@
type T;
identifier b;
@@
- T
+ bool
b = ...;
... when any
b = \(true\|false\)
Quoted 1 line
Signed-off-by Peter Senna Tschudin <[email protected]>
Applied.