Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp383425lqa; Sat, 27 Apr 2024 06:22:52 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUk2bUQJA3/3G+bHiAWeZp3d0LFbR0kV2Slipz36IENh7Q+AnutCi+1qHsKPdFGQHFOFWYn/3JWqHptIUOTRN3pA7jOSRv5uFTnWmFP/A== X-Google-Smtp-Source: AGHT+IGXzMOSt1JRmAj2+DPm9+wPmHaiyOEy9GsybzBkxI/+8hq/3BrNQ2pRHxnqrMcZofaeF0uY X-Received: by 2002:a05:6a00:a09:b0:6f3:c10a:7bdd with SMTP id p9-20020a056a000a0900b006f3c10a7bddmr8718166pfh.18.1714224172525; Sat, 27 Apr 2024 06:22:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714224172; cv=pass; d=google.com; s=arc-20160816; b=ktew4HaqX7nsofeEePY7H+M+Tiqy4X2TDis3swXfIMvdjm5RR6/QVVUceeKZzVoJ+L y3IYc9cK345hr5Me4E6cQsXGcech8JyYAnZAufBP5qypXNh8Vfpi8gHvJTo/OSBXwgwW K8u+oz114T8zDWnKf+8kUEK2WthMhz0nCHETuchysMUde1L/d2ETd8HR6FrBhzsQScMZ 0wUkGwe7NEkFsvGmaQ38gEsyaZqqZfAqLTD0grQCkNWQJyFzqu1eYsYQO4yVRDAD99xj yTkZjU8ZgyNJBaPeh4cMUYVgLwiaELCzoszLX/Rsqcu2zXukt5Yfk8h8Ep/zWRnfPoAW HLEg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=UN8sjUbj9W0OtZnCnQkLCROZCAo3ON6bY0D+KpYWEOQ=; fh=fnFlVD2jLgeK8ZUAaSUpBm22UM8CRWGTuQeft9fddAk=; b=ALUqv/atzkyz3c4U+nkEU9zxFc8Gr1AahIFMRumXCygbX+4CCJOEEhbP9s4mH8htx7 zWof/WxsE5K/nPmTf1+l++iPQxWxY+1KWS3gqwbMfAp+pBPT2GRZ6H1lJ9skHKYBResM /g3vwtkh7AE5RgdleoYT0GjO0xpcOfmBTvcfR1Kelm5pBykiLeUApkIIEcuLwNFFIEOJ F6oJux5+vhUMMrfYKplo33FDQJPUQtX6PVbvcr7SUg+rV8Wyq27Am6xUu23Uc+5mvIEa nbkh6HWLsC+iaw46s/3C4tEApfY3eHptfbaz1gyQnVFwlgyS9tn4DDmiHL18sem1b452 IMWA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=rUV84ovs; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-161050-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-161050-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id g1-20020a632001000000b005f3fe37a91bsi16812520pgg.290.2024.04.27.06.22.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 27 Apr 2024 06:22:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-161050-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=rUV84ovs; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-161050-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-161050-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 2ED3F2828E6 for ; Sat, 27 Apr 2024 13:22:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2D7444F1E4; Sat, 27 Apr 2024 13:22:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="rUV84ovs" Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 200A82032A; Sat, 27 Apr 2024 13:22:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=156.67.10.101 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714224164; cv=none; b=VLoA7mMe/q9zpQofw8RG3Q5Pf9MwiHxXs6jLnnEfBfAwPIPVwJuvGMBjDJOw/WuERvb75FgqAOen99OM+KBHT6YR1acY12iSOEMr4QPrfuIltTRWpUDlOtyCX+uiShzlOn6IBom8kKdNtriwBAeuCZJBohrCE9axhODounHWp2I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714224164; c=relaxed/simple; bh=0RgdNbqY5OmtO6lnbA+EATz/8l3MncfCfEd7jcYF6jo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=U521cGuftJ8AzWeds3xWdVs3TbmlVqZwEN7MO8NDksgl2ziMbEXkvPI1py+KA33cmuJSGYyh9TG53OdPG82gHxdj+kxo8xlosNJTeb3flW8bHv5NFRw7/JZZGSM7esIPiOo/zLuW5qyEGTLJLP5cuSq826660W3W5N1+zgN9Fsk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b=rUV84ovs; arc=none smtp.client-ip=156.67.10.101 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=UN8sjUbj9W0OtZnCnQkLCROZCAo3ON6bY0D+KpYWEOQ=; b=rUV84ovse88jrzaIQysRpRhFe3 9nALNf8MgFWtijYpR8srHa69VDEe9uNb4LpXA+yAGAxaB0hDNc+xWnDWA3wBOmlkHb09a4BudDnae LAqad1cvfNk3yHQpZVs0geXP2buKlVekilAeA9cLBm8/T93vCiFi8v9cs2aitQr/CfrU=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1s0i0X-00E8ye-Ae; Sat, 27 Apr 2024 15:22:25 +0200 Date: Sat, 27 Apr 2024 15:22:25 +0200 From: Andrew Lunn To: Slark Xiao Cc: loic.poulain@linaro.org, ryazanov.s.a@gmail.com, johannes@sipsolutions.net, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: Re: [PATCH net] net: wwan: Add net device name for error message print Message-ID: <56b839fb-6a69-4dff-b412-1960e98fcbf2@lunn.ch> References: <20240426080733.819633-1-slark_xiao@163.com> <6f7c4b67-a6bd-4fc2-a7da-e4bb0c2b6f50@lunn.ch> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: > At 2024-04-27 06:21:03, "Andrew Lunn" wrote: > >> 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"); > > > >I don't know this code at all, but i think you can do > > > >dev_err_ratelimited(&mbim->mdev->dev, "frame too short\n"); > > > >That way, it tells you which of the 42 mhi devices has received too > >short a frame. > > > > Andrew > I tried in my case, and it will print: > mhi_wwan_mbim mhio_IP_HW0_MBIM: frame too short > > I think it's much more complicated, isn't it? As i said, this is about making it clear which device has problems. mhio_IP_HW0_MBI is not a particularly good name, but it should be unique. The question is, is this built into the silicon, and can there only be one? The name is them pointless. It is also not too unusual to see drivers define macros mbim_err_ratelimited(mbin, "frame too short") Andrew