Commit 09bb95d
firmware: arm_scmi: Use round_up() for base protocol list size calculation
Replace the open-coded size rounding logic with the kernel's
round_up() helper to improve readability and align with common
kernel practices.
The original expression:
(1 + (loop_num_ret - 1) / sizeof(u32)) * sizeof(u32)
is equivalent to rounding up loop_num_ret to the nearest multiple of
sizeof(u32), which is exactly what round_up() does.
No functional change.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Cristian Marussi <cristian.marussi@arm.com>
Message-Id: <20260228-scmi-check-v1-1-4935b58bb2db@nxp.com>
Signed-off-by: Sudeep Holla <sudeep.holla@kernel.org>1 parent d8283ac commit 09bb95d
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
219 | 220 | | |
220 | 221 | | |
221 | 222 | | |
222 | | - | |
223 | | - | |
| 223 | + | |
224 | 224 | | |
225 | 225 | | |
226 | 226 | | |
| |||
0 commit comments