From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Cc: Valentina Manea <valentina.manea.m@gmail.com>,
Shuah Khan <shuah@kernel.org>, Hongren Zheng <i@zenithal.me>,
"Brian G. Merrell" <bgmerrell@novell.com>,
kernel@collabora.com, Greg Kroah-Hartman <gregkh@suse.de>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 8/9] usb: vhci-hcd: Consistently use __func__
Date: Thu, 17 Jul 2025 18:18:11 +0200 [thread overview]
Message-ID: <2025071755-vitalize-nineteen-f843@gregkh> (raw)
In-Reply-To: <20250717-vhci-hcd-suspend-fix-v1-8-2b000cd05952@collabora.com>
On Thu, Jul 17, 2025 at 06:54:57PM +0300, Cristian Ciocaltea wrote:
> Replace all explicit function names in string literals with __func__ and
> silent several checkpatch complaints similar to the following one:
>
> WARNING: Prefer using '"%s...", __func__' to using 'vhci_start', this function's name, in a string
>
> Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
> ---
> drivers/usb/usbip/vhci_hcd.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/usb/usbip/vhci_hcd.c b/drivers/usb/usbip/vhci_hcd.c
> index 841902482fb15d1d86525f23492e4966f35630a0..95034440c84f931bdf47552b499e0fdc6f726e59 100644
> --- a/drivers/usb/usbip/vhci_hcd.c
> +++ b/drivers/usb/usbip/vhci_hcd.c
> @@ -160,7 +160,7 @@ void rh_port_connect(struct vhci_device *vdev, enum usb_device_speed speed)
> u32 status;
> unsigned long flags;
>
> - usbip_dbg_vhci_rh("rh_port_connect %d\n", rhport);
> + usbip_dbg_vhci_rh("%s %d\n", __func__, rhport);
So now you have __func__ twice in the log (hint, pr_debug() provides you
the function name.)
For "trace" debugging lines like this, just remove them, ftrace is
better to use instead.
>
> spin_lock_irqsave(&vhci->lock, flags);
>
> @@ -194,7 +194,7 @@ static void rh_port_disconnect(struct vhci_device *vdev)
> u32 status;
> unsigned long flags;
>
> - usbip_dbg_vhci_rh("rh_port_disconnect %d\n", rhport);
> + usbip_dbg_vhci_rh("%s %d\n", __func__, rhport);
Can be removed.
>
> spin_lock_irqsave(&vhci->lock, flags);
>
> @@ -1172,7 +1172,7 @@ static int vhci_start(struct usb_hcd *hcd)
> int id, rhport;
> int err;
>
> - usbip_dbg_vhci_hc("enter vhci_start\n");
> + usbip_dbg_vhci_hc("enter %s\n", __func__);
Also removed.
>
> if (usb_hcd_is_primary_hcd(hcd))
> spin_lock_init(&vhci_hcd->vhci->lock);
> @@ -1299,7 +1299,7 @@ static int vhci_alloc_streams(struct usb_hcd *hcd, struct usb_device *udev,
> struct usb_host_endpoint **eps, unsigned int num_eps,
> unsigned int num_streams, gfp_t mem_flags)
> {
> - dev_dbg(&hcd->self.root_hub->dev, "vhci_alloc_streams not implemented\n");
> + dev_dbg(&hcd->self.root_hub->dev, "%s not implemented\n", __func__);
Just drop __func__ as it's now duplicated.
> return 0;
> }
>
> @@ -1308,7 +1308,7 @@ static int vhci_free_streams(struct usb_hcd *hcd, struct usb_device *udev,
> struct usb_host_endpoint **eps, unsigned int num_eps,
> gfp_t mem_flags)
> {
> - dev_dbg(&hcd->self.root_hub->dev, "vhci_free_streams not implemented\n");
> + dev_dbg(&hcd->self.root_hub->dev, "%s not implemented\n", __func__);
Same here.
thanks,
greg k-h
next prev parent reply other threads:[~2025-07-17 16:18 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-17 15:54 [PATCH 0/9] USB/IP VHCI suspend fix and driver cleanup Cristian Ciocaltea
2025-07-17 15:54 ` [PATCH 1/9] usb: vhci-hcd: Prevent suspending virtually attached devices Cristian Ciocaltea
2025-07-17 18:26 ` Alan Stern
2025-07-17 19:55 ` Shuah Khan
2025-07-18 6:41 ` Cristian Ciocaltea
2025-07-25 10:20 ` Cristian Ciocaltea
2025-07-17 15:54 ` [PATCH 2/9] usb: vhci-hcd: Fix space, brace, alignment and line length issues Cristian Ciocaltea
2025-07-17 16:18 ` Greg Kroah-Hartman
2025-07-17 17:26 ` Cristian Ciocaltea
2025-07-18 6:26 ` Greg Kroah-Hartman
2025-07-18 6:48 ` Cristian Ciocaltea
2025-07-17 15:54 ` [PATCH 3/9] usb: vhci-hcd: Simplify NULL comparison Cristian Ciocaltea
2025-07-17 15:54 ` [PATCH 4/9] usb: vhci-hcd: Simplify kzalloc usage Cristian Ciocaltea
2025-07-17 15:54 ` [PATCH 5/9] usb: vhci-hcd: Do not split quoted strings Cristian Ciocaltea
2025-07-17 16:19 ` Greg Kroah-Hartman
2025-07-17 17:35 ` Cristian Ciocaltea
2025-07-17 15:54 ` [PATCH 6/9] usb: vhci-hcd: Fix block comments Cristian Ciocaltea
2025-07-17 16:19 ` Greg Kroah-Hartman
2025-07-17 15:54 ` [PATCH 7/9] usb: vhci-hcd: Use the paranthesized form of sizeof Cristian Ciocaltea
2025-07-17 15:54 ` [PATCH 8/9] usb: vhci-hcd: Consistently use __func__ Cristian Ciocaltea
2025-07-17 16:18 ` Greg Kroah-Hartman [this message]
2025-07-17 17:43 ` Cristian Ciocaltea
2025-07-17 15:54 ` [PATCH 9/9] usb: vhci-hcd: Remove ftrace-like logging Cristian Ciocaltea
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=2025071755-vitalize-nineteen-f843@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=bgmerrell@novell.com \
--cc=cristian.ciocaltea@collabora.com \
--cc=gregkh@suse.de \
--cc=i@zenithal.me \
--cc=kernel@collabora.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=shuah@kernel.org \
--cc=valentina.manea.m@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox