Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1209268rwd; Tue, 13 Jun 2023 06:23:23 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6EUZfyLG6yddaA5nehwYi1U57NRRje2lp5HWyuatGjlSA6ywEpE8KjWl3Mxiz6yl10Pwni X-Received: by 2002:a17:902:b182:b0:1b3:a949:cfdf with SMTP id s2-20020a170902b18200b001b3a949cfdfmr7230680plr.4.1686662603458; Tue, 13 Jun 2023 06:23:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686662603; cv=none; d=google.com; s=arc-20160816; b=HR08i4IV3XIvQuCaPkp+73JopLldKspGgV8w+7JxnAP0pzhvaFuWzpWC/s9yxAUTE+ IaFjZ+Tw+KXahtXecSpdlepvq8I3gPjeiYwBn0KBnmfWCAhwLZQvpxPDRwy87yjyYDo3 Ri7jYv/a3eA5tULiu6EIo09aCUxOW7zmj4qCgS7Llbjp1y4t2Z7e03bHUz0unZTNQQK2 h0BRYRIqFVysadN1CMilv7TiW62lETdeQBr7TYZsX5GlxRATno5kjvMlOGjEe83gAHKN Zp8V7MtKPMiu6u11gScdZfip7Iwvcy6n0uTCqouBSaYAArJGprNHKBGVdZeUt8q2SnJP OT1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=3GvNNzZqfspIZmoDRwcEGnmmoM6lZx4HaN+1tRFShbw=; b=dGFVaVeeP627pryWOlzTpBLIMGG0IFHNBsQb73mTa3HlheruyhzHXui2qy7jlAOCLX JNJzmC9ZoQYijmPZ18YbucaY4vwZ43TTeUvSJecD60Un7wJV87YP9sbRluFax9A9qE/A +ldBtLRBUUDwUfETmHBznmcn15GjxEWhElBIwiGeTi3ZxatNJCDWUP7BbPjk1Cjg4pDo l8zOLiP1xii64aU7mTIJem+AgLz4fGnaOCyYwhUdGQR2LYwToERBN2I5IPJryRwcclGP aIf0qQ6MrULXf0fjcfrV6cqrhIpLJMHloi2F+l5CIT+HjOu+ZCNAE+OaYJEzQY51Yr3j pnmA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w4-20020a170902904400b001b3d5ec6739si2782543plz.481.2023.06.13.06.23.10; Tue, 13 Jun 2023 06:23:23 -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; 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240551AbjFMMxA (ORCPT + 99 others); Tue, 13 Jun 2023 08:53:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50044 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230183AbjFMMw6 (ORCPT ); Tue, 13 Jun 2023 08:52:58 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 354AF10D9; Tue, 13 Jun 2023 05:52:57 -0700 (PDT) Received: from dggpemm500005.china.huawei.com (unknown [172.30.72.53]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4QgT3V5DLQzTl6g; Tue, 13 Jun 2023 20:52:22 +0800 (CST) Received: from [10.69.30.204] (10.69.30.204) by dggpemm500005.china.huawei.com (7.185.36.74) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Tue, 13 Jun 2023 20:52:52 +0800 Subject: Re: [PATCH] drivers/thunder:improve-warning-message-in-device_for_each_child_node() To: Wang Ming , Sunil Goutham , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , , , CC: References: <20230613123826.558-1-machel@vivo.com> From: Yunsheng Lin Message-ID: <4aa86edd-5526-929d-8576-9d2b6f828eb0@huawei.com> Date: Tue, 13 Jun 2023 20:52:52 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: <20230613123826.558-1-machel@vivo.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.69.30.204] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To dggpemm500005.china.huawei.com (7.185.36.74) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,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 On 2023/6/13 20:38, Wang Ming wrote: > In device_for_each_child_node(), it should have fwnode_handle_put() > before break to prevent stale device node references from being > left behind. > > Signed-off-by: Wang Ming A Fixes tag seems necessary according to the commit log, and should target the net branch using: [PATCH net] drivers/thunder: improve-warning-message-in-device_for_each_child_node() Also it seems confusing the 'improve' in the title suggest that it is not a fix. > --- > .../net/ethernet/cavium/thunder/thunder_bgx.c | 37 ++++++++++--------- > 1 file changed, 20 insertions(+), 17 deletions(-) > > diff --git a/drivers/net/ethernet/cavium/thunder/thunder_bgx.c b/drivers/net/ethernet/cavium/thunder/thunder_bgx.c > index a317feb8d..d37ee2872 100644 > --- a/drivers/net/ethernet/cavium/thunder/thunder_bgx.c > +++ b/drivers/net/ethernet/cavium/thunder/thunder_bgx.c > @@ -90,7 +90,7 @@ static const struct pci_device_id bgx_id_table[] = { > > MODULE_AUTHOR("Cavium Inc"); > MODULE_DESCRIPTION("Cavium Thunder BGX/MAC Driver"); > -MODULE_LICENSE("GPL v2"); > +MODULE_LICENSE("GPL"); Is there any reason you changing the license here? > MODULE_VERSION(DRV_VERSION); > MODULE_DEVICE_TABLE(pci, bgx_id_table); > > @@ -174,10 +174,10 @@ static struct bgx *get_bgx(int node, int bgx_idx) > } > > /* Return number of BGX present in HW */ > -unsigned bgx_get_map(int node) > +unsigned int bgx_get_map(int node) It seems to be unrelated change here, is the changing related to the problem you are fixing? > { > int i; > - unsigned map = 0; > + unsigned int map = 0; Same here. > > for (i = 0; i < max_bgx_per_node; i++) { > if (bgx_vnic[(node * max_bgx_per_node) + i]) > @@ -600,9 +600,9 @@ static void bgx_lmac_handler(struct net_device *netdev) > link_changed = -1; > > if (phydev->link && > - (lmac->last_duplex != phydev->duplex || > - lmac->last_link != phydev->link || > - lmac->last_speed != phydev->speed)) { > + (lmac->last_duplex != phydev->duplex || > + lmac->last_link != phydev->link || > + lmac->last_speed != phydev->speed)) { Same here. > link_changed = 1; > } > > @@ -783,7 +783,7 @@ static int bgx_lmac_xaui_init(struct bgx *bgx, struct lmac *lmac) > bgx_reg_write(bgx, lmacid, BGX_SPUX_BR_PMD_LD_REP, 0x00); > /* training enable */ > bgx_reg_modify(bgx, lmacid, > - BGX_SPUX_BR_PMD_CRTL, SPU_PMD_CRTL_TRAIN_EN); > + BGX_SPUX_BR_PMD_CRTL, SPU_PMD_CRTL_TRAIN_EN); Same here. Please make sure it only contain change related to fixing the problem.