Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp384692ybv; Wed, 19 Feb 2020 01:30:26 -0800 (PST) X-Google-Smtp-Source: APXvYqxs3EVBdLIrby5fEJCVwJbwyEowQadZgbAGk6Okxh1ccznOgSiYm4xMGOIBtVbiSHQKyp/w X-Received: by 2002:a9d:171a:: with SMTP id i26mr14516578ota.202.1582104626820; Wed, 19 Feb 2020 01:30:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582104626; cv=none; d=google.com; s=arc-20160816; b=SDpw6OG0jFHV0t0j6EQB+D3HmPoSNpD1Q0VBD43p9zzKRb+NaAQLuKED9G3yJyl1g0 qqG06MPTGWyjMle6cXduC8mL1rK2ED2kxqKywkDjJKv9MbRE0ck6YAqiAx0w5cUodWl0 jLQOqk9qOQ2zZKcEp4+Q7WFCek0jI2Tpf8aCfxQaN4J50FK2tQiIqXPx9udrevmYfz1M n4w7NeFL/D6YDSS+pnHu/tZ4+m6C+A/Nh5e1IxbpavzaAeerzl6K4/KtkvE1zxHMAJUF bdV9YeDx2gmd2OXfJWgy3nv7SEVAuTcxc6AgjccI8DcIEwQbA/fmdM0R/JW7lRushyui +WFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=vY/TIT9xta6k/JFdXtAbxY77umPo9z4AZvVgvp/dLeU=; b=aKmSWCYx5cQFViu0+WARcv52gENn8d/k379ioQpO8LufgX3rpI+1KDK0UYEuViOkp0 tXV4k93pxo1tMyJbvs55ePk0nMeDMGhYaaSjHk9w3PPQoe4GachkM70b/o7mrQFTvmuT Jx/r3cV2Ligd9stnnt83Ho9UpEdrx435NGakghEKKygmHKvupyOiD1POUOuL+22hirQj MUqnrUnXsBpTEO+GuH7/yNUvdpxkOCZaMkGxFPRZ+WGuydkie9YrDzDTxo2I1D6H0+81 xDIz9/RL5KuqxQyE716aui/sKtr9Xia5etFN0iI4iWalCcvD1cb9XgpI973ErbEilSbE YBJw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 73si8749936oii.60.2020.02.19.01.30.14; Wed, 19 Feb 2020 01:30:26 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726622AbgBSJ3i (ORCPT + 99 others); Wed, 19 Feb 2020 04:29:38 -0500 Received: from mx2.suse.de ([195.135.220.15]:46152 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726195AbgBSJ3i (ORCPT ); Wed, 19 Feb 2020 04:29:38 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 885C2B2CC; Wed, 19 Feb 2020 09:29:36 +0000 (UTC) Date: Wed, 19 Feb 2020 10:29:34 +0100 From: Joerg Roedel To: Christoph Hellwig Cc: Joerg Roedel , Lu Baolu , David Woodhouse , iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/5] iommu/vt-d: Add attach_deferred() helper Message-ID: <20200219092934.GJ23114@suse.de> References: <20200217193858.26990-1-joro@8bytes.org> <20200217193858.26990-2-joro@8bytes.org> <20200218171454.GA7067@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200218171454.GA7067@infradead.org> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 18, 2020 at 09:14:54AM -0800, Christoph Hellwig wrote: > > +static bool attach_deferred(struct device *dev) > > +{ > > + return dev->archdata.iommu == DEFER_DEVICE_DOMAIN_INFO; > > +} > > This is not a very useful helper. Depends on what one considers useful. I think such helpers make the code better readable, which is pretty useful to me. Regards, Joerg