From: Ingo Molnar Subject: Re: [PATCH 6/9] x86/iommu: change Calgary to use dma_ops register interface Date: Tue, 30 Sep 2008 13:10:28 +0200 Message-ID: <20080930111028.GC12529@elte.hu> References: <1222107681-8185-1-git-send-email-joerg.roedel@amd.com> <1222107681-8185-7-git-send-email-joerg.roedel@amd.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, iommu@lists.linux-foundation.org, David Woodhouse , Muli Ben-Yehuda , Amit Shah , Ingo Molnar , FUJITA Tomonori To: Joerg Roedel Return-path: Received: from mx2.mail.elte.hu ([157.181.151.9]:47146 "EHLO mx2.mail.elte.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752208AbYI3LLb (ORCPT ); Tue, 30 Sep 2008 07:11:31 -0400 Content-Disposition: inline In-Reply-To: <1222107681-8185-7-git-send-email-joerg.roedel@amd.com> Sender: kvm-owner@vger.kernel.org List-ID: * Joerg Roedel wrote: > +static int calgary_device_supported(struct device *dev) > +{ > + struct iommu_table *tbl; > + > + tbl = find_iommu_table(dev); > + > + return translation_enabled(tbl); > +} i guess this could be written as a simple: > +static int calgary_device_supported(struct device *dev) > +{ > + return translation_enabled(find_iommu_table(dev)); > +} ? Ingo