Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp4465834pxf; Tue, 16 Mar 2021 14:22:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwIneiEm692hUlD8MazljgZd6/6SmHGtcFU1G71IqwLaUcn7RwMMktM9ktagVcud9cbZNUj X-Received: by 2002:a17:906:71d3:: with SMTP id i19mr32380321ejk.347.1615929758712; Tue, 16 Mar 2021 14:22:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615929758; cv=none; d=google.com; s=arc-20160816; b=UkqGN0t2AinYd5Gdf8b5Dqv/iGWvB96vYWf90b1fmC2IQ7g3I5XV2cixNkbMZTTZk5 9vaprl2GT2SpF5xtPVjyAq9V8XirVZdHt0R4n7t8xxhPIqAlyCBhr2GS/+sW6AQriHxt KY+ww4UTyKaJ+QyCgjb7ye3+MDAfNJwnUjkIPsupWVwOlkeUoaUcmjII5BunYcNBXzGb BkORhEtF7cXDqZYEVQGYMUc/jYPWlOvWYV6yjEev3v5FAbH+TyKvSahcW2gWL9Idv+f2 qW8cDnyIZX4zkFlkEjoNw67T6eHoxTHfJyVkh+3kwgHkyiOeQdh+a2xqVMD0v2m+VzpY QJkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=yJC45Mn+RzMch54aRopaf8f4RskUe/2ksYXX6JxgcXQ=; b=A3gm2CyJf5c5iCbwn0rZh2VO2T21/ILksK+ovc9V79w2EI7lotUYDUD9Gb+1QDzKeR etjVE/I6BSSWGjG1sFANVQTRa2nN8bcxDxBK5o7eDiqOK2qsgeH0SyRp4Zs3NnL+mJ1z kaJkCKWv5GZHBEWyZLOXUqWqeL1UJW0SKS4GAxVesxi/7KfY8Nj5Bf97SLNnM2rgCqNw TviAXSAcRLzLny/jKMwC/cahxskVi90IpFURqglX+7DbQo9IitMATbLyXHj7gEaMdd1j 6G3oUGchEw5UZkMmM3Yi7/aAbv+N/NqTrWoC4HjlKwEW5SdB4ZQNtyaOksYnHwaf9xu7 chlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YOPUQaYu; 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=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i17si18087058ejo.365.2021.03.16.14.22.16; Tue, 16 Mar 2021 14:22:38 -0700 (PDT) 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=@linaro.org header.s=google header.b=YOPUQaYu; 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=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231649AbhCPTR2 (ORCPT + 99 others); Tue, 16 Mar 2021 15:17:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57954 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236614AbhCPTRY (ORCPT ); Tue, 16 Mar 2021 15:17:24 -0400 Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [IPv6:2a00:1450:4864:20::535]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 437B0C06175F for ; Tue, 16 Mar 2021 12:17:23 -0700 (PDT) Received: by mail-ed1-x535.google.com with SMTP id e7so22878387edu.10 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=iCbw6+GoWT/T5mquekzULzN/axCcezhvFlp0UGgQh1nVzh0kqvf4p3PmIR1RNtjEWQ r7jJqVK7kGOxwJQ359uBC7YRTYs5vSbDHLyJ+dauZmnabp4TVbM0SwJi8Bp2Ad8knL+C p3yZUI48oYYNTleqbpAzJH+Oeos+fj8lwUnoyz/N0BcnR/QkOCNAnrUtxAQN0Ed0OPui 6UQwqcXKYXozrgT8TdaYnY18/Ii6xziGOKrXl2Ev5MDq2MyitR5F4dMiHPsCB5Ygtia8 iJyjH7KaEw/hin25E0e0FiWwK+stbXk5dSq/ia3IK9/Rhj4yWXSUpUsVd0jemKO5G7FU kOKg== X-Gm-Message-State: AOAM531IY070PLQrfJDakxPL1pUuPyD4CF7Pd1KvTm0k/46wSdBrl95L kxoJqCeH4s/ukNJZSa8E98vtyaks2BnyyLL+ 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-kernel@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); >