Skip to content

Commit

Permalink
aoe: remove redundant assignment on variable n
Browse files Browse the repository at this point in the history
The variable n is being bit-wise or'd with a value and reassigned
before being returned. The update of n is redundant, replace
the |= operator with | instead. Cleans up clang scan warning:

drivers/block/aoe/aoecmd.c:125:9: warning: Although the value stored
to 'n' is used in the enclosing expression, the value is never
actually read from 'n' [deadcode.DeadStores]

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Link: https://lore.kernel.org/r/20220113000545.1307091-1-colin.i.king@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
Colin Ian King authored and Jens Axboe committed Jan 13, 2022
1 parent 413ec80 commit a6431e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/block/aoe/aoecmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ newtag(struct aoedev *d)
register ulong n;

n = jiffies & 0xffff;
return n |= (++d->lasttag & 0x7fff) << 16;
return n | (++d->lasttag & 0x7fff) << 16;
}

static u32
Expand Down

0 comments on commit a6431e3

Please sign in to comment.