usb: atm: ueagle-atm: cosmetic changes to .probe()
Subsystems (3)
cover usb: atm: ueagle-atm: cosmetic changes to .probe()
This series does a couple of cosmetic changes to ueagle-atm's .probe().
Patch 1 adjusts the 'device found' probe message. Patch 2 adds a missing 'leaving uea_probe' debug message.
With:
# echo 2 >/sys/module/ueagle_atm/parameters/debug # echo 'file drivers/usb/atm/ueagle-atm.c +p' >/sys/kernel/debug/dynamic_debug/control
Changes:
[ 84.813964] usb 1-1: [ueagle-atm vdbg] entering uea_probe -[ 84.813970] usb 1-1: [ueagle-atm] ADSL device founded vid (0X1039) pid (0X2101) Rev (0X2581): Eagle I +[ 84.813970] usb 1-1: [ueagle-atm] ADSL device found with vid (0X1039) pid (0X2101) Rev (0X2581): Eagle I [ 85.571855] usb 1-1: [ueagle-atm vdbg] entering uea_load_firmware ... [ 148.697655] usb 1-1: [ueagle-atm vdbg] leaving uea_load_firmware +[ 148.697665] usb 1-1: [ueagle-atm vdbg] leaving uea_probe
---
Mauricio Faria de Oliveira (2):
usb: atm: ueagle-atm: adjust 'device found' message
usb: atm: ueagle-atm: add missing uea_leaves() in uea_probe()
drivers/usb/atm/ueagle-atm.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
---
base-commit: 5d6919055dec134de3c40167a490f33c74c12581
change-id: 20260515-ueagle-atm_cosmetic-bf1805e4ae71
Best regards,
Signature · 1 line
Mauricio Faria de Oliveira <[email protected]>
PATCH 1/2 usb: atm: ueagle-atm: adjust 'device found' message
Correct the verb form and add 'with' for clarity.
--- drivers/usb/atm/ueagle-atm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/atm/ueagle-atm.c +1 -1
@@ -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_info(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),
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerRe: [PATCH 1/2] usb: atm: ueagle-atm: adjust 'device found' message
Quoted 12 lines · Mauricio Faria de Oliveira
Correct the verb form and add 'with' for clarity.
Signed-off-by Mauricio Faria de Oliveira <[email protected]>--- drivers/usb/atm/ueagle-atm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/usb/atm/ueagle-atm.c +0
-0
drivers/usb/atm/ueagle-atm.c static int uea_probe(struct usb_interface *intf, const struct usb_device_id *id) · line 2596
Quoted 8 lines
drivers/usb/atm/ueagle-atm.c +1
-1@@ -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_info(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),
When drivers work properly, they are quiet, so that means this line should be removed entirely.
thanks,
greg k-h
PATCH 2/2 usb: atm: ueagle-atm: add missing uea_leaves() in uea_probe()
In reply to Mauricio Faria de OliveiraPair the existing uea_enters() (function entry debug message) with a missing uea_leaves() (function exit debug message) in uea_probe().
--- drivers/usb/atm/ueagle-atm.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/usb/atm/ueagle-atm.c +6 -2
@@ -2598,8 +2598,10 @@ static int uea_probe(struct usb_interface *intf, const struct usb_device_id *id)usb_reset_device (usb); -if (UEA_IS_PREFIRM (id)) -return uea_load_firmware (usb,UEA_CHIP_VERSION (id)); +if (UEA_IS_PREFIRM (id)) { + ret =uea_load_firmware (usb,UEA_CHIP_VERSION (id)); + goto out; + } ret =usbatm_usb_probe (intf, id, &uea_usbatm_driver);if (ret ==0 ) {
@@ -2613,6 +2615,8 @@ static int uea_probe(struct usb_interface *intf, const struct usb_device_id *id)wake_up_process (sc->kthread); } +out: +uea_leaves (usb);return ret; }
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerRe: [PATCH 2/2] usb: atm: ueagle-atm: add missing uea_leaves() in uea_probe()
Quoted 2 lines · Mauricio Faria de Oliveira
Pair the existing
uea_enters()(function entry debug message) with a missinguea_leaves()(function exit debug message) inuea_probe().
All of those should also be removed, we have function tracing if people really need/want to see this info.
thanks,
greg k-h
Re: [PATCH 2/2] usb: atm: ueagle-atm: add missing uea_leaves() in uea_probe()
Quoted 6 lines · Greg Kroah-Hartman
Quoted 2 lines · Mauricio Faria de Oliveira
Pair the existing
uea_enters()(function entry debug message) with a missinguea_leaves()(function exit debug message) inuea_probe().All of those should also be removed, we have function tracing if people really need/want to see this info.
Agreed. I'll send an updated series based on your feedback. Thanks.
Quoted 4 lines
thanks,
greg k-h
Signature · 1 line
Mauricio
Quoted 1 line · Mauricio Faria de Oliveira
This series does a couple of cosmetic changes to ueagle-atm's .probe().
Different approach as per Greg's suggestions:
https://lore.kernel.org/all/[email protected]/
Signature · 1 line
Mauricio