Re: [PATCH] [media] stk1160: Remove dead code from stk1160_i2c_read_reg()

2012-10-15 Thread Jesper Juhl
On Sat, 13 Oct 2012, Ezequiel Garcia wrote:

> On Sun, Nov 9, 2008 at 2:04 PM, Jesper Juhl  wrote:
> > There are two checks for 'rc' being less than zero with no change to
> > 'rc' between the two, so the second is just dead code - remove it.
> >
> > Signed-off-by: Jesper Juhl 
> > ---
> >  drivers/media/usb/stk1160/stk1160-i2c.c |3 ---
> >  1 files changed, 0 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/media/usb/stk1160/stk1160-i2c.c 
> > b/drivers/media/usb/stk1160/stk1160-i2c.c
> > index 176ac93..035cf8c 100644
> > --- a/drivers/media/usb/stk1160/stk1160-i2c.c
> > +++ b/drivers/media/usb/stk1160/stk1160-i2c.c
> > @@ -117,9 +117,6 @@ static int stk1160_i2c_read_reg(struct stk1160 *dev, u8 
> > addr,
> > return rc;
> >
> > stk1160_read_reg(dev, STK1160_SBUSR_RD, value);
> > -   if (rc < 0)
> > -   return rc;
> > -
> > return 0;
> >  }
> >
> 
> Thanks for doing this. Wouldn't you like to save stk1160_read_reg
> return code to rc, instead of this?
> 
Ahh yes, I guess I was too quick to just assume it was dead code. 
Looking at it again; what you suggest must have been the original 
intention. I'll cook up a new patch.

Thanks.

-- 
Jesper Juhlhttp://www.chaosbits.net/
Don't top-post http://www.catb.org/jargon/html/T/top-post.html
Plain text mails only, please.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] [media] stk1160: Remove dead code from stk1160_i2c_read_reg()

2012-10-15 Thread Jesper Juhl
On Sat, 13 Oct 2012, Ezequiel Garcia wrote:

 On Sun, Nov 9, 2008 at 2:04 PM, Jesper Juhl j...@chaosbits.net wrote:
  There are two checks for 'rc' being less than zero with no change to
  'rc' between the two, so the second is just dead code - remove it.
 
  Signed-off-by: Jesper Juhl j...@chaosbits.net
  ---
   drivers/media/usb/stk1160/stk1160-i2c.c |3 ---
   1 files changed, 0 insertions(+), 3 deletions(-)
 
  diff --git a/drivers/media/usb/stk1160/stk1160-i2c.c 
  b/drivers/media/usb/stk1160/stk1160-i2c.c
  index 176ac93..035cf8c 100644
  --- a/drivers/media/usb/stk1160/stk1160-i2c.c
  +++ b/drivers/media/usb/stk1160/stk1160-i2c.c
  @@ -117,9 +117,6 @@ static int stk1160_i2c_read_reg(struct stk1160 *dev, u8 
  addr,
  return rc;
 
  stk1160_read_reg(dev, STK1160_SBUSR_RD, value);
  -   if (rc  0)
  -   return rc;
  -
  return 0;
   }
 
 
 Thanks for doing this. Wouldn't you like to save stk1160_read_reg
 return code to rc, instead of this?
 
Ahh yes, I guess I was too quick to just assume it was dead code. 
Looking at it again; what you suggest must have been the original 
intention. I'll cook up a new patch.

Thanks.

-- 
Jesper Juhl j...@chaosbits.net   http://www.chaosbits.net/
Don't top-post http://www.catb.org/jargon/html/T/top-post.html
Plain text mails only, please.

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] [media] stk1160: Remove dead code from stk1160_i2c_read_reg()

2012-10-12 Thread Ezequiel Garcia
On Sun, Nov 9, 2008 at 2:04 PM, Jesper Juhl  wrote:
> There are two checks for 'rc' being less than zero with no change to
> 'rc' between the two, so the second is just dead code - remove it.
>
> Signed-off-by: Jesper Juhl 
> ---
>  drivers/media/usb/stk1160/stk1160-i2c.c |3 ---
>  1 files changed, 0 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/media/usb/stk1160/stk1160-i2c.c 
> b/drivers/media/usb/stk1160/stk1160-i2c.c
> index 176ac93..035cf8c 100644
> --- a/drivers/media/usb/stk1160/stk1160-i2c.c
> +++ b/drivers/media/usb/stk1160/stk1160-i2c.c
> @@ -117,9 +117,6 @@ static int stk1160_i2c_read_reg(struct stk1160 *dev, u8 
> addr,
> return rc;
>
> stk1160_read_reg(dev, STK1160_SBUSR_RD, value);
> -   if (rc < 0)
> -   return rc;
> -
> return 0;
>  }
>

