diff mbox

S2io: two branches the same in wait_for_cmd_complete()

Message ID 4B53284C.1090405@gmail.com
State Superseded, archived
Delegated to: David Miller
Headers show

Commit Message

roel kluin Jan. 17, 2010, 3:10 p.m. UTC
Regardless of the bit_state, the branches execute the same code.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
 drivers/net/s2io.c |   13 +++----------
 1 files changed, 3 insertions(+), 10 deletions(-)

Maybe something else was intended?
this was introduced in commit 9fc93a41a1ad11

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

David Miller Jan. 18, 2010, 3:13 a.m. UTC | #1
From: Roel Kluin <roel.kluin@gmail.com>
Date: Sun, 17 Jan 2010 16:10:04 +0100

> Regardless of the bit_state, the branches execute the same code.
> 
> Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
> ---
>  drivers/net/s2io.c |   13 +++----------
>  1 files changed, 3 insertions(+), 10 deletions(-)
> 
> Maybe something else was intended?
> this was introduced in commit 9fc93a41a1ad11

If you know the guilty commit, at least do the author(s) of commit
and/or the driver maintainer(s) the courtesy of CC:'ing them on
patches like this.

I've fixed this up here in my reply.

> diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c
> index cc42186..0e353d6 100644
> --- a/drivers/net/s2io.c
> +++ b/drivers/net/s2io.c
> @@ -3415,16 +3415,9 @@ static int wait_for_cmd_complete(void __iomem *addr, u64 busy_bit,
>  
>  	do {
>  		val64 = readq(addr);
> -		if (bit_state == S2IO_BIT_RESET) {
> -			if (!(val64 & busy_bit)) {
> -				ret = SUCCESS;
> -				break;
> -			}
> -		} else {
> -			if (!(val64 & busy_bit)) {
> -				ret = SUCCESS;
> -				break;
> -			}
> +		if (!(val64 & busy_bit)) {
> +			ret = SUCCESS;
> +			break;
>  		}
>  
>  		if (in_interrupt())
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Joe Perches Jan. 18, 2010, 3:58 a.m. UTC | #2
On Sun, 2010-01-17 at 19:13 -0800, David Miller wrote:
> From: Roel Kluin <roel.kluin@gmail.com>
> Date: Sun, 17 Jan 2010 16:10:04 +0100
> > Regardless of the bit_state, the branches execute the same code.
> > Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
> > ---
> >  drivers/net/s2io.c |   13 +++----------
> >  1 files changed, 3 insertions(+), 10 deletions(-)
> > Maybe something else was intended?
> > this was introduced in commit 9fc93a41a1ad11
> If you know the guilty commit, at least do the author(s) of commit
> and/or the driver maintainer(s) the courtesy of CC:'ing them on
> patches like this.

One way to do that is to use:
$ ./scripts/get_maintainer.pl --git-blame <patch>


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c
index cc42186..0e353d6 100644
--- a/drivers/net/s2io.c
+++ b/drivers/net/s2io.c
@@ -3415,16 +3415,9 @@  static int wait_for_cmd_complete(void __iomem *addr, u64 busy_bit,
 
 	do {
 		val64 = readq(addr);
-		if (bit_state == S2IO_BIT_RESET) {
-			if (!(val64 & busy_bit)) {
-				ret = SUCCESS;
-				break;
-			}
-		} else {
-			if (!(val64 & busy_bit)) {
-				ret = SUCCESS;
-				break;
-			}
+		if (!(val64 & busy_bit)) {
+			ret = SUCCESS;
+			break;
 		}
 
 		if (in_interrupt())