public inbox for linux-raid@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] md/raid5: clean up stale declaration and misplaced comment
@ 2026-03-03 11:16 Chen Cheng
  2026-03-04  2:10 ` Yu Kuai
  0 siblings, 1 reply; 2+ messages in thread
From: Chen Cheng @ 2026-03-03 11:16 UTC (permalink / raw)
  To: Song Liu, Yu Kuai; +Cc: Li Nan, linux-raid

Remove the unused md_raid5_kick_device() declaration from raid5.h -
no definition exists for this function.

Move the handle_stripe() documentation comment from above
analyse_stripe() to directly above handle_stripe() where it belongs.

Signed-off-by: Chen Cheng <chencheng@fnnas.com>
---
 drivers/md/raid5.c | 26 ++++++++++++--------------
 drivers/md/raid5.h |  1 -
 2 files changed, 12 insertions(+), 15 deletions(-)

diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index a8e8d431071b..48504b0e496b 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -4594,20 +4594,6 @@ static void handle_stripe_expansion(struct r5conf *conf, struct stripe_head *sh)
 	async_tx_quiesce(&tx);
 }
 
-/*
- * handle_stripe - do things to a stripe.
- *
- * We lock the stripe by setting STRIPE_ACTIVE and then examine the
- * state of various bits to see what needs to be done.
- * Possible results:
- *    return some read requests which now have data
- *    return some write requests which are safely on storage
- *    schedule a read on some buffers
- *    schedule a write of some buffers
- *    return confirmation of parity correctness
- *
- */
-
 static void analyse_stripe(struct stripe_head *sh, struct stripe_head_state *s)
 {
 	struct r5conf *conf = sh->raid_conf;
@@ -4901,6 +4887,18 @@ static void break_stripe_batch_list(struct stripe_head *head_sh,
 		set_bit(STRIPE_HANDLE, &head_sh->state);
 }
 
+/*
+ * handle_stripe - do things to a stripe.
+ *
+ * We lock the stripe by setting STRIPE_ACTIVE and then examine the
+ * state of various bits to see what needs to be done.
+ * Possible results:
+ *    return some read requests which now have data
+ *    return some write requests which are safely on storage
+ *    schedule a read on some buffers
+ *    schedule a write of some buffers
+ *    return confirmation of parity correctness
+ */
 static void handle_stripe(struct stripe_head *sh)
 {
 	struct stripe_head_state s;
diff --git a/drivers/md/raid5.h b/drivers/md/raid5.h
index 110b1c2d0a86..1c7b710fc9c1 100644
--- a/drivers/md/raid5.h
+++ b/drivers/md/raid5.h
@@ -801,7 +801,6 @@ raid5_get_dev_page(struct stripe_head *sh, int disk_idx)
 }
 #endif
 
-void md_raid5_kick_device(struct r5conf *conf);
 int raid5_set_cache_size(struct mddev *mddev, int size);
 sector_t raid5_compute_blocknr(struct stripe_head *sh, int i, int previous);
 void raid5_release_stripe(struct stripe_head *sh);
-- 
2.51.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] md/raid5: clean up stale declaration and misplaced comment
  2026-03-03 11:16 [PATCH] md/raid5: clean up stale declaration and misplaced comment Chen Cheng
@ 2026-03-04  2:10 ` Yu Kuai
  0 siblings, 0 replies; 2+ messages in thread
From: Yu Kuai @ 2026-03-04  2:10 UTC (permalink / raw)
  To: Chen Cheng, Song Liu, Yu Kuai; +Cc: Li Nan, linux-raid

Hi,

在 2026/3/3 19:16, Chen Cheng 写道:
> Remove the unused md_raid5_kick_device() declaration from raid5.h -
> no definition exists for this function.
>
> Move the handle_stripe() documentation comment from above
> analyse_stripe() to directly above handle_stripe() where it belongs.

Looks fine to me, however, please split and just do one thing in one patch.

> Signed-off-by: Chen Cheng <chencheng@fnnas.com>
> ---
>   drivers/md/raid5.c | 26 ++++++++++++--------------
>   drivers/md/raid5.h |  1 -
>   2 files changed, 12 insertions(+), 15 deletions(-)
>
> diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
> index a8e8d431071b..48504b0e496b 100644
> --- a/drivers/md/raid5.c
> +++ b/drivers/md/raid5.c
> @@ -4594,20 +4594,6 @@ static void handle_stripe_expansion(struct r5conf *conf, struct stripe_head *sh)
>   	async_tx_quiesce(&tx);
>   }
>   
> -/*
> - * handle_stripe - do things to a stripe.
> - *
> - * We lock the stripe by setting STRIPE_ACTIVE and then examine the
> - * state of various bits to see what needs to be done.
> - * Possible results:
> - *    return some read requests which now have data
> - *    return some write requests which are safely on storage
> - *    schedule a read on some buffers
> - *    schedule a write of some buffers
> - *    return confirmation of parity correctness
> - *
> - */
> -
>   static void analyse_stripe(struct stripe_head *sh, struct stripe_head_state *s)
>   {
>   	struct r5conf *conf = sh->raid_conf;
> @@ -4901,6 +4887,18 @@ static void break_stripe_batch_list(struct stripe_head *head_sh,
>   		set_bit(STRIPE_HANDLE, &head_sh->state);
>   }
>   
> +/*
> + * handle_stripe - do things to a stripe.
> + *
> + * We lock the stripe by setting STRIPE_ACTIVE and then examine the
> + * state of various bits to see what needs to be done.
> + * Possible results:
> + *    return some read requests which now have data
> + *    return some write requests which are safely on storage
> + *    schedule a read on some buffers
> + *    schedule a write of some buffers
> + *    return confirmation of parity correctness
> + */
>   static void handle_stripe(struct stripe_head *sh)
>   {
>   	struct stripe_head_state s;
> diff --git a/drivers/md/raid5.h b/drivers/md/raid5.h
> index 110b1c2d0a86..1c7b710fc9c1 100644
> --- a/drivers/md/raid5.h
> +++ b/drivers/md/raid5.h
> @@ -801,7 +801,6 @@ raid5_get_dev_page(struct stripe_head *sh, int disk_idx)
>   }
>   #endif
>   
> -void md_raid5_kick_device(struct r5conf *conf);
>   int raid5_set_cache_size(struct mddev *mddev, int size);
>   sector_t raid5_compute_blocknr(struct stripe_head *sh, int i, int previous);
>   void raid5_release_stripe(struct stripe_head *sh);

-- 
Thansk,
Kuai

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-03-04  2:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-03 11:16 [PATCH] md/raid5: clean up stale declaration and misplaced comment Chen Cheng
2026-03-04  2:10 ` Yu Kuai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox