From: Fabio Estevam <fabio.estevam@nxp.com>
Date: Sat, 28 Jul 2018 16:17:50 -0300
Subject: thermal: qoriq: Simplify the 'site' variable assignment
Git-commit: 1a893a5a198eff228ddc1a364830f8928b8f9ac5
Patch-mainline: v4.19-rc2
References: fate#326530,fate#326531,fate#326535,fate#326538,fate#326539
There is no need to assign zero to the variable 'site' and then
perform a compound bitwise OR operation afterwards.
Make it simpler by assigning the final 'site' value directly.
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Mian Yousaf Kaukab <yousaf.kaukab@suse.com>
---
drivers/thermal/qoriq_thermal.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/thermal/qoriq_thermal.c b/drivers/thermal/qoriq_thermal.c
index e32d6ac79145..f807e4d1f72e 100644
--- a/drivers/thermal/qoriq_thermal.c
+++ b/drivers/thermal/qoriq_thermal.c
@@ -197,7 +197,7 @@ static int qoriq_tmu_probe(struct platform_device *pdev)
int ret;
struct qoriq_tmu_data *data;
struct device_node *np = pdev->dev.of_node;
- u32 site = 0;
+ u32 site;
if (!np) {
dev_err(&pdev->dev, "Device OF-Node is NULL");
@@ -244,7 +244,7 @@ static int qoriq_tmu_probe(struct platform_device *pdev)
}
/* Enable monitoring */
- site |= 0x1 << (15 - data->sensor_id);
+ site = 0x1 << (15 - data->sensor_id);
tmu_write(data, site | TMR_ME | TMR_ALPF, &data->regs->tmr);
return 0;
--
2.11.0