Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
* [PATCH] mfd: qcom-pm8xxx: Remove set but unused variable 'rev'
@ 2022-12-27  8:19 Jiapeng Chong
  2023-01-05 15:01 ` Lee Jones
  0 siblings, 1 reply; 2+ messages in thread
From: Jiapeng Chong @ 2022-12-27  8:19 UTC (permalink / raw)
  To: agross
  Cc: andersson, konrad.dybcio, lee, linux-arm-msm, linux-kernel,
	Jiapeng Chong, Abaci Robot

Variable rev is not effectively used in the function, so delete it.

drivers/mfd/qcom-pm8xxx.c:513:6: warning: variable 'rev' set but not used.

Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3558
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
 drivers/mfd/qcom-pm8xxx.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/mfd/qcom-pm8xxx.c b/drivers/mfd/qcom-pm8xxx.c
index 601106580e2e..9a948df8c28d 100644
--- a/drivers/mfd/qcom-pm8xxx.c
+++ b/drivers/mfd/qcom-pm8xxx.c
@@ -510,7 +510,6 @@ static int pm8xxx_probe(struct platform_device *pdev)
 	struct regmap *regmap;
 	int irq, rc;
 	unsigned int val;
-	u32 rev;
 	struct pm_irq_chip *chip;
 
 	data = of_device_get_match_data(&pdev->dev);
@@ -535,7 +534,6 @@ static int pm8xxx_probe(struct platform_device *pdev)
 		return rc;
 	}
 	pr_info("PMIC revision 1: %02X\n", val);
-	rev = val;
 
 	/* Read PMIC chip revision 2 */
 	rc = regmap_read(regmap, REG_HWREV_2, &val);
@@ -545,7 +543,6 @@ static int pm8xxx_probe(struct platform_device *pdev)
 		return rc;
 	}
 	pr_info("PMIC revision 2: %02X\n", val);
-	rev |= val << BITS_PER_BYTE;
 
 	chip = devm_kzalloc(&pdev->dev,
 			    struct_size(chip, config, data->num_irqs),
-- 
2.20.1.7.g153144c


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

* Re: [PATCH] mfd: qcom-pm8xxx: Remove set but unused variable 'rev'
  2022-12-27  8:19 [PATCH] mfd: qcom-pm8xxx: Remove set but unused variable 'rev' Jiapeng Chong
@ 2023-01-05 15:01 ` Lee Jones
  0 siblings, 0 replies; 2+ messages in thread
From: Lee Jones @ 2023-01-05 15:01 UTC (permalink / raw)
  To: Jiapeng Chong
  Cc: agross, andersson, konrad.dybcio, linux-arm-msm, linux-kernel,
	Abaci Robot

On Tue, 27 Dec 2022, Jiapeng Chong wrote:

> Variable rev is not effectively used in the function, so delete it.
> 
> drivers/mfd/qcom-pm8xxx.c:513:6: warning: variable 'rev' set but not used.
> 
> Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3558
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
> ---
>  drivers/mfd/qcom-pm8xxx.c | 3 ---
>  1 file changed, 3 deletions(-)

Applied, thanks

-- 
Lee Jones [李琼斯]

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

end of thread, other threads:[~2023-01-05 15:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-27  8:19 [PATCH] mfd: qcom-pm8xxx: Remove set but unused variable 'rev' Jiapeng Chong
2023-01-05 15:01 ` Lee Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox