From patchwork Thu Apr 20 02:36:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Slark Xiao X-Patchwork-Id: 85692 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp27049vqo; Wed, 19 Apr 2023 19:49:59 -0700 (PDT) X-Google-Smtp-Source: AKy350aIrLLJwwK7L6IY4NrxGH5aJuQNvfZ/4hEKXrlPh2srDY4YU3VbPx1Y1wUGc7IKCbP9xZXf X-Received: by 2002:a05:6a00:21c8:b0:637:920c:25fd with SMTP id t8-20020a056a0021c800b00637920c25fdmr5060993pfj.17.1681958999085; Wed, 19 Apr 2023 19:49:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681958999; cv=none; d=google.com; s=arc-20160816; b=Yq7MCj/2LrObsCCIxKELRgjVG76j560sZQPqbyH4INnLc9WD1jASmJJR0kx+bucqO6 aSfhCfh3SWYvadWY8qU2zbbUdIaklD9BgD4dMmKcymi+aH7Rg4GtlLBXHEj5NhZv0q81 AA+7W0Mqc46sI1/UkZ4c/qGvSzPAvCkQWgz6Jhs8Usz3xgCoKTrcVkOs7kHf/oM8/M6J V5rqtzrRr4D6BLJezsdq2d/xzLG5WXPdteZ9M/Hrr1QsMxOb2YfQhgxzML79p4DvDwtT BEweYg3L7RdeHGT23gDomGa4/jWpO6UHfVkFT++31myfoDcgaZmhX0Xb0qLBaLpb6i/9 GROQ== 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=HXZIpzZdUrErn57m6e5heCl+mhUJCi/HhdJ4WRmQj1M=; b=zTWP7MKemdo4s1W13DXf8AtTDX4eUiNH5wmpOpjhEL0EVpIdoxWTuCz/per4rshBqR dfpDR7WV0B6eu8p4A2m0IJrdoCfVtEIXnONF3GO0yjr4WlqAD1sJO7GmMJ1n40JxYhc+ 97Z0H22RNorLoL7q8uKheH+EL/TqtnP+soq8wRpjmloU+9EItyRALF5uQSi6SOLYydFD r3++kp4e6o1TIpXScRh4/vIV1ypx2R70S6xGecaDrCF/vL7rxeEQYuthDb/4PScbNM3P a20JqP+CXxGRrVumwado1wvxIM+FmYm4ZH4PIoJ0A5d6oU2CQ9VWfL3nSmlxxJxBgQgu Kdyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=lKdRDD6L; 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=163.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 6-20020a621806000000b0063b6bc7df13si279126pfy.209.2023.04.19.19.49.28; Wed, 19 Apr 2023 19:49:59 -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=@163.com header.s=s110527 header.b=lKdRDD6L; 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=163.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233174AbjDTChb (ORCPT + 99 others); Wed, 19 Apr 2023 22:37:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39642 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232606AbjDTCh3 (ORCPT ); Wed, 19 Apr 2023 22:37:29 -0400 Received: from m12.mail.163.com (m12.mail.163.com [220.181.12.196]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 97793F9; Wed, 19 Apr 2023 19:37:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=HXZIp zZdUrErn57m6e5heCl+mhUJCi/HhdJ4WRmQj1M=; b=lKdRDD6L9VYeVfWcV97e0 eBPz2Fk2cbhR9L0PgSvI6au081QCrIoIPjBchPxNFpb81WrF8hd8PlSBgVnlo2Tt xLi72ynUsRTs2EMTqWeBN81/cklfYoLUsx63Fihb58Ex7rzRYya1gNLI0cY4NhCm jwwPJXvtSxbzRAuEV++GoI= Received: from VM-0-27-ubuntu.. (unknown [43.134.191.38]) by zwqz-smtp-mta-g4-3 (Coremail) with SMTP id _____wCXhVYjpUBkg2azBw--.61857S2; Thu, 20 Apr 2023 10:36:21 +0800 (CST) From: Slark Xiao To: loic.poulain@linaro.org, ryazanov.s.a@gmail.com, johannes@sipsolutions.net, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Slark Xiao Subject: [net-next v2] wwan: core: add print for wwan port attach/disconnect Date: Thu, 20 Apr 2023 10:36:17 +0800 Message-Id: <20230420023617.3919569-1-slark_xiao@163.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CM-TRANSID: _____wCXhVYjpUBkg2azBw--.61857S2 X-Coremail-Antispam: 1Uf129KBjvdXoW7Gry3WF4xJw47tr1rJF13Arb_yoWkWrbE93 Z8Zan5XrWUGayxtrW3GF15ZrWSkw1IvFW0qr1FqFZ3Z34DXryxW3yfu3ZrG3yxCa15uFy3 Wr1UtF1Iv34rGjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7xRKPfHUUUUUU== X-Originating-IP: [43.134.191.38] X-CM-SenderInfo: xvod2y5b0lt0i6rwjhhfrp/1tbiRxxXZFc7bap18AAAsG X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1763661839880608593?= X-GMAIL-MSGID: =?utf-8?q?1763661839880608593?= Refer to USB serial device or net device, there is a notice to let end user know the status of device, like attached or disconnected. Add attach/disconnect print for wwan device as well. Signed-off-by: Slark Xiao --- v2: Use dev_name() instead of kobj item and make print neat. --- drivers/net/wwan/wwan_core.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/wwan/wwan_core.c b/drivers/net/wwan/wwan_core.c index 2e1c01cf00a9..aa54fa6d5f90 100644 --- a/drivers/net/wwan/wwan_core.c +++ b/drivers/net/wwan/wwan_core.c @@ -492,6 +492,7 @@ struct wwan_port *wwan_create_port(struct device *parent, if (err) goto error_put_device; + dev_info(&wwandev->dev, "port %s attached\n", dev_name(&port->dev)); return port; error_put_device: @@ -517,6 +518,8 @@ void wwan_remove_port(struct wwan_port *port) skb_queue_purge(&port->rxq); dev_set_drvdata(&port->dev, NULL); + + dev_info(&wwandev->dev, "port %s disconnected\n", dev_name(&port->dev)); device_unregister(&port->dev); /* Release related wwan device */