Linux USB
 help / color / mirror / Atom feed
* [PATCH 0/2] usb: atm: ueagle-atm: debug message changes
@ 2026-05-20 22:32 Mauricio Faria de Oliveira
  2026-05-20 22:32 ` [PATCH 1/2] usb: atm: ueagle-atm: use dev_dbg() for 'device found' message Mauricio Faria de Oliveira
  2026-05-20 22:32 ` [PATCH 2/2] usb: atm: ueagle-atm: remove function entry/exit debug messages Mauricio Faria de Oliveira
  0 siblings, 2 replies; 5+ messages in thread
From: Mauricio Faria de Oliveira @ 2026-05-20 22:32 UTC (permalink / raw)
  To: Matthieu CASTET, Stanislaw Gruszka, Greg Kroah-Hartman
  Cc: kernel-dev, linux-usb, linux-kernel, Mauricio Faria de Oliveira

This series changes/removes some debug messages in the ueagle-atm driver.

Patch 1 adjusts the 'device found' message to debug level.
Patch 2 removes the function entry/exit debug messages.

With:

  # echo 1 >/sys/module/printk/parameters/ignore_loglevel
  # echo 2 >/sys/module/ueagle_atm/parameters/debug
  # echo 'file drivers/usb/atm/ueagle-atm.c +p' >/sys/kernel/debug/dynamic_debug/control

Changes:

  -usb 1-1: [ueagle-atm vdbg]  entering uea_probe

  -usb 1-1: [ueagle-atm] ADSL device founded vid (0X1039) pid (0X2101) Rev (0X2581): Eagle I
  +usb 1-1: [ueagle-atm dbg] uea_probe: ADSL device found with vid (0X1039) pid (0X2101) Rev (0X2581): Eagle I

  -usb 1-1: [ueagle-atm vdbg]  entering uea_load_firmware
   usb 1-1: [ueagle-atm] pre-firmware device, uploading firmware
   usb 1-1: [ueagle-atm] loading firmware ueagle-atm/eagleI.fw
  -usb 1-1: [ueagle-atm vdbg]  leaving  uea_load_firmware
   usb 1-1: Direct firmware load for ueagle-atm/eagleI.fw failed with error -2
   usb 1-1: Falling back to sysfs fallback for: ueagle-atm/eagleI.fw
   usb 1-1: USB disconnect, device number 2
  -usb 1-1: [ueagle-atm vdbg]  entering uea_disconnect
  -usb 1-1: [ueagle-atm vdbg]  leaving  uea_disconnect
  -usb 1-1: [ueagle-atm vdbg]  entering uea_upload_pre_firmware
   usb 1-1: [UEAGLE-ATM] firmware is not available
  -usb 1-1: [ueagle-atm vdbg]  leaving  uea_upload_pre_firmware

Final:

   usb 1-1: [ueagle-atm dbg] uea_probe: ADSL device found with vid (0X1039) pid (0X2101) Rev (0X2581): Eagle I
   usb 1-1: [ueagle-atm] pre-firmware device, uploading firmware
   usb 1-1: [ueagle-atm] loading firmware ueagle-atm/eagleI.fw
   usb 1-1: Direct firmware load for ueagle-atm/eagleI.fw failed with error -2
   usb 1-1: Falling back to sysfs fallback for: ueagle-atm/eagleI.fw
   usb 1-1: USB disconnect, device number 2
   usb 1-1: [UEAGLE-ATM] firmware is not available

Signed-off-by: Mauricio Faria de Oliveira <mfo@igalia.com>
---
Mauricio Faria de Oliveira (2):
      usb: atm: ueagle-atm: use dev_dbg() for 'device found' message
      usb: atm: ueagle-atm: remove function entry/exit debug messages

 drivers/usb/atm/ueagle-atm.c | 58 ++++++--------------------------------------
 1 file changed, 7 insertions(+), 51 deletions(-)
---
base-commit: 80dd246accce631c328ea43294e53b2b2dd2aa32
change-id: 20260520-ueagle-atm-cleanup-e53d67296693

Best regards,
-- 
Mauricio Faria de Oliveira <mfo@igalia.com>


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

* [PATCH 1/2] usb: atm: ueagle-atm: use dev_dbg() for 'device found' message
  2026-05-20 22:32 [PATCH 0/2] usb: atm: ueagle-atm: debug message changes Mauricio Faria de Oliveira
