public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Chen <hzpeterchen@gmail.com>
To: Stephan Gerhold <stephan@gerhold.net>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Peter Chen <Peter.Chen@nxp.com>,
	Kishon Vijay Abraham I <kishon@ti.com>,
	"open list:ULTRA-WIDEBAND (UWB) SUBSYSTEM:" 
	<linux-usb@vger.kernel.org>, Thierry Reding <treding@nvidia.com>
Subject: Re: Infinite recursion in device_reorder_to_tail() due to circular device links
Date: Thu, 14 Jan 2021 08:54:54 +0800	[thread overview]
Message-ID: <20210114005454.GA14220@b29397-desktop> (raw)
In-Reply-To: <X/7XCzdDG7kbiNfM@gerhold.net>

On 21-01-13 12:18:35, Stephan Gerhold wrote:
> 
> Also, on a completely different note I looked again at the chipidea USB
> driver that produces this situation. To request the PHY (which ends up
> in the circular device link) it does:
> 
> 	/* Look for a generic PHY first */
> 	ci->phy = devm_phy_get(dev->parent, "usb-phy");
> 
> To me it doesn't really seem great to use the devm_* helpers on the
> parent device either, so I will check if I can refactor this somehow.
> Perhaps this situation can be prevented entirely.
> 

Hi Stephan,

You could try to get the PHY at parent driver
(drivers/usb/chipidea/ci_hdrc_msm.c) to see the difference.

-- 

Thanks,
Peter Chen


  reply	other threads:[~2021-01-14  1:47 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-11 18:43 Infinite recursion in device_reorder_to_tail() due to circular device links Stephan Gerhold
2021-01-12 14:32 ` Rafael J. Wysocki
2021-01-12 18:04   ` Greg Kroah-Hartman
2021-01-23 23:37     ` Hugh Dickins
2021-01-24  8:13       ` Greg Kroah-Hartman
2021-01-24 20:06         ` Hugh Dickins
2021-01-12 18:24   ` Rafael J. Wysocki
2021-01-13 11:18     ` Stephan Gerhold
2021-01-14  0:54       ` Peter Chen [this message]
2021-01-14  8:17         ` Stephan Gerhold

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210114005454.GA14220@b29397-desktop \
    --to=hzpeterchen@gmail.com \
    --cc=Peter.Chen@nxp.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kishon@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=stephan@gerhold.net \
    --cc=treding@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox