Received: by 10.213.65.68 with SMTP id h4csp253040imn; Tue, 13 Mar 2018 03:17:23 -0700 (PDT) X-Google-Smtp-Source: AG47ELuLxDG6NvY8nr2/dGvy5SCQ+EqubAdKpbTdoKwHPmYF+fkq2TO6yDm04tVn50riE2CEV7xL X-Received: by 10.99.96.130 with SMTP id u124mr51252pgb.252.1520936243629; Tue, 13 Mar 2018 03:17:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520936243; cv=none; d=google.com; s=arc-20160816; b=uGjoVBrfkfQ6hb83x8B8uXeX9DeVFjvaJNT5qTLDbBBhuXIOZodbELI1LnHhGp3Ksp 8SQAGl/9hh8DA5EV38CkDWjcy4XJ2rB6TZxWRCSV+KX5J9DuHybIohBQ850eaeQ7j0IS /G5GWQ8iQklB55MzRsSPcy/dzN6ahRvglzLubxqqTHPTLjG7d+dYFNkmcogSRwmZvSp6 DpDMdnuF86S29DQkcKmWwpF15dz5paw6MYYVi41az6NvMFji++QBzuNbuaEzSMkTpzip PbeF92cmlPwOB6YwPBqg5lTWp1i5el8LcU/X+iVZA65+yhLJ6sZYZYUmleHYJYPR4Wil D/lQ== 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=tXurIzgDS2GGSfwF44rS8YEpF2qAvmRarzvu2PLKcck=; b=zVfUsWT+3eZC5iJzgzZg32NbI11rP6mgNmgwgX9XmCJDdRWfIVN1mj9o7PeM+acF+k q4fD/8O5rElqoqqeVuVv+etqp7Fn6pqMLbnxkvXo/5bG3YKkFth/9KKpvgP76L8Oh7MH m+55OBXCuD2O1mIykeOup/vpbvMjtcF0S/W9riwE5dg06NtMheoWpnLidNHIXLZRpp/1 Y1QNTpyi/ynuqLUzoNhdVWh/csQCkhuXIcK8t4kFS9ZSTg2cEJatcg5mBx/iFLNYIiDf cAJkzaK0heWUGMMooVVQVo+4hTyRhj3Az1r65pQHg3Nu2UYcMXrJ+kAoa971esoGXfKq iH9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=CEL4BuMs; 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 v14si15314pgo.360.2018.03.13.03.17.09; Tue, 13 Mar 2018 03:17:23 -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=CEL4BuMs; 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 S932582AbeCMKPe (ORCPT + 99 others); Tue, 13 Mar 2018 06:15:34 -0400 Received: from mail-vk0-f53.google.com ([209.85.213.53]:45163 "EHLO mail-vk0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932521AbeCMKPd (ORCPT ); Tue, 13 Mar 2018 06:15:33 -0400 Received: by mail-vk0-f53.google.com with SMTP id k187so8093245vke.12 for ; Tue, 13 Mar 2018 03:15:32 -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=tXurIzgDS2GGSfwF44rS8YEpF2qAvmRarzvu2PLKcck=; b=CEL4BuMsVz30B0wyX8RQvz1JjdPJhkUF+BZFlBJkWOuTZj+5Xsd866IKD3YAAHM11y cFiC/vhxXhL5uekzA9NrnGBV2m8exB56umzcSagOUV9/O7uuacqhMmIW8RWIh/eyvLGe 0JLrQc4HD4PNyVrjLDoTvLsOZILrlZ1g8liq8= 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=tXurIzgDS2GGSfwF44rS8YEpF2qAvmRarzvu2PLKcck=; b=tx/5UK1C8NTxmi9bQ4oD4wdy//SJTomMHxTrx8zgxwnveQaOizkNqoYwJwt0CkDQOw gEfRb8KnUThbZ8FNWSnZmYRWMVSJ9dK58IwWJy8nG31pdXfX/xYAZ8wEr/GANGtBUlQf yFjZL4BOocjhhk+9CZR0tWndN2klvLXD6ioSdw68SxrUc17jacKOBUzRajQaArBuHPdg h3tt4UZWlaLcvP06cEEExaK1o3luo0X3w4DalMja8off/Lbyec8fsBwvm+X8HUfJCs3d 6UoGaI/vCWEjw6Hr/Hii3LCAkCqTs+LFJQJnWlMmxZfzWKKzv7NuATb+UtCRIBrUMa4X gsFw== X-Gm-Message-State: AElRT7HYR2lWalL7v4KQ8fhWQepW3LgNfI3LgDGya8QFmmX6pLClX49/ GahWWbD3GLQ2S2q3rIRJKWSSBFPxdGY= X-Received: by 10.31.24.149 with SMTP id 143mr38328vky.168.1520936132136; Tue, 13 Mar 2018 03:15:32 -0700 (PDT) Received: from mail-vk0-f49.google.com (mail-vk0-f49.google.com. [209.85.213.49]) by smtp.gmail.com with ESMTPSA id 101sm2887264uav.52.2018.03.13.03.15.29 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Mar 2018 03:15:30 -0700 (PDT) Received: by mail-vk0-f49.google.com with SMTP id t126so8114747vkb.11 for ; Tue, 13 Mar 2018 03:15:29 -0700 (PDT) X-Received: by 10.31.173.209 with SMTP id w200mr9635vke.179.1520936128838; Tue, 13 Mar 2018 03:15:28 -0700 (PDT) MIME-Version: 1.0 Received: by 10.176.0.99 with HTTP; Tue, 13 Mar 2018 03:15:08 -0700 (PDT) In-Reply-To: <20180313085534.11650-2-vivek.gautam@codeaurora.org> References: <20180313085534.11650-1-vivek.gautam@codeaurora.org> <20180313085534.11650-2-vivek.gautam@codeaurora.org> From: Tomasz Figa Date: Tue, 13 Mar 2018 19:15:08 +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 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 , "Rafael J . Wysocki" , 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 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? Best regards, Tomasz