Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1580270pxb; Mon, 8 Mar 2021 00:44:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJxHqG9mYj5aJGfmWbfrozzf/tokdFE+Fzl5ML64z5c+2Un1qJWBs705CzjqmNAnuE0gYZtA X-Received: by 2002:a17:906:39a:: with SMTP id b26mr14400701eja.158.1615193048436; Mon, 08 Mar 2021 00:44:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615193048; cv=none; d=google.com; s=arc-20160816; b=x74+LxHI2Am9fBqyQYiEh3GsbjlK+VgyFnkC/oUk+SXHLsUh7w/cB72Bw2hwos1QfG 4n83SHhA+dXaFxE2LnUScRwV2kikxGmYKkdr87iD5lG0eM4/2IZsv2s5FJTmO1+Zgijq jI/+6bfftTzJU4AMSp+WS8tOpKsj7traw9Nr5UhxC4Z90xp0iNEh6JkT3t3Yon9BjYf7 8cSSP5NgnzaNLzP7XC/EaUL7abf7Np4SVqNQ29D2YoK0dYMndwcz8lhkiq6BTOubnjCD O/lmx8ya4/4T3pcPCFo/zQHPnun99pkmPAq2emUf+S1gxYdhBtKISjfjSBKrqJ6/T+jh RmPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=xHZkAYpj5YERxCUOm9guOUvY/kkdywSROgu73IdqYZA=; b=ArMBABC2S2XN9LuAi+nqXfTbhr6nZOahLwII+anl2C72wYb6Viw4ftPghevqut1Rii HsBplR5ipgzn1eFTSupuB84MOsjN8VLiLaNT7R4ukeysDsC441u+oqKd2sjoxJk3I0cR sGltazSx8LkN8c/A/zKcTBLRxjqur0Co83OoB+H+7AO3xfv5Qu7blFmFAZRWsQeXoBvs XoXrTe/CcxQBgjvx5P+kKe2kvglOJVlEoLd+noiGoddsECi/ugfUDiUkNNcRr2aAZxM8 Xx1xv736GSrGoTslirkxh1KuWtooJzilH1pfE/a20ELtCVNdUsalBO0meTEg0x/dX40x wGXA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q28si7313655edc.389.2021.03.08.00.43.46; Mon, 08 Mar 2021 00:44:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234851AbhCHGVj (ORCPT + 99 others); Mon, 8 Mar 2021 01:21:39 -0500 Received: from out4436.biz.mail.alibaba.com ([47.88.44.36]:34645 "EHLO out4436.biz.mail.alibaba.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234831AbhCHGVZ (ORCPT ); Mon, 8 Mar 2021 01:21:25 -0500 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R151e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04426;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---0UQpSCpB_1615184483; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0UQpSCpB_1615184483) by smtp.aliyun-inc.com(127.0.0.1); Mon, 08 Mar 2021 14:21:23 +0800 From: Yang Li To: linux@roeck-us.net Cc: heikki.krogerus@linux.intel.com, gregkh@linuxfoundation.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Yang Li Subject: [PATCH] usb: typec: tcpm: turn tcpm_ams_finish into void function Date: Mon, 8 Mar 2021 14:21:21 +0800 Message-Id: <1615184481-102148-1-git-send-email-yang.lee@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This function always return '0' and no callers use the return value. So make it a void function. This eliminates the following coccicheck warning: ./drivers/usb/typec/tcpm/tcpm.c:778:5-8: Unneeded variable: "ret". Return "0" on line 794 Reported-by: Abaci Robot Signed-off-by: Yang Li --- drivers/usb/typec/tcpm/tcpm.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c index be0b646..6ee984e 100644 --- a/drivers/usb/typec/tcpm/tcpm.c +++ b/drivers/usb/typec/tcpm/tcpm.c @@ -773,10 +773,8 @@ static enum typec_cc_status tcpm_rp_cc(struct tcpm_port *port) return TYPEC_CC_RP_DEF; } -static int tcpm_ams_finish(struct tcpm_port *port) +static void tcpm_ams_finish(struct tcpm_port *port) { - int ret = 0; - tcpm_log(port, "AMS %s finished", tcpm_ams_str[port->ams]); if (port->pd_capable && port->pwr_role == TYPEC_SOURCE) { @@ -791,7 +789,7 @@ static int tcpm_ams_finish(struct tcpm_port *port) port->in_ams = false; port->ams = NONE_AMS; - return ret; + return; } static int tcpm_pd_transmit(struct tcpm_port *port, -- 1.8.3.1