Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp560117imu; Thu, 3 Jan 2019 03:04:46 -0800 (PST) X-Google-Smtp-Source: ALg8bN50M0kihQcLPajTgpTOigR5zZZHSuPNnOVNdqTqlJvcFOvTKhRP77ujT90N/ZQHKLxAvrJ6 X-Received: by 2002:a63:a30a:: with SMTP id s10mr15521080pge.234.1546513486611; Thu, 03 Jan 2019 03:04:46 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1546513486; cv=pass; d=google.com; s=arc-20160816; b=Pk/gnTuykr1gPP9N4SordEMSfPmjGaxYZQtJ9nOQ6z5zMRkTjVbjXALHvyhrnH1mWo QnPZoTbE6xf485f8lrflpM2LpthGWRqThUwxRZAnCria0zyZDwEn2Ua0bIAJzFJzny/t e4sKQlQMPEl+Z2e6LzWpPJHfuWIn5C2TRiWJZe6HGjMN8ljFiQTlFIN+bp2wX4itU4lM 94NWpjK5eldD6L1mL3mbX8cvnaw7mwgCOXu/4pQ02WEgt/Lpz3fPO90ZPUkuUTBac0Wb w/kWjmYqoAyckplhGAIEyWJcq9sO6KIi/DcZnpm3VlyWTyTF7qbV0r3rAkG/aGnYlMk+ g1bQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:domainkey-signature; bh=GLMplAc/1wyRSa54blzN1TjGuBt+nMTrWiVLprHbzdQ=; b=NO4iDouJew3M3vEmu1h520CryPpcNHSgtfEK2/yrIcUGgwm1NiW7Z9eMGXkrhyHrez tvoWT097/eMybx1OA5idCT44xvtkEOlQERBfGHY5Ezy6qnOdCygaZMNafBziHOC/WkRn DngRgMRjcgvvHiX4z2y6agPcH44s4agR3mbZ9rUlCRglwfahMmJgs0PynFXYUKS384o4 ANnLSIUy9BLZ2WoSDE0Pu9gV4ssgWv5jZsMF6RFUuScbkMVwUgkOoVCtpkJb8twNqknE XFs1kfCmzlQLJ73zYYta20p9BGVvdkKnRlhFVOqza2fL9x4U7JDyJRjVEl6UUVRPrgEZ XDVw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@zoho.com header.s=default header.b="Pnkv4/Cf"; arc=pass (i=1 spf=pass spfdomain=zoho.com dkim=pass dkdomain=zoho.com dmarc=pass fromdomain=zoho.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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=zoho.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g17si51641935pgi.578.2019.01.03.03.04.31; Thu, 03 Jan 2019 03:04:46 -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; dkim=pass header.i=@zoho.com header.s=default header.b="Pnkv4/Cf"; arc=pass (i=1 spf=pass spfdomain=zoho.com dkim=pass dkdomain=zoho.com dmarc=pass fromdomain=zoho.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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=zoho.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730239AbfACI3w (ORCPT + 99 others); Thu, 3 Jan 2019 03:29:52 -0500 Received: from sender-pp-092.zoho.com ([135.84.80.237]:25462 "EHLO sender-pp-092.zoho.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730160AbfACI3w (ORCPT ); Thu, 3 Jan 2019 03:29:52 -0500 ARC-Seal: i=1; a=rsa-sha256; t=1546504178; cv=none; d=zoho.com; s=zohoarc; b=ClQSrW8KJDY89PhJhQ/AYD8XONVvWY/88WRkqylbr9jSpiPY5vvJJEb3xvF4C+MKuBigIidMZ0cQUy/ceX7ERJbUuvC2hgDZjlRqTStm3guzBIyVeFuEnKCrGmrGY8dsHVM1hWRDxhYgSOvG7h10/6DS3lkJBtoCc/RssuJKgv8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1546504178; h=Cc:Date:From:Message-ID:Subject:To:ARC-Authentication-Results; bh=GLMplAc/1wyRSa54blzN1TjGuBt+nMTrWiVLprHbzdQ=; b=bzdLU5vUkPSI6mcpUrvjyMbjJGzlkLC/bv/aKQ/sBa+aYFVhvve/P4qBTeuCf7bnPZ2fTtU3W/+nUsmd2k7xgPccTPd/n/u+hl+F1Ty+s4a1STFumK0hvg8yOVfFC9KR3sll8eYlW4b5SNO7dtI8bviAmRLaYSOhihqwMuoxoiA= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass header.i=zoho.com; spf=pass smtp.mailfrom=yehs2007@zoho.com; dmarc=pass header.from= header.from= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=zapps768; d=zoho.com; h=from:to:cc:subject:date:message-id; b=pr6xA8zCoY6gLhtkivV8lXSzO1FYiDAd9DzUJFg/YnH9QzDG72PmDix+KoYQq2A64cqkLwUFOVmJ UyMXI/OLReF/9fjntNS9LcoU5pqrkUZeYYaMGHtG0Pp8YbHQOtD/ DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1546504178; s=default; d=zoho.com; i=yehs2007@zoho.com; h=From:To:Cc:Subject:Date:Message-Id; l=2370; bh=GLMplAc/1wyRSa54blzN1TjGuBt+nMTrWiVLprHbzdQ=; b=Pnkv4/Cf2YAzoL+HEcKlCJDuNI49IkxDX1PTf/blczzGCMxQkU4HNUM7PlgktWF+ An0RUXSkHJFYizI5osUEwBoB8JjAAd4wjtJti9ggudL/YZp633LCl58WozmIqjQGKXT Ly9plaP0aCc3iLryx+Ri853Y/5qaElNhf0AydOKs= Received: from YEHS1XR956R00D1.lenovo.com (106.38.1.115 [106.38.1.115]) by mx.zohomail.com with SMTPS id 1546504176699644.4196842856686; Thu, 3 Jan 2019 00:29:36 -0800 (PST) From: Huaisheng Ye To: hch@lst.de Cc: konrad.wilk@oracle.com, boris.ostrovsky@oracle.com, jgross@suse.com, sstabellini@kernel.org, m.szyprowski@samsung.com, robin.murphy@arm.com, linux-kernel@vger.kernel.org, chengnt@lenovo.com, xen-devel@lists.xenproject.org, iommu@lists.linux-foundation.org, Huaisheng Ye Subject: [PATCH] dma-mapping: remove unused attrs parameter to dma_common_get_sgtable Date: Thu, 3 Jan 2019 16:29:08 +0800 Message-Id: <20190103082908.9988-1-yehs2007@zoho.com> X-Mailer: git-send-email 2.17.0.windows.1 X-ZohoMailClient: External Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Huaisheng Ye dma_common_get_sgtable has parameter attrs which is not used at all. Remove it. Signed-off-by: Huaisheng Ye --- drivers/xen/swiotlb-xen.c | 2 +- include/linux/dma-mapping.h | 5 ++--- kernel/dma/mapping.c | 3 +-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/xen/swiotlb-xen.c b/drivers/xen/swiotlb-xen.c index 2a7f545..2dc17a5 100644 --- a/drivers/xen/swiotlb-xen.c +++ b/drivers/xen/swiotlb-xen.c @@ -697,7 +697,7 @@ static void xen_swiotlb_unmap_page(struct device *hwdev, dma_addr_t dev_addr, handle, size, attrs); } #endif - return dma_common_get_sgtable(dev, sgt, cpu_addr, handle, size, attrs); + return dma_common_get_sgtable(dev, sgt, cpu_addr, handle, size); } static int xen_swiotlb_mapping_error(struct device *dev, dma_addr_t dma_addr) diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h index d327bdd..bbfad44 100644 --- a/include/linux/dma-mapping.h +++ b/include/linux/dma-mapping.h @@ -483,7 +483,7 @@ void *dma_common_pages_remap(struct page **pages, size_t size, int dma_common_get_sgtable(struct device *dev, struct sg_table *sgt, void *cpu_addr, - dma_addr_t dma_addr, size_t size, unsigned long attrs); + dma_addr_t dma_addr, size_t size); static inline int dma_get_sgtable_attrs(struct device *dev, struct sg_table *sgt, void *cpu_addr, @@ -495,8 +495,7 @@ void *dma_common_pages_remap(struct page **pages, size_t size, if (ops->get_sgtable) return ops->get_sgtable(dev, sgt, cpu_addr, dma_addr, size, attrs); - return dma_common_get_sgtable(dev, sgt, cpu_addr, dma_addr, size, - attrs); + return dma_common_get_sgtable(dev, sgt, cpu_addr, dma_addr, size); } #define dma_get_sgtable(d, t, v, h, s) dma_get_sgtable_attrs(d, t, v, h, s, 0) diff --git a/kernel/dma/mapping.c b/kernel/dma/mapping.c index 58dec7a..6b33f10 100644 --- a/kernel/dma/mapping.c +++ b/kernel/dma/mapping.c @@ -202,8 +202,7 @@ void dmam_release_declared_memory(struct device *dev) * Create scatter-list for the already allocated DMA buffer. */ int dma_common_get_sgtable(struct device *dev, struct sg_table *sgt, - void *cpu_addr, dma_addr_t dma_addr, size_t size, - unsigned long attrs) + void *cpu_addr, dma_addr_t dma_addr, size_t size) { struct page *page; int ret; -- 1.8.3.1