Message ID | 20210116052623.3196274-1-grundler@chromium.org (mailing list archive) |
---|---|
State | Deferred |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [1/3] net: usb: cdc_ncm: emit dev_err on error paths | expand |
Context | Check | Description |
---|---|---|
netdev/cover_letter | warning | Series does not have a cover letter |
netdev/fixes_present | success | Link |
netdev/patch_count | success | Link |
netdev/tree_selection | success | Guessed tree name to be net-next |
netdev/subject_prefix | warning | Target tree name not specified in the subject |
netdev/cc_maintainers | success | CCed 5 of 5 maintainers |
netdev/source_inline | success | Was 0 now: 0 |
netdev/verify_signedoff | success | Link |
netdev/module_param | success | Was 0 now: 0 |
netdev/build_32bit | success | Errors and warnings before: 0 this patch: 0 |
netdev/kdoc | success | Errors and warnings before: 0 this patch: 0 |
netdev/verify_fixes | success | Link |
netdev/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 36 lines checked |
netdev/build_allmodconfig_warn | success | Errors and warnings before: 0 this patch: 0 |
netdev/header_inline | success | Link |
netdev/stable | success | Stable not CCed |
+nic_swsd [adding per Realtek developer team request] On Sat, Jan 16, 2021 at 5:26 AM Grant Grundler <grundler@chromium.org> wrote: > > Several error paths in bind/probe code will only emit > output using dev_dbg. But if we are going to fail the > bind/probe, emit related output with "err" priority. > > Signed-off-by: Grant Grundler <grundler@chromium.org> > --- > drivers/net/usb/cdc_ncm.c | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/drivers/net/usb/cdc_ncm.c b/drivers/net/usb/cdc_ncm.c > index 5a78848db93f..25498c311551 100644 > --- a/drivers/net/usb/cdc_ncm.c > +++ b/drivers/net/usb/cdc_ncm.c > @@ -849,17 +849,17 @@ int cdc_ncm_bind_common(struct usbnet *dev, struct usb_interface *intf, u8 data_ > > /* check if we got everything */ > if (!ctx->data) { > - dev_dbg(&intf->dev, "CDC Union missing and no IAD found\n"); > + dev_err(&intf->dev, "CDC Union missing and no IAD found\n"); > goto error; > } > if (cdc_ncm_comm_intf_is_mbim(intf->cur_altsetting)) { > if (!ctx->mbim_desc) { > - dev_dbg(&intf->dev, "MBIM functional descriptor missing\n"); > + dev_err(&intf->dev, "MBIM functional descriptor missing\n"); > goto error; > } > } else { > if (!ctx->ether_desc || !ctx->func_desc) { > - dev_dbg(&intf->dev, "NCM or ECM functional descriptors missing\n"); > + dev_err(&intf->dev, "NCM or ECM functional descriptors missing\n"); > goto error; > } > } > @@ -868,7 +868,7 @@ int cdc_ncm_bind_common(struct usbnet *dev, struct usb_interface *intf, u8 data_ > if (ctx->data != ctx->control) { > temp = usb_driver_claim_interface(driver, ctx->data, dev); > if (temp) { > - dev_dbg(&intf->dev, "failed to claim data intf\n"); > + dev_err(&intf->dev, "failed to claim data intf\n"); > goto error; > } > } > @@ -924,7 +924,7 @@ int cdc_ncm_bind_common(struct usbnet *dev, struct usb_interface *intf, u8 data_ > if (ctx->ether_desc) { > temp = usbnet_get_ethernet_addr(dev, ctx->ether_desc->iMACAddress); > if (temp) { > - dev_dbg(&intf->dev, "failed to get mac address\n"); > + dev_err(&intf->dev, "failed to get mac address\n"); > goto error2; > } > dev_info(&intf->dev, "MAC-Address: %pM\n", dev->net->dev_addr); > -- > 2.29.2 >
diff --git a/drivers/net/usb/cdc_ncm.c b/drivers/net/usb/cdc_ncm.c index 5a78848db93f..25498c311551 100644 --- a/drivers/net/usb/cdc_ncm.c +++ b/drivers/net/usb/cdc_ncm.c @@ -849,17 +849,17 @@ int cdc_ncm_bind_common(struct usbnet *dev, struct usb_interface *intf, u8 data_ /* check if we got everything */ if (!ctx->data) { - dev_dbg(&intf->dev, "CDC Union missing and no IAD found\n"); + dev_err(&intf->dev, "CDC Union missing and no IAD found\n"); goto error; } if (cdc_ncm_comm_intf_is_mbim(intf->cur_altsetting)) { if (!ctx->mbim_desc) { - dev_dbg(&intf->dev, "MBIM functional descriptor missing\n"); + dev_err(&intf->dev, "MBIM functional descriptor missing\n"); goto error; } } else { if (!ctx->ether_desc || !ctx->func_desc) { - dev_dbg(&intf->dev, "NCM or ECM functional descriptors missing\n"); + dev_err(&intf->dev, "NCM or ECM functional descriptors missing\n"); goto error; } } @@ -868,7 +868,7 @@ int cdc_ncm_bind_common(struct usbnet *dev, struct usb_interface *intf, u8 data_ if (ctx->data != ctx->control) { temp = usb_driver_claim_interface(driver, ctx->data, dev); if (temp) { - dev_dbg(&intf->dev, "failed to claim data intf\n"); + dev_err(&intf->dev, "failed to claim data intf\n"); goto error; } } @@ -924,7 +924,7 @@ int cdc_ncm_bind_common(struct usbnet *dev, struct usb_interface *intf, u8 data_ if (ctx->ether_desc) { temp = usbnet_get_ethernet_addr(dev, ctx->ether_desc->iMACAddress); if (temp) { - dev_dbg(&intf->dev, "failed to get mac address\n"); + dev_err(&intf->dev, "failed to get mac address\n"); goto error2; } dev_info(&intf->dev, "MAC-Address: %pM\n", dev->net->dev_addr);
Several error paths in bind/probe code will only emit output using dev_dbg. But if we are going to fail the bind/probe, emit related output with "err" priority. Signed-off-by: Grant Grundler <grundler@chromium.org> --- drivers/net/usb/cdc_ncm.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)