@ 2026-05-20 22:32 ` Mauricio Faria de Oliveira
  2026-05-21 10:08   ` Stanislaw Gruszka
  2026-05-20 22:32 ` [PATCH 2/2] usb: atm: ueagle-atm: remove function entry/exit debug messages Mauricio Faria de Oliveira
  1 sibling, 1 reply; 5+ messages in thread
From: Mauricio Faria de Oliveira @ 2026-05-20 22:32 UTC (permalink / raw)
  To: Matthieu CASTET, Stanislaw Gruszka, Greg Kroah-Hartman
  Cc: kernel-dev, linux-usb, linux-kernel, Mauricio Faria de Oliveira

Convert dev_info() to dev_dbg().

Per 'Documentation/process/coding-style.rst':

  13) Printing kernel messages

  ...  When drivers are working properly they are quiet,
  so prefer to use dev_dbg/pr_debug unless something is wrong.

While in there, correct the verb form and add 'with' for clarity.

Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/all/2026051628-squatter-stature-c0e0@gregkh/
Signed-off-by: Mauricio Faria de Oliveira <mfo@igalia.com>
---
 drivers/usb/atm/ueagle-atm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/atm/ueagle-atm.c b/drivers/usb/atm/ueagle-atm.c
index f3ae72feb5bfc313ccfa1ab6a9bb40fcd8f5800a..71559a934133a82ddb23d255e0f04d018c13c583 100644
--- a/drivers/usb/atm/ueagle-atm.c
+++ b/drivers/usb/atm/ueagle-atm.c
@@ -2590,7 +2590,7 @@ static int uea_probe(struct usb_interface *intf, const struct usb_device_id *id)
 	int ret;
 
 	uea_enters(usb);
-	uea_info(usb, "ADSL device founded vid (%#X) pid (%#X) Rev (%#X): %s\n",
+	uea_dbg(usb, "ADSL device found with vid (%#X) pid (%#X) Rev (%#X): %s\n",
 		le16_to_cpu(usb->descriptor.idVendor),
 		le16_to_cpu(usb->descriptor.idProduct),
 		le16_to_cpu(usb->descriptor.bcdDevice),

-- 
2.51.0


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

* [PATCH 2/2] usb: atm: ueagle-atm: remove function entry/exit debug messages
  2026-05-20 22:32 [PATCH 0/2] usb: atm: ueagle-atm: debug message changes Mauricio Faria de Oliveira
  2026-05-20 22:32 ` [PATCH 1/2] usb: atm: ueagle-atm: use dev_dbg() for 'device found' message Mauricio Faria de Oliveira
@ 2026-05-20 22:32 ` Mauricio Faria de Oliveira
  2026-05-21 10:08   ` Stanislaw Gruszka
  1 sibling, 1 reply; 5+ messages in thread
From: Mauricio Faria de Oliveira @ 2026-05-20 22:32 UTC (permalink / raw)
  To: Matthieu CASTET, Stanislaw Gruszka, Greg Kroah-Hartman
  Cc: kernel-dev, linux-usb, linux-kernel, Mauricio Faria de Oliveira

Remove the driver-internal function entry/exit debug messages
in favor of existing kernel-level function tracing mechanisms.

Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/all/2026051657-scruffy-embark-45ea@gregkh/
Signed-off-by: Mauricio Faria de Oliveira <mfo@igalia.com>
---
 drivers/usb/atm/ueagle-atm.c | 56 +++++---------------------------------------
 1 file changed, 6 insertions(+), 50 deletions(-)

diff --git a/drivers/usb/atm/ueagle-atm.c b/drivers/usb/atm/ueagle-atm.c
index 71559a934133a82ddb23d255e0f04d018c13c583..ed2611aacb252fce829b4a33589c47912aadbe67 100644
--- a/drivers/usb/atm/ueagle-atm.c
+++ b/drivers/usb/atm/ueagle-atm.c
@@ -51,12 +51,6 @@
 				"[ueagle-atm vdbg]  " format, ##args); \
 	} while (0)
 
