Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp946982ybi; Wed, 17 Jul 2019 07:20:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqxA44DrO+bl0UkN29cceg+yXLoNXLHSrqj8Nxqpjih2Upyv31yuQZU5+spAHGoyVDKTFKFz X-Received: by 2002:a17:902:106:: with SMTP id 6mr44281325plb.64.1563373208065; Wed, 17 Jul 2019 07:20:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563373208; cv=none; d=google.com; s=arc-20160816; b=MyALIG3JAZNMR2eqmlg4EM6E1KukV6Va+b1L/CqzQ0yxMldGADP3TO7rA8t/ZEKx3t eSDbk5qyRy90R68vl0sGs2RtZ1QvPW9P+10hXqt4cDic+EMtU8SFjtjOrep7effY9oMw /yHra9KsoWDuhmbm0IJqsHPX8jiDShQDEv/UQhjDvYX70dK7Y69AyxLgKJ9U2A63Bl36 nXqgnsvqxBjGvtdh+ZquKFUawUlIKdocz9Rianjjj+qwUP/B3nfYjCl4J1fdc0HaDyVq LxXrk9hpNV8O8btvC3H/eMO3Dfe0bsqbtBV7LlpPTstNgGC64DhtPMd8P4zRQrHYU68U fuag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=YTr+I7NL9Zjd44j8hbKcK9PYGTL9Lzyge5rmPFyhIDw=; b=kegmQ7XBMyXv9WUOGaNAGfbFegMqjrKHeOYmZXc+Pqq3pzy2oWzx7uBotbep2dz/GC fbcJic82EaplWGJhTmfnXBkCkhWRZ6N92rUOl7T3OxODmadDkEqFoMkBc557mUf/XHIV HdwxR4HC9pFxJszmuuI7JL7s2uaCJOyva2iQGWOEHcetESNKId02BW5K/vl+D54oM6nD yrCdR2SFYSpT4JXxlb0phKnVpXUK+kFubyVFTXL6IA4GG/W/qXK1fgiLrG3TTH3iUa3B Bqk8ujl9qI6TX64tBM1WNL5wOO9FSr89dSPrcWdpWtoS8WMBn3A2aA1Adp9WXEA1puJx FUyg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t9si22171284pji.69.2019.07.17.07.19.52; Wed, 17 Jul 2019 07:20:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727497AbfGQOTL (ORCPT + 99 others); Wed, 17 Jul 2019 10:19:11 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:33980 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726081AbfGQOTL (ORCPT ); Wed, 17 Jul 2019 10:19:11 -0400 Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 68D1BC5C673E4A53180A; Wed, 17 Jul 2019 22:19:07 +0800 (CST) Received: from localhost (10.133.213.239) by DGGEMS408-HUB.china.huawei.com (10.3.19.208) with Microsoft SMTP Server id 14.3.439.0; Wed, 17 Jul 2019 22:18:58 +0800 From: YueHaibing To: , , , CC: , , YueHaibing Subject: [PATCH v2] power: supply: ab8500: remove set but not used variables 'vbup33_vrtcn' and 'bup_vch_range' Date: Wed, 17 Jul 2019 22:18:48 +0800 Message-ID: <20190717141848.31116-1-yuehaibing@huawei.com> X-Mailer: git-send-email 2.10.2.windows.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.133.213.239] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fixes gcc '-Wunused-but-set-variable' warnings: drivers/power/supply/ab8500_charger.c: In function ab8500_charger_init_hw_registers: drivers/power/supply/ab8500_charger.c:3013:24: warning: variable vbup33_vrtcn set but not used [-Wunused-but-set-variable] drivers/power/supply/ab8500_charger.c:3013:5: warning: variable bup_vch_range set but not used [-Wunused-but-set-variable] They are not used since commit 4c4268dc97c4 ("power: supply: ab8500: Drop AB8540/9540 support") Reported-by: Hulk Robot Signed-off-by: YueHaibing --- v2: Fix patch title --- drivers/power/supply/ab8500_charger.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/drivers/power/supply/ab8500_charger.c b/drivers/power/supply/ab8500_charger.c index 30de448..270a48a 100644 --- a/drivers/power/supply/ab8500_charger.c +++ b/drivers/power/supply/ab8500_charger.c @@ -3010,7 +3010,6 @@ static int ab8500_charger_usb_get_property(struct power_supply *psy, static int ab8500_charger_init_hw_registers(struct ab8500_charger *di) { int ret = 0; - u8 bup_vch_range = 0, vbup33_vrtcn = 0; /* Setup maximum charger current and voltage for ABB cut2.0 */ if (!is_ab8500_1p1_or_earlier(di->parent)) { @@ -3111,12 +3110,6 @@ static int ab8500_charger_init_hw_registers(struct ab8500_charger *di) goto out; } - /* Backup battery voltage and current */ - if (di->bm->bkup_bat_v > BUP_VCH_SEL_3P1V) - bup_vch_range = BUP_VCH_RANGE; - if (di->bm->bkup_bat_v == BUP_VCH_SEL_3P3V) - vbup33_vrtcn = VBUP33_VRTCN; - ret = abx500_set_register_interruptible(di->dev, AB8500_RTC, AB8500_RTC_BACKUP_CHG_REG, -- 2.7.4