Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2301276pxb; Mon, 18 Jan 2021 14:04:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJylw63yBxDCvRdbQ+88XtgMmimf0iqL9RqcljrBjJ9QuXisq7AF6Qo+6s6qmcMRkv0Hnxj1 X-Received: by 2002:a17:906:eb1b:: with SMTP id mb27mr1124936ejb.332.1611007444244; Mon, 18 Jan 2021 14:04:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611007444; cv=none; d=google.com; s=arc-20160816; b=Htl9pYg34NpjUqB+HP2igjc3/IS7mkoK33rAcGrjSdDxtkXIwgnWb7M1sx156qoxeK wkz7QWxFa7i5Ou01BkElpC2yqD8WQAZwSNY+evuhLjQak/Taof9zsw+/nO8vGVrPVoBM TZY+22x7Ud5kaNj9tLxkQde2g4SFJQsCoartKRftXf8vyoU/bXdd6Be8gR2ujsRdJHgg Noj4UJHF2zFjV1jHSJvVswBdNRYR5osBUDGUDCsxOhbKY0bbi5CRW8FrpzHGdjhTtYd6 ZhPfyJyF1s4e2evn78rO88QkF/yIoZClj28Z12jplEDsGJvEe0htxRtooGVurUO3BL99 hLkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=dSv0EYxQaJbjHMisjeOKJuNZjlVFGnjCJWJZiTxNS0k=; b=yswyDuHAf2L0gqkwzXhZGplCAm6Z+bRGNEmIvKwKpFtveP2qIvqbytL4zG4TU67yNS ipy9Aol892VmUn6dsw0hzyyTMkseQVXwB/UIpaKj5g50MKkyklLNSc6Uy+rFBrMSKm8j 6+ZehfnW35mdcujqdF8HLHzk4LJxvE7QBbpzSeng15Pc7Zr6QcMXItkStgo8uC0Od/yA gZljhw249KqCHIOQ3Lqg3GAm9ecMV1C9vGTsmaYdUERNlP7N3DEWsJHWN3LJ3a09b+lv 1gXVaiUBEKfkyx5/y3MryzKIOyJWav/DEqW1bK2SW3KeV/i/kbErUKzLT2VVDvNPTlf4 5KsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=US65w8Nq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i10si8427840ejd.325.2021.01.18.14.03.40; Mon, 18 Jan 2021 14:04:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=US65w8Nq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732787AbhARWC0 (ORCPT + 99 others); Mon, 18 Jan 2021 17:02:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38742 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726673AbhARWCJ (ORCPT ); Mon, 18 Jan 2021 17:02:09 -0500 Received: from mail-vk1-xa2e.google.com (mail-vk1-xa2e.google.com [IPv6:2607:f8b0:4864:20::a2e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9D185C0613C1 for ; Mon, 18 Jan 2021 14:01:28 -0800 (PST) Received: by mail-vk1-xa2e.google.com with SMTP id l187so4331265vki.6 for ; Mon, 18 Jan 2021 14:01:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=dSv0EYxQaJbjHMisjeOKJuNZjlVFGnjCJWJZiTxNS0k=; b=US65w8NqxwUBUWVNBX+9I5xdNtl4Mt6lNYsxAG1SFkvE47ao/Ib3p4Qy8QqqTOsHXE 6IZ0M9zy41gGAd8FkuJM+/2JDBLgKOQxrXwvSgKRxKd4bk6HxwZMSs1qrwAu+JQ8xOf8 kzsr5f3EtZ+hig6ImPseGjcvbRXkavQNKP9CM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=dSv0EYxQaJbjHMisjeOKJuNZjlVFGnjCJWJZiTxNS0k=; b=iKkW+6SFjiSk60XfUyqwOq5gvR2U9t8xsjaVb4e5GpjoeZe2dypa8nWozmUN7WuSD0 CeqorXg0AggDpwUhsgawAi/2r1SXJduNrz3xsRujTdlaVA/GwOigAjkxCgc0Fn3ad7Bc Pm5riliY4doI3eG64aGgRLmvfm0I95UpAAlpTCRB+w7iOYD3wQdvbOixiqNMXfmoXQN7 zYyGUqBv5ObE2ITK7lAW6Cwlvd2hpGxFT3NbGcn7u2ALp9k8rllhqNpRi5I4fKAOO2WV B85xFY3bcTt1qf5ppZz5vHbSreuqXjAQj2Cgw+x8zB5e7cj/9ugU9fo8bGtwfbGul1SV xtHA== X-Gm-Message-State: AOAM531SQhD43uC5LWSbuYHg3j+m3c1Aw/QkUOQXoDloNXlBhhufChfj 74GL9Ib1A1PUYAegB7rNyNVb2WRnPyfb75ky/kuS7Q== X-Received: by 2002:a1f:c305:: with SMTP id t5mr928711vkf.7.1611007287521; Mon, 18 Jan 2021 14:01:27 -0800 (PST) MIME-Version: 1.0 References: <20210116052623.3196274-1-grundler@chromium.org> In-Reply-To: <20210116052623.3196274-1-grundler@chromium.org> From: Grant Grundler Date: Mon, 18 Jan 2021 22:01:15 +0000 Message-ID: Subject: Re: [PATCH 1/3] net: usb: cdc_ncm: emit dev_err on error paths To: Grant Grundler , nic_swsd Cc: Oliver Neukum , "David S. Miller" , Jakub Kicinski , Greg Kroah-Hartman , linux-usb@vger.kernel.org, netdev , LKML Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org +nic_swsd [adding per Realtek developer team request] On Sat, Jan 16, 2021 at 5:26 AM Grant Grundler 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 > --- > 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 >