* [PATCH] fjes: use currently unused variable my_epid and max_epid
@ 2018-07-05 10:05 Colin King
2018-07-05 10:35 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2018-07-05 10:05 UTC (permalink / raw)
To: David S . Miller, netdev; +Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
Variables my_epid and max_epid are currently assigned and not being
used - however, I suspect they were intended to be used in the for-loops
to reduce the dereferencing of hw. Replace hw->my_epid and hw->max_epid
with these variables.
Cleans up clang warnings:
warning: variable 'my_epid' set but not used [-Wunused-but-set-variable]
variable 'max_epid' set but not used [-Wunused-but-set-variable]
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/net/fjes/fjes_main.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/fjes/fjes_main.c b/drivers/net/fjes/fjes_main.c
index 750954be5a74..d3eae1239045 100644
--- a/drivers/net/fjes/fjes_main.c
+++ b/drivers/net/fjes/fjes_main.c
@@ -1395,8 +1395,8 @@ static void fjes_watch_unshare_task(struct work_struct *work)
while ((unshare_watch_bitmask || hw->txrx_stop_req_bit) &&
(wait_time < 3000)) {
- for (epidx = 0; epidx < hw->max_epid; epidx++) {
- if (epidx == hw->my_epid)
+ for (epidx = 0; epidx < max_epid; epidx++) {
+ if (epidx == my_epid)
continue;
is_shared = fjes_hw_epid_is_shared(hw->hw_info.share,
@@ -1453,8 +1453,8 @@ static void fjes_watch_unshare_task(struct work_struct *work)
}
if (hw->hw_info.buffer_unshare_reserve_bit) {
- for (epidx = 0; epidx < hw->max_epid; epidx++) {
- if (epidx == hw->my_epid)
+ for (epidx = 0; epidx < max_epid; epidx++) {
+ if (epidx == my_epid)
continue;
if (test_bit(epidx,
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] fjes: use currently unused variable my_epid and max_epid
2018-07-05 10:05 [PATCH] fjes: use currently unused variable my_epid and max_epid Colin King
@ 2018-07-05 10:35 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2018-07-05 10:35 UTC (permalink / raw)
To: colin.king; +Cc: netdev, kernel-janitors, linux-kernel
From: Colin King <colin.king@canonical.com>
Date: Thu, 5 Jul 2018 11:05:32 +0100
> From: Colin Ian King <colin.king@canonical.com>
>
> Variables my_epid and max_epid are currently assigned and not being
> used - however, I suspect they were intended to be used in the for-loops
> to reduce the dereferencing of hw. Replace hw->my_epid and hw->max_epid
> with these variables.
>
> Cleans up clang warnings:
> warning: variable 'my_epid' set but not used [-Wunused-but-set-variable]
> variable 'max_epid' set but not used [-Wunused-but-set-variable]
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-07-05 10:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-05 10:05 [PATCH] fjes: use currently unused variable my_epid and max_epid Colin King
2018-07-05 10:35 ` David Miller
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).