From: YueHaibing <yuehaibing@huawei.com> To: <gregkh@linuxfoundation.org> Cc: <linux-kernel@vger.kernel.org>, <linux-usb@vger.kernel.org>, YueHaibing <yuehaibing@huawei.com> Subject: [PATCH -next 1/2] usb: ftdi-elan: remove a unnecessary variable 'empty_packets' Date: Wed, 23 Jan 2019 22:16:56 +0800 [thread overview] Message-ID: <20190123141657.8308-2-yuehaibing@huawei.com> (raw) In-Reply-To: <20190123141657.8308-1-yuehaibing@huawei.com> The variable 'empty_packets' does not used in any other places except for self increment, so it can be removed. Signed-off-by: YueHaibing <yuehaibing@huawei.com> --- drivers/usb/misc/ftdi-elan.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/usb/misc/ftdi-elan.c b/drivers/usb/misc/ftdi-elan.c index 76c718a..b2b05c9 100644 --- a/drivers/usb/misc/ftdi-elan.c +++ b/drivers/usb/misc/ftdi-elan.c @@ -915,7 +915,6 @@ static int ftdi_elan_respond_engine(struct usb_ftdi *ftdi) int bytes_read = 0; int retry_on_empty = 1; int retry_on_timeout = 3; - int empty_packets = 0; read:{ int packet_bytes = 0; int retval = usb_bulk_msg(ftdi->udev, @@ -963,7 +962,6 @@ read:{ } else if (packet_bytes == 2) { unsigned char s0 = ftdi->bulk_in_buffer[0]; unsigned char s1 = ftdi->bulk_in_buffer[1]; - empty_packets += 1; if (s0 == 0x31 && s1 == 0x60) { if (retry_on_empty-- > 0) { goto more; -- 2.7.0
WARNING: multiple messages have this Message-ID (diff)
From: YueHaibing <yuehaibing@huawei.com> To: gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, YueHaibing <yuehaibing@huawei.com> Subject: [-next,1/2] usb: ftdi-elan: remove a unnecessary variable 'empty_packets' Date: Wed, 23 Jan 2019 22:16:56 +0800 [thread overview] Message-ID: <20190123141657.8308-2-yuehaibing@huawei.com> (raw) The variable 'empty_packets' does not used in any other places except for self increment, so it can be removed. Signed-off-by: YueHaibing <yuehaibing@huawei.com> --- drivers/usb/misc/ftdi-elan.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/usb/misc/ftdi-elan.c b/drivers/usb/misc/ftdi-elan.c index 76c718a..b2b05c9 100644 --- a/drivers/usb/misc/ftdi-elan.c +++ b/drivers/usb/misc/ftdi-elan.c @@ -915,7 +915,6 @@ static int ftdi_elan_respond_engine(struct usb_ftdi *ftdi) int bytes_read = 0; int retry_on_empty = 1; int retry_on_timeout = 3; - int empty_packets = 0; read:{ int packet_bytes = 0; int retval = usb_bulk_msg(ftdi->udev, @@ -963,7 +962,6 @@ read:{ } else if (packet_bytes == 2) { unsigned char s0 = ftdi->bulk_in_buffer[0]; unsigned char s1 = ftdi->bulk_in_buffer[1]; - empty_packets += 1; if (s0 == 0x31 && s1 == 0x60) { if (retry_on_empty-- > 0) { goto more;
next prev parent reply other threads:[~2019-01-23 14:17 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-01-23 14:16 [PATCH -next 0/2] minor cleanup for ftdi-elan YueHaibing 2019-01-23 14:16 ` YueHaibing [this message] 2019-01-23 14:16 ` [-next,1/2] usb: ftdi-elan: remove a unnecessary variable 'empty_packets' YueHaibing 2019-01-23 14:16 ` [PATCH -next 2/2] usb: ftdi-elan: Fix if == else warnings in ftdi_elan_respond_engine YueHaibing 2019-01-23 14:16 ` [-next,2/2] " YueHaibing
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20190123141657.8308-2-yuehaibing@huawei.com \ --to=yuehaibing@huawei.com \ --cc=gregkh@linuxfoundation.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-usb@vger.kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.