From: zhong jiang <zhongjiang@huawei.com>
To: <kvalo@codeaurora.org>, <stas.yakovlev@gmail.com>
Cc: <linux-wireless@vger.kernel.org>, <netdev@vger.kernel.org>,
<zhongjiang@huawei.com>
Subject: [PATCH 3/3] b43legacy: ASoC: ux500: Remove redundant variable "count"
Date: Thu, 31 Oct 2019 21:46:20 +0800 [thread overview]
Message-ID: <1572529580-26594-4-git-send-email-zhongjiang@huawei.com> (raw)
In-Reply-To: <1572529580-26594-1-git-send-email-zhongjiang@huawei.com>
local variable "count" is not used. hence it is safe to remove and
just return 0.
Signed-off-by: zhong jiang <zhongjiang@huawei.com>
---
drivers/net/wireless/broadcom/b43legacy/debugfs.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/net/wireless/broadcom/b43legacy/debugfs.c b/drivers/net/wireless/broadcom/b43legacy/debugfs.c
index 082aab8..de766c7 100644
--- a/drivers/net/wireless/broadcom/b43legacy/debugfs.c
+++ b/drivers/net/wireless/broadcom/b43legacy/debugfs.c
@@ -65,7 +65,6 @@ struct b43legacy_dfs_file * fops_to_dfs_file(struct b43legacy_wldev *dev,
/* wl->irq_lock is locked */
static ssize_t tsf_read_file(struct b43legacy_wldev *dev, char *buf, size_t bufsize)
{
- ssize_t count = 0;
u64 tsf;
b43legacy_tsf_read(dev, &tsf);
@@ -73,7 +72,7 @@ static ssize_t tsf_read_file(struct b43legacy_wldev *dev, char *buf, size_t bufs
(unsigned int)((tsf & 0xFFFFFFFF00000000ULL) >> 32),
(unsigned int)(tsf & 0xFFFFFFFFULL));
- return count;
+ return 0;
}
/* wl->irq_lock is locked */
@@ -91,7 +90,6 @@ static int tsf_write_file(struct b43legacy_wldev *dev, const char *buf, size_t c
/* wl->irq_lock is locked */
static ssize_t ucode_regs_read_file(struct b43legacy_wldev *dev, char *buf, size_t bufsize)
{
- ssize_t count = 0;
int i;
for (i = 0; i < 64; i++) {
@@ -99,7 +97,7 @@ static ssize_t ucode_regs_read_file(struct b43legacy_wldev *dev, char *buf, size
b43legacy_shm_read16(dev, B43legacy_SHM_WIRELESS, i));
}
- return count;
+ return 0;
}
/* wl->irq_lock is locked */
@@ -125,7 +123,6 @@ static ssize_t shm_read_file(struct b43legacy_wldev *dev, char *buf, size_t bufs
static ssize_t txstat_read_file(struct b43legacy_wldev *dev, char *buf, size_t bufsize)
{
struct b43legacy_txstatus_log *log = &dev->dfsentry->txstatlog;
- ssize_t count = 0;
unsigned long flags;
int i, idx;
struct b43legacy_txstatus *stat;
@@ -166,7 +163,7 @@ static ssize_t txstat_read_file(struct b43legacy_wldev *dev, char *buf, size_t b
out_unlock:
spin_unlock_irqrestore(&log->lock, flags);
- return count;
+ return 0;
}
/* wl->irq_lock is locked */
--
1.7.12.4
next prev parent reply other threads:[~2019-10-31 13:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-31 13:46 [PATCH 0/3] wireless: remove unneeded variable and return 0 zhong jiang
2019-10-31 13:46 ` [PATCH 1/3] ipw2x00: Remove redundant variable "rc" zhong jiang
2019-10-31 20:44 ` Simon Horman
2019-11-01 1:42 ` zhong jiang
2019-10-31 13:46 ` [PATCH 2/3] iwlegacy: Remove redundant variable "ret" zhong jiang
2019-10-31 13:46 ` zhong jiang [this message]
2019-11-02 6:04 ` [PATCH 3/3] b43legacy: ASoC: ux500: Remove redundant variable "count" kbuild test robot
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=1572529580-26594-4-git-send-email-zhongjiang@huawei.com \
--to=zhongjiang@huawei.com \
--cc=kvalo@codeaurora.org \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=stas.yakovlev@gmail.com \
/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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).