soc: mtk-svs: mt8183: refactor o_slope calculation
authorRoger Lu <roger.lu@mediatek.com>
Wed, 11 Jan 2023 07:45:28 +0000 (15:45 +0800)
committerMatthias Brugger <matthias.bgg@gmail.com>
Tue, 31 Jan 2023 13:40:55 +0000 (14:40 +0100)
commitd5a7d809907c5df9e79625cd5f7d5a43b70dd913
tree7a369815c67720d2d99cb7c40bdf8b6e1875e729
parent01c9a8bd23ca43c708043c712fb4579848ae8dae
soc: mtk-svs: mt8183: refactor o_slope calculation

The o_slope value is dependent of the o_slope_sign, refactor code to get
rid of unnecessary if constructs.

Signed-off-by: Roger Lu <roger.lu@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20230111074528.29354-15-roger.lu@mediatek.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
drivers/soc/mediatek/mtk-svs.c