]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
firmware: arm_scmi: Use round_up() for base protocol list size calculation
authorPeng Fan <peng.fan@nxp.com>
Sat, 28 Feb 2026 03:37:33 +0000 (11:37 +0800)
committerSudeep Holla <sudeep.holla@kernel.org>
Sun, 8 Mar 2026 13:12:00 +0000 (13:12 +0000)
commit09bb95d63adeaab7b07127cfce4ecbeff9ab6488
treee9648ed65f2f04a4d576fbc12cec6acfea8367dd
parentd8283ac2c8fbf2b459672064ebff718fbefae226
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>
drivers/firmware/arm_scmi/base.c