diff options
author | Colin Ian King <colin.king@canonical.com> | 2018-07-05 11:05:32 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-07-05 19:34:21 +0900 |
commit | b67030b139de957f1266555009f5f19feac819c4 (patch) | |
tree | 69bb3efa3d07f62b8d55fbed25c85d23c0a1d6bb /drivers/net/fjes | |
parent | 2f9be18164add28fa231950e20ad9a978a34f13d (diff) | |
download | lwn-b67030b139de957f1266555009f5f19feac819c4.tar.gz lwn-b67030b139de957f1266555009f5f19feac819c4.zip |
fjes: use currently unused variable my_epid and max_epid
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/fjes')
-rw-r--r-- | drivers/net/fjes/fjes_main.c | 8 |
1 files 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, |