-#define uea_enters(usb_dev) \
-	uea_vdbg(usb_dev, "entering %s\n" , __func__)
-
-#define uea_leaves(usb_dev) \
-	uea_vdbg(usb_dev, "leaving  %s\n" , __func__)
-
 #define uea_err(usb_dev, format, args...) \
 	dev_err(&(usb_dev)->dev , "[UEAGLE-ATM] " format , ##args)
 
@@ -606,7 +600,6 @@ static void uea_upload_pre_firmware(const struct firmware *fw_entry,
 	u32 crc = 0;
 	int ret, size;
 
-	uea_enters(usb);
 	if (!fw_entry) {
 		uea_err(usb, "firmware is not available\n");
 		goto err;
@@ -670,7 +663,6 @@ static void uea_upload_pre_firmware(const struct firmware *fw_entry,
 	uea_err(usb, "firmware is corrupted\n");
 err:
 	release_firmware(fw_entry);
-	uea_leaves(usb);
 }
 
 /*
@@ -681,7 +673,6 @@ static int uea_load_firmware(struct usb_device *usb, unsigned int ver)
 	int ret;
 	char *fw_name = EAGLE_FIRMWARE;
 
-	uea_enters(usb);
 	uea_info(usb, "pre-firmware device, uploading firmware\n");
 
 	switch (ver) {
@@ -710,7 +701,6 @@ static int uea_load_firmware(struct usb_device *usb, unsigned int ver)
 	else
 		uea_info(usb, "loading firmware %s\n", fw_name);
 
-	uea_leaves(usb);
 	return ret;
 }
 
@@ -1137,7 +1127,6 @@ static int uea_cmv_e1(struct uea_softc *sc,
 	struct cmv_e1 cmv;
 	int ret;
 
-	uea_enters(INS_TO_USBDEV(sc));
 	uea_vdbg(INS_TO_USBDEV(sc), "Function : %d-%d, Address : %c%c%c%c, "
 			"offset : 0x%04x, data : 0x%08x\n",
 			E1_FUNCTION_TYPE(function),
@@ -1164,9 +1153,8 @@ static int uea_cmv_e1(struct uea_softc *sc,
 							sizeof(cmv), &cmv);
 	if (ret < 0)
 		return ret;
-	ret = wait_cmv_ack(sc);
-	uea_leaves(INS_TO_USBDEV(sc));
-	return ret;
+
+	return wait_cmv_ack(sc);
 }
 
 static int uea_cmv_e4(struct uea_softc *sc,
@@ -1175,7 +1163,6 @@ static int uea_cmv_e4(struct uea_softc *sc,
 	struct cmv_e4 cmv;
 	int ret;
 
-	uea_enters(INS_TO_USBDEV(sc));
 	memset(&cmv, 0, sizeof(cmv));
 
 	uea_vdbg(INS_TO_USBDEV(sc), "Function : %d-%d, Group : 0x%04x, "
@@ -1199,9 +1186,8 @@ static int uea_cmv_e4(struct uea_softc *sc,
 							sizeof(cmv), &cmv);
 	if (ret < 0)
 		return ret;
-	ret = wait_cmv_ack(sc);
-	uea_leaves(INS_TO_USBDEV(sc));
-	return ret;
+
+	return wait_cmv_ack(sc);
 }
 
 static inline int uea_read_cmv_e1(struct uea_softc *sc,
@@ -1295,7 +1281,6 @@ static int uea_stat_e1(struct uea_softc *sc)
 	u32 data;
 	int ret;
 
-	uea_enters(INS_TO_USBDEV(sc));
 	data = sc->stats.phy.state;
 
 	ret = uea_read_cmv_e1(sc, E1_SA_STAT, 0, &sc->stats.phy.state);
@@ -1438,7 +1423,6 @@ static int uea_stat_e4(struct uea_softc *sc)
 	u32 tmp_arr[2];
 	int ret;
 
-	uea_enters(INS_TO_USBDEV(sc));
 	data = sc->stats.phy.state;
 
 	/* XXX only need to be done before operationnal... */
@@ -1805,7 +1789,6 @@ static int uea_start_reset(struct uea_softc *sc)
 	u16 zero = 0;	/* ;-) */
 	int ret;
 
-	uea_enters(INS_TO_USBDEV(sc));
 	uea_info(INS_TO_USBDEV(sc), "(re)booting started\n");
 
 	/* mask interrupt */
@@ -1873,7 +1856,6 @@ static int uea_start_reset(struct uea_softc *sc)
 		return ret;
 
 	sc->reset = 0;
-	uea_leaves(INS_TO_USBDEV(sc));
 	return ret;
 }
 
@@ -1889,7 +1871,6 @@ static int uea_kthread(void *data)
 	int ret = -EAGAIN;
 
 	set_freezable();
-	uea_enters(INS_TO_USBDEV(sc));
 	while (!kthread_should_stop()) {
 		if (ret < 0 || sc->reset)
 			ret = uea_start_reset(sc);
@@ -1898,7 +1879,7 @@ static int uea_kthread(void *data)
 		if (ret != -EAGAIN)
 			uea_wait(sc, 0, msecs_to_jiffies(1000));
 	}
-	uea_leaves(INS_TO_USBDEV(sc));
+
 	return ret;
 }
 
@@ -1911,8 +1892,6 @@ static int load_XILINX_firmware(struct uea_softc *sc)
 	u8 value;
 	char *fw_name = FPGA930_FIRMWARE;
 
-	uea_enters(INS_TO_USBDEV(sc));
-
 	ret = request_firmware(&fw_entry, fw_name, &sc->usb_dev->dev);
 	if (ret) {
 		uea_err(INS_TO_USBDEV(sc), "firmware %s is not available\n",
@@ -1956,7 +1935,6 @@ static int load_XILINX_firmware(struct uea_softc *sc)
 err1:
 	release_firmware(fw_entry);
 err0:
-	uea_leaves(INS_TO_USBDEV(sc));
 	return ret;
 }
 
@@ -1966,7 +1944,6 @@ static void uea_dispatch_cmv_e1(struct uea_softc *sc, struct intr_pkt *intr)
 	struct cmv_dsc_e1 *dsc = &sc->cmv_dsc.e1;
 	struct cmv_e1 *cmv = &intr->u.e1.s2.cmv;
 
-	uea_enters(INS_TO_USBDEV(sc));
 	if (le16_to_cpu(cmv->wPreamble) != E1_PREAMBLE)
 		goto bad1;
 
@@ -1990,7 +1967,6 @@ static void uea_dispatch_cmv_e1(struct uea_softc *sc, struct intr_pkt *intr)
 	if (cmv->bFunction == E1_MAKEFUNCTION(E1_ADSLDIRECTIVE,
 							E1_MODEMREADY)) {
 		wake_up_cmv_ack(sc);
-		uea_leaves(INS_TO_USBDEV(sc));
 		return;
 	}
 
@@ -2004,7 +1980,6 @@ static void uea_dispatch_cmv_e1(struct uea_softc *sc, struct intr_pkt *intr)
 	sc->data = sc->data << 16 | sc->data >> 16;
 
 	wake_up_cmv_ack(sc);
-	uea_leaves(INS_TO_USBDEV(sc));
 	return;
 
 bad2:
@@ -2012,14 +1987,12 @@ static void uea_dispatch_cmv_e1(struct uea_softc *sc, struct intr_pkt *intr)
 			"Function : %d, Subfunction : %d\n",
 			E1_FUNCTION_TYPE(cmv->bFunction),
 			E1_FUNCTION_SUBTYPE(cmv->bFunction));
-	uea_leaves(INS_TO_USBDEV(sc));
 	return;
 
 bad1:
 	uea_err(INS_TO_USBDEV(sc), "invalid cmv received, "
 			"wPreamble %d, bDirection %d\n",
 			le16_to_cpu(cmv->wPreamble), cmv->bDirection);
-	uea_leaves(INS_TO_USBDEV(sc));
 }
 
 /* The modem send us an ack. First with check if it right */
