From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3616AC4345F for ; Fri, 12 Apr 2024 13:17:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=dz8WXGo2rg2PIZIhU3evCHEwyEutSvlGdLID3pe+zBw=; b=fPtRSeWCa2YKBV xhA2WltULmMSEq095sWHvAb+FONfJRvruipJNeGgKczjruY4mgdIteauoeez6tFLPzTjEy5DXvJR/ uG19HPaU5KG/R/KYYUeYHNWmbo8lIvnbannpMw2kQhvqU0WiL5nHkHba9aX7LceGtosamsF1SimKP CtGZt0ougP8Dzkyw9YmBUqw34BWpEzOA+IlWSWzlNIofVXoSoeshDE9qIBCWG9Yw+5C4gGqOiyNHr asHcVKuRB1uepzVMiXKnFaRVS34Syl6uNSTxsH5rNUguhylKJCmjLINtV66PBylStoHdkHJIW5Zot Akkabbvq0URm7vEtaECA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rvGm4-0000000HHDI-02nr; Fri, 12 Apr 2024 13:17:00 +0000 Received: from relay1-d.mail.gandi.net ([2001:4b98:dc4:8::221]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rvGm0-0000000HHA5-3M3v for linux-arm-kernel@lists.infradead.org; Fri, 12 Apr 2024 13:16:58 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id C3A03240004; Fri, 12 Apr 2024 13:16:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1712927811; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=O5+3+rElzUNybXHG/ZwL7fFM6Iw46bn7txCnEsQ1q2w=; b=lT+dK4IBl81ohQ/NsUOa/zq3G805EZLYGAN0wFqWK2ljT7vjQaRpWC3Qc03ndnkG3TgUpm y5JxQB8JVB0AWSxNHLhB5+9J4mEX3PQHvJKATw9N02+A1o6CzbVSlRScL+Vvw4fEzSikpl Ar+zsj31zbD3D8pmx1BOjkGhR27phYPcPmg5VPaBym1oM8z2jNl5tRBaCzSEBBKeFseFry cllGgnhW1ZjimKFdazfcL24xB0XWJE/p0ext0rfJE3JAPM06bwiaJOyBbVXewadjWe/xwk pCmfiIrcTavpUHqLfiguFM7YV/WI8W9/qJe/FGcWsa2fYLeJkyaFrnrc8r+T2w== Date: Fri, 12 Apr 2024 15:16:48 +0200 From: Maxime Chevallier To: Antoine Tenart Cc: davem@davemloft.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, thomas.petazzoni@bootlin.com, Andrew Lunn , Jakub Kicinski , Eric Dumazet , Paolo Abeni , Russell King , linux-arm-kernel@lists.infradead.org, Christophe Leroy , Herve Codina , Florian Fainelli , Heiner Kallweit , Vladimir Oltean , =?UTF-8?B?S8O2cnk=?= Maincent , Jesse Brandeburg , Marek =?UTF-8?B?QmVow7pu?= , Piergiorgio Beruto , Oleksij Rempel , =?UTF-8?B?Tmljb2zDsg==?= Veronese , Simon Horman , mwojtas@chromium.org, Nathan Chancellor Subject: Re: [PATCH net-next] net: phy: phy_link_topology: Handle NULL topologies Message-ID: <20240412151648.653d41be@device-28.home> In-Reply-To: <171292699033.4917.4025686054785818967@kwain> References: <20240412104615.3779632-1-maxime.chevallier@bootlin.com> <171292699033.4917.4025686054785818967@kwain> Organization: Bootlin X-Mailer: Claws Mail 4.2.0 (GTK 3.24.41; x86_64-redhat-linux-gnu) MIME-Version: 1.0 X-GND-Sasl: maxime.chevallier@bootlin.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240412_061657_310865_9DAB6B81 X-CRM114-Status: GOOD ( 18.37 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Antoine, On Fri, 12 Apr 2024 15:03:10 +0200 Antoine Tenart wrote: > Hi Maxime, > > Quoting Maxime Chevallier (2024-04-12 12:46:14) > > > > This patch fixes a commit that is in net-next, hence the net-next tag and the > > lack of "Fixes" tag. > > You can use Fixes: on net-next, that still helps to identify which > commit is being fixed (eg. for reviews, while looking at the history, > etc). Won't the tag become invalid when the commit gets merged into an -rc release then ? > > > diff --git a/drivers/net/phy/phy_link_topology.c b/drivers/net/phy/phy_link_topology.c > > index 985941c5c558..0f3973f07fac 100644 > > --- a/drivers/net/phy/phy_link_topology.c > > +++ b/drivers/net/phy/phy_link_topology.c > > @@ -42,6 +42,9 @@ int phy_link_topo_add_phy(struct phy_link_topology *topo, > > struct phy_device_node *pdn; > > int ret; > > > > + if (!topo) > > + return 0; > > + > > With that phy_sfp_connect_phy does not need to check the topo validity > before calling phy_link_topo_add_phy. The other way around is fine too. > > > @@ -93,7 +96,12 @@ EXPORT_SYMBOL_GPL(phy_link_topo_add_phy); > > void phy_link_topo_del_phy(struct phy_link_topology *topo, > > struct phy_device *phy) > > { > > - struct phy_device_node *pdn = xa_erase(&topo->phys, phy->phyindex); > > + struct phy_device_node *pdn; > > + > > + if (!topo) > > + return; > > + > > + pdn = xa_erase(&topo->phys, phy->phyindex); > > Same here with phy_sfp_disconnect_phy. Ah right, well spotted, thanks ! Maxime > > Thanks! > Antoine _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel