public inbox for linux-usb@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] USB: typec: tcpci: Make tcpci_pm_ops variable static
@ 2026-02-16 11:04 Krzysztof Kozlowski
  2026-02-18 20:35 ` Badhri Jagan Sridharan
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Krzysztof Kozlowski @ 2026-02-16 11:04 UTC (permalink / raw)
  To: Badhri Jagan Sridharan, Heikki Krogerus, Greg Kroah-Hartman,
	linux-usb, linux-kernel
  Cc: Krzysztof Kozlowski

File-scope 'tcpci_pm_ops' is not used outside of this unit, so make it
static to silence sparse warning:

  tcpm/tcpci.c:1002:1: warning: symbol 'tcpci_pm_ops' was not declared. Should it be static?

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
---
 drivers/usb/typec/tcpm/tcpci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/typec/tcpm/tcpci.c b/drivers/usb/typec/tcpm/tcpci.c
index 2a951c585e92..8b7e6eb92ca2 100644
--- a/drivers/usb/typec/tcpm/tcpci.c
+++ b/drivers/usb/typec/tcpm/tcpci.c
@@ -999,7 +999,7 @@ static int tcpci_resume(struct device *dev)
 	return ret;
 }
 
-DEFINE_SIMPLE_DEV_PM_OPS(tcpci_pm_ops, tcpci_suspend, tcpci_resume);
+static DEFINE_SIMPLE_DEV_PM_OPS(tcpci_pm_ops, tcpci_suspend, tcpci_resume);
 
 static const struct i2c_device_id tcpci_id[] = {
 	{ "tcpci" },
-- 
2.51.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH] USB: typec: tcpci: Make tcpci_pm_ops variable static
  2026-02-16 11:04 [PATCH] USB: typec: tcpci: Make tcpci_pm_ops variable static Krzysztof Kozlowski
@ 2026-02-18 20:35 ` Badhri Jagan Sridharan
  2026-02-18 20:56   ` Greg Kroah-Hartman
  2026-02-18 21:01   ` Krzysztof Kozlowski
  2026-02-18 21:17 ` Badhri Jagan Sridharan
  2026-02-23 15:04 ` Heikki Krogerus
  2 siblings, 2 replies; 9+ messages in thread
From: Badhri Jagan Sridharan @ 2026-02-18 20:35 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Heikki Krogerus, Greg Kroah-Hartman, linux-usb, linux-kernel

On Mon, Feb 16, 2026 at 3:04 AM Krzysztof Kozlowski
<krzysztof.kozlowski@oss.qualcomm.com> wrote:
>
> File-scope 'tcpci_pm_ops' is not used outside of this unit, so make it
> static to silence sparse warning:
>
>   tcpm/tcpci.c:1002:1: warning: symbol 'tcpci_pm_ops' was not declared. Should it be static?
>

Thanks for sending the patch Krzysztof !
Can you also please add "Fixes:" and "Cc: stable@vger.kernel.org" ?

Thanks,
Badhri

> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
> ---
>  drivers/usb/typec/tcpm/tcpci.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/usb/typec/tcpm/tcpci.c b/drivers/usb/typec/tcpm/tcpci.c
> index 2a951c585e92..8b7e6eb92ca2 100644
> --- a/drivers/usb/typec/tcpm/tcpci.c
> +++ b/drivers/usb/typec/tcpm/tcpci.c
> @@ -999,7 +999,7 @@ static int tcpci_resume(struct device *dev)
>         return ret;
>  }
>
> -DEFINE_SIMPLE_DEV_PM_OPS(tcpci_pm_ops, tcpci_suspend, tcpci_resume);
> +static DEFINE_SIMPLE_DEV_PM_OPS(tcpci_pm_ops, tcpci_suspend, tcpci_resume);
>
>  static const struct i2c_device_id tcpci_id[] = {
>         { "tcpci" },
> --
> 2.51.0
>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] USB: typec: tcpci: Make tcpci_pm_ops variable static
  2026-02-18 20:35 ` Badhri Jagan Sridharan
@ 2026-02-18 20:56   ` Greg Kroah-Hartman
  2026-02-18 21:02     ` Badhri Jagan Sridharan
  2026-02-18 21:01   ` Krzysztof Kozlowski
  1 sibling, 1 reply; 9+ messages in thread
