Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp517913pxb; Fri, 15 Jan 2021 21:28:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJwzRNtFJANZLGZNWXZezK+uH90lGEZhBKuYFl1KU3bFTGPOYh8UDf9IRwkWYjabq0+Gn5l6 X-Received: by 2002:a05:6402:168f:: with SMTP id a15mr12779720edv.376.1610774926698; Fri, 15 Jan 2021 21:28:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610774926; cv=none; d=google.com; s=arc-20160816; b=VrjkGcVOXbBD2PNqJE9uPKIvNI+26uH68JFktdsDqYa+9EWnfe63XnZCuLqpAEiUFF DAS9jf82b1sJS8/2XUE5aYmLQ6u2G4P9bSaeHrIkCA7Y3hWRtWlxW5gIQ040VxlBnpQN pVwLcsfxmx/UN3SrsQ3107v4mPHfkMdwN5do2oiscZshQ5cOtl2UjP1vzdyutLZcXFkj jcm3kYlt63uR8JbZ3vvpHYhLiAb6suun5VijY3XfHR8vqQXoIxovQwaz4yTB4DRJSias 6VS9d/BNiGCCeQCQ7RcWwLQtRgs1EswU/25w5WqJOaSkF1hDV0Yh/0P288RPYO1IJREf ai/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=lhhC7i8Jt4OyU/mL///U4MefuTCdZmJtkcEWZXhJTEM=; b=dO+mi3ssDYeS/SOgAv4RBLj+iTHt5+QF4tRcoTxQ4eAMHmxOduHub2klTlBH0M4IAW Y4sklxtqx3nN6bZKJhmIphCxAgsFgDGUQOJ6tE8RXRh6j6ByfC0XeUFao0MWIAGPuSB5 J8zoFOw0vE8e+1z2Lmil46OK0cH+gkd9/HLwl4aNCiJo6wmjVSjJq9lLTAt/dLKDOLSn 3ULF0t+4DQAOwJd55yTq8eq397RZY/Fn3uFENg5Ls3nCJUbE2jMPnY3OqZ5xrTIttMPs iwH/Iti/YKv51btm65r1MByk2MMUPxkywz3FY0pk6PI33vN3+O8CgXrbj+PytZ9jC/Fb Qh+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Uzxc4W+4; 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 s2si5014233eds.424.2021.01.15.21.28.22; Fri, 15 Jan 2021 21:28:46 -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=Uzxc4W+4; 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 S1726016AbhAPF1a (ORCPT + 99 others); Sat, 16 Jan 2021 00:27:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59608 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725797AbhAPF13 (ORCPT ); Sat, 16 Jan 2021 00:27:29 -0500 Received: from mail-ot1-x335.google.com (mail-ot1-x335.google.com [IPv6:2607:f8b0:4864:20::335]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 54579C061793 for ; Fri, 15 Jan 2021 21:26:49 -0800 (PST) Received: by mail-ot1-x335.google.com with SMTP id r9so10750503otk.11 for ; Fri, 15 Jan 2021 21:26:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=lhhC7i8Jt4OyU/mL///U4MefuTCdZmJtkcEWZXhJTEM=; b=Uzxc4W+4aVbbHBCeuzBCIq+SpmtESQvEbAtx0XbHjbFr3Cvm0XZ6gQh3N99sDlKItl 1sn+VBP/aahUtygbPpBI348RRmzlLMa6VwOo6GCVzaio4JWTDiyGHyX04P3bVxuYp3nP TXQRhYmBVxOeEiuBsDjt1VvyhQKRR7GqaclAg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=lhhC7i8Jt4OyU/mL///U4MefuTCdZmJtkcEWZXhJTEM=; b=si1ixaDtpuU8A67ccMjCEYffcL39qQEwIjWtHhQjgjw860kTRyKL+wOPHnRWgRIIYa 9WclBtuSLERgrJRz281INC5t9o7sZxINbTSCURV1xNhvX6FjF6FXUN2NxphOyw7AUdUg Pk4jNOYUfyDNoGXjq7AC9gP+g5J1K0sVd46XUrbpL9C0BhipKvLrq9deTkyOAeythsc7 fziXMpeCtNKrPfhBtG35pEXwOk7gex6uAdnqPFLW9a48GoPIenM1WJf94v759cSFmheQ SpNEKZXCRHb2mVpWRObjl3OpldK9t2FJG1OlLhTZARC3J46Q7HRmTBueWcn68qHsFgZl vY5A== X-Gm-Message-State: AOAM532q6qQohBIs4ZFwBwZdLoArSBlPYhiFTv9+s0DojhjYEkZWobcG LC7Up4gUFP2pATaDBB4v1pKMog== X-Received: by 2002:a05:6830:458:: with SMTP id d24mr10584784otc.163.1610774808529; Fri, 15 Jan 2021 21:26:48 -0800 (PST) Received: from grundler-glapstation.lan ([70.134.62.80]) by smtp.gmail.com with ESMTPSA id 94sm2359230otw.41.2021.01.15.21.26.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Jan 2021 21:26:47 -0800 (PST) From: Grant Grundler To: Oliver Neukum Cc: "David S. Miller" , Jakub Kicinski , Greg Kroah-Hartman , linux-usb@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Grant Grundler Subject: [PATCH 1/3] net: usb: cdc_ncm: emit dev_err on error paths Date: Fri, 15 Jan 2021 21:26:21 -0800 Message-Id: <20210116052623.3196274-1-grundler@chromium.org> X-Mailer: git-send-email 2.30.0.284.gd98b1dd5eaa7-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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