Skip to content

Commit bc1c2f0

Browse files
johnpgarryYuKuai-huawei
authored andcommitted
md/raid10: fix set but not used variable in sync_request_write()
Building with W=1 reports the following: drivers/md/raid10.c: In function ‘sync_request_write’: drivers/md/raid10.c:2441:21: error: variable ‘d’ set but not used [-Werror=unused-but-set-variable] 2441 | int d; | ^ cc1: all warnings being treated as errors Remove the usage of that variable. Fixes: 752d046 ("md: clean up accounting for issued sync IO") Signed-off-by: John Garry <[email protected]> Link: https://lore.kernel.org/linux-raid/[email protected] Signed-off-by: Yu Kuai <[email protected]>
1 parent c0ffeb6 commit bc1c2f0

1 file changed

Lines changed: 0 additions & 3 deletions

File tree

drivers/md/raid10.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2438,15 +2438,12 @@ static void sync_request_write(struct mddev *mddev, struct r10bio *r10_bio)
24382438
* that are active
24392439
*/
24402440
for (i = 0; i < conf->copies; i++) {
2441-
int d;
2442-
24432441
tbio = r10_bio->devs[i].repl_bio;
24442442
if (!tbio || !tbio->bi_end_io)
24452443
continue;
24462444
if (r10_bio->devs[i].bio->bi_end_io != end_sync_write
24472445
&& r10_bio->devs[i].bio != fbio)
24482446
bio_copy_data(tbio, fbio);
2449-
d = r10_bio->devs[i].devnum;
24502447
atomic_inc(&r10_bio->remaining);
24512448
submit_bio_noacct(tbio);
24522449
}

0 commit comments

Comments
 (0)