Linux RAID subsystem development
 help / color / mirror / Atom feed
From: Damien Le Moal <damien.lemoal@wdc.com>
To: Song Liu <song@kernel.org>, linux-raid@vger.kernel.org
Subject: [PATCH 3/4] md: raid5: Fix compilation warning
Date: Thu, 16 Jul 2020 13:54:42 +0900	[thread overview]
Message-ID: <20200716045443.662056-4-damien.lemoal@wdc.com> (raw)
In-Reply-To: <20200716045443.662056-1-damien.lemoal@wdc.com>

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: Damien Le Moal <damien.lemoal@wdc.com>
---
 drivers/md/raid5.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index a4fbafa5b8f8..2dad541a60da 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -2217,9 +2217,9 @@ static int grow_stripes(struct r5conf *conf, int num)
 /**
  * scribble_alloc - allocate percpu scribble buffer for required size
  *		    of the scribble region
- * @percpu - from for_each_present_cpu() of the caller
- * @num - total number of disks in the array
- * @cnt - scribble objs count for required size of the scribble region
+ * @percpu: from for_each_present_cpu() of the caller
+ * @num: total number of disks in the array
+ * @cnt: scribble objs count for required size of the scribble region
  *
  * The scribble buffer size must be enough to contain:
  * 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,
 	return 0;
 }
 
-/**
+/*
  * handle_stripe_fill - read or compute data to satisfy pending requests.
  */
 static void handle_stripe_fill(struct stripe_head *sh,
@@ -7944,8 +7944,8 @@ static int raid5_start_reshape(struct mddev *mddev)
 					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->previous_raid_disks
 				   && !test_bit(Faulty, &rdev->flags)) {
-- 
2.26.2

  parent reply	other threads:[~2020-07-16  4:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-16  4:54 [PATCH 0/4] Various cleanups Damien Le Moal
2020-07-16  4:54 ` [PATCH 1/4] md: Fix compilation warning Damien Le Moal
2020-07-16  4:54 ` [PATCH 2/4] md: raid5-cache: Remove set but unused variable Damien Le Moal
2020-07-16  4:54 ` Damien Le Moal [this message]
2020-07-16  4:54 ` [PATCH 4/4] md: raid10: Fix compilation warning Damien Le Moal
2020-07-16  5:53 ` [PATCH 0/4] Various cleanups Song Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200716045443.662056-4-damien.lemoal@wdc.com \
    --to=damien.lemoal@wdc.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=song@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox