[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180314122326.GA19651@wunner.de>
Date: Wed, 14 Mar 2018 13:23:26 +0100
From: Lukas Wunner <lukas@...ner.de>
To: "Rafael J. Wysocki" <rjw@...ysocki.net>
Cc: Tomasz Figa <tfiga@...omium.org>,
Vivek Gautam <vivek.gautam@...eaurora.org>,
Joerg Roedel <joro@...tes.org>,
Rob Herring <robh+dt@...nel.org>,
Robin Murphy <robin.murphy@....com>,
"open list:IOMMU DRIVERS" <iommu@...ts.linux-foundation.org>,
devicetree@...r.kernel.org,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Mark Rutland <mark.rutland@....com>,
Will Deacon <will.deacon@....com>,
Rob Clark <robdclark@...il.com>,
Sricharan R <sricharan@...eaurora.org>,
Marek Szyprowski <m.szyprowski@...sung.com>,
Archit Taneja <architt@...eaurora.org>,
linux-arm-msm <linux-arm-msm@...r.kernel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: Re: [PATCH v9 1/5] driver core: Find an existing link between two
devices
On Wed, Mar 14, 2018 at 12:12:05PM +0100, Rafael J. Wysocki wrote:
> On Tuesday, March 13, 2018 12:23:34 PM CET Tomasz Figa wrote:
> > On Tue, Mar 13, 2018 at 7:34 PM, Vivek Gautam <vivek.gautam@...eaurora.org> wrote:
> > > On Tue, Mar 13, 2018 at 3:45 PM, Tomasz Figa <tfiga@...omium.org> wrote:
> > >> On Tue, Mar 13, 2018 at 5:55 PM, Vivek Gautam <vivek.gautam@...eaurora.org> wrote:
> > >>> The lists managing the device-links can be traversed to
> > >>> find the link between two devices. The device_link_add() APIs
> > >>> does traverse these lists to check if there's already a link
> > >>> setup between the two devices.
> > >>> So, add a new APIs, device_link_find(), to find an existing
> > >>> device link between two devices - suppliers and consumers.
> > >>
> > >> I'm wondering if this API would be useful for anything else that the
> > >> problem we're trying to solve with deleting links without storing them
> > >> anywhere. Perhaps a device_link_del_dev(consumer, supplier) would be a
> > >> better alternative?
> > >
> > > Yea, that sounds simpler i think. Will add this API instead of
> > > find_link(). Thanks.
> >
> > Perhaps let's wait for a moment to see if there are other opinions. :)
> >
> > Rafael, Lucas, any thoughts?
>
> It is not clear to me what the device_link_del_dev(consumer, supplier)
> would do.
The point appears to be that the pointer to the device_link need not be
stored somewhere for later deletion. The newly added function would
check if a device link exists and delete it if so.
However I don't understand why storing the pointer would be a problem?
Also, would using DL_FLAG_AUTOREMOVE avoid the need for the additional
function?
Thanks,
Lukas
Powered by blists - more mailing lists