From: Yangtao Li <tiny.windzz@gmail.com>
To: anarsoul@gmail.com, rui.zhang@intel.com,
daniel.lezcano@linaro.org, amit.kucheria@verdurent.com,
mripard@kernel.org, wens@csie.org
Cc: linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, Yangtao Li <tiny.windzz@gmail.com>
Subject: [PATCH] thermal: sun8i: remove unused variable and unneeded macros
Date: Sun, 12 Jan 2020 18:09:25 +0000 [thread overview]
Message-ID: <20200112180925.23705-1-tiny.windzz@gmail.com> (raw)
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
next reply other threads:[~2020-01-12 18:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-12 18:09 Yangtao Li [this message]
2020-01-12 18:55 ` [PATCH] thermal: sun8i: remove unused variable and unneeded macros Daniel Lezcano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200112180925.23705-1-tiny.windzz@gmail.com \
--to=tiny.windzz@gmail.com \
--cc=amit.kucheria@verdurent.com \
--cc=anarsoul@gmail.com \
--cc=daniel.lezcano@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mripard@kernel.org \
--cc=rui.zhang@intel.com \
--cc=wens@csie.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).