From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759163Ab0JHRdo (ORCPT ); Fri, 8 Oct 2010 13:33:44 -0400 Received: from e2.ny.us.ibm.com ([32.97.182.142]:59593 "EHLO e2.ny.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759093Ab0JHRdl (ORCPT ); Fri, 8 Oct 2010 13:33:41 -0400 From: Nishanth Aravamudan To: nacc@us.ibm.com Cc: miltonm@bga.com, Benjamin Herrenschmidt , Paul Mackerras , Grant Likely , Anton Blanchard , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [RFC PATCH 07/11] ppc/iommu: do not need to check for dma_window == NULL Date: Fri, 8 Oct 2010 10:33:08 -0700 Message-Id: <1286559192-10898-8-git-send-email-nacc@us.ibm.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1286559192-10898-1-git-send-email-nacc@us.ibm.com> References: <1286559192-10898-1-git-send-email-nacc@us.ibm.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The block in pci_dma_dev_setup_pSeriesLP for dma_window == NULL can be removed because we will only teminate the loop if we had already allocated a iommu table for that node or we found a window. While there may be no window for the device, the intresting part is if we are reusing a table or creating it for the first device under it. Signed-off-by: Milton Miller Signed-off-by: Nishanth Aravamudan --- arch/powerpc/platforms/pseries/iommu.c | 6 ------ 1 files changed, 0 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c index 0ae5a60..9d564b9 100644 --- a/arch/powerpc/platforms/pseries/iommu.c +++ b/arch/powerpc/platforms/pseries/iommu.c @@ -530,12 +530,6 @@ static void pci_dma_dev_setup_pSeriesLP(struct pci_dev *dev) } pr_debug(" parent is %s\n", pdn->full_name); - if (dma_window == NULL) { - pr_debug(" no dma window for device, linking to parent\n"); - set_iommu_table_base(&dev->dev, PCI_DN(pdn)->iommu_table); - return; - } - pci = PCI_DN(pdn); if (!pci->iommu_table) { tbl = kzalloc_node(sizeof(struct iommu_table), GFP_KERNEL, -- 1.7.1