public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 5/7] I2C: eg20t, remove unused variable
       [not found] ` <1300870200-24405-1-git-send-email-jslaby-AlSwsSmVLrQ@public.gmane.org>
@ 2011-03-23  8:49   ` Jiri Slaby
  2011-03-23 10:09     ` Jean Delvare
       [not found]     ` <1300870200-24405-5-git-send-email-jslaby-AlSwsSmVLrQ@public.gmane.org>
  0 siblings, 2 replies; 5+ messages in thread
From: Jiri Slaby @ 2011-03-23  8:49 UTC (permalink / raw)
  To: jirislaby-Re5JQEeQqe8AvxtiuMwx3w
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA, Jiri Slaby, Jean Delvare,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA

drivers/i2c/busses/i2c-eg20t.c:684:2: warning: Value stored to 'msglen' is never read
msglen = (pmsg->len) - (subaddrlen + 1);
^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Jiri Slaby <jslaby-AlSwsSmVLrQ@public.gmane.org>
Cc: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
---
 drivers/i2c/busses/i2c-eg20t.c |    8 --------
 1 files changed, 0 insertions(+), 8 deletions(-)

diff --git a/drivers/i2c/busses/i2c-eg20t.c b/drivers/i2c/busses/i2c-eg20t.c
index 878a120..ea73252 100644
--- a/drivers/i2c/busses/i2c-eg20t.c
+++ b/drivers/i2c/busses/i2c-eg20t.c
@@ -651,8 +651,6 @@ static s32 pch_i2c_xfer(struct i2c_adapter *i2c_adap,
 	struct i2c_msg *pmsg;
 	u32 i = 0;
 	u32 status;
-	u32 msglen;
-	u32 subaddrlen;
 	s32 ret;
 
 	struct i2c_algo_pch_data *adap = i2c_adap->algo_data;
@@ -676,12 +674,6 @@ static s32 pch_i2c_xfer(struct i2c_adapter *i2c_adap,
 	status = pmsg->flags;
 	pch_dbg(adap,
 		"After invoking I2C_MODE_SEL :flag= 0x%x\n", status);
-	/* calculate sub address length and message length */
-	/* these are applicable only for buffer mode */
-	subaddrlen = pmsg->buf[0];
-	/* calculate actual message length excluding
-	 * the sub address fields */
-	msglen = (pmsg->len) - (subaddrlen + 1);
 	if (status & (I2C_M_RD)) {
 		pch_dbg(adap, "invoking pch_i2c_readbytes\n");
 		ret = pch_i2c_readbytes(i2c_adap, pmsg, (i + 1 == num),
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 5/7] I2C: eg20t, remove unused variable
  2011-03-23  8:49   ` [PATCH 5/7] I2C: eg20t, remove unused variable Jiri Slaby
@ 2011-03-23 10:09     ` Jean Delvare
       [not found]     ` <1300870200-24405-5-git-send-email-jslaby-AlSwsSmVLrQ@public.gmane.org>
  1 sibling, 0 replies; 5+ messages in thread
From: Jean Delvare @ 2011-03-23 10:09 UTC (permalink / raw)
  To: Jiri Slaby; +Cc: jirislaby, linux-kernel, linux-i2c, Tomoya MORINAGA, Ben Dooks

Hi Jiri,

On Wed, 23 Mar 2011 09:49:58 +0100, Jiri Slaby wrote:
> drivers/i2c/busses/i2c-eg20t.c:684:2: warning: Value stored to 'msglen' is never read
> msglen = (pmsg->len) - (subaddrlen + 1);
> ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
> Cc: Jean Delvare <khali@linux-fr.org>
> Cc: linux-i2c@vger.kernel.org
> ---
>  drivers/i2c/busses/i2c-eg20t.c |    8 --------
>  1 files changed, 0 insertions(+), 8 deletions(-)

This driver is under Ben Dooks's jurisdiction, not mine. You should get
this patch reviewed by him and Tomoya MORINAGA (both Cc'd.) It may be
that your simple fix is correct, but it may also be that the unused
variables should be used somewhere in the code for correctness. I can't
tell.

> 
> diff --git a/drivers/i2c/busses/i2c-eg20t.c b/drivers/i2c/busses/i2c-eg20t.c
> index 878a120..ea73252 100644
> --- a/drivers/i2c/busses/i2c-eg20t.c
> +++ b/drivers/i2c/busses/i2c-eg20t.c
> @@ -651,8 +651,6 @@ static s32 pch_i2c_xfer(struct i2c_adapter *i2c_adap,
>  	struct i2c_msg *pmsg;
>  	u32 i = 0;
>  	u32 status;
> -	u32 msglen;
> -	u32 subaddrlen;
>  	s32 ret;
>  
>  	struct i2c_algo_pch_data *adap = i2c_adap->algo_data;
> @@ -676,12 +674,6 @@ static s32 pch_i2c_xfer(struct i2c_adapter *i2c_adap,
>  	status = pmsg->flags;
>  	pch_dbg(adap,
>  		"After invoking I2C_MODE_SEL :flag= 0x%x\n", status);
> -	/* calculate sub address length and message length */
> -	/* these are applicable only for buffer mode */
> -	subaddrlen = pmsg->buf[0];
> -	/* calculate actual message length excluding
> -	 * the sub address fields */
> -	msglen = (pmsg->len) - (subaddrlen + 1);
>  	if (status & (I2C_M_RD)) {
>  		pch_dbg(adap, "invoking pch_i2c_readbytes\n");
>  		ret = pch_i2c_readbytes(i2c_adap, pmsg, (i + 1 == num),


-- 
Jean Delvare

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [PATCH 5/7] I2C: eg20t, remove unused variable
       [not found]     ` <1300870200-24405-5-git-send-email-jslaby-AlSwsSmVLrQ@public.gmane.org>
@ 2011-03-23 10:50       ` Tomoya MORINAGA
       [not found]         ` <3DCFFD98C696488F94CB1A74F2998DF9-c0cKtqp5df7I9507bXv2FdBPR1lH4CV8@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Tomoya MORINAGA @ 2011-03-23 10:50 UTC (permalink / raw)
  To: 'Jiri Slaby', jirislaby-Re5JQEeQqe8AvxtiuMwx3w
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA, 'Jean Delvare',
	linux-i2c-u79uwXL29TY76Z2rM5mHXA

Hi Jiri,

It looks OK.

Signed-off-by: Tomoya MORINAGA <tomoya-linux-ECg8zkTtlr0C6LszWs/t0g@public.gmane.org> 

Thanks,
-----------------------------------------
Tomoya MORINAGA
OKI SEMICONDUCTOR CO., LTD.

> -----Original Message-----
> From: linux-kernel-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org 
> [mailto:linux-kernel-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org] On Behalf Of Jiri Slaby
> Sent: Wednesday, March 23, 2011 5:50 PM
> To: jirislaby-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
> Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; Jiri Slaby; Jean Delvare; 
> linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> Subject: [PATCH 5/7] I2C: eg20t, remove unused variable
> 
> drivers/i2c/busses/i2c-eg20t.c:684:2: warning: Value stored 
> to 'msglen' is never read msglen = (pmsg->len) - (subaddrlen + 1);
> ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> Signed-off-by: Jiri Slaby <jslaby-AlSwsSmVLrQ@public.gmane.org>
> Cc: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
> Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> ---
>  drivers/i2c/busses/i2c-eg20t.c |    8 --------
>  1 files changed, 0 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/i2c/busses/i2c-eg20t.c 
> b/drivers/i2c/busses/i2c-eg20t.c index 878a120..ea73252 100644
> --- a/drivers/i2c/busses/i2c-eg20t.c
> +++ b/drivers/i2c/busses/i2c-eg20t.c
> @@ -651,8 +651,6 @@ static s32 pch_i2c_xfer(struct 
> i2c_adapter *i2c_adap,
>  	struct i2c_msg *pmsg;
>  	u32 i = 0;
>  	u32 status;
> -	u32 msglen;
> -	u32 subaddrlen;
>  	s32 ret;
>  
>  	struct i2c_algo_pch_data *adap = i2c_adap->algo_data; 
> @@ -676,12 +674,6 @@ static s32 pch_i2c_xfer(struct 
> i2c_adapter *i2c_adap,
>  	status = pmsg->flags;
>  	pch_dbg(adap,
>  		"After invoking I2C_MODE_SEL :flag= 0x%x\n", status);
> -	/* calculate sub address length and message length */
> -	/* these are applicable only for buffer mode */
> -	subaddrlen = pmsg->buf[0];
> -	/* calculate actual message length excluding
> -	 * the sub address fields */
> -	msglen = (pmsg->len) - (subaddrlen + 1);
>  	if (status & (I2C_M_RD)) {
>  		pch_dbg(adap, "invoking pch_i2c_readbytes\n");
>  		ret = pch_i2c_readbytes(i2c_adap, pmsg, (i + 1 == num),
> --
> 1.7.4.1
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe 
> linux-kernel" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 5/7] I2C: eg20t, remove unused variable
       [not found]         ` <3DCFFD98C696488F94CB1A74F2998DF9-c0cKtqp5df7I9507bXv2FdBPR1lH4CV8@public.gmane.org>
@ 2011-04-19 15:06           ` Jiri Slaby
       [not found]             ` <4DADA4D8.4080602-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Jiri Slaby @ 2011-04-19 15:06 UTC (permalink / raw)
  To: Tomoya MORINAGA
  Cc: 'Jiri Slaby', linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	'Jean Delvare', linux-i2c-u79uwXL29TY76Z2rM5mHXA

On 03/23/2011 11:50 AM, Tomoya MORINAGA wrote:
> Hi Jiri,
> 
> It looks OK.
> 
> Signed-off-by: Tomoya MORINAGA <tomoya-linux-ECg8zkTtlr0C6LszWs/t0g@public.gmane.org> 

Hi, will somebody take it or should I resubmit?

> Thanks,
> -----------------------------------------
> Tomoya MORINAGA
> OKI SEMICONDUCTOR CO., LTD.
> 
>> -----Original Message-----
>> From: linux-kernel-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org 
>> [mailto:linux-kernel-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org] On Behalf Of Jiri Slaby
>> Sent: Wednesday, March 23, 2011 5:50 PM
>> To: jirislaby-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
>> Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; Jiri Slaby; Jean Delvare; 
>> linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
>> Subject: [PATCH 5/7] I2C: eg20t, remove unused variable
>>
>> drivers/i2c/busses/i2c-eg20t.c:684:2: warning: Value stored 
>> to 'msglen' is never read msglen = (pmsg->len) - (subaddrlen + 1);
>> ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>
>> Signed-off-by: Jiri Slaby <jslaby-AlSwsSmVLrQ@public.gmane.org>
>> Cc: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
>> Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
>> ---
>>  drivers/i2c/busses/i2c-eg20t.c |    8 --------
>>  1 files changed, 0 insertions(+), 8 deletions(-)
>>
>> diff --git a/drivers/i2c/busses/i2c-eg20t.c 
>> b/drivers/i2c/busses/i2c-eg20t.c index 878a120..ea73252 100644
>> --- a/drivers/i2c/busses/i2c-eg20t.c
>> +++ b/drivers/i2c/busses/i2c-eg20t.c
>> @@ -651,8 +651,6 @@ static s32 pch_i2c_xfer(struct 
>> i2c_adapter *i2c_adap,
>>  	struct i2c_msg *pmsg;
>>  	u32 i = 0;
>>  	u32 status;
>> -	u32 msglen;
>> -	u32 subaddrlen;
>>  	s32 ret;
>>  
>>  	struct i2c_algo_pch_data *adap = i2c_adap->algo_data; 
>> @@ -676,12 +674,6 @@ static s32 pch_i2c_xfer(struct 
>> i2c_adapter *i2c_adap,
>>  	status = pmsg->flags;
>>  	pch_dbg(adap,
>>  		"After invoking I2C_MODE_SEL :flag= 0x%x\n", status);
>> -	/* calculate sub address length and message length */
>> -	/* these are applicable only for buffer mode */
>> -	subaddrlen = pmsg->buf[0];
>> -	/* calculate actual message length excluding
>> -	 * the sub address fields */
>> -	msglen = (pmsg->len) - (subaddrlen + 1);
>>  	if (status & (I2C_M_RD)) {
>>  		pch_dbg(adap, "invoking pch_i2c_readbytes\n");
>>  		ret = pch_i2c_readbytes(i2c_adap, pmsg, (i + 1 == num),
>> --
>> 1.7.4.1
>>
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe 
>> linux-kernel" in
>> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>> Please read the FAQ at  http://www.tux.org/lkml/
>>
> 


-- 
js

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [PATCH 5/7] I2C: eg20t, remove unused variable
       [not found]             ` <4DADA4D8.4080602-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2011-04-20  0:04               ` Tomoya MORINAGA
  0 siblings, 0 replies; 5+ messages in thread
From: Tomoya MORINAGA @ 2011-04-20  0:04 UTC (permalink / raw)
  To: 'Jiri Slaby'
  Cc: 'Jiri Slaby', linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	'Jean Delvare', linux-i2c-u79uwXL29TY76Z2rM5mHXA,
	'Ben Dooks'

 Hi Jiri

Until now, this driver have been reviewed / accepted by Ben Dooks [ben-i2c-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org].
Thus, I think he will review / accept with sooner or later.

Thanks,
-----------------------------------------
Tomoya MORINAGA
OKI SEMICONDUCTOR CO., LTD.


> -----Original Message-----
> From: Jiri Slaby [mailto:jirislaby-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org] 
> Sent: Wednesday, April 20, 2011 12:06 AM
> To: Tomoya MORINAGA
> Cc: 'Jiri Slaby'; linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; 'Jean 
> Delvare'; linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> Subject: Re: [PATCH 5/7] I2C: eg20t, remove unused variable
> 
> On 03/23/2011 11:50 AM, Tomoya MORINAGA wrote:
> > Hi Jiri,
> > 
> > It looks OK.
> > 
> > Signed-off-by: Tomoya MORINAGA <tomoya-linux-ECg8zkTtlr0C6LszWs/t0g@public.gmane.org>
> 
> Hi, will somebody take it or should I resubmit?
> 
> > Thanks,
> > -----------------------------------------
> > Tomoya MORINAGA
> > OKI SEMICONDUCTOR CO., LTD.
> > 
> >> -----Original Message-----
> >> From: linux-kernel-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> >> [mailto:linux-kernel-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org] On Behalf Of Jiri Slaby
> >> Sent: Wednesday, March 23, 2011 5:50 PM
> >> To: jirislaby-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
> >> Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; Jiri Slaby; Jean Delvare; 
> >> linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> >> Subject: [PATCH 5/7] I2C: eg20t, remove unused variable
> >>
> >> drivers/i2c/busses/i2c-eg20t.c:684:2: warning: Value stored to 
> >> 'msglen' is never read msglen = (pmsg->len) - (subaddrlen + 1);
> >> ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >>
> >> Signed-off-by: Jiri Slaby <jslaby-AlSwsSmVLrQ@public.gmane.org>
> >> Cc: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
> >> Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> >> ---
> >>  drivers/i2c/busses/i2c-eg20t.c |    8 --------
> >>  1 files changed, 0 insertions(+), 8 deletions(-)
> >>
> >> diff --git a/drivers/i2c/busses/i2c-eg20t.c 
> >> b/drivers/i2c/busses/i2c-eg20t.c index 878a120..ea73252 100644
> >> --- a/drivers/i2c/busses/i2c-eg20t.c
> >> +++ b/drivers/i2c/busses/i2c-eg20t.c
> >> @@ -651,8 +651,6 @@ static s32 pch_i2c_xfer(struct i2c_adapter 
> >> *i2c_adap,
> >>  	struct i2c_msg *pmsg;
> >>  	u32 i = 0;
> >>  	u32 status;
> >> -	u32 msglen;
> >> -	u32 subaddrlen;
> >>  	s32 ret;
> >>  
> >>  	struct i2c_algo_pch_data *adap = i2c_adap->algo_data; 
> @@ -676,12 
> >> +674,6 @@ static s32 pch_i2c_xfer(struct i2c_adapter *i2c_adap,
> >>  	status = pmsg->flags;
> >>  	pch_dbg(adap,
> >>  		"After invoking I2C_MODE_SEL :flag= 0x%x\n", status);
> >> -	/* calculate sub address length and message length */
> >> -	/* these are applicable only for buffer mode */
> >> -	subaddrlen = pmsg->buf[0];
> >> -	/* calculate actual message length excluding
> >> -	 * the sub address fields */
> >> -	msglen = (pmsg->len) - (subaddrlen + 1);
> >>  	if (status & (I2C_M_RD)) {
> >>  		pch_dbg(adap, "invoking pch_i2c_readbytes\n");
> >>  		ret = pch_i2c_readbytes(i2c_adap, pmsg, (i + 1 == num),
> >> --
> >> 1.7.4.1
> >>
> >>
> >> --
> >> To unsubscribe from this list: send the line "unsubscribe 
> >> linux-kernel" in the body of a message to 
> majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org 
> >> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> >> Please read the FAQ at  http://www.tux.org/lkml/
> >>
> > 
> 
> 
> --
> js
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-04-20  0:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1300870200-24405-1-git-send-email-jslaby@suse.cz>
     [not found] ` <1300870200-24405-1-git-send-email-jslaby-AlSwsSmVLrQ@public.gmane.org>
2011-03-23  8:49   ` [PATCH 5/7] I2C: eg20t, remove unused variable Jiri Slaby
2011-03-23 10:09     ` Jean Delvare
     [not found]     ` <1300870200-24405-5-git-send-email-jslaby-AlSwsSmVLrQ@public.gmane.org>
2011-03-23 10:50       ` Tomoya MORINAGA
     [not found]         ` <3DCFFD98C696488F94CB1A74F2998DF9-c0cKtqp5df7I9507bXv2FdBPR1lH4CV8@public.gmane.org>
2011-04-19 15:06           ` Jiri Slaby
     [not found]             ` <4DADA4D8.4080602-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2011-04-20  0:04               ` Tomoya MORINAGA

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox