From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-20.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1EC0AC433DB for ; Tue, 16 Mar 2021 19:18:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EB78665130 for ; Tue, 16 Mar 2021 19:18:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236556AbhCPTSA (ORCPT ); Tue, 16 Mar 2021 15:18:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57950 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236531AbhCPTRf (ORCPT ); Tue, 16 Mar 2021 15:17:35 -0400 Received: from mail-ed1-x530.google.com (mail-ed1-x530.google.com [IPv6:2a00:1450:4864:20::530]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 366ADC06174A for ; Tue, 16 Mar 2021 12:17:23 -0700 (PDT) Received: by mail-ed1-x530.google.com with SMTP id w18so22916248edc.0 for ; Tue, 16 Mar 2021 12:17:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=yJC45Mn+RzMch54aRopaf8f4RskUe/2ksYXX6JxgcXQ=; b=YOPUQaYu61zNCEW0I+0VuGWO+jZ62N18lasnJhhq8o6+iiKFEp81+bfzEpT+OqjUgd 6cerNAFAA/uu4CteS1WQ6L3IgnqlVZwoDtfYAtfxR9xGPdrdNnuXux8fHctjnVFTpMYQ gIYFau0JEJGmtVSLYofnl7zDMbxVjmrpemoU+viB43FH0mYKC47dNA5WeBc93Z/L6FB7 M4djVFkpVgCs6I1BFXb6bZMcomTthdDmJkJxBf6Buq06raHBgINJ1Tg69iVv8OTsGIOe 5ydS/tloN2nzi++WPGP+IWNMPT42Wjpp32gF8RjHMMGLr9Yz+A9g8fP4FZ3VKzCWxYAZ bJpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=yJC45Mn+RzMch54aRopaf8f4RskUe/2ksYXX6JxgcXQ=; b=nmmq8BrcCW7mpRCyArmjw8hbEOhXk0VmEl9es/PJQXRkMtupnZYM9DoXgfZZUcEOF8 CbQxsRnLNSLHNunJLqT6RPeLnkisXsEKTdKWSUr/XraJqCFOmE7gAp0QGUg5XTHeIv/F bKzXdfNCKBvS86SZ0PPHSekWz5Obr3rTQWDwJGbyfSPJfgsb8yZeX/ix/qGzHyv3GVmB NY2+vo97mMlBgECyQ+I07rSePzGa2rgD1SlCculCRO4YNQrEvedd0dBWIgS2LEKNu70o Kvo7WdVXqFcSadHP+izSQGrUl5DbUGMuNw65w42kVnZWA70tLXCTflEPMp6Q93d2yKET +4yw== X-Gm-Message-State: AOAM53322m23vGxkG1D95Q67+yw2XQudN7aZnI6q23ZZm8ZwZioStLS/ Ft5nLR5Sicey+k2sddLK4sXVoA== X-Google-Smtp-Source: ABdhPJx3nc9W89NaX4LY5YY+hb8Y5rL7nTk4bzJZK45Hjhw7No1srHgvS4l5fnzAg1n6yI/g+XSKkA== X-Received: by 2002:aa7:de11:: with SMTP id h17mr4925753edv.83.1615922241789; Tue, 16 Mar 2021 12:17:21 -0700 (PDT) Received: from holly.lan (cpc141216-aztw34-2-0-cust174.18-1.cable.virginm.net. [80.7.220.175]) by smtp.gmail.com with ESMTPSA id lx6sm10006261ejb.64.2021.03.16.12.17.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Mar 2021 12:17:21 -0700 (PDT) Date: Tue, 16 Mar 2021 19:17:19 +0000 From: Daniel Thompson To: Calvin Johnson Cc: Grant Likely , "Rafael J . Wysocki" , Jeremy Linton , Andrew Lunn , Andy Shevchenko , 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 , linux-arm-kernel@lists.infradead.org, Diana Madalina Craciun , linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, linux.cj@gmail.com, netdev@vger.kernel.org, Laurentiu Tudor , "David S. Miller" , Heiner Kallweit , Jakub Kicinski Subject: Re: [net-next PATCH v7 04/16] of: mdio: Refactor of_phy_find_device() Message-ID: <20210316191719.d7nxgywwhczo7tyg@holly.lan> References: <20210311062011.8054-1-calvin.johnson@oss.nxp.com> <20210311062011.8054-5-calvin.johnson@oss.nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210311062011.8054-5-calvin.johnson@oss.nxp.com> Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org On Thu, Mar 11, 2021 at 11:49:59AM +0530, Calvin Johnson wrote: > Refactor of_phy_find_device() to use fwnode_phy_find_device(). > > Signed-off-by: Calvin Johnson This patch series is provoking depmod dependency cycles for me and it bisected down to this patch (although I think later patches in the series add further cycles). The problems emerge when running modules_install either directly or indirectly via packaging rules such as bindeb-pkg. ~~~ make -j16 INSTALL_MOD_PATH=$PWD/modules modules_install ... INSTALL sound/usb/misc/snd-ua101.ko INSTALL sound/usb/snd-usb-audio.ko INSTALL sound/usb/snd-usbmidi-lib.ko INSTALL sound/xen/snd_xen_front.ko DEPMOD 5.12.0-rc3-00009-g1fda33bf463d depmod: ERROR: Cycle detected: fwnode_mdio -> of_mdio -> fwnode_mdio depmod: ERROR: Found 2 modules in dependency cycles! ~~~ Kconfig can be found here: https://gist.github.com/daniel-thompson/6a7d224f3d3950ffa3f63f979b636474 This Kconfig file is for a highly modular kernel derived from the Debian 5.10 arm64 kernel config. I was not able to reproduce using the defconfig kernel for arm64. Daniel. > --- > > Changes in v7: None > Changes in v6: None > Changes in v5: None > Changes in v4: None > Changes in v3: None > Changes in v2: None > > drivers/net/mdio/of_mdio.c | 13 +------------ > 1 file changed, 1 insertion(+), 12 deletions(-) > > diff --git a/drivers/net/mdio/of_mdio.c b/drivers/net/mdio/of_mdio.c > index d5e0970b2561..b5e0b5b22f1a 100644 > --- a/drivers/net/mdio/of_mdio.c > +++ b/drivers/net/mdio/of_mdio.c > @@ -360,18 +360,7 @@ EXPORT_SYMBOL(of_mdio_find_device); > */ > struct phy_device *of_phy_find_device(struct device_node *phy_np) > { > - struct mdio_device *mdiodev; > - > - mdiodev = of_mdio_find_device(phy_np); > - if (!mdiodev) > - return NULL; > - > - if (mdiodev->flags & MDIO_DEVICE_FLAG_PHY) > - return to_phy_device(&mdiodev->dev); > - > - put_device(&mdiodev->dev); > - > - return NULL; > + return fwnode_phy_find_device(of_fwnode_handle(phy_np)); > } > EXPORT_SYMBOL(of_phy_find_device); > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DE40AC433E0 for ; Tue, 16 Mar 2021 19:19:09 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7D7C464EB9 for ; Tue, 16 Mar 2021 19:19:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7D7C464EB9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=FngZ+6hBVvU0bsk88rpwkJA9Ftuu/ZWVzwNZ5Ry1tu0=; b=qc5CgkNBl5/BttDFkPPTJreOU dtO1lodbyl8aTywlCNTpldMjvQkaYEGlsvjVuNAuCevd5D4SO3+iFeN6oE1qnflnbHIGVSavhuAwB kLmWEJyg5nLdZQj11wYLmsinO30VJVrBmHizfTHd2GWbW/fdMd3G49MRrjyYkcqH+C/3WzrYyj9Mx /DoObtlcFH5J5406Rbo+Odcu2hzFScPKNHC9MyMNGgylWq3Mn0my8ZEwvo7R+8xnb8XlR3SAbT2Jz F0alTll+J5WVuIIpu2ieZoD9UXnnDkM9uPmFE3GV31/ejxGY78YPoftnZ4h5X8a6PjJ8uHNKgRVDV fPL3PXQBQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lMFC3-001hVX-PX; Tue, 16 Mar 2021 19:17:28 +0000 Received: from mail-ed1-x529.google.com ([2a00:1450:4864:20::529]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lMFBz-001hUg-50 for linux-arm-kernel@lists.infradead.org; Tue, 16 Mar 2021 19:17:25 +0000 Received: by mail-ed1-x529.google.com with SMTP id bx7so22893910edb.12 for ; Tue, 16 Mar 2021 12:17:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=yJC45Mn+RzMch54aRopaf8f4RskUe/2ksYXX6JxgcXQ=; b=YOPUQaYu61zNCEW0I+0VuGWO+jZ62N18lasnJhhq8o6+iiKFEp81+bfzEpT+OqjUgd 6cerNAFAA/uu4CteS1WQ6L3IgnqlVZwoDtfYAtfxR9xGPdrdNnuXux8fHctjnVFTpMYQ gIYFau0JEJGmtVSLYofnl7zDMbxVjmrpemoU+viB43FH0mYKC47dNA5WeBc93Z/L6FB7 M4djVFkpVgCs6I1BFXb6bZMcomTthdDmJkJxBf6Buq06raHBgINJ1Tg69iVv8OTsGIOe 5ydS/tloN2nzi++WPGP+IWNMPT42Wjpp32gF8RjHMMGLr9Yz+A9g8fP4FZ3VKzCWxYAZ bJpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=yJC45Mn+RzMch54aRopaf8f4RskUe/2ksYXX6JxgcXQ=; b=GU/8dt68IOfSlV/y2ZbVay9gIImbygGjbJ9VumUJB5CXHAMnrCvwfTr5MQLH2wxN86 UxW8PVESOKxF6nYRhHX9SUFGmbsxC5RpTqBy3TNBHwfiRzBjKUxnv57IObqToQV2GD34 cwOxNQBZU8ZGSBdb7kd7QA6mX3xMCsSpap7uhoTeZsz2ibYB3tgxGcfKi9yYktrwF7vA ZTcXulrSGrjcHoZMjuj/1oIKROpZr3jExW3LUVP2dfQU5m2m2v4Wamhfzj11xGUjxuON hCN5Gp15ya8HQsyCkFWa1eDI8Fr2P4wM+C/bKZ7DkpAbPIz1dLcQprq19LBdkfnnCPrq kosQ== X-Gm-Message-State: AOAM531IUXGXvRjc9exTmBPW/oAC/DOiL7wKC0OhpHlGrVvsgU5Hc60N 4pClNlez9vX13UZ28E1tMeXazg== X-Google-Smtp-Source: ABdhPJx3nc9W89NaX4LY5YY+hb8Y5rL7nTk4bzJZK45Hjhw7No1srHgvS4l5fnzAg1n6yI/g+XSKkA== X-Received: by 2002:aa7:de11:: with SMTP id h17mr4925753edv.83.1615922241789; Tue, 16 Mar 2021 12:17:21 -0700 (PDT) Received: from holly.lan (cpc141216-aztw34-2-0-cust174.18-1.cable.virginm.net. [80.7.220.175]) by smtp.gmail.com with ESMTPSA id lx6sm10006261ejb.64.2021.03.16.12.17.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Mar 2021 12:17:21 -0700 (PDT) Date: Tue, 16 Mar 2021 19:17:19 +0000 From: Daniel Thompson To: Calvin Johnson Cc: Grant Likely , "Rafael J . Wysocki" , Jeremy Linton , Andrew Lunn , Andy Shevchenko , 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 , linux-arm-kernel@lists.infradead.org, Diana Madalina Craciun , linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, linux.cj@gmail.com, netdev@vger.kernel.org, Laurentiu Tudor , "David S. Miller" , Heiner Kallweit , Jakub Kicinski Subject: Re: [net-next PATCH v7 04/16] of: mdio: Refactor of_phy_find_device() Message-ID: <20210316191719.d7nxgywwhczo7tyg@holly.lan> References: <20210311062011.8054-1-calvin.johnson@oss.nxp.com> <20210311062011.8054-5-calvin.johnson@oss.nxp.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210311062011.8054-5-calvin.johnson@oss.nxp.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210316_191723_320509_1BBAC0B3 X-CRM114-Status: GOOD ( 19.63 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Mar 11, 2021 at 11:49:59AM +0530, Calvin Johnson wrote: > Refactor of_phy_find_device() to use fwnode_phy_find_device(). > > Signed-off-by: Calvin Johnson This patch series is provoking depmod dependency cycles for me and it bisected down to this patch (although I think later patches in the series add further cycles). The problems emerge when running modules_install either directly or indirectly via packaging rules such as bindeb-pkg. ~~~ make -j16 INSTALL_MOD_PATH=$PWD/modules modules_install ... INSTALL sound/usb/misc/snd-ua101.ko INSTALL sound/usb/snd-usb-audio.ko INSTALL sound/usb/snd-usbmidi-lib.ko INSTALL sound/xen/snd_xen_front.ko DEPMOD 5.12.0-rc3-00009-g1fda33bf463d depmod: ERROR: Cycle detected: fwnode_mdio -> of_mdio -> fwnode_mdio depmod: ERROR: Found 2 modules in dependency cycles! ~~~ Kconfig can be found here: https://gist.github.com/daniel-thompson/6a7d224f3d3950ffa3f63f979b636474 This Kconfig file is for a highly modular kernel derived from the Debian 5.10 arm64 kernel config. I was not able to reproduce using the defconfig kernel for arm64. Daniel. > --- > > Changes in v7: None > Changes in v6: None > Changes in v5: None > Changes in v4: None > Changes in v3: None > Changes in v2: None > > drivers/net/mdio/of_mdio.c | 13 +------------ > 1 file changed, 1 insertion(+), 12 deletions(-) > > diff --git a/drivers/net/mdio/of_mdio.c b/drivers/net/mdio/of_mdio.c > index d5e0970b2561..b5e0b5b22f1a 100644 > --- a/drivers/net/mdio/of_mdio.c > +++ b/drivers/net/mdio/of_mdio.c > @@ -360,18 +360,7 @@ EXPORT_SYMBOL(of_mdio_find_device); > */ > struct phy_device *of_phy_find_device(struct device_node *phy_np) > { > - struct mdio_device *mdiodev; > - > - mdiodev = of_mdio_find_device(phy_np); > - if (!mdiodev) > - return NULL; > - > - if (mdiodev->flags & MDIO_DEVICE_FLAG_PHY) > - return to_phy_device(&mdiodev->dev); > - > - put_device(&mdiodev->dev); > - > - return NULL; > + return fwnode_phy_find_device(of_fwnode_handle(phy_np)); > } > EXPORT_SYMBOL(of_phy_find_device); > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel