summaryrefslogtreecommitdiffstats
path: root/drivers/md/raid5-cache.c
diff options
context:
space:
mode:
authorDamien Le Moal <damien.lemoal@wdc.com>2020-07-16 13:54:41 +0900
committerSong Liu <songliubraving@fb.com>2020-07-15 22:46:07 -0700
commit52923083b54e7c6eeec8d78dbb9d209f4b2e9b9e (patch)
tree57217a249fae4886410cc8719ee68482ee4fd521 /drivers/md/raid5-cache.c
parent5e3b8a8d59b2064f68ab349182f5dc5f5bb4fd30 (diff)
downloadlinux-52923083b54e7c6eeec8d78dbb9d209f4b2e9b9e.tar.gz
linux-52923083b54e7c6eeec8d78dbb9d209f4b2e9b9e.tar.bz2
linux-52923083b54e7c6eeec8d78dbb9d209f4b2e9b9e.zip
md: raid5-cache: Remove set but unused variable
Remove the variable offset in r5c_tree_index() to avoid a "set but not used" compilation warning when compiling with W=1. Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com> Signed-off-by: Song Liu <songliubraving@fb.com>
Diffstat (limited to 'drivers/md/raid5-cache.c')
-rw-r--r--drivers/md/raid5-cache.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/md/raid5-cache.c b/drivers/md/raid5-cache.c
index 0bea21d81697..34fd942dad83 100644
--- a/drivers/md/raid5-cache.c
+++ b/drivers/md/raid5-cache.c
@@ -195,9 +195,7 @@ struct r5l_log {
static inline sector_t r5c_tree_index(struct r5conf *conf,
sector_t sect)
{
- sector_t offset;
-
- offset = sector_div(sect, conf->chunk_sectors);
+ sector_div(sect, conf->chunk_sectors);
return sect;
}