Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp4301639rwb; Tue, 16 Aug 2022 19:21:44 -0700 (PDT) X-Google-Smtp-Source: AA6agR4UpQgefySqsDMOExLJCD/d844cqRXkT+TYQZuU7br2zMpfs3HMeZ2y/6M+2h4S0XE9q3M0 X-Received: by 2002:a63:211:0:b0:41d:946e:cf67 with SMTP id 17-20020a630211000000b0041d946ecf67mr20312459pgc.497.1660702904489; Tue, 16 Aug 2022 19:21:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660702904; cv=none; d=google.com; s=arc-20160816; b=DqCskjEhL8AhJBraXGVjJrZDNWO/hJxAgNrVD8w4YM3X/0U7FSoj9x2qHtv4BImzpx R8kH56hwT/c+zH/JEqm6VvYhk7LR+zLc+bTeqv3fmjDLjK4ZLJh/8m0YAW6SAZXa/0eg 2/Ckau+fjw6uR4Qql76ctEXL8u6WFEmG5LZnHXP9mb5wdMPo177hjc4L8J7wzM2Jd9Gd yEPV8GCbtXlgVQHaEJj4kw+Ibz/JXRqd4urbCpbHVgJnSbpGy+PHDiwvt6/KwfPcTf28 MB2bYSNY/heij9zM7ciVIZMpbu8D0FhGu+1NuMnoqxHicAmclTWrU/NlveNT/jTByqtu ka7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject; bh=8wO1Snlx52KYyQZtX8by3Y1MIfVnStfqDPIuvAzogrQ=; b=ynnKe+Nd8G2x1Kj7UoBqX6MmU28EILPLpw9IOy5k01R4OGEKZPzZTH2SeSKx1xk12P L/A052HuzOXLafjxxEHAy9B5mGGORmeB97uWi97Eu6QrQlpE13q7UBVy/QvuvuAHc6e+ DVxZbGBuv2yWzW956xCuZrONAx+495cPhQP3N6FkbI3K6ElJAi0Al98Qo2UdpKml7ZqG YV1i2q49yRHPNs3/Paqp0o+1uWZ/hxN4Np17RD55ipI9FnMgKdQ9ZbR31GRGBPNUA7w0 mJDSSkaoNSnESVYenZs1WhgntCcjQJvSsVC4OdGvdF35rufsKAkoIF5rNVKI4zNBva0b LSaA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 63-20020a630042000000b0041b4bc77d5esi16020527pga.621.2022.08.16.19.21.33; Tue, 16 Aug 2022 19:21:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237940AbiHQB6I (ORCPT + 99 others); Tue, 16 Aug 2022 21:58:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60044 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232515AbiHQB56 (ORCPT ); Tue, 16 Aug 2022 21:57:58 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F38919753B; Tue, 16 Aug 2022 18:57:57 -0700 (PDT) Received: from dggpemm500023.china.huawei.com (unknown [172.30.72.56]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4M6rhJ6JQQzmVql; Wed, 17 Aug 2022 09:55:44 +0800 (CST) Received: from dggpemm500001.china.huawei.com (7.185.36.107) by dggpemm500023.china.huawei.com (7.185.36.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Wed, 17 Aug 2022 09:57:55 +0800 Received: from [10.67.111.195] (10.67.111.195) by dggpemm500001.china.huawei.com (7.185.36.107) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Wed, 17 Aug 2022 09:57:55 +0800 Subject: Re: [PATCH] power: supply: ab8500: remove unused static local variable To: Tom Rix , , CC: , References: <20220719022743.305189-1-trix@redhat.com> From: chenlifu Message-ID: <7b42a25a-806f-f3b2-b42f-ac3fdb6627b4@huawei.com> Date: Wed, 17 Aug 2022 09:57:44 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.9.0 MIME-Version: 1.0 In-Reply-To: <20220719022743.305189-1-trix@redhat.com> Content-Type: text/plain; charset="gbk"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.111.195] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To dggpemm500001.china.huawei.com (7.185.36.107) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ?? 2022/7/19 10:27, Tom Rix ะด??: > cpp_check reports > [drivers/power/supply/ab8500_chargalg.c:493]: (style) Variable 'ab8500_chargalg_ex_ac_enable_toggle' is assigned a value that is never used. > >>From inspection, this variable is never used. So remove it. > > Fixes: 6c50a08d9dd3 ("power: supply: ab8500: Drop external charger leftovers") > Signed-off-by: Tom Rix > --- > drivers/power/supply/ab8500_chargalg.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/drivers/power/supply/ab8500_chargalg.c b/drivers/power/supply/ab8500_chargalg.c > index ae4be553f424..05146d436a6a 100644 > --- a/drivers/power/supply/ab8500_chargalg.c > +++ b/drivers/power/supply/ab8500_chargalg.c > @@ -490,8 +490,6 @@ static int ab8500_chargalg_kick_watchdog(struct ab8500_chargalg *di) > static int ab8500_chargalg_ac_en(struct ab8500_chargalg *di, int enable, > int vset_uv, int iset_ua) > { > - static int ab8500_chargalg_ex_ac_enable_toggle; > - > if (!di->ac_chg || !di->ac_chg->ops.enable) > return -ENXIO; > > Reviewed-by: Chen Lifu I can still observe this build error with ARCH=arm, defconfig=allyesconfig in linux-next next-200816: drivers/power/supply/ab8500_chargalg.c: In function ??ab8500_chargalg_ac_en??: drivers/power/supply/ab8500_chargalg.c:493:13: error: unused variable ??ab8500_chargalg_ex_ac_enable_toggle?? [-Werror=unused-variable] static int ab8500_chargalg_ex_ac_enable_toggle; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~