All of lore.kernel.org
 help / color / mirror / Atom feed
From: Herve Codina <herve.codina@bootlin.com>
To: Li Zetao <lizetao1@huawei.com>
Cc: <gregkh@linuxfoundation.org>, <linux-renesas-soc@vger.kernel.org>,
	<linux-usb@vger.kernel.org>
Subject: Re: [PATCH -next] usb: gadget: udc: Remove redundant initialization for udc_driver
Date: Thu, 3 Aug 2023 08:19:00 +0200	[thread overview]
Message-ID: <20230803081900.250f0cc8@bootlin.com> (raw)
In-Reply-To: <20230803032838.3045730-1-lizetao1@huawei.com>

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é

      reply	other threads:[~2023-08-03  6:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230803081900.250f0cc8@bootlin.com \
    --to=herve.codina@bootlin.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=lizetao1@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.