md: raid10: Fix compilation warning
authorDamien Le Moal <damien.lemoal@wdc.com>
Thu, 16 Jul 2020 04:54:43 +0000 (13:54 +0900)
committerSong Liu <songliubraving@fb.com>
Thu, 16 Jul 2020 05:46:07 +0000 (22:46 -0700)
Remove the if statement around the call to sysfs_link_rdev() in
raid10_start_reshape() to avoid the compilation warning:

warning: suggest braces around empty body in an ‘if’ statement

when compiling with W=1.

Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: Song Liu <songliubraving@fb.com>
drivers/md/raid10.c

index 2c47474..14b1ba7 100644 (file)
@@ -4307,8 +4307,8 @@ out:
                                        else
                                                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->prev.raid_disks
                                   && !test_bit(Faulty, &rdev->flags)) {