[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250815015404.468511-6-zhao.xichao@vivo.com>
Date: Fri, 15 Aug 2025 09:53:54 +0800
From: Xichao Zhao <zhao.xichao@...o.com>
To: Song Liu <song@...nel.org>,
Yu Kuai <yukuai3@...wei.com>,
linux-raid@...r.kernel.org (open list:SOFTWARE RAID (Multiple Disks) SUPPORT),
linux-kernel@...r.kernel.org (open list)
Cc: Xichao Zhao <zhao.xichao@...o.com>
Subject: [PATCH v1 05/13] ib/raid6: Clean up code style in recov_s390xc.c
Reduce or add spaces to clean up code style.
Clean up comment style.
No functional changes here.
Signed-off-by: Xichao Zhao <zhao.xichao@...o.com>
---
lib/raid6/recov_s390xc.c | 36 ++++++++++++++++++++----------------
1 file changed, 20 insertions(+), 16 deletions(-)
diff --git a/lib/raid6/recov_s390xc.c b/lib/raid6/recov_s390xc.c
index 487018f81192..f1b329ab0229 100644
--- a/lib/raid6/recov_s390xc.c
+++ b/lib/raid6/recov_s390xc.c
@@ -27,26 +27,28 @@ static void raid6_2data_recov_s390xc(int disks, size_t bytes, int faila,
const u8 *qmul; /* Q multiplier table (for both) */
int i;
- p = (u8 *)ptrs[disks-2];
- q = (u8 *)ptrs[disks-1];
-
- /* Compute syndrome with zero for the missing data pages
- Use the dead data pages as temporary storage for
- delta p and delta q */
+ p = (u8 *)ptrs[disks - 2];
+ q = (u8 *)ptrs[disks - 1];
+
+ /*
+ * Compute syndrome with zero for the missing data pages
+ * Use the dead data pages as temporary storage for
+ * delta p and delta q
+ */
dp = (u8 *)ptrs[faila];
ptrs[faila] = raid6_get_zero_page();
- ptrs[disks-2] = dp;
+ ptrs[disks - 2] = dp;
dq = (u8 *)ptrs[failb];
ptrs[failb] = raid6_get_zero_page();
- ptrs[disks-1] = dq;
+ ptrs[disks - 1] = dq;
raid6_call.gen_syndrome(disks, bytes, ptrs);
/* Restore pointer table */
ptrs[faila] = dp;
ptrs[failb] = dq;
- ptrs[disks-2] = p;
- ptrs[disks-1] = q;
+ ptrs[disks - 2] = p;
+ ptrs[disks - 1] = q;
/* Now, pick the proper data tables */
pbmul = raid6_gfmul[raid6_gfexi[failb-faila]];
@@ -75,20 +77,22 @@ static void raid6_datap_recov_s390xc(int disks, size_t bytes, int faila,
const u8 *qmul; /* Q multiplier table */
int i;
- p = (u8 *)ptrs[disks-2];
- q = (u8 *)ptrs[disks-1];
+ p = (u8 *)ptrs[disks - 2];
+ q = (u8 *)ptrs[disks - 1];
- /* Compute syndrome with zero for the missing data page
- Use the dead data page as temporary storage for delta q */
+ /*
+ * Compute syndrome with zero for the missing data page
+ * Use the dead data page as temporary storage for delta q
+ */
dq = (u8 *)ptrs[faila];
ptrs[faila] = raid6_get_zero_page();
- ptrs[disks-1] = dq;
+ ptrs[disks - 1] = dq;
raid6_call.gen_syndrome(disks, bytes, ptrs);
/* Restore pointer table */
ptrs[faila] = dq;
- ptrs[disks-1] = q;
+ ptrs[disks - 1] = q;
/* Now, pick the proper data tables */
qmul = raid6_gfmul[raid6_gfinv[raid6_gfexp[faila]]];
--
2.34.1
Powered by blists - more mailing lists