Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1671658imu; Wed, 23 Jan 2019 23:11:52 -0800 (PST) X-Google-Smtp-Source: ALg8bN48g2LDIgP++f9yn02Lc0YqYhq6FWVdgRtIDbFGozVML6HZxkqA8BCTIL7NTy0HQBDlVcVs X-Received: by 2002:a63:7c41:: with SMTP id l1mr4843077pgn.45.1548313912726; Wed, 23 Jan 2019 23:11:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548313912; cv=none; d=google.com; s=arc-20160816; b=R/F0u3bnGpO1n5fj3ttNqLu2sDzlSfq9WbxG4tJzxpqNM81BLfLwbJ4HVI053LdIbU 3NouTXxTZ4sGGFKro8OjK36lnYqh4JRjyt/JIb3jTwE1ChzRvJ000x18k6ELRgYabtxH PYPKmhSUWxBTE0jtou3rqF67OCZRBdUa3XPlbxVayS0TbaP5ycMiTUxkRD8zlX7issCh Wc3or9/XWDafvYWdZwOdwD/E7ouYvdQZtkNtvYZI3Kth6sCq5rT7AH1oN4EGRE8M/vig hq0O36B1mtJKb/b5tFc/Lrm8jomqc0XDdJxsBNxGODbS3vrCDjOHsjspID1cxANeovb1 4SYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=CQ3kOXly+MTPNFzMZ6HrxU0RcT/mYHcIXC5r0TsjHsk=; b=hacCg+55/C4GU+RON7GVo0ZvmBrYxy082lwisWlaj1VIPjKMFS89NEyK0cAC5Q6fDK L/AJnS9Nwk0nbUuQPORuy8L/jHbX5a15dkLUs8AQRl9z6EWL4uvA4ayaZL3F/+mcMPBn MWtjI23IQQdG4/jduQdyhkR96EyS6ZBhM1MuTWI7sML2hCEoGlE5fmDCDAjTh9h/UWSq FMN6rFixa/ykSShDIwzOVop/+WzrbD91+ev3nsGDlyOCsFcaX1NiFpyXNT3INz+tZ6Ee Cr4H1IF1xx2sBUvnxnYCiWFFbdGzqy9o2+/E6G74KK5X6oYv5FlYTi6WtQiIY3AbtOFz bzjg== 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 l135si20107174pga.69.2019.01.23.23.11.37; Wed, 23 Jan 2019 23:11:52 -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 S1726199AbfAXHKm (ORCPT + 99 others); Thu, 24 Jan 2019 02:10:42 -0500 Received: from szxga06-in.huawei.com ([45.249.212.32]:60372 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725987AbfAXHKm (ORCPT ); Thu, 24 Jan 2019 02:10:42 -0500 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 96945ECE9E34F177EF68; Thu, 24 Jan 2019 15:10:40 +0800 (CST) Received: from localhost.localdomain (10.67.212.132) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.408.0; Thu, 24 Jan 2019 15:10:31 +0800 From: Shaokun Zhang To: , CC: Shaokun Zhang , Joerg Roedel , Robin Murphy , Zhen Lei Subject: [PATCH] iommu/dma: Remove unused variable Date: Thu, 24 Jan 2019 15:10:02 +0800 Message-ID: <1548313802-64412-1-git-send-email-zhangshaokun@hisilicon.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.67.212.132] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org end_pfn is never used after commit ('iommu/iova: Make dma 32bit pfn implicit'), cleanup it. Cc: Joerg Roedel Cc: Robin Murphy Cc: Zhen Lei Signed-off-by: Shaokun Zhang --- drivers/iommu/dma-iommu.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/iommu/dma-iommu.c b/drivers/iommu/dma-iommu.c index d19f3d6b43c1..77aabe637a60 100644 --- a/drivers/iommu/dma-iommu.c +++ b/drivers/iommu/dma-iommu.c @@ -289,7 +289,7 @@ int iommu_dma_init_domain(struct iommu_domain *domain, dma_addr_t base, { struct iommu_dma_cookie *cookie = domain->iova_cookie; struct iova_domain *iovad = &cookie->iovad; - unsigned long order, base_pfn, end_pfn; + unsigned long order, base_pfn; int attr; if (!cookie || cookie->type != IOMMU_DMA_IOVA_COOKIE) @@ -298,7 +298,6 @@ int iommu_dma_init_domain(struct iommu_domain *domain, dma_addr_t base, /* Use the smallest supported page size for IOVA granularity */ order = __ffs(domain->pgsize_bitmap); base_pfn = max_t(unsigned long, 1, base >> order); - end_pfn = (base + size - 1) >> order; /* Check the domain allows at least some access to the device... */ if (domain->geometry.force_aperture) { -- 2.7.4