Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp4217383pxb; Mon, 8 Feb 2021 10:36:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJwgwr6rdaSoKkbpLakitpcNFXwoDDQyfRXNBvYzZndyoccZnBIyensOcAYTUdIm8+y7i4XF X-Received: by 2002:a05:6402:1109:: with SMTP id u9mr4202044edv.385.1612809391454; Mon, 08 Feb 2021 10:36:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612809391; cv=none; d=google.com; s=arc-20160816; b=uOhatMdD+NetCgY0kZg5rn2jco5AVz07K7qnjBAf7ckvEhW9GFeapDLXCFGVJfYXF0 iZpjbrcWuF35OoBFTvL5mwpcyzpKURizqJoV0rOzaJZKNnkRV4bP0UyNR1mi3mXg9Lk7 cMrHAA9x6ew1rUeVAg3vZ7j66BavGgPYzSNwHksCfWCPhT5tSKLDRgxAm+TOtH+2pILX orU079TEVNygy0SlE0ufCPNw/NIbMTgVcItGC18B0bsHrIaSMaJPN7XCszTxjQtmd4f+ JFyjsjbmGItngfbAokfYlfeJgxlSUq5uBzhDUXwtejQY2tETubB1VvAkVfsI4MKwU2QU PAig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=FwkWha3g7oAGpB4ws7tQE2d1Ep3IiBneyrvjPgo+ZlY=; b=nA+tvhXENnOKfZbLwyJL+w94CGIu96QnBbY1k7Zp7KZV+on1jTgBdrBPoxjBvzyi34 CHa4H/Szw6V3boR0GifFGBwM9qV9kozFrmM+yFy7ij7bM+mnmHjurSOucBXc6Rw+E43f se5IB8/JAf1SREWgexFM3EjG7+GZPwfVQh/kjHbttwr3nRArSP8qJQ/FAptEf4ljtFMt 8PrNtsbiUYTlfaHOc5xenlg2DRk8UfZ/NKFIbtIrHAXRv7c3tLqQxK0e99rH/cAiW1SN TJLRdHzYPgEOEmLD3/0HIjDv3emNEnP4BShS1OJfbYoscaNYx7xbx0EHTwG8u58ph8L9 Hx9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=c0r5N8jx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lb22si3764135ejc.276.2021.02.08.10.36.07; Mon, 08 Feb 2021 10:36:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=c0r5N8jx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235800AbhBHSf0 (ORCPT + 99 others); Mon, 8 Feb 2021 13:35:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38842 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234346AbhBHQWV (ORCPT ); Mon, 8 Feb 2021 11:22:21 -0500 Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 90DE9C061788; Mon, 8 Feb 2021 08:21:40 -0800 (PST) Received: by mail-pj1-x102e.google.com with SMTP id l18so9065027pji.3; Mon, 08 Feb 2021 08:21:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=FwkWha3g7oAGpB4ws7tQE2d1Ep3IiBneyrvjPgo+ZlY=; b=c0r5N8jxVF6gKwrWgIFk8pzpa5inqJJ8IxXFim69z2u09lU41usZE+nCWufo8wzGbX xQGTDDnnAMsMXQm4FA2+T7yT8T1Na/dsKGh9ru3rKRUcNdTBa+DnwhHcePl67AGtIvNe fpKd1YiEuHmTv5UkLgVVYWCXVlNkOIn++vtiXyisvc7woTn4YLg3U1YENvqFW33tfkZN VJv/o7M3bNp6zDQeKw6ksavdZKHzZo2ehclHD4qqHJPCrweuWN4ikyFN7aWYEJQwWyKF dZ0DgxYyplPOGOLf85OWqLj64XccoT2gZzJDqgjGiX9JoCGzmkIM+kfKjL6JURNQJeMF FNMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=FwkWha3g7oAGpB4ws7tQE2d1Ep3IiBneyrvjPgo+ZlY=; b=QcFgnZx7oEXV5Zd4qAd+YxNHmEvsiNj64X4wVAjm6NA02yHqu2kDQGWaRFSbfKFAWT oFdbYCdBw1YlxqjyrdiJLEwyxJ83YMGA5fbf5PiI1gXoOSxVLuTjkfWRBXm+c7otgSmv XIZpqvcABpyMAI05Q+gve0vGs8BTEFvGIDIQPodqay4XSQlTg/TGxPezCjJlgD+nJNtx 97pYDdP8UuNEQYtBcL4lMxcf52Tat3SQ6IOW2F0zkgQ4JvARpLMdMokJtoaPnQneTN0K WGu+5f8JaixnFylUF9/oLgkz+zbTCT5kJO3cHpHW9W/WrZZBZpRDPfNKeZtCWluzeTnG mHjg== X-Gm-Message-State: AOAM5308OJ4WCChoaZZaaAPw2N0C1Xr3RG3Nyj3QBe/setfJWvpi7k9I W7S/3xuP9b/lODU7CXVe7qwFm0oe8P+k3VChYUU= X-Received: by 2002:a17:90a:644a:: with SMTP id y10mr18283260pjm.129.1612801300072; Mon, 08 Feb 2021 08:21:40 -0800 (PST) MIME-Version: 1.0 References: <20210208151244.16338-1-calvin.johnson@oss.nxp.com> <20210208151244.16338-16-calvin.johnson@oss.nxp.com> In-Reply-To: <20210208151244.16338-16-calvin.johnson@oss.nxp.com> From: Andy Shevchenko Date: Mon, 8 Feb 2021 18:21:22 +0200 Message-ID: Subject: Re: [net-next PATCH v5 15/15] net: dpaa2-mac: Add ACPI support for DPAA2 MAC driver To: Calvin Johnson Cc: Grant Likely , "Rafael J . Wysocki" , Jeremy Linton , Andrew Lunn , Florian Fainelli , Russell King - ARM Linux admin , Cristi Sovaiala , Florin Laurentiu Chiculita , Ioana Ciornei , Madalin Bucur , Heikki Krogerus , Marcin Wojtas , Pieter Jansen Van Vuuren , Jon , Saravana Kannan , Randy Dunlap , Laurentiu Tudor , Linux Kernel Mailing List , "linux.cj" , Diana Madalina Craciun , netdev , linux-arm Mailing List , ACPI Devel Maling List , "David S. Miller" , Ioana Radulescu , Jakub Kicinski Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 8, 2021 at 5:15 PM Calvin Johnson wrote: > > Modify dpaa2_mac_connect() to support ACPI along with DT. > Modify dpaa2_mac_get_node() to get the dpmac fwnode from either > DT or ACPI. > > Replace of_get_phy_mode with fwnode_get_phy_mode to get > phy-mode for a dpmac_node. > > Use helper function phylink_fwnode_phy_connect() to find phy_dev and > connect to mac->phylink. ... > + if (is_of_node(dev->parent->fwnode)) { > + dpmacs = of_find_node_by_name(NULL, "dpmacs"); > + if (!dpmacs) > + return NULL; > + parent = of_fwnode_handle(dpmacs); > + } else if (is_acpi_node(dev->parent->fwnode)) { > + parent = dev->parent->fwnode; dev_fwnode(dev->parent) ? > + } ... > + if (err) { > continue; > + } else if (id == dpmac_id) { Useless 'else' > + if (is_of_node(dev->parent->fwnode)) dev_fwnode() ? > + of_node_put(dpmacs); > + return child; > + } ... > + if (is_of_node(dev->parent->fwnode)) Ditto ? > + of_node_put(dpmacs); -- With Best Regards, Andy Shevchenko