diff mbox series

[4/5] power: avs: qcom-cpr: remove set but unused variable

Message ID 20191223141934.19837-5-nks@flawful.org (mailing list archive)
State Mainlined, archived
Headers show
Series qcom-cpr fixes for rjw bleeding-edge | expand

Commit Message

Niklas Cassel Dec. 23, 2019, 2:19 p.m. UTC
drivers/power/avs/qcom-cpr.c:896:35:
warning: variable ‘prev’ set but not used

Detected when running make with W=1.

Signed-off-by: Niklas Cassel <nks@flawful.org>
---
 drivers/power/avs/qcom-cpr.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Bjorn Andersson Dec. 27, 2019, 6:52 a.m. UTC | #1
On Mon 23 Dec 06:19 PST 2019, Niklas Cassel wrote:

> drivers/power/avs/qcom-cpr.c:896:35:
> warning: variable ‘prev’ set but not used
> 
> Detected when running make with W=1.
> 

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

> Signed-off-by: Niklas Cassel <nks@flawful.org>
> ---
>  drivers/power/avs/qcom-cpr.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/power/avs/qcom-cpr.c b/drivers/power/avs/qcom-cpr.c
> index 232836a1ef27..484dd498f8b9 100644
> --- a/drivers/power/avs/qcom-cpr.c
> +++ b/drivers/power/avs/qcom-cpr.c
> @@ -893,7 +893,7 @@ static int cpr_fuse_corner_init(struct cpr_drv *drv)
>  	int i;
>  	unsigned int step_volt;
>  	struct fuse_corner_data *fdata;
> -	struct fuse_corner *fuse, *end, *prev;
> +	struct fuse_corner *fuse, *end;
>  	int uV;
>  	const struct reg_sequence *accs;
>  	int ret;
> @@ -909,7 +909,7 @@ static int cpr_fuse_corner_init(struct cpr_drv *drv)
>  	end = &fuse[desc->num_fuse_corners - 1];
>  	fdata = desc->cpr_fuses.fuse_corner_data;
>  
> -	for (i = 0, prev = NULL; fuse <= end; fuse++, fuses++, i++, fdata++) {
> +	for (i = 0; fuse <= end; fuse++, fuses++, i++, fdata++) {
>  		/*
>  		 * Update SoC voltages: platforms might choose a different
>  		 * regulators than the one used to characterize the algorithms
> -- 
> 2.24.1
>
diff mbox series

Patch

diff --git a/drivers/power/avs/qcom-cpr.c b/drivers/power/avs/qcom-cpr.c
index 232836a1ef27..484dd498f8b9 100644
--- a/drivers/power/avs/qcom-cpr.c
+++ b/drivers/power/avs/qcom-cpr.c
@@ -893,7 +893,7 @@  static int cpr_fuse_corner_init(struct cpr_drv *drv)
 	int i;
 	unsigned int step_volt;
 	struct fuse_corner_data *fdata;
-	struct fuse_corner *fuse, *end, *prev;
+	struct fuse_corner *fuse, *end;
 	int uV;
 	const struct reg_sequence *accs;
 	int ret;
@@ -909,7 +909,7 @@  static int cpr_fuse_corner_init(struct cpr_drv *drv)
 	end = &fuse[desc->num_fuse_corners - 1];
 	fdata = desc->cpr_fuses.fuse_corner_data;
 
-	for (i = 0, prev = NULL; fuse <= end; fuse++, fuses++, i++, fdata++) {
+	for (i = 0; fuse <= end; fuse++, fuses++, i++, fdata++) {
 		/*
 		 * Update SoC voltages: platforms might choose a different
 		 * regulators than the one used to characterize the algorithms