* [PATCH 08/19 v2] net: atl1c: Change variable type to bool
@ 2013-10-02 12:19 Peter Senna Tschudin
2013-10-02 12:19 ` [PATCH 09/19 v2] net: bnx2x: " Peter Senna Tschudin
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Peter Senna Tschudin @ 2013-10-02 12:19 UTC (permalink / raw)
To: jcliburn
Cc: chris.snook, jkosina, rdunlap, standby24x7, peter.senna, netdev,
linux-kernel, kernel-janitors
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\)
Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
---
Changes from v1:
- Added subsystem prefix to shortlog
drivers/net/ethernet/atheros/atl1c/atl1c_hw.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/atheros/atl1c/atl1c_hw.c b/drivers/net/ethernet/atheros/atl1c/atl1c_hw.c
index 3ef7092..1cda49a 100644
--- a/drivers/net/ethernet/atheros/atl1c/atl1c_hw.c
+++ b/drivers/net/ethernet/atheros/atl1c/atl1c_hw.c
@@ -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;
--
1.8.3.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 09/19 v2] net: bnx2x: Change variable type to bool
2013-10-02 12:19 [PATCH 08/19 v2] net: atl1c: Change variable type to bool Peter Senna Tschudin
@ 2013-10-02 12:19 ` Peter Senna Tschudin
2013-10-03 19:41 ` David Miller
2013-10-02 12:19 ` [PATCH 10/19 v2] net: myri10ge: " Peter Senna Tschudin
` (2 subsequent siblings)
3 siblings, 1 reply; 8+ messages in thread
From: Peter Senna Tschudin @ 2013-10-02 12:19 UTC (permalink / raw)
To: eilong; +Cc: netdev, linux-kernel, kernel-janitors, Peter Senna Tschudin
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\)
Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
---
Changes from v1:
- Added subsystem prefix to shortlog
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
index fccfc1d..105cc80 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
@@ -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;
--
1.8.3.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 10/19 v2] net: myri10ge: Change variable type to bool
2013-10-02 12:19 [PATCH 08/19 v2] net: atl1c: Change variable type to bool Peter Senna Tschudin
2013-10-02 12:19 ` [PATCH 09/19 v2] net: bnx2x: " Peter Senna Tschudin
@ 2013-10-02 12:19 ` Peter Senna Tschudin
2013-10-03 19:41 ` David Miller
2013-10-02 12:19 ` [PATCH 19/19 v2] net: ipv4: " Peter Senna Tschudin
2013-10-03 19:41 ` [PATCH 08/19 v2] net: atl1c: " David Miller
3 siblings, 1 reply; 8+ messages in thread
From: Peter Senna Tschudin @ 2013-10-02 12:19 UTC (permalink / raw)
To: hykim; +Cc: netdev, linux-kernel, kernel-janitors, Peter Senna Tschudin
There 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\)
Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
---
Changes from v1:
- Added subsystem prefix to shortlog
drivers/net/ethernet/myricom/myri10ge/myri10ge.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/myricom/myri10ge/myri10ge.c b/drivers/net/ethernet/myricom/myri10ge/myri10ge.c
index 149355b..7792264 100644
--- a/drivers/net/ethernet/myricom/myri10ge/myri10ge.c
+++ b/drivers/net/ethernet/myricom/myri10ge/myri10ge.c
@@ -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;
--
1.8.3.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 19/19 v2] net: ipv4: Change variable type to bool
2013-10-02 12:19 [PATCH 08/19 v2] net: atl1c: Change variable type to bool Peter Senna Tschudin
2013-10-02 12:19 ` [PATCH 09/19 v2] net: bnx2x: " Peter Senna Tschudin
2013-10-02 12:19 ` [PATCH 10/19 v2] net: myri10ge: " Peter Senna Tschudin
@ 2013-10-02 12:19 ` Peter Senna Tschudin
2013-10-03 19:41 ` David Miller
2013-10-03 19:41 ` [PATCH 08/19 v2] net: atl1c: " David Miller
3 siblings, 1 reply; 8+ messages in thread
From: Peter Senna Tschudin @ 2013-10-02 12:19 UTC (permalink / raw)
To: davem
Cc: kuznet, jmorris, kaber, netdev, linux-kernel, kernel-janitors,
Peter Senna Tschudin
The 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\)
Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
---
Changes from v1:
- Added subsystem prefix to shortlog
net/ipv4/tcp_input.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 25a89ea..fa17dce 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -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;
--
1.8.3.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 08/19 v2] net: atl1c: Change variable type to bool
2013-10-02 12:19 [PATCH 08/19 v2] net: atl1c: Change variable type to bool Peter Senna Tschudin
` (2 preceding siblings ...)
2013-10-02 12:19 ` [PATCH 19/19 v2] net: ipv4: " Peter Senna Tschudin
@ 2013-10-03 19:41 ` David Miller
3 siblings, 0 replies; 8+ messages in thread
From: David Miller @ 2013-10-03 19:41 UTC (permalink / raw)
To: peter.senna
Cc: jcliburn, chris.snook, jkosina, rdunlap, standby24x7, netdev,
linux-kernel, kernel-janitors
From: Peter Senna Tschudin <peter.senna@gmail.com>
Date: Wed, 2 Oct 2013 14:19:48 +0200
> 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\)
>
> Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Applied.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 19/19 v2] net: ipv4: Change variable type to bool
2013-10-02 12:19 ` [PATCH 19/19 v2] net: ipv4: " Peter Senna Tschudin
@ 2013-10-03 19:41 ` David Miller
0 siblings, 0 replies; 8+ messages in thread
From: David Miller @ 2013-10-03 19:41 UTC (permalink / raw)
To: peter.senna; +Cc: kuznet, jmorris, kaber, netdev, linux-kernel, kernel-janitors
From: Peter Senna Tschudin <peter.senna@gmail.com>
Date: Wed, 2 Oct 2013 14:19:51 +0200
> The 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\)
>
> Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Applied.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 10/19 v2] net: myri10ge: Change variable type to bool
2013-10-02 12:19 ` [PATCH 10/19 v2] net: myri10ge: " Peter Senna Tschudin
@ 2013-10-03 19:41 ` David Miller
0 siblings, 0 replies; 8+ messages in thread
From: David Miller @ 2013-10-03 19:41 UTC (permalink / raw)
To: peter.senna; +Cc: hykim, netdev, linux-kernel, kernel-janitors
From: Peter Senna Tschudin <peter.senna@gmail.com>
Date: Wed, 2 Oct 2013 14:19:50 +0200
> There 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\)
>
> Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Applied.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 09/19 v2] net: bnx2x: Change variable type to bool
2013-10-02 12:19 ` [PATCH 09/19 v2] net: bnx2x: " Peter Senna Tschudin
@ 2013-10-03 19:41 ` David Miller
0 siblings, 0 replies; 8+ messages in thread
From: David Miller @ 2013-10-03 19:41 UTC (permalink / raw)
To: peter.senna; +Cc: eilong, netdev, linux-kernel, kernel-janitors
From: Peter Senna Tschudin <peter.senna@gmail.com>
Date: Wed, 2 Oct 2013 14:19:49 +0200
> 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\)
>
> Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Applied.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2013-10-03 19:41 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-02 12:19 [PATCH 08/19 v2] net: atl1c: Change variable type to bool Peter Senna Tschudin
2013-10-02 12:19 ` [PATCH 09/19 v2] net: bnx2x: " Peter Senna Tschudin
2013-10-03 19:41 ` David Miller
2013-10-02 12:19 ` [PATCH 10/19 v2] net: myri10ge: " Peter Senna Tschudin
2013-10-03 19:41 ` David Miller
2013-10-02 12:19 ` [PATCH 19/19 v2] net: ipv4: " Peter Senna Tschudin
2013-10-03 19:41 ` David Miller
2013-10-03 19:41 ` [PATCH 08/19 v2] net: atl1c: " David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).