* [PATCH] i2c: viperboard: remove superfluous assignment
@ 2014-01-04 21:21 Wolfram Sang
[not found] ` <1388870493-6523-1-git-send-email-wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Wolfram Sang @ 2014-01-04 21:21 UTC (permalink / raw)
To: linux-i2c-u79uwXL29TY76Z2rM5mHXA; +Cc: Lars Poeschel, Wolfram Sang
cppcheck rightfully says:
drivers/i2c/busses/i2c-viperboard.c:169: style: Variable 'bytes_xfer' is assigned a value that is never used.
Signed-off-by: Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
---
drivers/i2c/busses/i2c-viperboard.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/i2c/busses/i2c-viperboard.c b/drivers/i2c/busses/i2c-viperboard.c
index 6976e1c..7533fa3 100644
--- a/drivers/i2c/busses/i2c-viperboard.c
+++ b/drivers/i2c/busses/i2c-viperboard.c
@@ -118,8 +118,7 @@ static int vprbrd_i2c_addr(struct usb_device *usb_dev,
static int vprbrd_i2c_read(struct vprbrd *vb, struct i2c_msg *msg)
{
int ret;
- u16 remain_len, bytes_xfer, len1, len2,
- start = 0x0000;
+ u16 remain_len, len1, len2, start = 0x0000;
struct vprbrd_i2c_read_msg *rmsg =
(struct vprbrd_i2c_read_msg *)vb->buf;
@@ -166,7 +165,6 @@ static int vprbrd_i2c_read(struct vprbrd *vb, struct i2c_msg *msg)
rmsg->header.len3 = remain_len - 512;
rmsg->header.len4 = 0x00;
rmsg->header.len5 = 0x00;
- bytes_xfer = remain_len;
remain_len = 0;
} else if (remain_len <= 1022) {
len1 = 512;
--
1.8.5.1
^ permalink raw reply related [flat|nested] 3+ messages in thread[parent not found: <1388870493-6523-1-git-send-email-wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>]
* Re: [PATCH] i2c: viperboard: remove superfluous assignment [not found] ` <1388870493-6523-1-git-send-email-wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org> @ 2014-01-08 17:00 ` Lars Poeschel 2014-01-09 21:18 ` Wolfram Sang 1 sibling, 0 replies; 3+ messages in thread From: Lars Poeschel @ 2014-01-08 17:00 UTC (permalink / raw) To: Wolfram Sang; +Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA On Wednesday 08 January 2014 22:21:33, Wolfram Sang wrote: > cppcheck rightfully says: > > drivers/i2c/busses/i2c-viperboard.c:169: style: Variable 'bytes_xfer' is > assigned a value that is never used. > > Signed-off-by: Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org> > --- > drivers/i2c/busses/i2c-viperboard.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/i2c/busses/i2c-viperboard.c > b/drivers/i2c/busses/i2c-viperboard.c index 6976e1c..7533fa3 100644 > --- a/drivers/i2c/busses/i2c-viperboard.c > +++ b/drivers/i2c/busses/i2c-viperboard.c > @@ -118,8 +118,7 @@ static int vprbrd_i2c_addr(struct usb_device *usb_dev, > static int vprbrd_i2c_read(struct vprbrd *vb, struct i2c_msg *msg) > { > int ret; > - u16 remain_len, bytes_xfer, len1, len2, > - start = 0x0000; > + u16 remain_len, len1, len2, start = 0x0000; > struct vprbrd_i2c_read_msg *rmsg = > (struct vprbrd_i2c_read_msg *)vb->buf; > > @@ -166,7 +165,6 @@ static int vprbrd_i2c_read(struct vprbrd *vb, struct > i2c_msg *msg) rmsg->header.len3 = remain_len - 512; > rmsg->header.len4 = 0x00; > rmsg->header.len5 = 0x00; > - bytes_xfer = remain_len; > remain_len = 0; > } else if (remain_len <= 1022) { > len1 = 512; Acked-by: Lars Poeschel <poeschel-Xtl8qvBWbHwb1SvskN2V4Q@public.gmane.org> ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] i2c: viperboard: remove superfluous assignment [not found] ` <1388870493-6523-1-git-send-email-wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org> 2014-01-08 17:00 ` Lars Poeschel @ 2014-01-09 21:18 ` Wolfram Sang 1 sibling, 0 replies; 3+ messages in thread From: Wolfram Sang @ 2014-01-09 21:18 UTC (permalink / raw) To: linux-i2c-u79uwXL29TY76Z2rM5mHXA; +Cc: Lars Poeschel [-- Attachment #1: Type: text/plain, Size: 324 bytes --] On Sat, Jan 04, 2014 at 10:21:33PM +0100, Wolfram Sang wrote: > cppcheck rightfully says: > > drivers/i2c/busses/i2c-viperboard.c:169: style: Variable 'bytes_xfer' is assigned a value that is never used. > > Signed-off-by: Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org> Applied to for-next, thanks! [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-01-09 21:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-04 21:21 [PATCH] i2c: viperboard: remove superfluous assignment Wolfram Sang
[not found] ` <1388870493-6523-1-git-send-email-wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
2014-01-08 17:00 ` Lars Poeschel
2014-01-09 21:18 ` Wolfram Sang
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).