diff mbox series

thermal/drivers/qcom: Remove some unused fields in struct qpnp_tm_chip

Message ID d1c3a3c455f485dae46290e3488daf1dcc1d355a.1712687589.git.christophe.jaillet@wanadoo.fr (mailing list archive)
State Not Applicable
Headers show
Series thermal/drivers/qcom: Remove some unused fields in struct qpnp_tm_chip | expand

Commit Message

Christophe JAILLET April 9, 2024, 7:56 p.m. UTC
In "struct qpnp_tm_chip", the 'prev_stage' field is unused.
Remove it.

Found with cppcheck, unusedStructMember.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
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(-)

Comments

Bjorn Andersson April 11, 2024, 3:15 a.m. UTC | #1
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 <christophe.jaillet@wanadoo.fr>

Reviewed-by: Bjorn Andersson <andersson@kernel.org>

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
> 
>
Daniel Lezcano April 22, 2024, 4:23 p.m. UTC | #2
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 <christophe.jaillet@wanadoo.fr>
> ---

Applied, thanks
diff mbox series

Patch

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;