aboutsummaryrefslogtreecommitdiffstats
path: root/net/lapb/lapb_timer.c
diff options
context:
space:
mode:
authorChristophe JAILLET <[email protected]>2025-05-18 12:16:21 +0000
committerMark Brown <[email protected]>2025-05-19 10:41:48 +0000
commite9be77134469df4a11da898bec2bfc137700a9f3 (patch)
tree20010e654a2a21cfddc5263cb178eb43ec9cb11c /net/lapb/lapb_timer.c
parentregulator: dt-bindings: mt6357: Drop fixed compatible requirement (diff)
downloadkernel-e9be77134469df4a11da898bec2bfc137700a9f3.tar.gz
kernel-e9be77134469df4a11da898bec2bfc137700a9f3.zip
regulator: qcom_spmi: Constify struct spmi_voltage_range
'struct spmi_voltage_range' are only modified at runtime to compile a field, n_voltages, that could be computed at compile time. So, simplify spmi_calculate_num_voltages() and compute n_voltages at compile time within the SPMI_VOLTAGE_RANGE macro. Constifying these structures moves some data to a read-only section, so increase overall security. On a x86_64, with allmodconfig: Before: ====== text data bss dec hex filename 85437 26776 512 112725 1b855 drivers/regulator/qcom_spmi-regulator.o After: ===== text data bss dec hex filename 86857 24760 512 112129 1b601 drivers/regulator/qcom_spmi-regulator.o Signed-off-by: Christophe JAILLET <[email protected]> Reviewed-by: Dmitry Baryshkov <[email protected]> Link: https://patch.msgid.link/ef2a4b6df61e19470ddf6cbd1f3ca1ce88a3c1a0.1747570556.git.christophe.jaillet@wanadoo.fr Signed-off-by: Mark Brown <[email protected]>
Diffstat (limited to 'net/lapb/lapb_timer.c')
0 files changed, 0 insertions, 0 deletions