All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] thermal: sun8i: remove unused variable and unneeded macros
@ 2020-01-12 18:09 ` Yangtao Li
  0 siblings, 0 replies; 4+ messages in thread
From: Yangtao Li @ 2020-01-12 18:09 UTC (permalink / raw)
  To: anarsoul, rui.zhang, daniel.lezcano, amit.kucheria, mripard, wens
  Cc: linux-pm, linux-arm-kernel, linux-kernel, Yangtao Li

The cp_ft_flag variable is not used after initialization, so delete
it. After that, THS_EFUSE_CP_FT_MASK, THS_EFUSE_CP_FT_BIT and
THS_CALIBRATION_IN_FT are not needed, so delete them.

Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
---
 drivers/thermal/sun8i_thermal.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/drivers/thermal/sun8i_thermal.c b/drivers/thermal/sun8i_thermal.c
index 4bcde9491edb..bd7549f9ecba 100644
--- a/drivers/thermal/sun8i_thermal.c
+++ b/drivers/thermal/sun8i_thermal.c
@@ -54,9 +54,6 @@
 #define SUN50I_H6_THS_DATA_IRQ_STS(x)		BIT(x)
 
 /* millidegree celsius */
-#define THS_EFUSE_CP_FT_MASK			0x3000
-#define THS_EFUSE_CP_FT_BIT			12
-#define THS_CALIBRATION_IN_FT			1
 
 struct tsensor {
 	struct ths_device		*tmdev;
@@ -88,7 +85,6 @@ struct ths_device {
 	struct clk				*bus_clk;
 	struct clk                              *mod_clk;
 	struct tsensor				sensor[MAX_SENSOR_NUM];
-	u32					cp_ft_flag;
 };
 
 /* Temp Unit: millidegree Celsius */
@@ -244,8 +240,6 @@ static int sun50i_h6_ths_calibrate(struct ths_device *tmdev,
 	 * register values and this will become a calibration offset.
 	 */
 	ft_temp = (caldata[0] & FT_TEMP_MASK) * 100;
-	tmdev->cp_ft_flag = (caldata[0] & THS_EFUSE_CP_FT_MASK)
-		>> THS_EFUSE_CP_FT_BIT;
 
 	for (i = 0; i < tmdev->chip->sensor_num; i++) {
 		int sensor_reg = caldata[i + 1];
-- 
2.17.1


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

* [PATCH] thermal: sun8i: remove unused variable and unneeded macros
@ 2020-01-12 18:09 ` Yangtao Li
  0 siblings, 0 replies; 4+ messages in thread
From: Yangtao Li @ 2020-01-12 18:09 UTC (permalink / raw)
  To: anarsoul, rui.zhang, daniel.lezcano, amit.kucheria, mripard, wens
  Cc: Yangtao Li, linux-kernel, linux-arm-kernel, linux-pm

The cp_ft_flag variable is not used after initialization, so delete
it. After that, THS_EFUSE_CP_FT_MASK, THS_EFUSE_CP_FT_BIT and
THS_CALIBRATION_IN_FT are not needed, so delete them.

Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
---
 drivers/thermal/sun8i_thermal.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/drivers/thermal/sun8i_thermal.c b/drivers/thermal/sun8i_thermal.c
index 4bcde9491edb..bd7549f9ecba 100644
--- a/drivers/thermal/sun8i_thermal.c
+++ b/drivers/thermal/sun8i_thermal.c
@@ -54,9 +54,6 @@
 #define SUN50I_H6_THS_DATA_IRQ_STS(x)		BIT(x)
 
 /* millidegree celsius */
-#define THS_EFUSE_CP_FT_MASK			0x3000
-#define THS_EFUSE_CP_FT_BIT			12
-#define THS_CALIBRATION_IN_FT			1
 
 struct tsensor {
 	struct ths_device		*tmdev;
@@ -88,7 +85,6 @@ struct ths_device {
 	struct clk				*bus_clk;
 	struct clk                              *mod_clk;
 	struct tsensor				sensor[MAX_SENSOR_NUM];
-	u32					cp_ft_flag;
 };
 
 /* Temp Unit: millidegree Celsius */
@@ -244,8 +240,6 @@ static int sun50i_h6_ths_calibrate(struct ths_device *tmdev,
 	 * register values and this will become a calibration offset.
 	 */
 	ft_temp = (caldata[0] & FT_TEMP_MASK) * 100;
-	tmdev->cp_ft_flag = (caldata[0] & THS_EFUSE_CP_FT_MASK)
-		>> THS_EFUSE_CP_FT_BIT;
 
 	for (i = 0; i < tmdev->chip->sensor_num; i++) {
 		int sensor_reg = caldata[i + 1];
-- 
2.17.1


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

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

* Re: [PATCH] thermal: sun8i: remove unused variable and unneeded macros
  2020-01-12 18:09 ` Yangtao Li
@ 2020-01-12 18:55   ` Daniel Lezcano
  -1 siblings, 0 replies; 4+ messages in thread
From: Daniel Lezcano @ 2020-01-12 18:55 UTC (permalink / raw)
  To: Yangtao Li, anarsoul, rui.zhang, amit.kucheria, mripard, wens
  Cc: linux-pm, linux-arm-kernel, linux-kernel

On 12/01/2020 19:09, Yangtao Li wrote:
> The cp_ft_flag variable is not used after initialization, so delete
> it. After that, THS_EFUSE_CP_FT_MASK, THS_EFUSE_CP_FT_BIT and
> THS_CALIBRATION_IN_FT are not needed, so delete them.
> 
> Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
> ---

Applied, thanks


-- 
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog


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

* Re: [PATCH] thermal: sun8i: remove unused variable and unneeded macros
@ 2020-01-12 18:55   ` Daniel Lezcano
  0 siblings, 0 replies; 4+ messages in thread
From: Daniel Lezcano @ 2020-01-12 18:55 UTC (permalink / raw)
  To: Yangtao Li, anarsoul, rui.zhang, amit.kucheria, mripard, wens
  Cc: linux-kernel, linux-arm-kernel, linux-pm

On 12/01/2020 19:09, Yangtao Li wrote:
> The cp_ft_flag variable is not used after initialization, so delete
> it. After that, THS_EFUSE_CP_FT_MASK, THS_EFUSE_CP_FT_BIT and
> THS_CALIBRATION_IN_FT are not needed, so delete them.
> 
> Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
> ---

Applied, thanks


-- 
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog


_______________________________________________
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] 4+ messages in thread

end of thread, other threads:[~2020-01-12 18:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-12 18:09 [PATCH] thermal: sun8i: remove unused variable and unneeded macros Yangtao Li
2020-01-12 18:09 ` Yangtao Li
2020-01-12 18:55 ` Daniel Lezcano
2020-01-12 18:55   ` Daniel Lezcano

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.