Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp2030785rwl; Thu, 13 Apr 2023 00:12:39 -0700 (PDT) X-Google-Smtp-Source: AKy350ZWkCTqsLSbDPucbreBe4WmoywfJu0eHOXWLvZlLVTQw6ZA1DiEiWI8wyR29wAs9NuEI4Ui X-Received: by 2002:a17:906:a1d8:b0:946:be05:ed7a with SMTP id bx24-20020a170906a1d800b00946be05ed7amr1759189ejb.70.1681369959522; Thu, 13 Apr 2023 00:12:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681369959; cv=none; d=google.com; s=arc-20160816; b=jsxeo23W4jpbFnYWX6ykvs4e0hG5Z+R57qPBNpDUkc1YlQVwgGo6cVMv9/mBuwr3vk 9w9XdfM2dO7QeyBmGC9Y1BdL/ey7dITeG6oxeCdWIid3NmfNc6fOxRUvoACSg+5iX/m9 dQnn+LgIdhGh0zHjSF3dfoSGnGokKttji3A4Yyi7ynoSPd0XUnMR0eVQC2+hyooiFzL3 inhq8KNF/KDtGB0WwXZSxbc/nkQ/RxsULVdrciJ4ITllkuBjoD48mNvcw4i9LTN+6A5E VNFJRzE6n/qPe+qBjTlk+qgEe+WZ7GwyPqIPzLcd3oqfxxdm5gQaGDw7lV4c64BCl7Cp GZjA== 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=pMNjTon4yKZUaNx1tiPdNGd7Z6N+uzozCYugn5Cr1m0=; b=rlxAmKoVBVZD8YFBPNb5iXlc5RhI7izRhM9shP5uLrrH0p3pbv6HQucSIFVOtuqTpf d9CR/h/3AKgkx4OImHBbogST3l3fPyPlndSiO2dpo3I5vTKY9UDtbMfdk7KQCD5BZ70y NY+KEuPFJdw7C2qJGXCwHaihTCe8o72VLBlkqemYJ0vF3hg/E17iI3B+Dlfk9qBH7JYi loukb5uN4Glrx/1a91N5Qm6KnvPSJfoHB3EFzDT+iqThL3bJkVhywbAmLEIMsQWqDi8A xqX1duqs+20K6+T4rkFhtIkh9BUght3PYxaFc7w0DKQ5FhYnPVDGzxd/UuHsfg8mIUob 1Gaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fBPV2EoA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mc23-20020a170906eb5700b0094e596f8e5asi1080760ejb.852.2023.04.13.00.12.14; Thu, 13 Apr 2023 00:12:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fBPV2EoA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229709AbjDMHIB (ORCPT + 99 others); Thu, 13 Apr 2023 03:08:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59438 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229492AbjDMHIA (ORCPT ); Thu, 13 Apr 2023 03:08:00 -0400 Received: from mail-oi1-x234.google.com (mail-oi1-x234.google.com [IPv6:2607:f8b0:4864:20::234]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B67A4E4B for ; Thu, 13 Apr 2023 00:07:58 -0700 (PDT) Received: by mail-oi1-x234.google.com with SMTP id bl22so27353215oib.11 for ; Thu, 13 Apr 2023 00:07:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1681369678; x=1683961678; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=pMNjTon4yKZUaNx1tiPdNGd7Z6N+uzozCYugn5Cr1m0=; b=fBPV2EoAs48OGDIo6A0RB5oxx6S/+v9ZwtkMQfiMhI7yM6Ca495u6H7uYdJG5NHoqL K4OUB4aECHx0I8RR1Ib2kyrwfmJo0XZYLeCSa6zoZLVH2pLY97pSuSqTpzsRAs1ymqCk 22Cm+8EYeBH3hKgHKJ1XKOgzb7POclT3lEXZXFJDAu/k3NA2spC17rN6OQC6GovhUh2Y ju2Im7x9RkTmR5pJOdSWOsMHInD0fEtZswBABMYJ1xzK35zaMJy+TAcdmZjEnVsbp2UH V7BbAR+Lmt8IsvCOj6Ploh4hc2gPUK9gM/3ykld0P+CHtTPA5HxogngxvOrYTfRtsKMR pEyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681369678; x=1683961678; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=pMNjTon4yKZUaNx1tiPdNGd7Z6N+uzozCYugn5Cr1m0=; b=EYBPjMPb9VRDUwa3lnPP6i0jNsD3k7UNfZvm1c9yYuZFkJuS3MF5BRyeUXSJZB6ec4 cURvp48IWmvkEforexwGh/gAZWBBfjN+NaTv9FeFZSQCdMIDQ8RhIAemcr1ybUk10dCL hefzayADbXurmP6dauHQvVhTrgBBKRhckObLLQxp7IWmuuPXtiF6Q7DebwZ1EFxy2Bhu EuGt0GO7nAf+XmFIhE6CGGJYmdOuZh3Lz9+lHIE+a4WYOBvWv8L58gb+obcbIJpFotPY Cwajm5uhjWhZz75dktLDDBTlAfmPaLJeRY4SpXVjERZcKu7byr9USg9J6erbqhsJzuM8 +Mmw== X-Gm-Message-State: AAQBX9doha3HEAExkVvlYpXI7utO8WMVPft3reAAIr6HkkL/jNid85oo X8H/fEsu3v14zIsjW5T4Em0zRZWPeaS+my4gQREV2g== X-Received: by 2002:a54:451a:0:b0:386:b6a7:c093 with SMTP id l26-20020a54451a000000b00386b6a7c093mr270735oil.6.1681369677707; Thu, 13 Apr 2023 00:07:57 -0700 (PDT) MIME-Version: 1.0 References: <20230412114402.1119956-1-slark_xiao@163.com> In-Reply-To: <20230412114402.1119956-1-slark_xiao@163.com> From: Loic Poulain Date: Thu, 13 Apr 2023 09:07:21 +0200 Message-ID: Subject: Re: [PATCH net] wwan: core: add print for wwan port attach/disconnect To: Slark Xiao Cc: 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 Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 12 Apr 2023 at 13:45, Slark Xiao wrote: > > Refer to USB serial device or net device, there is notice to > let end user know the status of device, like attached or > disconnected. Add attach/disconnect print for wwan device as > well. This change works for MHI device and USB device. This change works for wwan port devices, whatever the bus is. > > Signed-off-by: Slark Xiao > --- > drivers/net/wwan/wwan_core.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/drivers/net/wwan/wwan_core.c b/drivers/net/wwan/wwan_core.c > index 2e1c01cf00a9..d3ac6c5b0b26 100644 > --- a/drivers/net/wwan/wwan_core.c > +++ b/drivers/net/wwan/wwan_core.c > @@ -492,6 +492,8 @@ struct wwan_port *wwan_create_port(struct device *parent, > if (err) > goto error_put_device; > > + dev_info(&wwandev->dev, "%s converter now attached to %s\n", > + wwan_port_dev_type.name, port->dev.kobj.name); You should use `dev_name()` instead of direct reference to kobj. Why 'converter' ? If you really want to print, it should be something like: wwan0: wwan0at1 port attached > return port; > > error_put_device: > @@ -517,6 +519,9 @@ void wwan_remove_port(struct wwan_port *port) > > skb_queue_purge(&port->rxq); > dev_set_drvdata(&port->dev, NULL); > + > + dev_info(&wwandev->dev, "%s converter now disconnected from %s\n", > + wwan_port_dev_type.name, port->dev.kobj.name); > device_unregister(&port->dev); > > /* Release related wwan device */ > -- > 2.34.1 > Regards, Loic