From: Greg Kroah-Hartman @ 2026-02-18 20:56 UTC (permalink / raw)
  To: Badhri Jagan Sridharan
  Cc: Krzysztof Kozlowski, Heikki Krogerus, linux-usb, linux-kernel

On Wed, Feb 18, 2026 at 12:35:04PM -0800, Badhri Jagan Sridharan wrote:
> On Mon, Feb 16, 2026 at 3:04 AM Krzysztof Kozlowski
> <krzysztof.kozlowski@oss.qualcomm.com> wrote:
> >
> > File-scope 'tcpci_pm_ops' is not used outside of this unit, so make it
> > static to silence sparse warning:
> >
> >   tcpm/tcpci.c:1002:1: warning: symbol 'tcpci_pm_ops' was not declared. Should it be static?
> >
> 
> Thanks for sending the patch Krzysztof !
> Can you also please add "Fixes:" and "Cc: stable@vger.kernel.org" ?

Why would a sparse warning fix need either of those?  Are you wanting to
just pre-load my "WTF" email bot to go off?  :)

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] USB: typec: tcpci: Make tcpci_pm_ops variable static
  2026-02-18 20:35 ` Badhri Jagan Sridharan
  2026-02-18 20:56   ` Greg Kroah-Hartman
@ 2026-02-18 21:01   ` Krzysztof Kozlowski
  1 sibling, 0 replies; 9+ messages in thread
From: Krzysztof Kozlowski @ 2026-02-18 21:01 UTC (permalink / raw)
  To: Badhri Jagan Sridharan
  Cc: Heikki Krogerus, Greg Kroah-Hartman, linux-usb, linux-kernel

On 18/02/2026 21:35, Badhri Jagan Sridharan wrote:
> On Mon, Feb 16, 2026 at 3:04 AM Krzysztof Kozlowski
> <krzysztof.kozlowski@oss.qualcomm.com> wrote:
>>
>> File-scope 'tcpci_pm_ops' is not used outside of this unit, so make it
>> static to silence sparse warning:
>>
>>   tcpm/tcpci.c:1002:1: warning: symbol 'tcpci_pm_ops' was not declared. Should it be static?
>>
> 
> Thanks for sending the patch Krzysztof !
> Can you also please add "Fixes:" and "Cc: stable@vger.kernel.org" ?

This has no practical impact on users, so I don't think it is a fix. It
is a code improvement, but not a fix.


Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] USB: typec: tcpci: Make tcpci_pm_ops variable static
  2026-02-18 20:56   ` Greg Kroah-Hartman
@ 2026-02-18 21:02     ` Badhri Jagan Sridharan
  2026-02-18 21:19       ` Greg Kroah-Hartman
  0 siblings, 1 reply; 9+ messages in thread
From: Badhri Jagan Sridharan @ 2026-02-18 21:02 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Krzysztof Kozlowski, Heikki Krogerus, linux-usb, linux-kernel

On Wed, Feb 18, 2026 at 12:56 PM Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
>
> On Wed, Feb 18, 2026 at 12:35:04PM -0800, Badhri Jagan Sridharan wrote:
> > On Mon, Feb 16, 2026 at 3:04 AM Krzysztof Kozlowski
> > <krzysztof.kozlowski@oss.qualcomm.com> wrote:
> > >
> > > File-scope 'tcpci_pm_ops' is not used outside of this unit, so make it
> > > static to silence sparse warning:
> > >
> > >   tcpm/tcpci.c:1002:1: warning: symbol 'tcpci_pm_ops' was not declared. Should it be static?
> > >
> >
> > Thanks for sending the patch Krzysztof !
> > Can you also please add "Fixes:" and "Cc: stable@vger.kernel.org" ?
>
> Why would a sparse warning fix need either of those?  Are you wanting to
> just pre-load my "WTF" email bot to go off?  :)

I am still learning :) Wasn't aware that warning fixes are not
supposed to have those.


