From patchwork Tue Dec 27 08:19:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiapeng Chong X-Patchwork-Id: 637010 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A6840C10F1B for ; Tue, 27 Dec 2022 08:19:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229652AbiL0ITr (ORCPT ); Tue, 27 Dec 2022 03:19:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60670 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231349AbiL0ITj (ORCPT ); Tue, 27 Dec 2022 03:19:39 -0500 Received: from out30-8.freemail.mail.aliyun.com (out30-8.freemail.mail.aliyun.com [115.124.30.8]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9930E8FD4; Tue, 27 Dec 2022 00:19:32 -0800 (PST) X-Alimail-AntiSpam: AC=PASS; BC=-1|-1; BR=01201311R121e4; CH=green; DM=||false|; DS=||; FP=0|-1|-1|-1|0|-1|-1|-1; HT=ay29a033018046049; MF=jiapeng.chong@linux.alibaba.com; NM=1; PH=DS; RN=8; SR=0; TI=SMTPD_---0VYCwgaT_1672129163; Received: from localhost(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0VYCwgaT_1672129163) by smtp.aliyun-inc.com; Tue, 27 Dec 2022 16:19:29 +0800 From: Jiapeng Chong To: agross@kernel.org Cc: andersson@kernel.org, konrad.dybcio@linaro.org, lee@kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Jiapeng Chong , Abaci Robot Subject: [PATCH] mfd: qcom-pm8xxx: Remove set but unused variable 'rev' Date: Tue, 27 Dec 2022 16:19:21 +0800 Message-Id: <20221227081921.56448-1-jiapeng.chong@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.7.g153144c MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org 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 Signed-off-by: Jiapeng Chong --- 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),