Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp827844rdb; Sun, 18 Feb 2024 14:07:40 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWqgYDDcO6Egz8WYa86rlxIyI6T0W2iNU8msj4oohvTypN33GO06paD4VhvTHQtSDICHCAvqm9DOJpZ2X2mIqMGEAnFVUgSdo28mANG0w== X-Google-Smtp-Source: AGHT+IFwZuVAyCeEWPGaLMaW11pGQDEyYU5JmhRsfYM7PZxdXDa/APqKU+scUPbE00/6Az8gJiv1 X-Received: by 2002:a05:6e02:1a27:b0:365:229a:26da with SMTP id g7-20020a056e021a2700b00365229a26damr4958122ile.18.1708294060002; Sun, 18 Feb 2024 14:07:40 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708294059; cv=pass; d=google.com; s=arc-20160816; b=XC/O118jf0uRlCt6U3jI0dureBqnjIP0jmxNdw6R8INYadDLexRwh6ducxrRRQXp0h wpQ9HojiMVRvg3o8fzNKIoV2bQnjfTTfdpvNeF+PnMOToUraSB6gkDb+JU565cNsUCf/ MUseLi0rmF5VNLBKuPAQNSh/3Ph4eIJt/aCqoFViA6XxT1Qi+b/eoe9M/to4Z0xMjLWf HFnqvMfyNDR5ntwJoPGZlMBrEckb1Bg/dCQIJtVcdw2wHCsOysVu8ebVBNW0FKT4cmA2 riO4IM6gxO1RB8QeiVFNHhs/tmwIqVp67iaOMtUB6OpiGCnFKa7r0okFP3ob7FyHSgfF rk8w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=NadklAa6Tnip8w2TUfxFFu3aktzUd6Kx6TcCLDek8NE=; fh=nvZ42ehC9KLHC9eQJgk6Hcv3ZOSxL/NQPzhrSYdv35o=; b=Ee5PmN2bv+QGSnKl1onoqOSopCntyxJDURTdBSESzA2sKBCH+NX4X1g5Utis6/HLzx j6Lyzo1pevjR5uqBMrbD4+hRf9WBGUT8ufal7Um7X0gAt6fk7TliHg3yJe5tHK/vI8p0 gTXvtW8Rzjmxh5kmZx7FCfE1P4LYonNfv2YemMybCECGIMD3/JxtAmuynO0oh0gboxxf VWCj3lpwS4hLb74zh0oc31EnOosYfQOcDTdxeSVA1QjAGitVf11KjTFU1i75HKF8fDS/ QkKXWFHGvDBjzxUSZv+sJJ4Se5xPgjcmDwY2lXWTSTu4uKyOAtGiIQSApINReUhSFeo6 V4/A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=A4qtgmbz; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-70598-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-70598-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id c5-20020a633505000000b005cd7b938543si3355600pga.185.2024.02.18.14.07.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 18 Feb 2024 14:07:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-70598-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=A4qtgmbz; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-70598-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-70598-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id A8E2B28164E for ; Sun, 18 Feb 2024 22:07:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 53F657602F; Sun, 18 Feb 2024 22:07:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="A4qtgmbz" Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2EF9374297; Sun, 18 Feb 2024 22:07:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=156.67.10.101 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708294047; cv=none; b=MVUoMaR6nlDVLQ0LwBzWxjpdjzlj9q3anCc5wMxH15mzOiRJDviNpghCeFjTwi8l2Cbhm6eTQIe7BF9Nzq4bYW4xQT1gTBzQSzqhyOqzmzUapvCD+PdBrVlVON3tswLIh1QvxNawbCsLU+X9al8sG8W5l9Ge8t6iE7//9B2dgNA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708294047; c=relaxed/simple; bh=e0yWxLc3AYNv/5zFp3fPm6gjPgJpcMpeFj9+grm07MI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=jOGZH284DD43dxah3r8lb28BQRA+eT+gO2zvvnkf9SyvZ5ssQtzKFBQZlwPJ/XWU22il5y3eWF+tcdnwBlteT+1vc7u1tqRzoPhxBSRlXQfmjunTOOBtDeuDbYAWgyfEujBUV8HgLt+K2gjpEeFMXqnGytYXf7JFu6FP299JQtI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b=A4qtgmbz; arc=none smtp.client-ip=156.67.10.101 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=NadklAa6Tnip8w2TUfxFFu3aktzUd6Kx6TcCLDek8NE=; b=A4qtgmbzFk7aBDbe/5E1HGAoLz +VhQCph3UweeUHCROTXnLDt1OCD543Lw8LyR/FEpU8ocfQMox+OFHPxZZH2PZE3lh1/dEFxjfNl78 beRrqUd3jBgZvenJ8ekSn3vqA/9RNKWM67KhmRyceOr8PrlDbOmTD6l4pUQD178cUocM=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1rbpJU-00893B-FH; Sun, 18 Feb 2024 23:07:08 +0100 Date: Sun, 18 Feb 2024 23:07:08 +0100 From: Andrew Lunn To: Christian Marangi Cc: "Russell King (Oracle)" , Heiner Kallweit , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Florian Fainelli , Broadcom internal kernel review list , Robert Marko , Greg Kroah-Hartman , Pieter Jansen van Vuuren , Nipun Gupta , Andy Shevchenko , Puneet Gupta , Abhijit Gangurde , Umang Jain , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [net-next RFC PATCH 1/6] net: phy: add support for defining multiple PHY IDs in PHY driver Message-ID: <5233847b-a94b-4cd2-b976-232755f209d5@lunn.ch> References: <20240218190034.15447-1-ansuelsmth@gmail.com> <20240218190034.15447-2-ansuelsmth@gmail.com> <65d2613d.170a0220.2eb48.a510@mx.google.com> <829f8c7d-c09b-4264-818a-3f7b047ec44f@lunn.ch> <65d2682a.5d0a0220.3fef2.efe4@mx.google.com> <65d26c13.df0a0220.63f42.d8e6@mx.google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <65d26c13.df0a0220.63f42.d8e6@mx.google.com> > With the allocated mdio_devic_id it would result in this snipped > > const struct mdio_device_id *driver_dev_id; > struct mdio_device_id *dev_id; > int err = 0; > > phydev->drv = phydrv; > /* Fill the mdio_device_id for the PHY istance. > * If PHY driver provide an array of PHYs, search the right one, > * in the other case fill it with the phy_driver data. > */ > if (phy_driver_match(phydrv, phydev, &driver_dev_id) && driver_dev_id) { > /* If defined, overwrite the PHY driver dev name with a > * more specific one from the matching dev_id. > */ > phydev->dev_id = driver_dev_id; > if (driver_dev_id->name) > drv->name = driver_dev_id->name; What is drv here? You should not be changing the name within the driver structure, since that is shared by a number of devices. Andrew