summaryrefslogtreecommitdiff
path: root/scripts/lib/kdoc/kdoc_output.py
diff options
context:
space:
mode:
authorChen-Yu Tsai <wenst@chromium.org>2025-05-15 15:38:23 +0800
committerMark Brown <broonie@kernel.org>2025-05-15 09:44:43 +0200
commit29552dcc044a233be84ab9b64539fdc7d8f4314e (patch)
tree4ef53eab7ac213b35a3845d4bcc59046ec130853 /scripts/lib/kdoc/kdoc_output.py
parent0be889823f93429dab396cb7ac061d02046bd962 (diff)
ASoC: mediatek: mt8183-afe-pcm: shorten mt8183_is_volatile_reg()
mt8183_is_volatile_reg() is a large switch-case block that lists out every register that is volatile. Since many pairs of registers have consecutive addresses, the cases can be compressed down with the ellipsis, i.e. GCC extension "case ranges" [1] to cover more addresses in one case, shortening the source code. This is not completely the same, since the addresses are 4-byte aligned, and using the case ranges feature adds all unaligned addresses in between. In practice this doesn't matter since the unaligned addresses are blocked by the regmap core. This also ends up compiling slightly smaller with a reduction of 128 bytes in the text section. [1] https://gcc.gnu.org/onlinedocs/gcc/Case-Ranges.html Signed-off-by: Chen-Yu Tsai <wenst@chromium.org> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://patch.msgid.link/20250515073825.4155297-4-wenst@chromium.org Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'scripts/lib/kdoc/kdoc_output.py')
0 files changed, 0 insertions, 0 deletions