linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] usb: gadget: udc: Remove redundant initialization for udc_driver
@ 2023-08-03  3:28 Li Zetao
  2023-08-03  6:19 ` Herve Codina
  0 siblings, 1 reply; 2+ messages in thread
From: Li Zetao @ 2023-08-03  3:28 UTC (permalink / raw)
  To: herve.codina, gregkh; +Cc: lizetao1, linux-renesas-soc, linux-usb

There is a warning reported by coccinelle:

./drivers/usb/gadget/udc/renesas_usbf.c:3381:3-8:
		No need to set .owner here. The core will do it.

The module_platform_driver() will set "THIS_MODULE" to driver.owner
when register a driver for platform-level devices, so it is redundant
initialization to set driver.owner in udc_driver statement. Remove it
to silence the warning.

Signed-off-by: Li Zetao <lizetao1@huawei.com>
---
 drivers/usb/gadget/udc/renesas_usbf.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/usb/gadget/udc/renesas_usbf.c b/drivers/usb/gadget/udc/renesas_usbf.c
index 3482b41d0646..657f265ac7cc 100644
--- a/drivers/usb/gadget/udc/renesas_usbf.c
+++ b/drivers/usb/gadget/udc/renesas_usbf.c
@@ -3378,7 +3378,6 @@ MODULE_DEVICE_TABLE(of, usbf_match);
 static struct platform_driver udc_driver = {
 	.driver = {
 		.name = "usbf_renesas",
-		.owner = THIS_MODULE,
 		.of_match_table = usbf_match,
 	},
 	.probe          = usbf_probe,
-- 
2.34.1


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

* Re: [PATCH -next] usb: gadget: udc: Remove redundant initialization for udc_driver
  2023-08-03  3:28 [PATCH -next] usb: gadget: udc: Remove redundant initialization for udc_driver Li Zetao
@ 2023-08-03  6:19 ` Herve Codina
  0 siblings, 0 replies; 2+ messages in thread
From: Herve Codina @ 2023-08-03  6:19 UTC (permalink / raw)
  To: Li Zetao; +Cc: gregkh, linux-renesas-soc, linux-usb

Hi Li,

On Thu, 3 Aug 2023 11:28:38 +0800
Li Zetao <lizetao1@huawei.com> wrote:

> There is a warning reported by coccinelle:
> 
> ./drivers/usb/gadget/udc/renesas_usbf.c:3381:3-8:
> 		No need to set .owner here. The core will do it.
> 
> The module_platform_driver() will set "THIS_MODULE" to driver.owner
> when register a driver for platform-level devices, so it is redundant
> initialization to set driver.owner in udc_driver statement. Remove it
> to silence the warning.
> 
> Signed-off-by: Li Zetao <lizetao1@huawei.com>
> ---
>  drivers/usb/gadget/udc/renesas_usbf.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/usb/gadget/udc/renesas_usbf.c b/drivers/usb/gadget/udc/renesas_usbf.c
> index 3482b41d0646..657f265ac7cc 100644
> --- a/drivers/usb/gadget/udc/renesas_usbf.c
> +++ b/drivers/usb/gadget/udc/renesas_usbf.c
> @@ -3378,7 +3378,6 @@ MODULE_DEVICE_TABLE(of, usbf_match);
>  static struct platform_driver udc_driver = {
>  	.driver = {
>  		.name = "usbf_renesas",
> -		.owner = THIS_MODULE,
>  		.of_match_table = usbf_match,
>  	},
>  	.probe          = usbf_probe,

Acked-by: Herve Codina <herve.codina@bootlin.com>

Thanks,
Hervé

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

end of thread, other threads:[~2023-08-03  6:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-03  3:28 [PATCH -next] usb: gadget: udc: Remove redundant initialization for udc_driver Li Zetao
2023-08-03  6:19 ` Herve Codina

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).