2024-04-09 19:56:55

by Christophe JAILLET

[permalink] [raw]
Subject: [PATCH] thermal/drivers/qcom: Remove some unused fields in struct qpnp_tm_chip

In "struct qpnp_tm_chip", the 'prev_stage' field is unused.
Remove it.

Found with cppcheck, unusedStructMember.

Signed-off-by: Christophe JAILLET <[email protected]>
---
Compile tested only.

Apparently, it has never been used. It is not a left-over from a
refactoring.
---
drivers/thermal/qcom/qcom-spmi-temp-alarm.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/thermal/qcom/qcom-spmi-temp-alarm.c b/drivers/thermal/qcom/qcom-spmi-temp-alarm.c
index 78c5cfe6a0c0..3cd74f6cac8f 100644
--- a/drivers/thermal/qcom/qcom-spmi-temp-alarm.c
+++ b/drivers/thermal/qcom/qcom-spmi-temp-alarm.c
@@ -74,7 +74,6 @@ struct qpnp_tm_chip {
long temp;
unsigned int thresh;
unsigned int stage;
- unsigned int prev_stage;
unsigned int base;
/* protects .thresh, .stage and chip registers */
struct mutex lock;
--
2.44.0



2024-04-11 03:17:15

by Bjorn Andersson

[permalink] [raw]
Subject: Re: [PATCH] thermal/drivers/qcom: Remove some unused fields in struct qpnp_tm_chip

On Tue, Apr 09, 2024 at 09:56:34PM +0200, Christophe JAILLET wrote:
> In "struct qpnp_tm_chip", the 'prev_stage' field is unused.
> Remove it.
>
> Found with cppcheck, unusedStructMember.
>
> Signed-off-by: Christophe JAILLET <[email protected]>

Reviewed-by: Bjorn Andersson <[email protected]>

Regards,
Bjorn

> ---
> Compile tested only.
>
> Apparently, it has never been used. It is not a left-over from a
> refactoring.
> ---
> drivers/thermal/qcom/qcom-spmi-temp-alarm.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/thermal/qcom/qcom-spmi-temp-alarm.c b/drivers/thermal/qcom/qcom-spmi-temp-alarm.c
> index 78c5cfe6a0c0..3cd74f6cac8f 100644
> --- a/drivers/thermal/qcom/qcom-spmi-temp-alarm.c
> +++ b/drivers/thermal/qcom/qcom-spmi-temp-alarm.c
> @@ -74,7 +74,6 @@ struct qpnp_tm_chip {
> long temp;
> unsigned int thresh;
> unsigned int stage;
> - unsigned int prev_stage;
> unsigned int base;
> /* protects .thresh, .stage and chip registers */
> struct mutex lock;
> --
> 2.44.0
>
>

2024-04-22 16:23:49

by Daniel Lezcano

[permalink] [raw]
Subject: Re: [PATCH] thermal/drivers/qcom: Remove some unused fields in struct qpnp_tm_chip

On 09/04/2024 21:56, Christophe JAILLET wrote:
> In "struct qpnp_tm_chip", the 'prev_stage' field is unused.
> Remove it.
>
> Found with cppcheck, unusedStructMember.
>
> Signed-off-by: Christophe JAILLET <[email protected]>
> ---

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