* [PATCH -next] usb: typec: tcpci: Make symbol 'tcpci_apply_rc' static
@ 2021-05-24 13:37 Wei Yongjun
2021-05-25 3:11 ` Badhri Jagan Sridharan
2021-05-26 6:25 ` Heikki Krogerus
0 siblings, 2 replies; 3+ messages in thread
From: Wei Yongjun @ 2021-05-24 13:37 UTC (permalink / raw)
To: weiyongjun1, Badhri Jagan Sridharan, Guenter Roeck,
Heikki Krogerus, Greg Kroah-Hartman
Cc: linux-usb, kernel-janitors, Hulk Robot
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 <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
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;
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH -next] usb: typec: tcpci: Make symbol 'tcpci_apply_rc' static
2021-05-24 13:37 [PATCH -next] usb: typec: tcpci: Make symbol 'tcpci_apply_rc' static Wei Yongjun
@ 2021-05-25 3:11 ` Badhri Jagan Sridharan
2021-05-26 6:25 ` Heikki Krogerus
1 sibling, 0 replies; 3+ messages in thread
From: Badhri Jagan Sridharan @ 2021-05-25 3:11 UTC (permalink / raw)
To: Wei Yongjun
Cc: Guenter Roeck, Heikki Krogerus, Greg Kroah-Hartman, USB,
kernel-janitors, Hulk Robot
On Mon, May 24, 2021 at 6:26 AM Wei Yongjun <weiyongjun1@huawei.com> wrote:
>
> 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 <hulkci@huawei.com>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Reviewed-by: Badhri Jagan Sridharan <badhri@google.com>
> ---
> 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;
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH -next] usb: typec: tcpci: Make symbol 'tcpci_apply_rc' static
2021-05-24 13:37 [PATCH -next] usb: typec: tcpci: Make symbol 'tcpci_apply_rc' static Wei Yongjun
2021-05-25 3:11 ` Badhri Jagan Sridharan
@ 2021-05-26 6:25 ` Heikki Krogerus
1 sibling, 0 replies; 3+ messages in thread
From: Heikki Krogerus @ 2021-05-26 6:25 UTC (permalink / raw)
To: Wei Yongjun
Cc: Badhri Jagan Sridharan, Guenter Roeck, Greg Kroah-Hartman,
linux-usb, kernel-janitors, Hulk Robot
On Mon, May 24, 2021 at 01:37:04PM +0000, Wei Yongjun wrote:
> 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 <hulkci@huawei.com>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> ---
> 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;
--
heikki
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-05-26 6:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-24 13:37 [PATCH -next] usb: typec: tcpci: Make symbol 'tcpci_apply_rc' static Wei Yongjun
2021-05-25 3:11 ` Badhri Jagan Sridharan
2021-05-26 6:25 ` Heikki Krogerus
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.