Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp2700991rwe; Sun, 28 Aug 2022 20:18:03 -0700 (PDT) X-Google-Smtp-Source: AA6agR6OWFlMphXocn1F61pt/XX1oS0H7qKiL1/5wJWHFd/ZeuPIwgQkODwG3H9oNYui1zJXkry5 X-Received: by 2002:a05:6402:2691:b0:43d:ba10:854b with SMTP id w17-20020a056402269100b0043dba10854bmr14431315edd.158.1661743083691; Sun, 28 Aug 2022 20:18:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661743083; cv=none; d=google.com; s=arc-20160816; b=unSZVoedeq4ELsfCMlE+Hx07j+MBFqumpKRUYeOM0n/Es1v9G/JC3YddhesCzR6Gjb 3v41KF8HVIHDZiE7xnZY3x3nOeK6pzwgSMFCl/X6EKXfjTiVExC6iWDpNPPUFa8OqowB PEsoIBfny5wBO3dLY+2Y7lh2hKt9T6/uWC1JZBQW08wQoHS+bYHPBx1P2YyZpAQiIcV5 fGX0ZDN480rCylF4f+Wu73nknQLJ6LxmOqH6/UXOx9AgGvuzsVPlqE65dVNYoddxZpIR 2RO6RrEBEIxOtjUe92WmoMJqeVFkp1EZEju8xXTqEiZ2AhUTESL8t59XhLJ8HTurY7Dq B+5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=YGMycgUwRPz2tjC0IBocG1q3RSZtySFGaidz43cV5mI=; b=hCw12TIBqz+3qwzo6UMjYo8iBDLlgnOaRpgyrwZwtVSTJKUMnwNdikRqKBNHcIZSct vSHOU+Ssa8mV7AFlgr5UAx/lcN1KHY9ppWnCF36LyCmP6qyix2X1unjgz9VcMxpnQOBg xIh4RmDY1djpTLSX23eVkVFjs1Eh5fVLrcdksD6C30a4wXpL8oCJT1taJVlGR3X2kPms OydEAdk4ki0el4j8fPwQjPAdZa4TCkjMewCaQTg0PWgoJC8Jwmq5YtubJH5JOsI9/X9X Hdez2vBrJ5OtwanIZQaWopF50mXxAyETdpAf5QdTB4qaB6hbOSh/vYcW7IrakoLkJrhN DANw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="m/gLKyuU"; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q5-20020a1709066b0500b0073dd6da172csi4386314ejr.446.2022.08.28.20.17.32; Sun, 28 Aug 2022 20:18:03 -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; dkim=pass header.i=@gmail.com header.s=20210112 header.b="m/gLKyuU"; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229658AbiH2DFX (ORCPT + 99 others); Sun, 28 Aug 2022 23:05:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37758 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229462AbiH2DFU (ORCPT ); Sun, 28 Aug 2022 23:05:20 -0400 Received: from mail-pf1-x42a.google.com (mail-pf1-x42a.google.com [IPv6:2607:f8b0:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F026412749; Sun, 28 Aug 2022 20:05:18 -0700 (PDT) Received: by mail-pf1-x42a.google.com with SMTP id x26so6921187pfo.8; Sun, 28 Aug 2022 20:05:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc; bh=YGMycgUwRPz2tjC0IBocG1q3RSZtySFGaidz43cV5mI=; b=m/gLKyuUbF+icm8Yz9zwxD0N9vkmX3cs76hdop5mlBlaFzUWeGVyOLDH0oiVpHeuK1 VydYgN15GzhWYkSGDqpg5Bhk4ARWqY1x9wiRWaM9ohQwELgakqYvVubm4hH8fLNHpZVz 1glbhvau8PfbLE7oOds6vVD6MmMNKXmpTzZ8FNbytsXOyC+U/7Wu1irtdVmZr5m4uEe8 1CulPuo/NP6SqiN/Q2fH7vlO2Vbg0LkzuganH4+ozfQ5mkboRYBRRdAPBRQJwIFLKN/J PCXhClXnbaycryphMDz5/pjhsMoWrX6efu2cZXugpaugmEj/y2RuK+TmdD9qQkdQefzT 8MLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc; bh=YGMycgUwRPz2tjC0IBocG1q3RSZtySFGaidz43cV5mI=; b=rfuZIFl5i6RP3VNTjpDLOkWJfzHtGXzNskH5bmVDi7SjFdRvoeI5FFAVxynvKT0JO1 90DNM1bsOz3A3hqy8LoUFW7eK6uVBI+f1U7gMKfUREbn+6+ErP19yO3p9aYAKkGGgqYi 1IVK1R7mL+AFnqbXQ71qiLi+JPF+JVU1m6uptgxm2YuEybJ3r7OeoPtoGp72VoUHroL9 mn63tdY4Lmw6wndKIhQ65YyaFUDn4IpuMq+Y7HKst1kzV8phI33UB3sv+HU8BnJSir2Z DqF9kD48QHiMDUyq6c0ghY87ZlDG5ZpMGV+G3GaD/vZycXt5ECU7J61seLyjJhpOFWOR TNCw== X-Gm-Message-State: ACgBeo2RCVEmD0dZsXZ4CbQ4kCEXTEXtES6Jnfwp4u6IWH9O9asbTUFL UWHw7TFolCm6zqDoy0y9NSM= X-Received: by 2002:a63:5749:0:b0:42b:4002:2f65 with SMTP id h9-20020a635749000000b0042b40022f65mr11881048pgm.340.1661742318529; Sun, 28 Aug 2022 20:05:18 -0700 (PDT) Received: from localhost.localdomain ([193.203.214.57]) by smtp.gmail.com with ESMTPSA id c23-20020a63ef57000000b0042988a04bfdsm1263680pgk.9.2022.08.28.20.05.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 Aug 2022 20:05:17 -0700 (PDT) From: cgel.zte@gmail.com X-Google-Original-From: xu.panda@zte.com.cn To: linux@roeck-us.net Cc: heikki.krogerus@linux.intel.com, gregkh@linuxfoundation.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, xupanda , Zeal Robot Subject: [PATCH linux-next v3] usb: typec: tcpm: tcpci: Remove the unneeded result variable Date: Mon, 29 Aug 2022 03:04:43 +0000 Message-Id: <20220829030442.264695-1-xu.panda@zte.com.cn> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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 From: xupanda Return the value regmap_update_bits() directly instead of storing it in another redundant variable. Reported-by: Zeal Robot Signed-off-by: xupanda --- chang for v3 - re-align continuation line alignment --- drivers/usb/typec/tcpm/tcpci.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/usb/typec/tcpm/tcpci.c b/drivers/usb/typec/tcpm/tcpci.c index b2bfcebe218f..cd243530264b 100644 --- a/drivers/usb/typec/tcpm/tcpci.c +++ b/drivers/usb/typec/tcpm/tcpci.c @@ -328,11 +328,9 @@ static int tcpci_set_vconn(struct tcpc_dev *tcpc, bool enable) static int tcpci_enable_auto_vbus_discharge(struct tcpc_dev *dev, bool enable) { struct tcpci *tcpci = tcpc_to_tcpci(dev); - int ret; - ret = regmap_update_bits(tcpci->regmap, TCPC_POWER_CTRL, TCPC_POWER_CTRL_AUTO_DISCHARGE, - enable ? TCPC_POWER_CTRL_AUTO_DISCHARGE : 0); - return ret; + return regmap_update_bits(tcpci->regmap, TCPC_POWER_CTRL, TCPC_POWER_CTRL_AUTO_DISCHARGE, + enable ? TCPC_POWER_CTRL_AUTO_DISCHARGE : 0); } static int tcpci_set_auto_vbus_discharge_threshold(struct tcpc_dev *dev, enum typec_pwr_opmode mode, -- 2.25.1