From patchwork Fri Nov 16 11:01:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "\(Exiting\) Baolin Wang" X-Patchwork-Id: 151329 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp278707ljp; Fri, 16 Nov 2018 03:01:56 -0800 (PST) X-Google-Smtp-Source: AJdET5cxqfTsg8vQ8uRIlCMW/oQ4IAHSoy84vfvPQcCCiF6IBk2qo1HNcq1eesDWsgyPVRbi2qNN X-Received: by 2002:a63:a16:: with SMTP id 22mr9505345pgk.318.1542366116006; Fri, 16 Nov 2018 03:01:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542366116; cv=none; d=google.com; s=arc-20160816; b=lcKaArTdAnl6vOPZgKNNUbaQZ/0erJT1QXq6IAWVOiLtuZRgk6BbcmkzFhYmehDNES 3ygpc6t0U7abvc1RKI2Bcp7zRws+eKFyorkGJVB8Vt5mR+qgHyePHPRy+15WF/T9zAZP 2KDg7QHp0aa1EOWJpyJHFazVe9iWKmHNtM9S6eWN3qEz2iiTPXZ1NTyG54vmZK99C2Z1 HDvm489E3cjbV4H9MD00c5IXtDXXA4/+RNJLoVAohy9sAueILYq4LKUHAvD4MW7qGWC2 usPDOlorYZCKbR3sM/CjjPqrzItRfAr2vpVO8ffFsdeKwTCsHiQU3aZ2eUT8fkFyQuP1 GmSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=6LJBTmjPNOjTTUrUiu6Uu+XwWfVjQEp0CGIbptL2pHE=; b=mc5RWV5ApnYWRyn0OkXDqqZYQhILf3MgTMwYBtXoFCY757DaI1d0idpYWNuLFtR0J3 Z0hzSowlgf9a+GegnCxjHJJdOUrMTJ4Yg6VD/iPwBX2n6xHw9NwWjyrDA0CVN8mU2C3+ hxK+xfcDP3sGvwaaTN7qfdFEPj7MdE6TOIrfHk7yNuQvtVGl5rXUxidb2S66zPOA9DC6 rNbOtwbb6lduma+HvXYkqGZMkRWL7rXOew3xplCXHV2WxX/7RL2R0zIAxS7jKCvumjRi dlqEzPxYdVGqffKlOC8KFAFCTzkUgKaAVZXntK9TyHp2Pzgho/bch2hGShExlbCsuwZz W1lw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fapVZTL3; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b4-v6si32659547pla.189.2018.11.16.03.01.55; Fri, 16 Nov 2018 03:01:55 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fapVZTL3; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727624AbeKPVNp (ORCPT + 6 others); Fri, 16 Nov 2018 16:13:45 -0500 Received: from mail-pf1-f193.google.com ([209.85.210.193]:37594 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727544AbeKPVNp (ORCPT ); Fri, 16 Nov 2018 16:13:45 -0500 Received: by mail-pf1-f193.google.com with SMTP id u3-v6so8572850pfm.4 for ; Fri, 16 Nov 2018 03:01:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=6LJBTmjPNOjTTUrUiu6Uu+XwWfVjQEp0CGIbptL2pHE=; b=fapVZTL3wXtnQ6qrqRRDkPW6zHsdgy5Hy97ifAbfHXRkAIiBxsmM0Sy8undREmQltZ aWIExxCEv7GERjq3U5gIThtpDaIv68DyzvWZg+mMtu8D+GCLNz8sKR2/r5/GBsn5M8YL Qv4l4dWy/0EKyK5VjrApfY2CXYwApuZdj6eHw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=6LJBTmjPNOjTTUrUiu6Uu+XwWfVjQEp0CGIbptL2pHE=; b=M8s5CGrvwTDIovDct5slXzBBIjRb7j9QWNU90Ft+1KhlJkCOJFJdx9VwXTbDk0JRxP DZS/UkQ03y96O/QCwWLQYcr2HxonvoAHm7fht8eRwDZr/eY+n4Pv0Tr85O+4DU9O2vdx yAaV7dKKxjnBu9nNy1Zns7lRPGmaDbnlZOgYyBEJSY2lTx6TkAfTRWOuPXyt9j2M85uC pJ1ACUIQivN7LZBYL/SM9PwmzmSH1j2daBQ+ydIfKYeH3SZStE9Fyy+07rSapxCo8G7y MXg0W58HS+lXRoukJ2UdWiWZw+CMzCowRXtyuwC/cQunahdAaQcx7Rmvtb8m1xDAj/A9 k7PQ== X-Gm-Message-State: AGRZ1gK/sCF8sldXwJ85Ur3QPnFJuJsEDZwhro+QKd/z2hiLbWl9ETmk Yg3W6TAwuf6Z6LoKs2WBM6g5NQ== X-Received: by 2002:a63:dc0c:: with SMTP id s12mr9577968pgg.398.1542366114488; Fri, 16 Nov 2018 03:01:54 -0800 (PST) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.102]) by smtp.gmail.com with ESMTPSA id 202sm21268106pfy.87.2018.11.16.03.01.50 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 16 Nov 2018 03:01:53 -0800 (PST) From: Baolin Wang To: sre@kernel.org, robh+dt@kernel.org, mark.rutland@arm.com Cc: linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, yuanjiang.yu@unisoc.com, baolin.wang@linaro.org, broonie@kernel.org, linus.walleij@linaro.org Subject: [PATCH 1/6] power: supply: charger-manager: Remove unused index counting Date: Fri, 16 Nov 2018 19:01:08 +0800 Message-Id: <4ea9eaf85d780afb190cb45da2df8ff5fd86d449.1542362262.git.baolin.wang@linaro.org> X-Mailer: git-send-email 1.7.9.5 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Remove unused index counting. Signed-off-by: Baolin Wang --- drivers/power/supply/charger-manager.c | 4 ---- 1 file changed, 4 deletions(-) -- 1.7.9.5 diff --git a/drivers/power/supply/charger-manager.c b/drivers/power/supply/charger-manager.c index faa1a67..a1b420a 100644 --- a/drivers/power/supply/charger-manager.c +++ b/drivers/power/supply/charger-manager.c @@ -1687,10 +1687,6 @@ static int charger_manager_probe(struct platform_device *pdev) return -EINVAL; } - /* Counting index only */ - while (desc->psy_charger_stat[i]) - i++; - /* Check if charger's supplies are present at probe */ for (i = 0; desc->psy_charger_stat[i]; i++) { struct power_supply *psy;