Message ID | 20221209172853.2138941-1-alvin@pqrs.dk |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp908728wrr; Fri, 9 Dec 2022 09:47:36 -0800 (PST) X-Google-Smtp-Source: AA0mqf5jLgpV+/7dGnA++nsD0MePIERfzUDqfItwL62kCMgLmzIItmqLEJEFZAF3ti6l9HsKfn49 X-Received: by 2002:a05:6402:3987:b0:467:e9a5:77c4 with SMTP id fk7-20020a056402398700b00467e9a577c4mr3933550edb.14.1670608055965; Fri, 09 Dec 2022 09:47:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670608055; cv=none; d=google.com; s=arc-20160816; b=fLd4ZfrjXmafDse8/3Ln+w4gsMcGtcCWxsk6ENX1bDoKdSEBp/Dvxxvi8wYYXsg1CO e8IWU7OiSy8GTkcAcWDBLg6lJcd4tKHUmP1qwfgAgX+0bInN9wF57/4IGYN+o9pzwN8L xSEr1Wawxge4DP8223FFeG8ygzhDQENN5BDmeSaL5tPK8XfaXfvbT1zaOqHvSpaDOBhh fm3gAXefVW97UVlu61lcpr9UZTYPXaMLEA7mUwwxZNFfX+0slwAmfbGGyJVPOsZFJzqF MEwVhllVwO4rJd5EM+uj1YnLLGqtinb5fB8fzQi5J21lvTKdCIxeT5HkSof88F2d98kL J5fw== 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=gzI0mSSXDiULYDkFXYMyFYk7pUZpjZLakH92fcemRT0=; b=JkusmT0kynzC0jSE6lIMlXZ0nJXciWUTTWSNt75klRZy0GCSD6f230jeXgEzB8fymc E2Wr02lahJNZ5rXEpm5HwgBv03DoCnleCjuGhTXDAS+0sNUWbFGWTa8Nqtl1xJ+TJM53 tQxCF1Va4aXR5+eU2Aq3KZPhtk+Db8MQn2H9hU7mb1I0VTk76t7PlzmrzsAo4MM3nu8/ BGTpzJKAVF0/lOfouUwCHtWI9uuIbnXIiWldYyzCi4PCbPv7S8Yp0/ElULsA+86SzLy5 8Y8byITrhMgKzq3/6Nv4qJA9dzESuw+gONfVrBQcyewOt+cpYzjS1q5ICqvA2AjWJlgK 5RQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@pqrs.dk header.s=google header.b=avPhojfy; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m18-20020a056402511200b00469e701200dsi2238353edd.287.2022.12.09.09.47.12; Fri, 09 Dec 2022 09:47:35 -0800 (PST) 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=temperror (no key for signature) header.i=@pqrs.dk header.s=google header.b=avPhojfy; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230135AbiLIR3T (ORCPT <rfc822;sophiezhao968@gmail.com> + 99 others); Fri, 9 Dec 2022 12:29:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48540 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230155AbiLIR3I (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 9 Dec 2022 12:29:08 -0500 Received: from mail-ej1-x62f.google.com (mail-ej1-x62f.google.com [IPv6:2a00:1450:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E2FC060B66 for <linux-kernel@vger.kernel.org>; Fri, 9 Dec 2022 09:29:05 -0800 (PST) Received: by mail-ej1-x62f.google.com with SMTP id ud5so13112437ejc.4 for <linux-kernel@vger.kernel.org>; Fri, 09 Dec 2022 09:29:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pqrs.dk; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=gzI0mSSXDiULYDkFXYMyFYk7pUZpjZLakH92fcemRT0=; b=avPhojfyAtEzYWjUqmN97DwPnMdwkhaZuk94QT4MgXiwryXE8hb1g9miVLLHqUYFP1 jth0Q+Hoocw8uH3k5/I8Qm3zQlIWrg5JXJH6jVmmUwTxILt7dWi80KIxBkf+mKpLr7hq 1tgQNCwBcUP9LG7xucdpxUC6h6HLop9xqEvCQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=gzI0mSSXDiULYDkFXYMyFYk7pUZpjZLakH92fcemRT0=; b=EgRVifS8YOezdA4N9un84uSzHVFW8HnQ3DiZAk3T/a69MFldamTdHVBWk56BcQNx03 /QqlPOQtyBQKDfs0oBWj0W/y/Sxo0SyBZMg+zHXrlLrzecDYRxsG/NSSRMy878ags4aa IN13WHeoyZvSZYM9V8IGDsN7ANbpqxA8zmROSb0XqIa7JpGnkcV5QTwRAhybFOrZ+tBw NEx2CmPpb/lvRGLPvt8KaYf4qVCB0FSv4WRCtm58ad2t5e4LmJt+2TvD9KWSu88JWXjN UefoWTQRMgHKVvP/XU1QEtbeC0Ct2XbPRuoGQj1DvOpcxAwdswNzgUL5rbaPREJZPb/x ssJA== X-Gm-Message-State: ANoB5pkxHEwoS2KRlUs1gxwX7YJOuYprdQDwUJIBXF8OrNa1dDR18Gx1 hGmm4a0eDT33Lo9qW+LK0dab3g== X-Received: by 2002:a17:906:381:b0:78d:f455:c39b with SMTP id b1-20020a170906038100b0078df455c39bmr5747668eja.65.1670606944432; Fri, 09 Dec 2022 09:29:04 -0800 (PST) Received: from localhost.localdomain (80.71.142.18.ipv4.parknet.dk. [80.71.142.18]) by smtp.gmail.com with ESMTPSA id pk14-20020a170906d7ae00b0077016f4c6d4sm161154ejb.55.2022.12.09.09.29.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Dec 2022 09:29:04 -0800 (PST) From: =?utf-8?q?Alvin_=C5=A0ipraga?= <alvin@pqrs.dk> To: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: =?utf-8?q?Alvin_=C5=A0ipraga?= <alsi@bang-olufsen.dk>, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] usb: gadget: u_ether: remove obnoxious warning messages Date: Fri, 9 Dec 2022 18:28:53 +0100 Message-Id: <20221209172853.2138941-1-alvin@pqrs.dk> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE autolearn=no 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1751759513216705484?= X-GMAIL-MSGID: =?utf-8?q?1751759513216705484?= |
Series |
usb: gadget: u_ether: remove obnoxious warning messages
|
|
Commit Message
Alvin Šipraga
Dec. 9, 2022, 5:28 p.m. UTC
From: Alvin Šipraga <alsi@bang-olufsen.dk> There is really no need for the driver to unconditionally emit warnings like this on every usage: [ 6.967283] using random self ethernet address [ 6.967294] using random host ethernet address Since this is normal behaviour, just remove the messages altogether. Signed-off-by: Alvin Šipraga <alsi@bang-olufsen.dk> --- drivers/usb/gadget/function/u_ether.c | 2 -- 1 file changed, 2 deletions(-)
Comments
W dniu 9.12.2022 o 18:28, Alvin Šipraga pisze: > From: Alvin Šipraga <alsi@bang-olufsen.dk> > > There is really no need for the driver to unconditionally emit warnings > like this on every usage: > > [ 6.967283] using random self ethernet address > [ 6.967294] using random host ethernet address > > Since this is normal behaviour, just remove the messages altogether. > > Signed-off-by: Alvin Šipraga <alsi@bang-olufsen.dk> Reviewed-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com> > --- > drivers/usb/gadget/function/u_ether.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/drivers/usb/gadget/function/u_ether.c b/drivers/usb/gadget/function/u_ether.c > index 8f12f3f8f6ee..3fdc913ef262 100644 > --- a/drivers/usb/gadget/function/u_ether.c > +++ b/drivers/usb/gadget/function/u_ether.c > @@ -845,13 +845,11 @@ struct net_device *gether_setup_name_default(const char *netname) > snprintf(net->name, sizeof(net->name), "%s%%d", netname); > > eth_random_addr(dev->dev_mac); > - pr_warn("using random %s ethernet address\n", "self"); > > /* by default we always have a random MAC address */ > net->addr_assign_type = NET_ADDR_RANDOM; > > eth_random_addr(dev->host_mac); > - pr_warn("using random %s ethernet address\n", "host"); > > net->netdev_ops = ð_netdev_ops; >
On Fri, Dec 09, 2022 at 06:28:53PM +0100, Alvin Šipraga wrote: > From: Alvin Šipraga <alsi@bang-olufsen.dk> > > There is really no need for the driver to unconditionally emit warnings > like this on every usage: > > [ 6.967283] using random self ethernet address > [ 6.967294] using random host ethernet address > > Since this is normal behaviour, just remove the messages altogether. > > Signed-off-by: Alvin Šipraga <alsi@bang-olufsen.dk> > --- > drivers/usb/gadget/function/u_ether.c | 2 -- > 1 file changed, 2 deletions(-) Please see the thread at: https://lore.kernel.org/r/20230116155545.101391-1-jonathanh@nvidia.com for more details. This should use dev_warn() or better yet, just dev_dbg(). thanks, greg k-h
diff --git a/drivers/usb/gadget/function/u_ether.c b/drivers/usb/gadget/function/u_ether.c index 8f12f3f8f6ee..3fdc913ef262 100644 --- a/drivers/usb/gadget/function/u_ether.c +++ b/drivers/usb/gadget/function/u_ether.c @@ -845,13 +845,11 @@ struct net_device *gether_setup_name_default(const char *netname) snprintf(net->name, sizeof(net->name), "%s%%d", netname); eth_random_addr(dev->dev_mac); - pr_warn("using random %s ethernet address\n", "self"); /* by default we always have a random MAC address */ net->addr_assign_type = NET_ADDR_RANDOM; eth_random_addr(dev->host_mac); - pr_warn("using random %s ethernet address\n", "host"); net->netdev_ops = ð_netdev_ops;