From: "Rafael J. Wysocki" Subject: Re: [PATCH v9 1/5] driver core: Find an existing link between two devices Date: Wed, 14 Mar 2018 12:12:05 +0100 Message-ID: <2217404.A2W3Iek6du@aspire.rjw.lan> References: <20180313085534.11650-1-vivek.gautam@codeaurora.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Tomasz Figa Cc: Mark Rutland , devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Lukas Wunner , Greg Kroah-Hartman , Will Deacon , Linux Kernel Mailing List , "open list:IOMMU DRIVERS" , Rob Herring , linux-arm-msm List-Id: linux-arm-msm@vger.kernel.org On Tuesday, March 13, 2018 12:23:34 PM CET Tomasz Figa wrote: > On Tue, Mar 13, 2018 at 7:34 PM, Vivek Gautam > wrote: > > Hi Tomasz, > > > > On Tue, Mar 13, 2018 at 3:45 PM, Tomasz Figa wrote: > >> Hi Vivek, > >> > >> Thanks for the patch. > >> > >> On Tue, Mar 13, 2018 at 5:55 PM, Vivek Gautam > >> 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. Thanks, Rafael