>
> thanks,
>
> greg k-h

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] USB: typec: tcpci: Make tcpci_pm_ops variable static
  2026-02-16 11:04 [PATCH] USB: typec: tcpci: Make tcpci_pm_ops variable static Krzysztof Kozlowski
  2026-02-18 20:35 ` Badhri Jagan Sridharan
@ 2026-02-18 21:17 ` Badhri Jagan Sridharan
  2026-02-23 15:04 ` Heikki Krogerus
  2 siblings, 0 replies; 9+ messages in thread
From: Badhri Jagan Sridharan @ 2026-02-18 21:17 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Heikki Krogerus, Greg Kroah-Hartman, linux-usb, linux-kernel

On Mon, Feb 16, 2026 at 3:04 AM Krzysztof Kozlowski
<krzysztof.kozlowski@oss.qualcomm.com> wrote:
>
> File-scope 'tcpci_pm_ops' is not used outside of this unit, so make it
> static to silence sparse warning:
>
>   tcpm/tcpci.c:1002:1: warning: symbol 'tcpci_pm_ops' was not declared. Should it be static?
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>

Reviewed-by: Badhri Jagan Sridharan <badhri@google.com>

> ---
>  drivers/usb/typec/tcpm/tcpci.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/usb/typec/tcpm/tcpci.c b/drivers/usb/typec/tcpm/tcpci.c
> index 2a951c585e92..8b7e6eb92ca2 100644
> --- a/drivers/usb/typec/tcpm/tcpci.c
> +++ b/drivers/usb/typec/tcpm/tcpci.c
> @@ -999,7 +999,7 @@ static int tcpci_resume(struct device *dev)
>         return ret;
>  }
>
> -DEFINE_SIMPLE_DEV_PM_OPS(tcpci_pm_ops, tcpci_suspend, tcpci_resume);
> +static DEFINE_SIMPLE_DEV_PM_OPS(tcpci_pm_ops, tcpci_suspend, tcpci_resume);
>
>  static const struct i2c_device_id tcpci_id[] = {
>         { "tcpci" },
> --
> 2.51.0
>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] USB: typec: tcpci: Make tcpci_pm_ops variable static
  2026-02-18 21:02     ` Badhri Jagan Sridharan
@ 2026-02-18 21:19       ` Greg Kroah-Hartman
  2026-02-18 21:24         ` Badhri Jagan Sridharan
  0 siblings, 1 reply; 9+ messages in thread
From: Greg Kroah-Hartman @ 2026-02-18 21:19 UTC (permalink / raw)
  To: Badhri Jagan Sridharan
  Cc: Krzysztof Kozlowski, Heikki Krogerus, linux-usb, linux-kernel

On Wed, Feb 18, 2026 at 01:02:50PM -0800, Badhri Jagan Sridharan wrote:
> On Wed, Feb 18, 2026 at 12:56 PM Greg Kroah-Hartman
> <gregkh@linuxfoundation.org> wrote:
> >
> > On Wed, Feb 18, 2026 at 12:35:04PM -0800, Badhri Jagan Sridharan wrote:
> > > On Mon, Feb 16, 2026 at 3:04 AM Krzysztof Kozlowski
> > > <krzysztof.kozlowski@oss.qualcomm.com> wrote:
> > > >
> > > > File-scope 'tcpci_pm_ops' is not used outside of this unit, so make it
> > > > static to silence sparse warning:
> > > >
> > > >   tcpm/tcpci.c:1002:1: warning: symbol 'tcpci_pm_ops' was not declared. Should it be static?
> > > >
> > >
> > > Thanks for sending the patch Krzysztof !
> > > Can you also please add "Fixes:" and "Cc: stable@vger.kernel.org" ?
> >
> > Why would a sparse warning fix need either of those?  Are you wanting to
> > just pre-load my "WTF" email bot to go off?  :)
> 
> I am still learning :) Wasn't aware that warning fixes are not
> supposed to have those.

This is a warning from sparse, not the build.  sparse is an add-on
thing, not a part of a normal kernel build.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] USB: typec: tcpci: Make tcpci_pm_ops variable static
  2026-02-18 21:19       ` Greg Kroah-Hartman
@ 2026-02-18 21:24         ` Badhri Jagan Sridharan
  0 siblings, 0 replies; 9+ messages in thread
From: Badhri Jagan Sridharan @ 2026-02-18 21:24 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Krzysztof Kozlowski, Heikki Krogerus, linux-usb, linux-kernel