@@ -2028,7 +2001,6 @@ static void uea_dispatch_cmv_e4(struct uea_softc *sc, struct intr_pkt *intr)
 	struct cmv_dsc_e4 *dsc = &sc->cmv_dsc.e4;
 	struct cmv_e4 *cmv = &intr->u.e4.s2.cmv;
 
-	uea_enters(INS_TO_USBDEV(sc));
 	uea_dbg(INS_TO_USBDEV(sc), "cmv %x %x %x %x %x %x\n",
 		be16_to_cpu(cmv->wGroup), be16_to_cpu(cmv->wFunction),
 		be16_to_cpu(cmv->wOffset), be16_to_cpu(cmv->wAddress),
@@ -2040,7 +2012,6 @@ static void uea_dispatch_cmv_e4(struct uea_softc *sc, struct intr_pkt *intr)
 	if (be16_to_cpu(cmv->wFunction) == E4_MAKEFUNCTION(E4_ADSLDIRECTIVE,
 						E4_MODEMREADY, 1)) {
 		wake_up_cmv_ack(sc);
-		uea_leaves(INS_TO_USBDEV(sc));
 		return;
 	}
 
@@ -2053,7 +2024,6 @@ static void uea_dispatch_cmv_e4(struct uea_softc *sc, struct intr_pkt *intr)
 	sc->data = be32_to_cpu(cmv->dwData[0]);
 	sc->data1 = be32_to_cpu(cmv->dwData[1]);
 	wake_up_cmv_ack(sc);
-	uea_leaves(INS_TO_USBDEV(sc));
 	return;
 
 bad2:
@@ -2061,7 +2031,6 @@ static void uea_dispatch_cmv_e4(struct uea_softc *sc, struct intr_pkt *intr)
 			"Function : %d, Subfunction : %d\n",
 			E4_FUNCTION_TYPE(cmv->wFunction),
 			E4_FUNCTION_SUBTYPE(cmv->wFunction));
-	uea_leaves(INS_TO_USBDEV(sc));
 	return;
 }
 
@@ -2089,8 +2058,6 @@ static void uea_intr(struct urb *urb)
 	struct intr_pkt *intr = urb->transfer_buffer;
 	int status = urb->status;
 
-	uea_enters(INS_TO_USBDEV(sc));
-
 	if (unlikely(status < 0)) {
 		uea_err(INS_TO_USBDEV(sc), "uea_intr() failed with %d\n",
 		       status);
@@ -2130,8 +2097,6 @@ static int uea_boot(struct uea_softc *sc, struct usb_interface *intf)
 	int ret = -ENOMEM;
 	int size;
 
-	uea_enters(INS_TO_USBDEV(sc));
-
 	if (UEA_CHIP_VERSION(sc) == EAGLE_IV) {
 		size = E4_INTR_PKT_SIZE;
 		sc->dispatch_cmv = uea_dispatch_cmv_e4;
@@ -2188,7 +2153,6 @@ static int uea_boot(struct uea_softc *sc, struct usb_interface *intf)
 		goto err2;
 	}
 
-	uea_leaves(INS_TO_USBDEV(sc));
 	return 0;
 
 err2:
@@ -2198,7 +2162,6 @@ static int uea_boot(struct uea_softc *sc, struct usb_interface *intf)
 	sc->urb_int = NULL;
 	kfree(intr);
 err0:
-	uea_leaves(INS_TO_USBDEV(sc));
 	return ret;
 }
 
@@ -2208,7 +2171,7 @@ static int uea_boot(struct uea_softc *sc, struct usb_interface *intf)
 static void uea_stop(struct uea_softc *sc)
 {
 	int ret;
-	uea_enters(INS_TO_USBDEV(sc));
+
 	ret = kthread_stop(sc->kthread);
 	uea_dbg(INS_TO_USBDEV(sc), "kthread finish with status %d\n", ret);
 
@@ -2222,7 +2185,6 @@ static void uea_stop(struct uea_softc *sc)
 	flush_work(&sc->task);
 
 	release_firmware(sc->dsp_firm);
-	uea_leaves(INS_TO_USBDEV(sc));
 }
 
 /* syfs interface */
