* [PATCH] usb: typec: qcom: set pm8150b_typec_res storage-class-specifier to static
@ 2023-05-15 11:40 Tom Rix
2023-05-15 11:42 ` Bryan O'Donoghue
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Tom Rix @ 2023-05-15 11:40 UTC (permalink / raw)
To: bryan.odonoghue, linux, heikki.krogerus, agross, andersson,
konrad.dybcio, gregkh
Cc: linux-arm-msm, linux-usb, linux-kernel, Tom Rix
smatch reports
drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c:323:29: warning: symbol
'pm8150b_typec_res' was not declared. Should it be static?
This variable is only used in its defining file, so it should be static
Signed-off-by: Tom Rix <trix@redhat.com>
---
drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c b/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c
index 191458ce4a06..937e855a6c4c 100644
--- a/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c
+++ b/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c
@@ -320,7 +320,7 @@ static struct pmic_typec_port_resources pm8150b_port_res = {
.nr_irqs = 7,
};
-struct pmic_typec_resources pm8150b_typec_res = {
+static struct pmic_typec_resources pm8150b_typec_res = {
.pdphy_res = &pm8150b_pdphy_res,
.port_res = &pm8150b_port_res,
};
--
2.27.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] usb: typec: qcom: set pm8150b_typec_res storage-class-specifier to static
2023-05-15 11:40 [PATCH] usb: typec: qcom: set pm8150b_typec_res storage-class-specifier to static Tom Rix
@ 2023-05-15 11:42 ` Bryan O'Donoghue
2023-05-15 13:09 ` Heikki Krogerus
2023-05-15 13:20 ` Guenter Roeck
2 siblings, 0 replies; 4+ messages in thread
From: Bryan O'Donoghue @ 2023-05-15 11:42 UTC (permalink / raw)
To: Tom Rix, linux, heikki.krogerus, agross, andersson, konrad.dybcio,
gregkh
Cc: linux-arm-msm, linux-usb, linux-kernel
On 15/05/2023 12:40, Tom Rix wrote:
> smatch reports
> drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c:323:29: warning: symbol
> 'pm8150b_typec_res' was not declared. Should it be static?
>
> This variable is only used in its defining file, so it should be static
>
> Signed-off-by: Tom Rix <trix@redhat.com>
> ---
> drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c b/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c
> index 191458ce4a06..937e855a6c4c 100644
> --- a/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c
> +++ b/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c
> @@ -320,7 +320,7 @@ static struct pmic_typec_port_resources pm8150b_port_res = {
> .nr_irqs = 7,
> };
>
> -struct pmic_typec_resources pm8150b_typec_res = {
> +static struct pmic_typec_resources pm8150b_typec_res = {
> .pdphy_res = &pm8150b_pdphy_res,
> .port_res = &pm8150b_port_res,
> };
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] usb: typec: qcom: set pm8150b_typec_res storage-class-specifier to static
2023-05-15 11:40 [PATCH] usb: typec: qcom: set pm8150b_typec_res storage-class-specifier to static Tom Rix
2023-05-15 11:42 ` Bryan O'Donoghue
@ 2023-05-15 13:09 ` Heikki Krogerus
2023-05-15 13:20 ` Guenter Roeck
2 siblings, 0 replies; 4+ messages in thread
From: Heikki Krogerus @ 2023-05-15 13:09 UTC (permalink / raw)
To: Tom Rix
Cc: bryan.odonoghue, linux, agross, andersson, konrad.dybcio, gregkh,
linux-arm-msm, linux-usb, linux-kernel
On Mon, May 15, 2023 at 07:40:43AM -0400, Tom Rix wrote:
> smatch reports
> drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c:323:29: warning: symbol
> 'pm8150b_typec_res' was not declared. Should it be static?
>
> This variable is only used in its defining file, so it should be static
>
> Signed-off-by: Tom Rix <trix@redhat.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> ---
> drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c b/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c
> index 191458ce4a06..937e855a6c4c 100644
> --- a/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c
> +++ b/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c
> @@ -320,7 +320,7 @@ static struct pmic_typec_port_resources pm8150b_port_res = {
> .nr_irqs = 7,
> };
>
> -struct pmic_typec_resources pm8150b_typec_res = {
> +static struct pmic_typec_resources pm8150b_typec_res = {
> .pdphy_res = &pm8150b_pdphy_res,
> .port_res = &pm8150b_port_res,
> };
--
heikki
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] usb: typec: qcom: set pm8150b_typec_res storage-class-specifier to static
2023-05-15 11:40 [PATCH] usb: typec: qcom: set pm8150b_typec_res storage-class-specifier to static Tom Rix
2023-05-15 11:42 ` Bryan O'Donoghue
2023-05-15 13:09 ` Heikki Krogerus
@ 2023-05-15 13:20 ` Guenter Roeck
2 siblings, 0 replies; 4+ messages in thread
From: Guenter Roeck @ 2023-05-15 13:20 UTC (permalink / raw)
To: Tom Rix
Cc: bryan.odonoghue, heikki.krogerus, agross, andersson,
konrad.dybcio, gregkh, linux-arm-msm, linux-usb, linux-kernel
On Mon, May 15, 2023 at 07:40:43AM -0400, Tom Rix wrote:
> smatch reports
> drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c:323:29: warning: symbol
> 'pm8150b_typec_res' was not declared. Should it be static?
>
> This variable is only used in its defining file, so it should be static
>
> Signed-off-by: Tom Rix <trix@redhat.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Guenter
> ---
> drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c b/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c
> index 191458ce4a06..937e855a6c4c 100644
> --- a/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c
> +++ b/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c
> @@ -320,7 +320,7 @@ static struct pmic_typec_port_resources pm8150b_port_res = {
> .nr_irqs = 7,
> };
>
> -struct pmic_typec_resources pm8150b_typec_res = {
> +static struct pmic_typec_resources pm8150b_typec_res = {
> .pdphy_res = &pm8150b_pdphy_res,
> .port_res = &pm8150b_port_res,
> };
> --
> 2.27.0
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-05-15 13:21 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-15 11:40 [PATCH] usb: typec: qcom: set pm8150b_typec_res storage-class-specifier to static Tom Rix
2023-05-15 11:42 ` Bryan O'Donoghue
2023-05-15 13:09 ` Heikki Krogerus
2023-05-15 13:20 ` Guenter Roeck
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox