Skip to contentSkip to conversation

mfd: qcom-pm8xxx: Remove set but unused variable 'rev'

PATCH Applied Jiapeng Chong 2 participants 2 messages Dec 27, 2022 – Jan 5, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mfd: qcom-pm8xxx: Remove set but unused variable 'rev'

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.

---
 drivers/mfd/qcom-pm8xxx.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/mfd/qcom-pm8xxx.c +0 -3
index 601106580e2e..9a948df8c28d 100644
@@ -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),
Signature · 1 line
2.20.1.7.g153144c
maintainer Applied
#1 lore raw
Quoted 10 lines · Jiapeng Chong

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.

---
 drivers/mfd/qcom-pm8xxx.c | 3 ---
 1 file changed, 3 deletions(-)

Applied, thanks

Signature · 1 line
Lee Jones [李琼斯]