Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp129839imu; Thu, 3 Jan 2019 15:41:27 -0800 (PST) X-Google-Smtp-Source: ALg8bN4PZv/RZLA3hz4FxO4O0G94ATHZYpBgzTG086tX4l3kbzlKOwOlbEXPcM016ILYMT94n5zC X-Received: by 2002:a63:1157:: with SMTP id 23mr18900342pgr.245.1546558887879; Thu, 03 Jan 2019 15:41:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546558887; cv=none; d=google.com; s=arc-20160816; b=EgjpkHitLV1hVNJJ6ObU4LuGsz9H+sfL7wCdI3Ox6xNTtBvHCZMIHaCvrTvXX0F/qN AKqW6IeTX6vsRqpQjOh6uDxkrBqtG6OtulX0iQCa6RnxNKt+cIqsSnwxl+9Ryq4bzLRc /ZSrIxKDq2XPHTdhsvRqQCzQuaP2raJ0UsfsE2G+UYLkWBmxXk2/iDlFnt39TAJ352HJ xI058HKmNcqIRkorH4Lt94FHGTDeqEYSv+mSJ7g8ZoDSEzbpwqgE4mjrfUW4PKAJMtjZ JB+zBnPh6QPa8DosStRV/71U4RKKuhN8R79oGFETX+V4j56LzA6PzW/TKirvhYs7Jom0 02Lg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date:dkim-signature; bh=mreadcjdbNQ1I9GP3yNsD3fBu449XnbyxPtxm37HA4c=; b=HhSYZTwRN3sYxa6UHv5PYUwa56OW123QRhMfW1lPYa9jAD8KViQjgqX8vbq/3xE4sT 5ju+9JQQFoJa0EmW16m1AptrYAHctuWxZsltSx0w/3RneqKEg+/Yf151aC+0gAu9tafX hhrgprK7hBwxXpMGuSk16oBdvA0kIhnK7epCo6MZhXlvWibZEhxRUBDIhYVzvAB+SKtg d3F4CLLOQ7UMG0qnplqB4POBGtxybKJlsrFzDF5QY0wU0MeFMi+ftacYezlao17nRZm5 cJkB/VBl23TGwAvZnMdkb1aK/A2EqrrBQ1PJCuUK4Gr4REjyh7N/Z6hE/D73ND8IKlqj Nxdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=1m08ovSS; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y10si8955880plt.406.2019.01.03.15.41.13; Thu, 03 Jan 2019 15:41:27 -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=@kernel.org header.s=default header.b=1m08ovSS; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732626AbfACRzB (ORCPT + 99 others); Thu, 3 Jan 2019 12:55:01 -0500 Received: from mail.kernel.org ([198.145.29.99]:43448 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728424AbfACRzA (ORCPT ); Thu, 3 Jan 2019 12:55:00 -0500 Received: from localhost (c-67-164-102-47.hsd1.ca.comcast.net [67.164.102.47]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 698D620815; Thu, 3 Jan 2019 17:54:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1546538100; bh=cx5/aIyE2OjbGfKc9XcMI2kcZJltMo12tCbM1unRiHY=; h=Date:From:To:cc:Subject:In-Reply-To:References:From; b=1m08ovSSQIXloyX2c8U3SeEdGNaHUFKt7FFxukBWLjeho1DsoEAYseOk00tSk6UAh wTSQtgwka4s6sw2bdm+sX9Ia+FOqy3GrxMpUtRc0apsZhGjVGDC8qVNvKISVoRFyMh LeeUoOTNV5QLrZVYeuWUhDjIQoIDymxyzDY1SouA= Date: Thu, 3 Jan 2019 09:54:58 -0800 (PST) From: Stefano Stabellini X-X-Sender: sstabellini@sstabellini-ThinkPad-X260 To: Huaisheng Ye cc: hch@lst.de, 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: Re: [PATCH] dma-mapping: remove unused attrs parameter to dma_common_get_sgtable In-Reply-To: <20190103082908.9988-1-yehs2007@zoho.com> Message-ID: References: <20190103082908.9988-1-yehs2007@zoho.com> User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 3 Jan 2019, Huaisheng Ye wrote: > From: Huaisheng Ye > > dma_common_get_sgtable has parameter attrs which is not used at all. > Remove it. > > Signed-off-by: Huaisheng Ye Acked-by: Stefano Stabellini FYI the patch doesn't apply cleanly to master. > --- > 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 > >