Fix the following gcc warning: drivers/md/raid5-cache.c:198:11: warning: variable ‘offset’ set but not used [-Wunused-but-set-variable] sector_t offset; ^~~~~~ Reported-by: Hulk Robot <hulkci@xxxxxxxxxx> Signed-off-by: Jason Yan <yanaijie@xxxxxxxxxx> --- drivers/md/raid5-cache.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/md/raid5-cache.c b/drivers/md/raid5-cache.c index 9b6da759dca2..eea14fa9e59b 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; } -- 2.17.2