On Wed, Feb 18, 2026 at 1:19 PM Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
>
> On Wed, Feb 18, 2026 at 01:02:50PM -0800, Badhri Jagan Sridharan wrote:
> > On Wed, Feb 18, 2026 at 12:56 PM Greg Kroah-Hartman
> > <gregkh@linuxfoundation.org> wrote:
> > >
> > > On Wed, Feb 18, 2026 at 12:35:04PM -0800, Badhri Jagan Sridharan wrote:
> > > > On Mon, Feb 16, 2026 at 3:04 AM Krzysztof Kozlowski
> > > > <krzysztof.kozlowski@oss.qualcomm.com> wrote:
> > > > >
> > > > > File-scope 'tcpci_pm_ops' is not used outside of this unit, so make it
> > > > > static to silence sparse warning:
> > > > >
> > > > >   tcpm/tcpci.c:1002:1: warning: symbol 'tcpci_pm_ops' was not declared. Should it be static?
> > > > >
> > > >
> > > > Thanks for sending the patch Krzysztof !
> > > > Can you also please add "Fixes:" and "Cc: stable@vger.kernel.org" ?
> > >
> > > Why would a sparse warning fix need either of those?  Are you wanting to
> > > just pre-load my "WTF" email bot to go off?  :)
> >
> > I am still learning :) Wasn't aware that warning fixes are not
> > supposed to have those.
>
> This is a warning from sparse, not the build.  sparse is an add-on
> thing, not a part of a normal kernel build.

Thanks Greg for the additional context. I will keep this in mind in the future!

>
> thanks,
>
> greg k-h

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] USB: typec: tcpci: Make tcpci_pm_ops variable static
  2026-02-16 11:04 [PATCH] USB: typec: tcpci: Make tcpci_pm_ops variable static Krzysztof Kozlowski
  2026-02-18 20:35 ` Badhri Jagan Sridharan
  2026-02-18 21:17 ` Badhri Jagan Sridharan
@ 2026-02-23 15:04 ` Heikki Krogerus
  2 siblings, 0 replies; 9+ messages in thread
From: Heikki Krogerus @ 2026-02-23 15:04 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Badhri Jagan Sridharan, Greg Kroah-Hartman, linux-usb,
	linux-kernel

Mon, Feb 16, 2026 at 12:04:04PM +0100, Krzysztof Kozlowski wrote:
> File-scope 'tcpci_pm_ops' is not used outside of this unit, so make it
> static to silence sparse warning:
> 
>   tcpm/tcpci.c:1002:1: warning: symbol 'tcpci_pm_ops' was not declared. Should it be static?
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>

Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>

> ---
>  drivers/usb/typec/tcpm/tcpci.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/typec/tcpm/tcpci.c b/drivers/usb/typec/tcpm/tcpci.c
> index 2a951c585e92..8b7e6eb92ca2 100644
> --- a/drivers/usb/typec/tcpm/tcpci.c
> +++ b/drivers/usb/typec/tcpm/tcpci.c
> @@ -999,7 +999,7 @@ static int tcpci_resume(struct device *dev)
>  	return ret;
>  }
>  
> -DEFINE_SIMPLE_DEV_PM_OPS(tcpci_pm_ops, tcpci_suspend, tcpci_resume);
> +static DEFINE_SIMPLE_DEV_PM_OPS(tcpci_pm_ops, tcpci_suspend, tcpci_resume);
>  
>  static const struct i2c_device_id tcpci_id[] = {
>  	{ "tcpci" },
> -- 
> 2.51.0

-- 
heikki

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-02-23 15:05 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-16 11:04 [PATCH] USB: typec: tcpci: Make tcpci_pm_ops variable static Krzysztof Kozlowski
2026-02-18 20:35 ` Badhri Jagan Sridharan
2026-02-18 20:56   ` Greg Kroah-Hartman
2026-02-18 21:02     ` Badhri Jagan Sridharan
2026-02-18 21:19       ` Greg Kroah-Hartman
2026-02-18 21:24         ` Badhri Jagan Sridharan
2026-02-18 21:01   ` Krzysztof Kozlowski
2026-02-18 21:17 ` Badhri Jagan Sridharan
2026-02-23 15:04 ` Heikki Krogerus

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox