Received: by 10.213.65.68 with SMTP id h4csp938910imn; Wed, 14 Mar 2018 04:59:58 -0700 (PDT) X-Google-Smtp-Source: AG47ELvV3yQ6Sij7SnUKn4xaOHic1559/a/rQFViO4j/IdX76p/hCzUn4bVuZhidW9SURsZj5ZLj X-Received: by 2002:a17:902:20eb:: with SMTP id v40-v6mr3834204plg.277.1521028798225; Wed, 14 Mar 2018 04:59:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521028798; cv=none; d=google.com; s=arc-20160816; b=gar+NWCa9arymLzSXlcU0meyMOcC/6ZSx5rp2CYprlfWUoCBfPKn3fbHi3diNwjms/ CJ5rO+lQawW2GGT2zOpu1aPmSN/Logg7pjKZzbcKz1+KF1r93eHAi+YhqaYBE57sFuR7 xDibPCe4lroXsFKXsMzCbFYMACT4nudebi0P6eRORSvlY/lPuRfG8eTOyBtLH29IHy40 +Av+UwVZEIkB76MAWIfmfgPf06M5qc+CW7BL23IymskhV5rPxZhCNN4lV3QaWgH8MV5c Z2+Sx2rUBHn4mGJuZpv4Be4/3FXi+24KyfUtuVBZ/RuVO4hTw4IUJQyKddGYazzjELb1 TtJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=HvYfP3YUuMdY9DDeYK1V3JFqAZQIIBqsiSsT1+Rp55o=; b=eAISolWUedOqFMIT4wDML7QWO5FDp6SN1yQ+phGL5wyrBTvYB2KUTUPDi9cRafMb53 ilIxGxOOxeYjJpKKmgpspzfb+rz7MUOqBenUPnVYhPPZWa1vdeCBfQUDr0W+AaXmgeEq g+FLD14MY0xZ/nqedXDEfWLWnD4TNLokEQKBB/3oWREc1Cz+RvDyMQTra9uUoXsWorxX AMH6jxT5yLTjKrPrYiX+KrNQmvHt8lKnFey2Q0A1HPH4dOjcvuKvHwHve7BMkaZcWUZu dLa2AJhmdclkobmwV5+qhk9O9wERoghKiG4OSTUowNLd7zFI/pXXTQVvq+4MGlVlsvws eApQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Dhg+JRX2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v14si1758870pgo.360.2018.03.14.04.59.43; Wed, 14 Mar 2018 04:59:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Dhg+JRX2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751946AbeCNL46 (ORCPT + 99 others); Wed, 14 Mar 2018 07:56:58 -0400 Received: from mail-vk0-f47.google.com ([209.85.213.47]:46649 "EHLO mail-vk0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751456AbeCNL45 (ORCPT ); Wed, 14 Mar 2018 07:56:57 -0400 Received: by mail-vk0-f47.google.com with SMTP id x125so1771661vkc.13 for ; Wed, 14 Mar 2018 04:56:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=HvYfP3YUuMdY9DDeYK1V3JFqAZQIIBqsiSsT1+Rp55o=; b=Dhg+JRX2EO4Cq5Z0j+V58FKHD27p+QHoAA8It5exWdFsyOC+te1GMp+VJa+/cSqXvw mybPyiIChIa28GCVqO93luXrmsRK0dlnn90m2PkZJmGa/rQk/FxZqWDAuc2QT5Kk6yuB ouA2JKuzscHhmLmw8U1FZC4TIZmgdF9n0rZAY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=HvYfP3YUuMdY9DDeYK1V3JFqAZQIIBqsiSsT1+Rp55o=; b=VOjAAo+zUsmItODvUY1+UCGaHE+zXWgOdBc+UgoKIFttHepeDxV5U6giyTT6H2XVCa CEs0iyjo6syFyYeFqWHs3UroggsgoM9qiKSbU8CWLzeAJEmCaM4FVohHqBPfyiVQ8AFT uQkk1/4K1aM4AUfJ8l2dCy1YQvgC26WHIGYnJaaTdFwq6ik5AUH4WjFNHjZTm1Xzrd9+ FZMvbzmNQ9hlEUUMoGxWW/cRcQCIgplwiGS4J/rIR3VyfNaNjcHp7wj0ZtxQ/orMeemu xEJ6VOXiUcVfCueWSWD6/irzIaLHk9E3V92KtBO31Nvba1pMHLwL+V7nE6sn/ZoPa1vM ggsg== X-Gm-Message-State: AElRT7GSrWT3mjcMkA6C88dMyp8h5LFSwaOXRtGx9HRzGChyGfFiqRzJ wXq6iW9Ay3zdrTnajpo4jKhzitql9Ys= X-Received: by 10.31.32.73 with SMTP id g70mr2962768vkg.170.1521028616628; Wed, 14 Mar 2018 04:56:56 -0700 (PDT) Received: from mail-ua0-f178.google.com (mail-ua0-f178.google.com. [209.85.217.178]) by smtp.gmail.com with ESMTPSA id b125sm1010259vkd.39.2018.03.14.04.56.56 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Mar 2018 04:56:56 -0700 (PDT) Received: by mail-ua0-f178.google.com with SMTP id m43so1868729uah.1 for ; Wed, 14 Mar 2018 04:56:56 -0700 (PDT) X-Received: by 10.176.68.197 with SMTP id n63mr2884848uan.132.1521028274882; Wed, 14 Mar 2018 04:51:14 -0700 (PDT) MIME-Version: 1.0 Received: by 10.176.0.99 with HTTP; Wed, 14 Mar 2018 04:50:54 -0700 (PDT) In-Reply-To: <2217404.A2W3Iek6du@aspire.rjw.lan> References: <20180313085534.11650-1-vivek.gautam@codeaurora.org> <2217404.A2W3Iek6du@aspire.rjw.lan> From: Tomasz Figa Date: Wed, 14 Mar 2018 20:50:54 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v9 1/5] driver core: Find an existing link between two devices To: "Rafael J. Wysocki" Cc: Vivek Gautam , Lukas Wunner , Joerg Roedel , Rob Herring , Robin Murphy , "open list:IOMMU DRIVERS" , devicetree@vger.kernel.org, Linux Kernel Mailing List , Mark Rutland , Will Deacon , Rob Clark , Sricharan R , Marek Szyprowski , Archit Taneja , linux-arm-msm , Greg Kroah-Hartman Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 14, 2018 at 8:12 PM, 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 >> 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. It would delete a link between consumer and supplier. Best regards, Tomasz