usb: typec: ucsi: Don't warn on probe deferral
Subsystems (3)
PATCH v2 1/1 usb: typec: ucsi: Don't warn on probe deferral
Deferred probe is an expected return value for fwnode_usb_role_switch_get(). Given that the driver deals with it properly, there's no need to output a warning that may potentially confuse users.
---
V1 -> V2: adjust the coding style for better reading format.
drivers/usb/typec/ucsi/ucsi.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)
drivers/usb/typec/ucsi/ucsi.c +3 -5
@@ -1069,11 +1069,9 @@ static int ucsi_register_port(struct ucsi *ucsi, int index) cap->fwnode =ucsi_find_fwnode (con); con->usb_role_sw =fwnode_usb_role_switch_get (cap->fwnode); -if (IS_ERR (con->usb_role_sw)) { -dev_err (ucsi->dev,"con%d: failed to get usb role switch\n" , - con->num); -return PTR_ERR (con->usb_role_sw); - } +if (IS_ERR (con->usb_role_sw)) +return dev_err_probe (ucsi->dev,PTR_ERR (con->usb_role_sw), +"con%d: failed to get usb role switch\n" , con->num);/* Delay other interactions with the con until registration is complete */ mutex_lock (&con->lock);
Signature · 1 line
2.25.1
Greg KH
maintainerQuoted 6 lines · Wayne Chang
Deferred probe is an expected return value for
fwnode_usb_role_switch_get(). Given that the driver deals with it properly, there's no need to output a warning that may potentially confuse users.Fixes 3c162511530c ("usb: typec: ucsi: Wait for the USB role switches")
Why is this a bugfix that needs to be backported? The current code works the same as what you are changing it to be, there's no functional difference, right?
thanks,
greg k-h
Hi Greg,
Thanks for the review.
Quoted 11 lines · Greg KH
External email: Use caution opening links or attachments
Quoted 6 lines · Wayne Chang
Deferred probe is an expected return value for
fwnode_usb_role_switch_get(). Given that the driver deals with it properly, there's no need to output a warning that may potentially confuse users.Fixes 3c162511530c ("usb: typec: ucsi: Wait for the USB role switches")
Quoted 8 lines
Why is this a bugfix that needs to be backported? The current code works the same as what you are changing it to be, there's no functional difference, right?
thanks,
greg k-h
Yes, there's no functional difference but clears probe deferral warnings. I'll send v3 to remove them.
thanks,
Wayne.