@@ -2495,8 +2457,6 @@ static int uea_bind(struct usbatm_data *usbatm, struct usb_interface *intf,
 	int ret, ifnum = intf->altsetting->desc.bInterfaceNumber;
 	unsigned int alt;
 
-	uea_enters(usb);
-
 	/* interface 0 is for firmware/monitoring */
 	if (ifnum != UEA_INTR_IFACE_NO)
 		return -ENODEV;
@@ -2589,7 +2549,6 @@ static int uea_probe(struct usb_interface *intf, const struct usb_device_id *id)
 	struct usb_device *usb = interface_to_usbdev(intf);
 	int ret;
 
-	uea_enters(usb);
 	uea_dbg(usb, "ADSL device found with vid (%#X) pid (%#X) Rev (%#X): %s\n",
 		le16_to_cpu(usb->descriptor.idVendor),
 		le16_to_cpu(usb->descriptor.idProduct),
@@ -2620,7 +2579,6 @@ static void uea_disconnect(struct usb_interface *intf)
 {
 	struct usb_device *usb = interface_to_usbdev(intf);
 	int ifnum = intf->altsetting->desc.bInterfaceNumber;
-	uea_enters(usb);
 
 	/* ADI930 has 2 interfaces and eagle 3 interfaces.
 	 * Pre-firmware device has one interface
@@ -2631,8 +2589,6 @@ static void uea_disconnect(struct usb_interface *intf)
 		mutex_unlock(&uea_mutex);
 		uea_info(usb, "ADSL device removed\n");
 	}
-
-	uea_leaves(usb);
 }
 
 /*

-- 
2.51.0


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

* Re: [PATCH 1/2] usb: atm: ueagle-atm: use dev_dbg() for 'device found' message
  2026-05-20 22:32 ` [PATCH 1/2] usb: atm: ueagle-atm: use dev_dbg() for 'device found' message Mauricio Faria de Oliveira
@ 2026-05-21 10:08   ` Stanislaw Gruszka
  0 siblings, 0 replies; 5+ messages in thread
From: Stanislaw Gruszka @ 2026-05-21 10:08 UTC (permalink / raw)
  To: Mauricio Faria de Oliveira
  Cc: Matthieu CASTET, Greg Kroah-Hartman, kernel-dev, linux-usb,
	linux-kernel

On Wed, May 20, 2026 at 07:32:50PM -0300, Mauricio Faria de Oliveira wrote:
> Convert dev_info() to dev_dbg().
> 
> Per 'Documentation/process/coding-style.rst':
> 
>   13) Printing kernel messages
> 
>   ...  When drivers are working properly they are quiet,
>   so prefer to use dev_dbg/pr_debug unless something is wrong.
> 
> While in there, correct the verb form and add 'with' for clarity.
> 
> Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Link: https://lore.kernel.org/all/2026051628-squatter-stature-c0e0@gregkh/
> Signed-off-by: Mauricio Faria de Oliveira <mfo@igalia.com>
Acked-by: Stanislaw Gruszka <stf_xl@wp.pl>

> ---
>  drivers/usb/atm/ueagle-atm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/atm/ueagle-atm.c b/drivers/usb/atm/ueagle-atm.c
> index f3ae72feb5bfc313ccfa1ab6a9bb40fcd8f5800a..71559a934133a82ddb23d255e0f04d018c13c583 100644
> --- a/drivers/usb/atm/ueagle-atm.c
> +++ b/drivers/usb/atm/ueagle-atm.c
> @@ -2590,7 +2590,7 @@ static int uea_probe(struct usb_interface *intf, const struct usb_device_id *id)
>  	int ret;
>  
>  	uea_enters(usb);
> -	uea_info(usb, "ADSL device founded vid (%#X) pid (%#X) Rev (%#X): %s\n",
> +	uea_dbg(usb, "ADSL device found with vid (%#X) pid (%#X) Rev (%#X): %s\n",
>  		le16_to_cpu(usb->descriptor.idVendor),
>  		le16_to_cpu(usb->descriptor.idProduct),
>  		le16_to_cpu(usb->descriptor.bcdDevice),
> 
> -- 
> 2.51.0
> 

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

* Re: [PATCH 2/2] usb: atm: ueagle-atm: remove function entry/exit debug messages
  2026-05-20 22:32 ` [PATCH 2/2] usb: atm: ueagle-atm: remove function entry/exit debug messages Mauricio Faria de Oliveira
@ 2026-05-21 10:08   ` Stanislaw Gruszka
  0 siblings, 0 replies; 5+ messages in thread
From: Stanislaw Gruszka @ 2026-05-21 10:08 UTC (permalink / raw)
  To: Mauricio Faria de Oliveira
  Cc: Matthieu CASTET, Greg Kroah-Hartman, kernel-dev, linux-usb,
	linux-kernel

On Wed, May 20, 2026 at 07:32:51PM -0300, Mauricio Faria de Oliveira wrote:
> Remove the driver-internal function entry/exit debug messages
> in favor of existing kernel-level function tracing mechanisms.
> 
> Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Link: https://lore.kernel.org/all/2026051657-scruffy-embark-45ea@gregkh/
> Signed-off-by: Mauricio Faria de Oliveira <mfo@igalia.com>
Acked-by: Stanislaw Gruszka <stf_xl@wp.pl>

> ---
>  drivers/usb/atm/ueagle-atm.c | 56 +++++---------------------------------------
>  1 file changed, 6 insertions(+), 50 deletions(-)
> 
> diff --git a/drivers/usb/atm/ueagle-atm.c b/drivers/usb/atm/ueagle-atm.c
> index 71559a934133a82ddb23d255e0f04d018c13c583..ed2611aacb252fce829b4a33589c47912aadbe67 100644
> --- a/drivers/usb/atm/ueagle-atm.c
> +++ b/drivers/usb/atm/ueagle-atm.c
> @@ -51,12 +51,6 @@
>  				"[ueagle-atm vdbg]  " format, ##args); \
>  	} while (0)
>  
> -#define uea_enters(usb_dev) \
> -	uea_vdbg(usb_dev, "entering %s\n" , __func__)
> -
> -#define uea_leaves(usb_dev) \
> -	uea_vdbg(usb_dev, "leaving  %s\n" , __func__)
> -
>  #define uea_err(usb_dev, format, args...) \
>  	dev_err(&(usb_dev)->dev , "[UEAGLE-ATM] " format , ##args)
>  
> @@ -606,7 +600,6 @@ static void uea_upload_pre_firmware(const struct firmware *fw_entry,
>  	u32 crc = 0;
>  	int ret, size;
>  
> -	uea_enters(usb);
>  	if (!fw_entry) {
>  		uea_err(usb, "firmware is not available\n");
>  		goto err;
> @@ -670,7 +663,6 @@ static void uea_upload_pre_firmware(const struct firmware *fw_entry,
>  	uea_err(usb, "firmware is corrupted\n");
>  err:
>  	release_firmware(fw_entry);
> -	uea_leaves(usb);
>  }
>  
>  /*
> @@ -681,7 +673,6 @@ static int uea_load_firmware(struct usb_device *usb, unsigned int ver)
>  	int ret;
>  	char *fw_name = EAGLE_FIRMWARE;
>  
> -	uea_enters(usb);
>  	uea_info(usb, "pre-firmware device, uploading firmware\n");
>  
>  	switch (ver) {
> @@ -710,7 +701,6 @@ static int uea_load_firmware(struct usb_device *usb, unsigned int ver)
>  	else
>  		uea_info(usb, "loading firmware %s\n", fw_name);
>  
> -	uea_leaves(usb);
>  	return ret;
>  }
>  
> @@ -1137,7 +1127,6 @@ static int uea_cmv_e1(struct uea_softc *sc,
>  	struct cmv_e1 cmv;
>  	int ret;
>  
> -	uea_enters(INS_TO_USBDEV(sc));
>  	uea_vdbg(INS_TO_USBDEV(sc), "Function : %d-%d, Address : %c%c%c%c, "
>  			"offset : 0x%04x, data : 0x%08x\n",
>  			E1_FUNCTION_TYPE(function),
> @@ -1164,9 +1153,8 @@ static int uea_cmv_e1(struct uea_softc *sc,
>  							sizeof(cmv), &cmv);
>  	if (ret < 0)
>  		return ret;
> -	ret = wait_cmv_ack(sc);
> -	uea_leaves(INS_TO_USBDEV(sc));
> -	return ret;
> +
> +	return wait_cmv_ack(sc);
>  }
>  
>  static int uea_cmv_e4(struct uea_softc *sc,
> @@ -1175,7 +1163,6 @@ static int uea_cmv_e4(struct uea_softc *sc,
>  	struct cmv_e4 cmv;
>  	int ret;
>  
> -	uea_enters(INS_TO_USBDEV(sc));
>  	memset(&cmv, 0, sizeof(cmv));
>  
>  	uea_vdbg(INS_TO_USBDEV(sc), "Function : %d-%d, Group : 0x%04x, "
> @@ -1199,9 +1186,8 @@ static int uea_cmv_e4(struct uea_softc *sc,
>  							sizeof(cmv), &cmv);
>  	if (ret < 0)
>  		return ret;
> -	ret = wait_cmv_ack(sc);
> -	uea_leaves(INS_TO_USBDEV(sc));
> -	return ret;
> +
> +	return wait_cmv_ack(sc);
>  }
>  
>  static inline int uea_read_cmv_e1(struct uea_softc *sc,
> @@ -1295,7 +1281,6 @@ static int uea_stat_e1(struct uea_softc *sc)
>  	u32 data;
>  	int ret;
>  
> -	uea_enters(INS_TO_USBDEV(sc));
>  	data = sc->stats.phy.state;
>  
>  	ret = uea_read_cmv_e1(sc, E1_SA_STAT, 0, &sc->stats.phy.state);
> @@ -1438,7 +1423,6 @@ static int uea_stat_e4(struct uea_softc *sc)
>  	u32 tmp_arr[2];
>  	int ret;
>  
> -	uea_enters(INS_TO_USBDEV(sc));
>  	data = sc->stats.phy.state;
>  
>  	/* XXX only need to be done before operationnal... */
> @@ -1805,7 +1789,6 @@ static int uea_start_reset(struct uea_softc *sc)
>  	u16 zero = 0;	/* ;-) */
>  	int ret;
>  
> -	uea_enters(INS_TO_USBDEV(sc));
>  	uea_info(INS_TO_USBDEV(sc), "(re)booting started\n");
>  
>  	/* mask interrupt */
> @@ -1873,7 +1856,6 @@ static int uea_start_reset(struct uea_softc *sc)
>  		return ret;
>  
>  	sc->reset = 0;
> -	uea_leaves(INS_TO_USBDEV(sc));
>  	return ret;
>  }
>  
> @@ -1889,7 +1871,6 @@ static int uea_kthread(void *data)
>  	int ret = -EAGAIN;
>  
>  	set_freezable();
> -	uea_enters(INS_TO_USBDEV(sc));
>  	while (!kthread_should_stop()) {
>  		if (ret < 0 || sc->reset)
>  			ret = uea_start_reset(sc);
> @@ -1898,7 +1879,7 @@ static int uea_kthread(void *data)
>  		if (ret != -EAGAIN)
>  			uea_wait(sc, 0, msecs_to_jiffies(1000));
>  	}
> -	uea_leaves(INS_TO_USBDEV(sc));
> +
>  	return ret;
>  }
>  
> @@ -1911,8 +1892,6 @@ static int load_XILINX_firmware(struct uea_softc *sc)
>  	u8 value;
>  	char *fw_name = FPGA930_FIRMWARE;
>  
> -	uea_enters(INS_TO_USBDEV(sc));
> -
>  	ret = request_firmware(&fw_entry, fw_name, &sc->usb_dev->dev);
>  	if (ret) {
>  		uea_err(INS_TO_USBDEV(sc), "firmware %s is not available\n",
> @@ -1956,7 +1935,6 @@ static int load_XILINX_firmware(struct uea_softc *sc)
>  err1:
>  	release_firmware(fw_entry);
>  err0:
> -	uea_leaves(INS_TO_USBDEV(sc));
>  	return ret;
>  }
>  
> @@ -1966,7 +1944,6 @@ static void uea_dispatch_cmv_e1(struct uea_softc *sc, struct intr_pkt *intr)
>  	struct cmv_dsc_e1 *dsc = &sc->cmv_dsc.e1;
>  	struct cmv_e1 *cmv = &intr->u.e1.s2.cmv;
>  
> -	uea_enters(INS_TO_USBDEV(sc));
>  	if (le16_to_cpu(cmv->wPreamble) != E1_PREAMBLE)
>  		goto bad1;
>  
> @@ -1990,7 +1967,6 @@ static void uea_dispatch_cmv_e1(struct uea_softc *sc, struct intr_pkt *intr)
>  	if (cmv->bFunction == E1_MAKEFUNCTION(E1_ADSLDIRECTIVE,
>  							E1_MODEMREADY)) {
>  		wake_up_cmv_ack(sc);
> -		uea_leaves(INS_TO_USBDEV(sc));
>  		return;
>  	}
>  
> @@ -2004,7 +1980,6 @@ static void uea_dispatch_cmv_e1(struct uea_softc *sc, struct intr_pkt *intr)
>  	sc->data = sc->data << 16 | sc->data >> 16;
>  
>  	wake_up_cmv_ack(sc);
> -	uea_leaves(INS_TO_USBDEV(sc));
>  	return;
>  
>  bad2:
> @@ -2012,14 +1987,12 @@ static void uea_dispatch_cmv_e1(struct uea_softc *sc, struct intr_pkt *intr)
>  			"Function : %d, Subfunction : %d\n",
>  			E1_FUNCTION_TYPE(cmv->bFunction),
>  			E1_FUNCTION_SUBTYPE(cmv->bFunction));
> -	uea_leaves(INS_TO_USBDEV(sc));
>  	return;
>  
>  bad1:
>  	uea_err(INS_TO_USBDEV(sc), "invalid cmv received, "
>  			"wPreamble %d, bDirection %d\n",
>  			le16_to_cpu(cmv->wPreamble), cmv->bDirection);
> -	uea_leaves(INS_TO_USBDEV(sc));
>  }
>  
>  /* The modem send us an ack. First with check if it right */
> @@ -2028,7 +2001,6 @@ static void uea_dispatch_cmv_e4(struct uea_softc *sc, struct intr_pkt *intr)
>  	struct cmv_dsc_e4 *dsc = &sc->cmv_dsc.e4;
>  	struct cmv_e4 *cmv = &intr->u.e4.s2.cmv;
>  
> -	uea_enters(INS_TO_USBDEV(sc));
>  	uea_dbg(INS_TO_USBDEV(sc), "cmv %x %x %x %x %x %x\n",
>  		be16_to_cpu(cmv->wGroup), be16_to_cpu(cmv->wFunction),
>  		be16_to_cpu(cmv->wOffset), be16_to_cpu(cmv->wAddress),
> @@ -2040,7 +2012,6 @@ static void uea_dispatch_cmv_e4(struct uea_softc *sc, struct intr_pkt *intr)
>  	if (be16_to_cpu(cmv->wFunction) == E4_MAKEFUNCTION(E4_ADSLDIRECTIVE,
>  						E4_MODEMREADY, 1)) {
>  		wake_up_cmv_ack(sc);
> -		uea_leaves(INS_TO_USBDEV(sc));
>  		return;
>  	}
>  
> @@ -2053,7 +2024,6 @@ static void uea_dispatch_cmv_e4(struct uea_softc *sc, struct intr_pkt *intr)
>  	sc->data = be32_to_cpu(cmv->dwData[0]);
>  	sc->data1 = be32_to_cpu(cmv->dwData[1]);
>  	wake_up_cmv_ack(sc);
> -	uea_leaves(INS_TO_USBDEV(sc));
>  	return;
>  
>  bad2:
> @@ -2061,7 +2031,6 @@ static void uea_dispatch_cmv_e4(struct uea_softc *sc, struct intr_pkt *intr)
>  			"Function : %d, Subfunction : %d\n",
>  			E4_FUNCTION_TYPE(cmv->wFunction),
>  			E4_FUNCTION_SUBTYPE(cmv->wFunction));
> -	uea_leaves(INS_TO_USBDEV(sc));
>  	return;
>  }
>  
> @@ -2089,8 +2058,6 @@ static void uea_intr(struct urb *urb)
>  	struct intr_pkt *intr = urb->transfer_buffer;
>  	int status = urb->status;
>  
> -	uea_enters(INS_TO_USBDEV(sc));
> -
>  	if (unlikely(status < 0)) {
>  		uea_err(INS_TO_USBDEV(sc), "uea_intr() failed with %d\n",
>  		       status);
> @@ -2130,8 +2097,6 @@ static int uea_boot(struct uea_softc *sc, struct usb_interface *intf)
>  	int ret = -ENOMEM;
>  	int size;
>  
> -	uea_enters(INS_TO_USBDEV(sc));
> -
>  	if (UEA_CHIP_VERSION(sc) == EAGLE_IV) {
>  		size = E4_INTR_PKT_SIZE;
>  		sc->dispatch_cmv = uea_dispatch_cmv_e4;
> @@ -2188,7 +2153,6 @@ static int uea_boot(struct uea_softc *sc, struct usb_interface *intf)
>  		goto err2;
>  	}
>  
> -	uea_leaves(INS_TO_USBDEV(sc));
>  	return 0;
>  
>  err2:
> @@ -2198,7 +2162,6 @@ static int uea_boot(struct uea_softc *sc, struct usb_interface *intf)
>  	sc->urb_int = NULL;
>  	kfree(intr);
>  err0:
> -	uea_leaves(INS_TO_USBDEV(sc));
>  	return ret;
>  }
>  
> @@ -2208,7 +2171,7 @@ static int uea_boot(struct uea_softc *sc, struct usb_interface *intf)
>  static void uea_stop(struct uea_softc *sc)
>  {
>  	int ret;
> -	uea_enters(INS_TO_USBDEV(sc));
> +
>  	ret = kthread_stop(sc->kthread);
>  	uea_dbg(INS_TO_USBDEV(sc), "kthread finish with status %d\n", ret);
>  
> @@ -2222,7 +2185,6 @@ static void uea_stop(struct uea_softc *sc)
>  	flush_work(&sc->task);
>  
>  	release_firmware(sc->dsp_firm);
> -	uea_leaves(INS_TO_USBDEV(sc));
>  }
>  
>  /* syfs interface */
> @@ -2495,8 +2457,6 @@ static int uea_bind(struct usbatm_data *usbatm, struct usb_interface *intf,
>  	int ret, ifnum = intf->altsetting->desc.bInterfaceNumber;
>  	unsigned int alt;
>  
> -	uea_enters(usb);
> -
>  	/* interface 0 is for firmware/monitoring */
>  	if (ifnum != UEA_INTR_IFACE_NO)
>  		return -ENODEV;
> @@ -2589,7 +2549,6 @@ static int uea_probe(struct usb_interface *intf, const struct usb_device_id *id)
>  	struct usb_device *usb = interface_to_usbdev(intf);
>  	int ret;
>  
> -	uea_enters(usb);
>  	uea_dbg(usb, "ADSL device found with vid (%#X) pid (%#X) Rev (%#X): %s\n",
>  		le16_to_cpu(usb->descriptor.idVendor),
>  		le16_to_cpu(usb->descriptor.idProduct),
> @@ -2620,7 +2579,6 @@ static void uea_disconnect(struct usb_interface *intf)
>  {
>  	struct usb_device *usb = interface_to_usbdev(intf);
>  	int ifnum = intf->altsetting->desc.bInterfaceNumber;
> -	uea_enters(usb);
>  
>  	/* ADI930 has 2 interfaces and eagle 3 interfaces.
>  	 * Pre-firmware device has one interface
> @@ -2631,8 +2589,6 @@ static void uea_disconnect(struct usb_interface *intf)
>  		mutex_unlock(&uea_mutex);
>  		uea_info(usb, "ADSL device removed\n");
>  	}
> -
> -	uea_leaves(usb);
>  }
>  
>  /*
> 
> -- 
> 2.51.0
> 

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

end of thread, other threads:[~2026-05-21 10:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-20 22:32 [PATCH 0/2] usb: atm: ueagle-atm: debug message changes Mauricio Faria de Oliveira
2026-05-20 22:32 ` [PATCH 1/2] usb: atm: ueagle-atm: use dev_dbg() for 'device found' message Mauricio Faria de Oliveira
2026-05-21 10:08   ` Stanislaw Gruszka
2026-05-20 22:32 ` [PATCH 2/2] usb: atm: ueagle-atm: remove function entry/exit debug messages Mauricio Faria de Oliveira
2026-05-21 10:08   ` Stanislaw Gruszka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox