mbox series

[v1,0/3] soc: mediatek: mtk-cmdq-helper: Various cleanups

Message ID 20240918100620.103536-1-angelogioacchino.delregno@collabora.com (mailing list archive)
Headers show
Series soc: mediatek: mtk-cmdq-helper: Various cleanups | expand

Message

AngeloGioacchino Del Regno Sept. 18, 2024, 10:06 a.m. UTC
This series performs various cleanups to the MediaTek CMDQ Helper lib,
reducing code duplication and enhancing human readability.

This also avoids double initialization struct cmdq_instruction as,
in some cases, it was stack-initialized to zero and then overwritten
completely anyway a bit later.
I'd expect compilers to be somehow smart about that, but still, while
at it ... why not :-)

Tested on MT8192 Asurada, MT8195 Tomato Chromebooks.

AngeloGioacchino Del Regno (3):
  soc: mediatek: mtk-cmdq: Move mask build and append to function
  soc: mediatek: mtk-cmdq: Mark very unlikely branches as such
  soc: mediatek: mtk-cmdq: Move cmdq_instruction init to declaration

 drivers/soc/mediatek/mtk-cmdq-helper.c | 241 ++++++++++++-------------
 1 file changed, 112 insertions(+), 129 deletions(-)