Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1581268pxb; Mon, 8 Mar 2021 00:46:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJxpfd4cWNSkb4ahMFHb7GbZl0YB+Dowcy7nzFTvJDn2I8v1Al9fay3sKJZEjRyOCHtsLnJH X-Received: by 2002:aa7:d294:: with SMTP id w20mr5541573edq.68.1615193163806; Mon, 08 Mar 2021 00:46:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615193163; cv=none; d=google.com; s=arc-20160816; b=VdGzyDDcJiNRdwgiNZYJJlRrtSnEj0bMt+2cYFdD3xPUPquxNmw6nQbB39CS3GWW6s fGkTQxOrG3/yFVi38dD8113u97pQkNABmu2EMR5BzQLVAcU8WB9FcMpQBKic44EhyB5m Yk+Nwxqw7s3NvWIcphEM3jR8nxzzQ/t8I0jFA4k+P4mlAJUoNOBtLYso0gTwxLWVA/UA Gwgu0SoP0qEApFkX3tOHXbV1dxJKTsJKGAXCeuBaReh4sX9sED1Q1KRRItpJtBa6/K5c xDnJsZKDA6cDQlyt3ymrLL54IQAbrVEkxY+hm6ryo6/5N6ixgritBKkaDkiCx0+tVD47 EkzQ== 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=B1/JKJF7XFbudjwwwaxObaSkB5xkGLCAWPug+AKbMw0=; b=NiOi5HA/zRpEdbHlQKBjUdVmOlXCgjpBK1HCoPZ7g0brQgjMBJdM9QMqLo7QvpikNs VQ4o9Gw7mVqtCvXBFyiSseSeJEA63+P6nZn4kwbn7v8qLSJ8W7V2w4rACe9m7xeIyKQF d1TN5oT2F84sW5i2U9zjivmaPzdMnr79VqfxsAqJZNRbslGqEvii0mVqwYy6wcdNUddi G3OZrNDcu7xkEOYTFWtSmf+Q7iDH+2CYAwdXGM9DgxVqvPQoIYaRGP54QK9BhPfbZkLa gl6uSAPE4aaRr9kxfynpWyK+XVSrkJR+Lb0kELdBaszsaW23nm3zWi7BPFKywI2Zy5gH eFJw== 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 r1si6420787ejp.0.2021.03.08.00.45.41; Mon, 08 Mar 2021 00:46:03 -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 S232673AbhCHGfg (ORCPT + 99 others); Mon, 8 Mar 2021 01:35:36 -0500 Received: from out30-43.freemail.mail.aliyun.com ([115.124.30.43]:49092 "EHLO out30-43.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232629AbhCHGfg (ORCPT ); Mon, 8 Mar 2021 01:35:36 -0500 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R171e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04420;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---0UQr4v4L_1615185332; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0UQr4v4L_1615185332) by smtp.aliyun-inc.com(127.0.0.1); Mon, 08 Mar 2021 14:35:32 +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 v2] usb: typec: tcpm: turn tcpm_ams_finish into void function Date: Mon, 8 Mar 2021 14:35:30 +0800 Message-Id: <1615185330-118246-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 --- Change in v2: -remove the unnecessary return statement drivers/usb/typec/tcpm/tcpm.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c index be0b646..8159229 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) { @@ -790,8 +788,6 @@ static int tcpm_ams_finish(struct tcpm_port *port) port->in_ams = false; port->ams = NONE_AMS; - - return ret; } static int tcpm_pd_transmit(struct tcpm_port *port, -- 1.8.3.1