Received: by 2002:ab2:3c46:0:b0:1f5:f2ab:c469 with SMTP id x6csp148959lqf; Fri, 26 Apr 2024 02:28:07 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWs9+DeSt+ZLtsk2WembyAbeMIguKXyVTATZgcbtGueK2Jbco5PopxUXm5X3+gHKBoDpXstUcLJHrFq4AiSeorAJOVlTcx6q5nt2pxaxg== X-Google-Smtp-Source: AGHT+IFMIwJ59BSqsIoEN6puGe+6wzMya4rh1AXo/blKxpdNz9pFT0fksGTh42vhd0mNW32nGqdZ X-Received: by 2002:a05:6808:2788:b0:3c7:5258:c06f with SMTP id es8-20020a056808278800b003c75258c06fmr2561515oib.31.1714123687332; Fri, 26 Apr 2024 02:28:07 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714123687; cv=pass; d=google.com; s=arc-20160816; b=yup/nad+gZiRSScRGA6peJiYUclYFUlr+QckuJSfhkeYBFdhErIhBAkfk2rAmduAgL ieTH1kf2vZkcDbxBaCNen/ex8WbB8VVrUOK9OsK+4KBbuq+h/5xJnvLOZiCJUJAoREbp W9E5P5AQOPymElu45VdIHSTSvcjCYfggQPYYIashN6ZfAFCNEx6k2zu4f0YLlIgFCeMo q1mhlaIuz2kPHyehTJubvXvhgBl9elQinKJh9m9Qjb9d6LpyZGrZeNdgxSS2kn0fNwam Kiixllqrhnh4nR1zCMYsyLbtL6VY3zFW/8997nSgIgHaYlGr6pNhAby5CX0GXhP766eK u0ew== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=ac8OtBpdXETb5u8j8PCiiZkMHIEDlMdWPHdK4ooOeGY=; fh=9OIWdP+tVxZ0uD39EJAv5MgIeXKUU/FUhHqyjrVhQtI=; b=PyVJWno8XVuYjXWzo3Q0pcNK1Njjg1l1t2J4YSfXddqyLlt2IETEGkTciRFfU6uCb5 0xx0ZRyTlIMhmgDmShHzrQ4BVgv8rb5m9ZaYKX3FSY/RKDMT7cxVpAxvuGSlXsnBOO2l Bw61zw/MVbxTl55iubWDHxvdOoTeMR3ekm/lUX3jLa4WM68gAiMbVj5yE8d0Gm/8a+eW eKS4qhfwAZr1lOa2qQXMBnmuKt1nEvvRBDlHqBs2zYmItt+RjgrK4POghvQVqEO8YPIG wiMwWyWjrm2oAfNCyzbxF63A1BLDAhbAK1vfCSC70ad18IxIBdzf9+qVejwI1MHakWpm AMAg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=DriDzvnH; arc=pass (i=1 spf=pass spfdomain=163.com dkim=pass dkdomain=163.com dmarc=pass fromdomain=163.com); spf=pass (google.com: domain of linux-kernel+bounces-159782-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-159782-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=163.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id bw11-20020a056a02048b00b0060477fb89aasi6077281pgb.864.2024.04.26.02.28.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Apr 2024 02:28:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-159782-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=DriDzvnH; arc=pass (i=1 spf=pass spfdomain=163.com dkim=pass dkdomain=163.com dmarc=pass fromdomain=163.com); spf=pass (google.com: domain of linux-kernel+bounces-159782-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-159782-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=163.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 7F1F3B218E4 for ; Fri, 26 Apr 2024 09:26:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A5BAF13F001; Fri, 26 Apr 2024 09:26:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=163.com header.i=@163.com header.b="DriDzvnH" Received: from m15.mail.163.com (m15.mail.163.com [45.254.50.220]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D654013C838; Fri, 26 Apr 2024 09:25:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.254.50.220 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714123561; cv=none; b=QEIEYfzJcdykqvEulmo5lEcwQTfCJB7ZkJ+J9+KPIjmgy4wMk2kTJiKah9kgv+LI1id2NX+DCbkeKHewHuJqijDRheDUvnL2RVoaEpl2zvR8L+tiulOe1otm67/gqKaZxmtPOxJCGTDRTJLNXV+o1XxEJQZ3dGEjeMjPLM2Dgq0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714123561; c=relaxed/simple; bh=rp94rzmBiWYwRT1Xe9//2+dGBGbcwQT69S3QZcWHhbc=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=NtNwmK+fkjMG498GgYM7fTAAEO1Psn/FROHwRpFarnOqdrqbKBzqdDLAgnByROE/ZN9KfegestAOf2VBmFr+isGdwOsO91kN5ByFb8cGU+J21xGQMiSe+YjUw4pZrE3cNAuJkRlv1MrIoNnam3Kycwr3eX2xpBrIjY5rTCttXWw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=163.com; spf=pass smtp.mailfrom=163.com; dkim=pass (1024-bit key) header.d=163.com header.i=@163.com header.b=DriDzvnH; arc=none smtp.client-ip=45.254.50.220 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=163.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=163.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=ac8Ot BpdXETb5u8j8PCiiZkMHIEDlMdWPHdK4ooOeGY=; b=DriDzvnHjrY+bGS417Fpf MqinJ2/Lr3xAt/nI9aHCUjJHLhQsvJrFpYu38cEBn1Kv0PrRFdmdJsij2jFh5zgk qn6aIf9q9ewZYsrs7K8EG2Gq8HHi2oxVFXMbeJBQPj9DiUsQWGHLB6ICAL1DCXXc SBPfj5XaheRUIiNyG4x87M= Received: from localhost.localdomain (unknown [112.97.48.208]) by gzga-smtp-mta-g0-3 (Coremail) with SMTP id _____wD3v3Tecitm5obCCQ--.37650S2; Fri, 26 Apr 2024 17:24:48 +0800 (CST) From: Slark Xiao To: loic.poulain@linaro.org, ryazanov.s.a@gmail.com, johannes@sipsolutions.net Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Slark Xiao , Hariprasad Kelam Subject: [PATCH net v2] net: wwan: Fix missing net device name for error message print Date: Fri, 26 Apr 2024 17:24:44 +0800 Message-Id: <20240426092444.825735-1-slark_xiao@163.com> X-Mailer: git-send-email 2.25.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID:_____wD3v3Tecitm5obCCQ--.37650S2 X-Coremail-Antispam: 1Uf129KBjvJXoWxAF4xCw13Cw45Wr43JF1kKrg_yoW5Cw1Upa y7K3sxZr18Jay7X3WUJrWkZFWFywn5ta47Kry2v3WSvF1ayrWUWa4fJF95uw43ta1rAw17 tF4a9anxW3ZrG3DanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x0piHa0PUUUUU= X-CM-SenderInfo: xvod2y5b0lt0i6rwjhhfrp/1tbiowPMZGVODGqReQAAst In my local, I got an error print in dmesg like below: "sequence number glitch prev=487 curr=0" After checking, it belongs to mhi_wwan_mbim.c. Refer to the usage of this net_err_ratelimited() API in other files, I think we should add net device name print before message context. Fixes: aa730a9905b7 ("net: wwan: Add MHI MBIM network driver") Signed-off-by: Slark Xiao Reviewed-by: Hariprasad Kelam --- drivers/net/wwan/mhi_wwan_mbim.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/net/wwan/mhi_wwan_mbim.c b/drivers/net/wwan/mhi_wwan_mbim.c index 3f72ae943b29..6cefee25efc4 100644 --- a/drivers/net/wwan/mhi_wwan_mbim.c +++ b/drivers/net/wwan/mhi_wwan_mbim.c @@ -186,14 +186,14 @@ static int mbim_rx_verify_nth16(struct mhi_mbim_context *mbim, struct sk_buff *s if (skb->len < sizeof(struct usb_cdc_ncm_nth16) + sizeof(struct usb_cdc_ncm_ndp16)) { - net_err_ratelimited("frame too short\n"); + net_err_ratelimited("mbim: frame too short\n"); return -EINVAL; } nth16 = (struct usb_cdc_ncm_nth16 *)skb->data; if (nth16->dwSignature != cpu_to_le32(USB_CDC_NCM_NTH16_SIGN)) { - net_err_ratelimited("invalid NTH16 signature <%#010x>\n", + net_err_ratelimited("mbim: invalid NTH16 signature <%#010x>\n", le32_to_cpu(nth16->dwSignature)); return -EINVAL; } @@ -201,7 +201,7 @@ static int mbim_rx_verify_nth16(struct mhi_mbim_context *mbim, struct sk_buff *s /* No limit on the block length, except the size of the data pkt */ len = le16_to_cpu(nth16->wBlockLength); if (len > skb->len) { - net_err_ratelimited("NTB does not fit into the skb %u/%u\n", + net_err_ratelimited("mbim: NTB does not fit into the skb %u/%u\n", len, skb->len); return -EINVAL; } @@ -209,7 +209,7 @@ static int mbim_rx_verify_nth16(struct mhi_mbim_context *mbim, struct sk_buff *s if (mbim->rx_seq + 1 != le16_to_cpu(nth16->wSequence) && (mbim->rx_seq || le16_to_cpu(nth16->wSequence)) && !(mbim->rx_seq == 0xffff && !le16_to_cpu(nth16->wSequence))) { - net_err_ratelimited("sequence number glitch prev=%d curr=%d\n", + net_err_ratelimited("mbim: sequence number glitch prev=%d curr=%d\n", mbim->rx_seq, le16_to_cpu(nth16->wSequence)); } mbim->rx_seq = le16_to_cpu(nth16->wSequence); @@ -222,7 +222,7 @@ static int mbim_rx_verify_ndp16(struct sk_buff *skb, struct usb_cdc_ncm_ndp16 *n int ret; if (le16_to_cpu(ndp16->wLength) < USB_CDC_NCM_NDP16_LENGTH_MIN) { - net_err_ratelimited("invalid DPT16 length <%u>\n", + net_err_ratelimited("mbim: invalid DPT16 length <%u>\n", le16_to_cpu(ndp16->wLength)); return -EINVAL; } @@ -233,7 +233,7 @@ static int mbim_rx_verify_ndp16(struct sk_buff *skb, struct usb_cdc_ncm_ndp16 *n if (sizeof(struct usb_cdc_ncm_ndp16) + ret * sizeof(struct usb_cdc_ncm_dpe16) > skb->len) { - net_err_ratelimited("Invalid nframes = %d\n", ret); + net_err_ratelimited("mbim: Invalid nframes = %d\n", ret); return -EINVAL; } -- 2.25.1