From patchwork Mon May 24 13:37:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 447793 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7D067C04FF3 for ; Mon, 24 May 2021 13:26:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 55801610C8 for ; Mon, 24 May 2021 13:26:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232869AbhEXN1m (ORCPT ); Mon, 24 May 2021 09:27:42 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:3983 "EHLO szxga06-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232456AbhEXN1k (ORCPT ); Mon, 24 May 2021 09:27:40 -0400 Received: from dggems701-chm.china.huawei.com (unknown [172.30.72.58]) by szxga06-in.huawei.com (SkyGuard) with ESMTP id 4FpdFz37lFzmZ3L; Mon, 24 May 2021 21:23:51 +0800 (CST) Received: from dggeml759-chm.china.huawei.com (10.1.199.138) by dggems701-chm.china.huawei.com (10.3.19.178) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2176.2; Mon, 24 May 2021 21:26:10 +0800 Received: from localhost.localdomain (10.175.102.38) by dggeml759-chm.china.huawei.com (10.1.199.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Mon, 24 May 2021 21:26:10 +0800 From: Wei Yongjun To: , Badhri Jagan Sridharan , Guenter Roeck , Heikki Krogerus , Greg Kroah-Hartman CC: , , Hulk Robot Subject: [PATCH -next] usb: typec: tcpci: Make symbol 'tcpci_apply_rc' static Date: Mon, 24 May 2021 13:37:04 +0000 Message-ID: <20210524133704.2432555-1-weiyongjun1@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Originating-IP: [10.175.102.38] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To dggeml759-chm.china.huawei.com (10.1.199.138) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org The sparse tool complains as follows: drivers/usb/typec/tcpm/tcpci.c:118:5: warning: symbol 'tcpci_apply_rc' was not declared. Should it be static? This symbol is not used outside of tcpci.c, so marks it static. Fixes: 7257fbc7c598 ("usb: typec: tcpci: Implement callback for apply_rc") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Reviewed-by: Badhri Jagan Sridharan Reviewed-by: Heikki Krogerus --- drivers/usb/typec/tcpm/tcpci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/typec/tcpm/tcpci.c b/drivers/usb/typec/tcpm/tcpci.c index 34b5095cc84f..22862345d1ab 100644 --- a/drivers/usb/typec/tcpm/tcpci.c +++ b/drivers/usb/typec/tcpm/tcpci.c @@ -115,7 +115,8 @@ static int tcpci_set_cc(struct tcpc_dev *tcpc, enum typec_cc_status cc) return 0; } -int tcpci_apply_rc(struct tcpc_dev *tcpc, enum typec_cc_status cc, enum typec_cc_polarity polarity) +static int tcpci_apply_rc(struct tcpc_dev *tcpc, enum typec_cc_status cc, + enum typec_cc_polarity polarity) { struct tcpci *tcpci = tcpc_to_tcpci(tcpc); unsigned int reg;