Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp7134745rdb; Wed, 3 Jan 2024 05:55:07 -0800 (PST) X-Google-Smtp-Source: AGHT+IF0+q9vReTsfpQkKemuVu+nyzoxzlvyyvhtZPDC/zB5x7AjsapBDjN4MgrPrnCprO7g3yPD X-Received: by 2002:a05:6a20:8e0a:b0:197:9bf1:4879 with SMTP id y10-20020a056a208e0a00b001979bf14879mr495092pzj.95.1704290106899; Wed, 03 Jan 2024 05:55:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704290106; cv=none; d=google.com; s=arc-20160816; b=SSarQpryut5SKUXgbjx9fKlwf2rAenlzuW9cmE9p7sZK2qfKr7iZ/n+Gr2eBNZtlwz YGQhgVuBH8X3kuGL+E0gyNXEKzRgxSBrpoxHbgN4ctg7oAflnNbx5SUz4RX+mSclXC4Q U8XoXS7IjmTxPk+3LIrrHpVizlFHwe4AcI121Sq4AjaCti1nxTmKp8QYC6TrtUtg//zL UvSbOk/9YqG8sjtantdnXOrufyqOXbENMZKxqOe30I/kWKWtzWM4zqxuvpYo1/PUgbZn z/FJYpFNKeG4sgfFuRqQLSYKx7S2htGZZeVlha81SPJjhiEDP2KdC9a9fjjcW/FoR+SJ Vjkw== ARC-Message-Signature: i=1; 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=B6mFRE7y+AFa7z4uxe9OX4CxoJLcZgIi5f2fGVeY1X4=; fh=RmaMZNEC7ivR+1bxpkrmuYluWmQPhenGrpcF5BKTrwk=; b=ITGW9owvegmVkjpozTKsjvyFCpwZh5CUUYBNmldm/gV/Rly2LSEnZgKWt52hgc0MM9 JEZdWftSnBL37OOR+gvi7DV3Rn+dpLqAnUExIFBPsPyoijUfG3/UK/zh0dVf8ahJ8mse AjZ0a/kA1VbDlT8mm82jj0LclCKndCcpP6HxK4VozKWOzpE3FRnyhXldoXFiVZhaQ470 JC/MY9iRXuhyELX29Ixi2a8SJ6yEZdPprUSHvulY5Cfcaik+emNXqnWgq0yQzWdq3W6R hBAox1bwbJEA6rfE4XvzrJKRShjAXDlLfDI9ZXQR1Szki8jp7+iJ78aCLoFEyEirq0Pe rReQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=fz03eCtE; spf=pass (google.com: domain of linux-kernel+bounces-15620-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-15620-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id i2-20020a17090a974200b0028cad5040b4si1251213pjw.72.2024.01.03.05.55.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jan 2024 05:55:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-15620-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=fz03eCtE; spf=pass (google.com: domain of linux-kernel+bounces-15620-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-15620-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id EA653B22F1C for ; Wed, 3 Jan 2024 13:55:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D8F7D1A27F; Wed, 3 Jan 2024 13:54:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="fz03eCtE" X-Original-To: linux-kernel@vger.kernel.org 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 CB07C19BB2; Wed, 3 Jan 2024 13:54:50 +0000 (UTC) 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=B6mFRE7y+AFa7z4uxe9OX4CxoJLcZgIi5f2fGVeY1X4=; b=fz03eCtEYIROoSjL2PoKk34UaN nWIZ8y3I80Du2ekglxO782pzI84U2yxmPVHbGBKyPrlBb4wGHiThgnDXehKr0g5e9aXpbOPednXbl ZSyJQX7p4d5D2KRI8j5iC887n8AO8prjw8AF3WmTtSMYWvC1lUr6u3DO4OHTWaSTP7ts=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1rL1hV-004G7n-7m; Wed, 03 Jan 2024 14:54:29 +0100 Date: Wed, 3 Jan 2024 14:54:29 +0100 From: Andrew Lunn To: Yajun Deng Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, olteanv@gmail.com, hkallweit1@gmail.com, linux@armlinux.org.uk, przemyslaw.kitszel@intel.com, rmk+kernel@armlinux.org.uk, kabel@kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org Subject: Re: [PATCH net-next v2 0/2] net: phy: Use is_phy_driver() and is_phy_device() Message-ID: <46528573-b584-4e37-82c9-f8fc4e0428d9@lunn.ch> References: <20240103025334.541682-1-yajun.deng@linux.dev> 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: <20240103025334.541682-1-yajun.deng@linux.dev> On Wed, Jan 03, 2024 at 10:53:32AM +0800, Yajun Deng wrote: > There is only one flag that can be set in struct mdio_driver_common and > mdio_device. We can compare the probe of the driver or the type of the > device to implement it. Hence, these flags in struct mdio_driver_common > and mdio_device can be removed. > > Introduce is_phy_driver() and is_phy_device(). Use them test the driver > or device. I'm still not convinced this is useful. Please expand your commit message. One things which might convince me this is useful is if the PHY drivers can make there struct phy_driver structures const. Also, please break this patch series up. You should be able to add the helper is_phy_driver() and make use of it, without changing common. You should be able to add is_phy_device() without changing common. So do these little steps first. The current code is hard to review because these changes are all mixed in with everything else. Once you have done the preparation steps, you can then do the mass change. Andrew --- pw-bot: cr