Re: [PATCH 1/7] md: factor error handling out of md_done_sync into helper

From: Yu Kuai

Date: Sun Sep 21 2025 - 21:24:40 EST


在 2025/09/17 17:35, linan666@xxxxxxxxxxxxxxx 写道:
From: Li Nan<linan122@xxxxxxxxxx>

The 'ok' parameter in md_done_sync() is redundant for most callers that
always pass 'true'. Factor error handling logic into a separate helper
function md_sync_error() to eliminate unnecessary parameter passing and
improve code clarity.

No functional changes introduced.

Signed-off-by: Li Nan<linan122@xxxxxxxxxx>
---
drivers/md/md.h | 3 ++-
drivers/md/md.c | 17 ++++++++++-------
drivers/md/raid1.c | 17 ++++++++---------
drivers/md/raid10.c | 11 ++++++-----
drivers/md/raid5.c | 14 ++++++++------
5 files changed, 34 insertions(+), 28 deletions(-)

LGTM
Reviewed-by: Yu Kuai <yukuai3@xxxxxxxxxx>