linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] thermal: exynos: fix masking value for exynos7 temp_error
       [not found] ` <CGME20220331071809epcas2p472298073d4aed0a8026d4b08967c5de5@epcms2p5>
@ 2022-03-31  7:28   ` Sang Min Kim
  2022-03-31  8:23     ` Krzysztof Kozlowski
  0 siblings, 1 reply; 2+ messages in thread
From: Sang Min Kim @ 2022-03-31  7:28 UTC (permalink / raw)
  To: bzolnier@gmail.com, krzk@kernel.org, rafael@kernel.org,
	daniel.lezcano@linaro.org, amitk@kernel.org, rui.zhang@intel.com,
	ALIM AKHTAR, edubezval@gmail.com
  Cc: linux-pm@vger.kernel.org, linux-samsung-soc@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org

 
Modify mask value for the temp_error in the sanitize_temp_error() function.
 
Fixes: aef27b658b43 ("thermal: exynos: use sanitize_temp_error() in exynos7_tmu_initialize()")
masked temp_error2 with EXYNOS_TMU_TEMP_MASK(0xff) value even in the case
of EXYNOS7.
In addition, when entering the if statement, both temp_error1 and 2 are
masked with EXYNOS_TMU_TEMP_MASK(0xff).
 
By modifying to use the previously declared local variable tmu_temp_mask,
the mask value suitable for the SOC can be applied.
 
Signed-off-by: sangmin kim <hypmean.kim@samsung.com>
---
 V1 -> V2: Add fixes tag
 
 drivers/thermal/samsung/exynos_tmu.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
 
diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c
index f4ab4c5b4b62..08c63fe5566e 100644
--- a/drivers/thermal/samsung/exynos_tmu.c
+++ b/drivers/thermal/samsung/exynos_tmu.c
@@ -243,17 +243,17 @@ static void sanitize_temp_error(struct exynos_tmu_data *data, u32 trim_info)
 
         data->temp_error1 = trim_info & tmu_temp_mask;
         data->temp_error2 = ((trim_info >> EXYNOS_TRIMINFO_85_SHIFT) &
-                                EXYNOS_TMU_TEMP_MASK);
+                                tmu_temp_mask);
 
         if (!data->temp_error1 ||
             (data->min_efuse_value > data->temp_error1) ||
             (data->temp_error1 > data->max_efuse_value))
-                data->temp_error1 = data->efuse_value & EXYNOS_TMU_TEMP_MASK;
+                data->temp_error1 = data->efuse_value & tmu_temp_mask;
 
         if (!data->temp_error2)
                 data->temp_error2 =
                         (data->efuse_value >> EXYNOS_TRIMINFO_85_SHIFT) &
-                        EXYNOS_TMU_TEMP_MASK;
+                        tmu_temp_mask;
 }
 
 static int exynos_tmu_initialize(struct platform_device *pdev)
--
2.9.5


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] thermal: exynos: fix masking value for exynos7 temp_error
  2022-03-31  7:28   ` [PATCH v2] thermal: exynos: fix masking value for exynos7 temp_error Sang Min Kim
@ 2022-03-31  8:23     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 2+ messages in thread
From: Krzysztof Kozlowski @ 2022-03-31  8:23 UTC (permalink / raw)
  To: hypmean.kim, bzolnier@gmail.com, rafael@kernel.org,
	daniel.lezcano@linaro.org, amitk@kernel.org, rui.zhang@intel.com,
	ALIM AKHTAR, edubezval@gmail.com
  Cc: linux-pm@vger.kernel.org, linux-samsung-soc@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org

On 31/03/2022 09:28, Sang Min Kim wrote:
>  

Unneeded empty line at beginning of msg.

> Modify mask value for the temp_error in the sanitize_temp_error() function.
>  
> Fixes: aef27b658b43 ("thermal: exynos: use sanitize_temp_error() in exynos7_tmu_initialize()")
> masked temp_error2 with EXYNOS_TMU_TEMP_MASK(0xff) value even in the case
> of EXYNOS7.
> In addition, when entering the if statement, both temp_error1 and 2 are
> masked with EXYNOS_TMU_TEMP_MASK(0xff).
>  
> By modifying to use the previously declared local variable tmu_temp_mask,
> the mask value suitable for the SOC can be applied.
>  

Fixes tag goes next to other tags, so usually before Signed-off-by.
Check some existing commits for examples.

> Signed-off-by: sangmin kim <hypmean.kim@samsung.com>

You received by Reviewed-by tag, so you should include it in v2. Don't
skip them.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

> ---
>  V1 -> V2: Add fixes tag
>  
>  drivers/thermal/samsung/exynos_tmu.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>  

Best regards,
Krzysztof

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-03-31  8:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20220331071833.115732-1-hypmean.kim@samsung.com>
     [not found] ` <CGME20220331071809epcas2p472298073d4aed0a8026d4b08967c5de5@epcms2p5>
2022-03-31  7:28   ` [PATCH v2] thermal: exynos: fix masking value for exynos7 temp_error Sang Min Kim
2022-03-31  8:23     ` Krzysztof Kozlowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).