From: Greg KH <gregkh@linuxfoundation.org>
To: Yajun Deng <yajun.deng@linux.dev>
Cc: marcel@holtmann.org, johan.hedberg@gmail.com,
luiz.dentz@gmail.com, wg@grandegger.com, mkl@pengutronix.de,
aspriel@gmail.com, franky.lin@broadcom.com,
hante.meuleman@broadcom.com, kvalo@kernel.org,
briannorris@chromium.org, mka@chromium.org, johan@kernel.org,
oneukum@suse.com, stern@rowland.harvard.edu,
valentina.manea.m@gmail.com, shuah@kernel.org,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] USB: core: Use device_driver directly in struct usb_driver and usb_device_driver
Date: Fri, 15 Dec 2023 13:40:57 +0100 [thread overview]
Message-ID: <2023121505-dexterity-rectal-8898@gregkh> (raw)
In-Reply-To: <20231215063101.792991-1-yajun.deng@linux.dev>
On Fri, Dec 15, 2023 at 02:31:01PM +0800, Yajun Deng wrote:
> There is usbdrv_wrap in struct usb_driver and usb_device_driver,
> it contains device_driver and for_devices. for_devices is used to
> distinguish between device drivers and interface drivers.
Yes.
> We can compare that if 'drv->probe' is equal to usb_probe_device instead
> of using for_devices in is_usb_device_driver().
Why?
> Remove struct usbdrv_wrap, use device_driver directly in struct usb_driver
> and usb_device_driver. This makes the code more concise.
Really? What does this help out with? Are there future changes that
require this?
I'm all for cleanups, but I don't see what this helps with.
Also, you have a coding style issue in this patch, which means I
couldn't take it anyway:
> +extern int usb_probe_device(struct device *dev);
We don't do that in .c files :(
thanks,
greg k-h
next prev parent reply other threads:[~2023-12-15 12:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-15 6:31 [PATCH] USB: core: Use device_driver directly in struct usb_driver and usb_device_driver Yajun Deng
2023-12-15 12:40 ` Greg KH [this message]
2023-12-15 13:23 ` Yajun Deng
2023-12-15 15:50 ` Alan Stern
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=2023121505-dexterity-rectal-8898@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=aspriel@gmail.com \
--cc=briannorris@chromium.org \
--cc=franky.lin@broadcom.com \
--cc=hante.meuleman@broadcom.com \
--cc=johan.hedberg@gmail.com \
--cc=johan@kernel.org \
--cc=kvalo@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=luiz.dentz@gmail.com \
--cc=marcel@holtmann.org \
--cc=mka@chromium.org \
--cc=mkl@pengutronix.de \
--cc=oneukum@suse.com \
--cc=shuah@kernel.org \
--cc=stern@rowland.harvard.edu \
--cc=valentina.manea.m@gmail.com \
--cc=wg@grandegger.com \
--cc=yajun.deng@linux.dev \
/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.