Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1433081ybb; Thu, 9 Apr 2020 01:57:52 -0700 (PDT) X-Google-Smtp-Source: APiQypK9ViyIWXUDBArwnercipEDgdUoq2EKiuwo+y6RdbhNDx2fd3QTIszQpCylyT2qiJnzaQmL X-Received: by 2002:a4a:b141:: with SMTP id e1mr9095383ooo.54.1586422672719; Thu, 09 Apr 2020 01:57:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586422672; cv=none; d=google.com; s=arc-20160816; b=daAO+V4ha/plBrChSwqrcnvHma6CYE4uj2d9+7ivLCrKt9UeqAR/hsIIC/GiBwFxDR DuLk5hMOWxFlXVQLdmp4AoM41o8rneog0nhyw+Jq/Zw7e/mR9JLrmaE1HDGA1m+QGhH7 kfZSJWIEIczvxXW3BDkGy05VTkasEOps4Z31nBX23eeiW3u9q8FMuqGa0GIoZ2/0yAUe xUopME1NoWxHxS/ntURrvfg6NgFkmZGzELkqRNnNSgRCQByMLBebHBdw4X6lxWOc3aQw s5yD53VjT6vwzuH/WStCPhYPmryVl/K0EsUHbp/YibwjfiBIhpcXeUw5NvwCELTHzS2q pP6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=204MohDfgCzogwcZkhMRqraS90lyjXiMlX0McT3ezgQ=; b=s5Jrce+O4LzEfukXAjY8T/Hd09WWixlgjAuzGOCuuLrfKotI4Bcx73taBwy2QcCpon p8mNEg5B+b52WaBwuqQlzrz95tBpbIOJn/0KYfTMizgCDxr/iPulVlZ6JxxkEjKgxnFw LQFm/tooy5rPYhBu9TuMSit81Suyl7bcaJo2ibT8jMZ7qmdwS+try00Vqavop+L/0909 3ZkhzV7NTolLmGOO82O2N5Bi2LbSIoM0fgwEO2nmFRImAhIo0pllX/v3XgjKwfXIjTNI T89sjFAotwb4+/h0RGV7XbJAXpNac5hea4HUJnWmWUoKxP9l0LKhmdlZkbZRTttLwP6O B49Q== 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 t13si3377724otp.249.2020.04.09.01.57.37; Thu, 09 Apr 2020 01:57:52 -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 S1726669AbgDIIzg (ORCPT + 99 others); Thu, 9 Apr 2020 04:55:36 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:12629 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725783AbgDIIzg (ORCPT ); Thu, 9 Apr 2020 04:55:36 -0400 Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id EFA14AC271DD9720191F; Thu, 9 Apr 2020 16:55:34 +0800 (CST) Received: from huawei.com (10.175.124.28) by DGGEMS408-HUB.china.huawei.com (10.3.19.208) with Microsoft SMTP Server id 14.3.487.0; Thu, 9 Apr 2020 16:55:27 +0800 From: Jason Yan To: , , CC: Jason Yan Subject: [PATCH] power: supply: max14656: remove set but not used 'ret' Date: Thu, 9 Apr 2020 16:54:01 +0800 Message-ID: <20200409085401.47516-1-yanaijie@huawei.com> X-Mailer: git-send-email 2.17.2 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.175.124.28] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix the following gcc warning: drivers/power/supply/max14656_charger_detector.c:142:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] int ret = 0; ^~~ Reported-by: Hulk Robot Signed-off-by: Jason Yan --- drivers/power/supply/max14656_charger_detector.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/power/supply/max14656_charger_detector.c b/drivers/power/supply/max14656_charger_detector.c index 3bbb8b4c8ae7..137f9fafce8c 100644 --- a/drivers/power/supply/max14656_charger_detector.c +++ b/drivers/power/supply/max14656_charger_detector.c @@ -139,10 +139,9 @@ static void max14656_irq_worker(struct work_struct *work) u8 buf[REG_TOTAL_NUM]; u8 chg_type; - int ret = 0; - ret = max14656_read_block_reg(chip->client, MAX14656_DEVICE_ID, - REG_TOTAL_NUM, buf); + max14656_read_block_reg(chip->client, MAX14656_DEVICE_ID, + REG_TOTAL_NUM, buf); if ((buf[MAX14656_STATUS_1] & STATUS1_VB_VALID_MASK) && (buf[MAX14656_STATUS_1] & STATUS1_CHG_TYPE_MASK)) { -- 2.17.2