From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753049AbdJ3Shh (ORCPT ); Mon, 30 Oct 2017 14:37:37 -0400 Received: from mail-qk0-f193.google.com ([209.85.220.193]:51885 "EHLO mail-qk0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753017AbdJ3Shc (ORCPT ); Mon, 30 Oct 2017 14:37:32 -0400 X-Google-Smtp-Source: ABhQp+ScJJCBB2y6WG9Z87NfAo/CullgGGLPVpwUKA7C+ZUf9qjqkl4aawIfgEj10jC5QhrrdAX+rw== Subject: Re: [PATCH net-next 1/7] net: dsa: get ports within parsing code To: Vivien Didelot , netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org, kernel@savoirfairelinux.com, "David S. Miller" , Andrew Lunn References: <20171027195519.5931-1-vivien.didelot@savoirfairelinux.com> <20171027195519.5931-2-vivien.didelot@savoirfairelinux.com> From: Florian Fainelli Message-ID: Date: Mon, 30 Oct 2017 11:37:28 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <20171027195519.5931-2-vivien.didelot@savoirfairelinux.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/27/2017 12:55 PM, Vivien Didelot wrote: > There is no point into hiding the -EINVAL error code in ERR_PTR from a > dsa_get_ports function, simply get the "ports" node directly from within > the dsa_parse_ports_dn function. > > This also has the effect to make the pdata and device tree handling code > symmetrical inside _dsa_register_switch. > > At the same time, rename dsa_parse_ports_dn to dsa_parse_ports_of > because _of is a more common suffix for device tree parsing functions. > > Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli -- Florian