* [PATCH] usb: dwc3: imx8mp: make dwc3_imx_glue_ops static and rename to imx8mp
@ 2026-06-23 10:05 Ben Dooks
2026-06-23 10:07 ` Ahmad Fatoum
2026-06-23 10:09 ` sashiko-bot
0 siblings, 2 replies; 4+ messages in thread
From: Ben Dooks @ 2026-06-23 10:05 UTC (permalink / raw)
To: Thinh Nguyen, Greg Kroah-Hartman, Frank Li, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam, linux-usb, imx,
linux-arm-kernel, linux-kernel
Cc: Ben Dooks
The dwc3_imx_glue_ops is not used outside this file, and technically this
is the dwc3-imx8mp driver so whilst making this static to avoid the
following warning, rename it dwc3_imx8mp_glue_ops to distinguish it from
the other driver which also has dwc3_imx_glue_ops.
Fixes:
drivers/usb/dwc3/dwc3-imx8mp.c:176:22: warning: symbol 'dwc3_imx_glue_ops' was not declared. Should it be static?
Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
---
drivers/usb/dwc3/dwc3-imx8mp.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/usb/dwc3/dwc3-imx8mp.c b/drivers/usb/dwc3/dwc3-imx8mp.c
index 1cf96540b66e..bc61a89b66b1 100644
--- a/drivers/usb/dwc3/dwc3-imx8mp.c
+++ b/drivers/usb/dwc3/dwc3-imx8mp.c
@@ -173,8 +173,8 @@ static void dwc3_imx_pre_set_role(struct dwc3 *dwc, enum usb_role role)
pm_runtime_use_autosuspend(dwc->dev);
}
-struct dwc3_glue_ops dwc3_imx_glue_ops = {
- .pre_set_role = dwc3_imx_pre_set_role,
+statc struct dwc3_glue_ops dwc3_imx8mp_glue_ops = {
+ .pre_set_role = dwc3_imx8mp_pre_set_role,
};
static int dwc3_imx8mp_probe(struct platform_device *pdev)
@@ -266,7 +266,7 @@ static int dwc3_imx8mp_probe(struct platform_device *pdev)
goto put_dwc3;
}
- dwc3->glue_ops = &dwc3_imx_glue_ops;
+ dwc3->glue_ops = &dwc3_imx8mp_glue_ops;
if (dwc3->dr_mode == USB_DR_MODE_HOST)
pm_runtime_dont_use_autosuspend(dwc3->dev);
--
2.37.2.352.g3c44437643
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] usb: dwc3: imx8mp: make dwc3_imx_glue_ops static and rename to imx8mp
2026-06-23 10:05 [PATCH] usb: dwc3: imx8mp: make dwc3_imx_glue_ops static and rename to imx8mp Ben Dooks
@ 2026-06-23 10:07 ` Ahmad Fatoum
2026-06-23 10:11 ` Ben Dooks
2026-06-23 10:09 ` sashiko-bot
1 sibling, 1 reply; 4+ messages in thread
From: Ahmad Fatoum @ 2026-06-23 10:07 UTC (permalink / raw)
To: Ben Dooks, Thinh Nguyen, Greg Kroah-Hartman, Frank Li,
Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam, linux-usb,
imx, linux-arm-kernel, linux-kernel
On 6/23/26 12:05 PM, Ben Dooks wrote:
> The dwc3_imx_glue_ops is not used outside this file, and technically this
> is the dwc3-imx8mp driver so whilst making this static to avoid the
> following warning, rename it dwc3_imx8mp_glue_ops to distinguish it from
> the other driver which also has dwc3_imx_glue_ops.
>
> Fixes:
> drivers/usb/dwc3/dwc3-imx8mp.c:176:22: warning: symbol 'dwc3_imx_glue_ops' was not declared. Should it be static?
>
> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
> ---
> drivers/usb/dwc3/dwc3-imx8mp.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/usb/dwc3/dwc3-imx8mp.c b/drivers/usb/dwc3/dwc3-imx8mp.c
> index 1cf96540b66e..bc61a89b66b1 100644
> --- a/drivers/usb/dwc3/dwc3-imx8mp.c
> +++ b/drivers/usb/dwc3/dwc3-imx8mp.c
> @@ -173,8 +173,8 @@ static void dwc3_imx_pre_set_role(struct dwc3 *dwc, enum usb_role role)
> pm_runtime_use_autosuspend(dwc->dev);
> }
>
> -struct dwc3_glue_ops dwc3_imx_glue_ops = {
> - .pre_set_role = dwc3_imx_pre_set_role,
> +statc struct dwc3_glue_ops dwc3_imx8mp_glue_ops = {
Typo
> + .pre_set_role = dwc3_imx8mp_pre_set_role,
> };
>
> static int dwc3_imx8mp_probe(struct platform_device *pdev)
> @@ -266,7 +266,7 @@ static int dwc3_imx8mp_probe(struct platform_device *pdev)
> goto put_dwc3;
> }
>
> - dwc3->glue_ops = &dwc3_imx_glue_ops;
> + dwc3->glue_ops = &dwc3_imx8mp_glue_ops;
>
> if (dwc3->dr_mode == USB_DR_MODE_HOST)
> pm_runtime_dont_use_autosuspend(dwc3->dev);
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] usb: dwc3: imx8mp: make dwc3_imx_glue_ops static and rename to imx8mp
2026-06-23 10:05 [PATCH] usb: dwc3: imx8mp: make dwc3_imx_glue_ops static and rename to imx8mp Ben Dooks
2026-06-23 10:07 ` Ahmad Fatoum
@ 2026-06-23 10:09 ` sashiko-bot
1 sibling, 0 replies; 4+ messages in thread
From: sashiko-bot @ 2026-06-23 10:09 UTC (permalink / raw)
To: Ben Dooks; +Cc: Frank.Li, imx
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Low] The keyword `static` is misspelled as `statc`, causing a compilation syntax error.
- [Low] The struct is initialized with the undeclared function `dwc3_imx8mp_pre_set_role`.
--
commit 7c7aefb84ba9dd8d7379b9aae197107a91b20ee1
Author: Ben Dooks <ben.dooks@codethink.co.uk>
usb: dwc3: imx8mp: make dwc3_imx_glue_ops static and rename to imx8mp
This commit makes the dwc3_imx_glue_ops structure static to resolve a missing
declaration warning. It also renames the structure to dwc3_imx8mp_glue_ops to
distinguish it from other drivers.
> diff --git a/drivers/usb/dwc3/dwc3-imx8mp.c b/drivers/usb/dwc3/dwc3-imx8mp.c
> --- a/drivers/usb/dwc3/dwc3-imx8mp.c
> +++ b/drivers/usb/dwc3/dwc3-imx8mp.c
> @@ -173,8 +173,8 @@ static void dwc3_imx_pre_set_role(struct dwc3 *dwc, enum usb_role role)
> pm_runtime_use_autosuspend(dwc->dev);
> }
>
> -struct dwc3_glue_ops dwc3_imx_glue_ops = {
> - .pre_set_role = dwc3_imx_pre_set_role,
> +statc struct dwc3_glue_ops dwc3_imx8mp_glue_ops = {
[Severity: Low]
Does this cause a compilation error? It looks like the static keyword is
misspelled as statc here.
> + .pre_set_role = dwc3_imx8mp_pre_set_role,
[Severity: Low]
Will this initialization also fail to compile? The structure is pointing to
dwc3_imx8mp_pre_set_role, but earlier in the file the function remains named
dwc3_imx_pre_set_role:
static void dwc3_imx_pre_set_role(struct dwc3 *dwc, enum usb_role role)
{
...
It seems the function renaming might have been left out of this patch.
> };
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260623100554.735080-1-ben.dooks@codethink.co.uk?part=1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] usb: dwc3: imx8mp: make dwc3_imx_glue_ops static and rename to imx8mp
2026-06-23 10:07 ` Ahmad Fatoum
@ 2026-06-23 10:11 ` Ben Dooks
0 siblings, 0 replies; 4+ messages in thread
From: Ben Dooks @ 2026-06-23 10:11 UTC (permalink / raw)
To: Ahmad Fatoum, Thinh Nguyen, Greg Kroah-Hartman, Frank Li,
Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam, linux-usb,
imx, linux-arm-kernel, linux-kernel
On 23/06/2026 11:07, Ahmad Fatoum wrote:
>
>
> On 6/23/26 12:05 PM, Ben Dooks wrote:
>> The dwc3_imx_glue_ops is not used outside this file, and technically this
>> is the dwc3-imx8mp driver so whilst making this static to avoid the
>> following warning, rename it dwc3_imx8mp_glue_ops to distinguish it from
>> the other driver which also has dwc3_imx_glue_ops.
>>
>> Fixes:
>> drivers/usb/dwc3/dwc3-imx8mp.c:176:22: warning: symbol 'dwc3_imx_glue_ops' was not declared. Should it be static?
>>
>> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
>> ---
>> drivers/usb/dwc3/dwc3-imx8mp.c | 6 +++---
>> 1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/usb/dwc3/dwc3-imx8mp.c b/drivers/usb/dwc3/dwc3-imx8mp.c
>> index 1cf96540b66e..bc61a89b66b1 100644
>> --- a/drivers/usb/dwc3/dwc3-imx8mp.c
>> +++ b/drivers/usb/dwc3/dwc3-imx8mp.c
>> @@ -173,8 +173,8 @@ static void dwc3_imx_pre_set_role(struct dwc3 *dwc, enum usb_role role)
>> pm_runtime_use_autosuspend(dwc->dev);
>> }
>>
>> -struct dwc3_glue_ops dwc3_imx_glue_ops = {
>> - .pre_set_role = dwc3_imx_pre_set_role,
>> +statc struct dwc3_glue_ops dwc3_imx8mp_glue_ops = {
>
> Typo
Thanks, forgot to re-run check after this. Sent v2
>
>> + .pre_set_role = dwc3_imx8mp_pre_set_role,
>> };
>>
>> static int dwc3_imx8mp_probe(struct platform_device *pdev)
>> @@ -266,7 +266,7 @@ static int dwc3_imx8mp_probe(struct platform_device *pdev)
>> goto put_dwc3;
>> }
>>
>> - dwc3->glue_ops = &dwc3_imx_glue_ops;
>> + dwc3->glue_ops = &dwc3_imx8mp_glue_ops;
>>
>> if (dwc3->dr_mode == USB_DR_MODE_HOST)
>> pm_runtime_dont_use_autosuspend(dwc3->dev);
>
--
Ben Dooks http://www.codethink.co.uk/
Senior Engineer Codethink - Providing Genius
https://www.codethink.co.uk/privacy.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-06-23 10:11 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-23 10:05 [PATCH] usb: dwc3: imx8mp: make dwc3_imx_glue_ops static and rename to imx8mp Ben Dooks
2026-06-23 10:07 ` Ahmad Fatoum
2026-06-23 10:11 ` Ben Dooks
2026-06-23 10:09 ` sashiko-bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox