From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754428AbcBEP0f (ORCPT ); Fri, 5 Feb 2016 10:26:35 -0500 Received: from unicorn.mansr.com ([81.2.72.234]:53629 "EHLO unicorn.mansr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751798AbcBEP0d convert rfc822-to-8bit (ORCPT ); Fri, 5 Feb 2016 10:26:33 -0500 From: =?iso-8859-1?Q?M=E5ns_Rullg=E5rd?= To: Sebastian Frias Cc: "David S. Miller" , netdev@vger.kernel.org, LKML , mason Subject: Re: [PATCH v3] net: ethernet: support "fixed-link" DT node on nb8800 driver References: <56B4A445.7080402@laposte.net> <56B4A877.4020800@laposte.net> <56B4ACC4.1000607@laposte.net> <56B4B013.5030407@laposte.net> <56B4B81D.3000108@laposte.net> <56B4BDDA.9010708@laposte.net> Date: Fri, 05 Feb 2016 15:26:30 +0000 In-Reply-To: <56B4BDDA.9010708@laposte.net> (Sebastian Frias's message of "Fri, 05 Feb 2016 16:20:58 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Sebastian Frias writes: > On 02/05/2016 04:08 PM, Måns Rullgård wrote: >> Sebastian Frias writes: >> >>> On 02/05/2016 03:34 PM, Måns Rullgård wrote: >>>> Sebastian Frias writes: >>>> >>>>> Signed-off-by: Sebastian Frias >>>> >>>> Please change the subject to something like "net: ethernet: nb8800: >>>> support fixed-link DT node" and add a comment body. >>> >>> The subject is pretty explicit for such a simple patch, what else >>> could I add that wouldn't be unnecessary chat? >> >> It's customary to include a description body even if it's little more >> than a restatement of the subject. Also, while the subject usually only >> says _what_ the patch does, the body should additionally state _why_ it >> is needed. > > I understand, but _why_ it is needed is also obvious in this case; I > mean, without the patch "fixed-link" cannot be used. Then say so. > Other patches may not be as obvious/simple and thus justify and > require more details. > > Anyway, I added "Properly handles the case where the PHY is not connected > to the real MDIO bus" would that be ok? Have you read Documentation/SubmittingPatches? Do so (again) and pay special attention to section 2 "Describe your changes." >>>>> --- >>>>> drivers/net/ethernet/aurora/nb8800.c | 14 +++++++++++++- >>>>> 1 file changed, 13 insertions(+), 1 deletion(-) >>>>> >>>>> diff --git a/drivers/net/ethernet/aurora/nb8800.c >>>>> b/drivers/net/ethernet/aurora/nb8800.c >>>>> index ecc4a33..e1fb071 100644 >>>>> --- a/drivers/net/ethernet/aurora/nb8800.c >>>>> +++ b/drivers/net/ethernet/aurora/nb8800.c >>>>> @@ -1460,7 +1460,19 @@ static int nb8800_probe(struct platform_device *pdev) >>>>> goto err_disable_clk; >>>>> } >>>>> >>>>> - priv->phy_node = of_parse_phandle(pdev->dev.of_node, "phy-handle", 0); >>>>> + if (of_phy_is_fixed_link(pdev->dev.of_node)) { >>>>> + ret = of_phy_register_fixed_link(pdev->dev.of_node); >>>>> + if (ret < 0) { >>>>> + dev_err(&pdev->dev, "bad fixed-link spec\n"); >>>>> + goto err_free_bus; >>>>> + } >>>>> + priv->phy_node = of_node_get(pdev->dev.of_node); >>>>> + } >>>>> + >>>>> + if (!priv->phy_node) >>>>> + priv->phy_node = of_parse_phandle(pdev->dev.of_node, >>>>> + "phy-handle", 0); >>>>> + >>>>> if (!priv->phy_node) { >>>>> dev_err(&pdev->dev, "no PHY specified\n"); >>>>> ret = -ENODEV; >>>>> -- >>>>> 2.1.4 >>>> >> -- Måns Rullgård