Thanks for doing this. Wouldn't you like to save stk1160_read_reg
return code to rc, instead of this?

Ezequiel
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] [media] stk1160: Remove dead code from stk1160_i2c_read_reg()

2012-10-12 Thread Jesper Juhl
There are two checks for 'rc' being less than zero with no change to
'rc' between the two, so the second is just dead code - remove it.

Signed-off-by: Jesper Juhl 
---
 drivers/media/usb/stk1160/stk1160-i2c.c |3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/drivers/media/usb/stk1160/stk1160-i2c.c 
b/drivers/media/usb/stk1160/stk1160-i2c.c
index 176ac93..035cf8c 100644
--- a/drivers/media/usb/stk1160/stk1160-i2c.c
+++ b/drivers/media/usb/stk1160/stk1160-i2c.c
@@ -117,9 +117,6 @@ static int stk1160_i2c_read_reg(struct stk1160 *dev, u8 
addr,
return rc;
 
stk1160_read_reg(dev, STK1160_SBUSR_RD, value);
-   if (rc < 0)
-   return rc;
-
return 0;
 }
 
-- 
1.7.1


-- 
Jesper Juhlhttp://www.chaosbits.net/
Don't top-post http://www.catb.org/jargon/html/T/top-post.html
Plain text mails only, please.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] [media] stk1160: Remove dead code from stk1160_i2c_read_reg()

2012-10-12 Thread Jesper Juhl
There are two checks for 'rc' being less than zero with no change to
'rc' between the two, so the second is just dead code - remove it.

Signed-off-by: Jesper Juhl j...@chaosbits.net
---
 drivers/media/usb/stk1160/stk1160-i2c.c |3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/drivers/media/usb/stk1160/stk1160-i2c.c 
b/drivers/media/usb/stk1160/stk1160-i2c.c
index 176ac93..035cf8c 100644
--- a/drivers/media/usb/stk1160/stk1160-i2c.c
+++ b/drivers/media/usb/stk1160/stk1160-i2c.c
@@ -117,9 +117,6 @@ static int stk1160_i2c_read_reg(struct stk1160 *dev, u8 
addr,
return rc;
 
stk1160_read_reg(dev, STK1160_SBUSR_RD, value);
-   if (rc  0)
-   return rc;
-
return 0;
 }
 
-- 
1.7.1


-- 
Jesper Juhl j...@chaosbits.net   http://www.chaosbits.net/
Don't top-post http://www.catb.org/jargon/html/T/top-post.html
Plain text mails only, please.

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] [media] stk1160: Remove dead code from stk1160_i2c_read_reg()

2012-10-12 Thread Ezequiel Garcia
On Sun, Nov 9, 2008 at 2:04 PM, Jesper Juhl j...@chaosbits.net wrote:
 There are two checks for 'rc' being less than zero with no change to
 'rc' between the two, so the second is just dead code - remove it.

 Signed-off-by: Jesper Juhl j...@chaosbits.net
 ---
  drivers/media/usb/stk1160/stk1160-i2c.c |3 ---
  1 files changed, 0 insertions(+), 3 deletions(-)

 diff --git a/drivers/media/usb/stk1160/stk1160-i2c.c 
 b/drivers/media/usb/stk1160/stk1160-i2c.c
 index 176ac93..035cf8c 100644
 --- a/drivers/media/usb/stk1160/stk1160-i2c.c
 +++ b/drivers/media/usb/stk1160/stk1160-i2c.c
 @@ -117,9 +117,6 @@ static int stk1160_i2c_read_reg(struct stk1160 *dev, u8 
 addr,
 return rc;

 stk1160_read_reg(dev, STK1160_SBUSR_RD, value);
 -   if (rc  0)
 -   return rc;
 -
 return 0;
  }


Thanks for doing this. Wouldn't you like to save stk1160_read_reg
return code to rc, instead of this?

Ezequiel
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/