Commit 2aada5b1 authored by Damien Le Moal's avatar Damien Le Moal Committed by Song Liu

md: raid5: Fix compilation warning

Remove the if statement around the calls to sysfs_link_rdev() to avoid
the compilation warning "suggest braces around empty body in an ‘if’
statement" when compiling with W=1.

Also fix function description comments to avoid kdoc format warnings.
Signed-off-by: default avatarDamien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: default avatarSong Liu <songliubraving@fb.com>
parent 52923083
...@@ -2217,9 +2217,9 @@ static int grow_stripes(struct r5conf *conf, int num) ...@@ -2217,9 +2217,9 @@ static int grow_stripes(struct r5conf *conf, int num)
/** /**
* scribble_alloc - allocate percpu scribble buffer for required size * scribble_alloc - allocate percpu scribble buffer for required size
* of the scribble region * of the scribble region
* @percpu - from for_each_present_cpu() of the caller * @percpu: from for_each_present_cpu() of the caller
* @num - total number of disks in the array * @num: total number of disks in the array
* @cnt - scribble objs count for required size of the scribble region * @cnt: scribble objs count for required size of the scribble region
* *
* The scribble buffer size must be enough to contain: * The scribble buffer size must be enough to contain:
* 1/ a struct page pointer for each device in the array +2 * 1/ a struct page pointer for each device in the array +2
...@@ -3710,7 +3710,7 @@ static int fetch_block(struct stripe_head *sh, struct stripe_head_state *s, ...@@ -3710,7 +3710,7 @@ static int fetch_block(struct stripe_head *sh, struct stripe_head_state *s,
return 0; return 0;
} }
/** /*
* handle_stripe_fill - read or compute data to satisfy pending requests. * handle_stripe_fill - read or compute data to satisfy pending requests.
*/ */
static void handle_stripe_fill(struct stripe_head *sh, static void handle_stripe_fill(struct stripe_head *sh,
...@@ -7944,8 +7944,8 @@ static int raid5_start_reshape(struct mddev *mddev) ...@@ -7944,8 +7944,8 @@ static int raid5_start_reshape(struct mddev *mddev)
else else
rdev->recovery_offset = 0; rdev->recovery_offset = 0;
if (sysfs_link_rdev(mddev, rdev)) /* Failure here is OK */
/* Failure here is OK */; sysfs_link_rdev(mddev, rdev);
} }
} else if (rdev->raid_disk >= conf->previous_raid_disks } else if (rdev->raid_disk >= conf->previous_raid_disks
&& !test_bit(Faulty, &rdev->flags)) { && !test_bit(Faulty, &rdev->flags)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment