Received: by 10.213.65.68 with SMTP id h4csp284271imn; Tue, 13 Mar 2018 04:25:05 -0700 (PDT) X-Google-Smtp-Source: AG47ELuQC4dCPJXQ7rWes3/gBhcCvZnAs8F5vxHyP/r9lEjlTU8ugsWE4RSIs7zyJvH4FeqXIRVO X-Received: by 2002:a17:902:20c2:: with SMTP id v2-v6mr265529plg.82.1520940305787; Tue, 13 Mar 2018 04:25:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520940305; cv=none; d=google.com; s=arc-20160816; b=EWXOCIE6C8HiVF8DWmZ6k5rd29rhcBaP3DiAi+V/QpuXcgi5pOn5dUrkCU63khuBHh U0nmEC3J3lIPGOy7nU7PbFmOIeLYlq1ZoTwl3QCjLVGrcTGxr1CamW9baVNLXLWcyPCF lGBTf6VG2SDoR9QtObClzKrp1Ue9kiEB9F4Km5cF+YAQvcguq/KNWA6RkS0eYXlZNQj9 y+otqqUJjU7MwS/J33PAnMOrqQn2tX+Se6Aiq+sVa2U2YLXKuNRx61ixiXdoBYh8aQ/d joC041A/R8XMO0HKfaK9aBom7dP6jk0mtlYDPF1fwRB/hKcjLD0tD2XzPLAXpto1x4FU UDoA== 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=E1KH3tONd4AhJ8+XrYnDe5dmUgw/tq+gCnHIs9n0dgA=; b=N5uAykzPf9m6as6KhIbhkePkXdd9eX8sZJJb7mJhnT06uuVJYe9QPaoeQrslGGOoNo DX8ZFPeUxbVG2Dn80UZf6DMK7HiV9Cb0k59CM3VfdH9r5roJTeT7ea2GKPzYYc8VLV5h dtbwFQaSxZMCNA1yISvaYRiHEYlu0i4n88bwYeCYme+HPRG9w0GHgaEvC4BJhyU1X1nO omjKOIbyu3TMgzCGMECCcsakAgadAy7j6RmyqBfiW6r5zuatG/DkR6TMaKhJJOoLU4Yh iPyH5vivHls+bV6dRuyUrVEsCZRUXez1y3wMXMbDl7ikH2oasjL3b6TZaNzsIfuTmeb1 CLUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=KA3J1Qe9; 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 g12-v6si75640pla.382.2018.03.13.04.24.51; Tue, 13 Mar 2018 04:25:05 -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=KA3J1Qe9; 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 S932930AbeCMLYA (ORCPT + 99 others); Tue, 13 Mar 2018 07:24:00 -0400 Received: from mail-ua0-f174.google.com ([209.85.217.174]:36824 "EHLO mail-ua0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932697AbeCMLX6 (ORCPT ); Tue, 13 Mar 2018 07:23:58 -0400 Received: by mail-ua0-f174.google.com with SMTP id j15so8924215uan.3 for ; Tue, 13 Mar 2018 04:23:58 -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=E1KH3tONd4AhJ8+XrYnDe5dmUgw/tq+gCnHIs9n0dgA=; b=KA3J1Qe9U1YOE8BKZLGWDWgXYKUoTrwBgxOMS1hsHf0TBaeaIiakY+vYb2fcxCCDQr jmzx2y7JNXyypyD3yRJSM/N6szrQjETJZSHqfbjk2sk4sEf+t3cOIbhaqsIDvvdGvbNB uowPkSIuRo/jDyTr6Yg0Hj6olSTX1sIwVUWs8= 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=E1KH3tONd4AhJ8+XrYnDe5dmUgw/tq+gCnHIs9n0dgA=; b=BaNw6YHVgEM49qEVLQTAvYs2IJVsnGVR76rXVq/Ltk3PXTpJ1pC6n9oaPoheHkRNCO nr8/qhujPYKmsSo4oY/3frUD6XRKSF8csbaHo2CNRk+GHBl4iX+e6YB6lTe9VUE7ShuB vT1+SZxa2NzT5Wmaxer6vdHRNdcWSXnnencZ+r631XtwAhIEIb6cou0Hbk4B3pQMDo+C zB9ZxH4VBMzY987aEoCdeBy1pqXSOhxNS4y2Ti5P5ireswKkbOMp1WeAZITQ46Yb/QwV rd8WM0KirjDJ0YjRXVk8uEDJcUpaKUlITmqGCcPomteTTC2lsy9XPqtsxaKL9k0t/LwF seDg== X-Gm-Message-State: AElRT7E+yJ9P0GZyVWxi5AiS0uP+vVdwxUqjsSvxIzGRd5lFcoFEQM52 ZOnwQiBPWwO4LjHOBFNQSj9wlAk1vJU= X-Received: by 10.159.56.2 with SMTP id p2mr182364uad.36.1520940237369; Tue, 13 Mar 2018 04:23:57 -0700 (PDT) Received: from mail-ua0-f176.google.com (mail-ua0-f176.google.com. [209.85.217.176]) by smtp.gmail.com with ESMTPSA id m8sm43297vkd.42.2018.03.13.04.23.55 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Mar 2018 04:23:56 -0700 (PDT) Received: by mail-ua0-f176.google.com with SMTP id q12so8924067uae.4 for ; Tue, 13 Mar 2018 04:23:55 -0700 (PDT) X-Received: by 10.159.52.101 with SMTP id s37mr185875uab.24.1520940234844; Tue, 13 Mar 2018 04:23:54 -0700 (PDT) MIME-Version: 1.0 Received: by 10.176.0.99 with HTTP; Tue, 13 Mar 2018 04:23:34 -0700 (PDT) In-Reply-To: References: <20180313085534.11650-1-vivek.gautam@codeaurora.org> <20180313085534.11650-2-vivek.gautam@codeaurora.org> From: Tomasz Figa Date: Tue, 13 Mar 2018 20:23:34 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v9 1/5] driver core: Find an existing link between two devices To: Vivek Gautam , "Rafael J . Wysocki" , Lukas Wunner Cc: 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 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? Best regards, Tomasz