Skip to content

Commit

Permalink
fjes: use currently unused variable my_epid and max_epid
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Colin Ian King authored and David S. Miller committed Jul 5, 2018
1 parent 2f9be18 commit b67030b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/net/fjes/fjes_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit b67030b

Please sign in to comment.