From patchwork Tue Feb 25 07:44:17 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Rashika X-Patchwork-Id: 3713271 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 017999F2F7 for ; Tue, 25 Feb 2014 07:44:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E6879201BF for ; Tue, 25 Feb 2014 07:44:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 006182018E for ; Tue, 25 Feb 2014 07:44:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750899AbaBYHom (ORCPT ); Tue, 25 Feb 2014 02:44:42 -0500 Received: from mail-pa0-f51.google.com ([209.85.220.51]:43828 "EHLO mail-pa0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750735AbaBYHok (ORCPT ); Tue, 25 Feb 2014 02:44:40 -0500 Received: by mail-pa0-f51.google.com with SMTP id ld10so7783704pab.38 for ; Mon, 24 Feb 2014 23:44:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=zi9Dz5GiDgxCGrH/NdHqcHRZoicuqr0Z5vzPh+2AT5o=; b=fy6/s7qkQ+53P9DT/1EyQe+1vAEsJAKoAMXYYsubbsoTpP5wWQJka4WfciHXm8xtJL UlkOag7xM1E0RY9Y0HpDXlEs6OToasG+QfHeUpUnx24Ww5a4IAt5YXYuyX5OSj/dhcFq IT6mjP7ZLx4v+YsLsK2yAe4jEuEZz4lT692GgNZtNF+AgnCyrU7+4Be/XFluB3iBkCgX y+1TjxcPtpWQBfdyeDxHIFY49tHPkaFb6JNbm+MlfvYlZ6NuXSfNQPv5oJmqYRKu5wNj 8/eqVn6K03YJeqJK7bX/RqfvS3LZtEq38s5p+NyIRnyDUk3wnf0XLQKss3QcqmoLqJjR JvDg== X-Received: by 10.68.200.74 with SMTP id jq10mr4679098pbc.169.1393314280171; Mon, 24 Feb 2014 23:44:40 -0800 (PST) Received: from rashika ([14.98.22.111]) by mx.google.com with ESMTPSA id dc4sm7484977pbc.34.2014.02.24.23.44.31 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 24 Feb 2014 23:44:39 -0800 (PST) Date: Tue, 25 Feb 2014 13:14:17 +0530 From: Rashika Kheria To: linux-kernel@vger.kernel.org Cc: Tony Luck , Fenghua Yu , Bjorn Helgaas , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, Konrad Rzeszutek Wilk , Rashika Kheria , "Rafael J. Wysocki" , Toshi Kani , Yijing Wang , Greg Kroah-Hartman , linux-ia64@vger.kernel.org, linux-pci@vger.kernel.org, josh@joshtriplett.org Subject: [PATCH 3/8] lib: Move prototype declaration to header file include/linux/swiotlb.h Message-ID: References: <7bf34999aea7f3d1441dc8fc344882a814da6e06.1393313946.git.rashika.kheria@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <7bf34999aea7f3d1441dc8fc344882a814da6e06.1393313946.git.rashika.kheria@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, KHOP_BIG_TO_CC, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Move prototype declaration of function to header file include/linux/swiotlb.h from arch/ia64/hp/common/hwsw_iommu.c, arch/ia64/hp/common/sba_iommu.c and arch/x86/pci/sta2x11-fixup.c because it is used by more than one file. This eliminates the following warning in lib/swiotlb.c: lib/swiotlb.c:240:1: warning: no previous prototype for ‘swiotlb_late_init_with_default_size’ [-Wmissing-prototypes] lib/swiotlb.c:537:13: warning: no previous prototype for ‘map_single’ [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- arch/ia64/hp/common/hwsw_iommu.c | 3 --- arch/ia64/hp/common/sba_iommu.c | 2 -- arch/x86/pci/sta2x11-fixup.c | 1 - include/linux/swiotlb.h | 4 +++- 4 files changed, 3 insertions(+), 7 deletions(-) diff --git a/arch/ia64/hp/common/hwsw_iommu.c b/arch/ia64/hp/common/hwsw_iommu.c index 1e4cae5..b14cab1 100644 --- a/arch/ia64/hp/common/hwsw_iommu.c +++ b/arch/ia64/hp/common/hwsw_iommu.c @@ -20,9 +20,6 @@ extern struct dma_map_ops sba_dma_ops, swiotlb_dma_ops; -/* swiotlb declarations & definitions: */ -extern int swiotlb_late_init_with_default_size (size_t size); - /* * Note: we need to make the determination of whether or not to use * the sw I/O TLB based purely on the device structure. Anything else diff --git a/arch/ia64/hp/common/sba_iommu.c b/arch/ia64/hp/common/sba_iommu.c index 8e858b5..b341994 100644 --- a/arch/ia64/hp/common/sba_iommu.c +++ b/arch/ia64/hp/common/sba_iommu.c @@ -46,8 +46,6 @@ #include -extern int swiotlb_late_init_with_default_size (size_t size); - #define PFX "IOC: " /* diff --git a/arch/x86/pci/sta2x11-fixup.c b/arch/x86/pci/sta2x11-fixup.c index 9d8a509..a39000b 100644 --- a/arch/x86/pci/sta2x11-fixup.c +++ b/arch/x86/pci/sta2x11-fixup.c @@ -28,7 +28,6 @@ #include #define STA2X11_SWIOTLB_SIZE (4*1024*1024) -extern int swiotlb_late_init_with_default_size(size_t default_size); /* * We build a list of bus numbers that are under the ConneXt. The diff --git a/include/linux/swiotlb.h b/include/linux/swiotlb.h index a5ffd32..7f419b6 100644 --- a/include/linux/swiotlb.h +++ b/include/linux/swiotlb.h @@ -27,7 +27,9 @@ int swiotlb_init_with_tbl(char *tlb, unsigned long nslabs, int verbose); extern unsigned long swiotlb_nr_tbl(void); unsigned long swiotlb_size_or_default(void); extern int swiotlb_late_init_with_tbl(char *tlb, unsigned long nslabs); - +int swiotlb_late_init_with_default_size (size_t ); +phys_addr_t map_single(struct device *hwdev, phys_addr_t phys, size_t size, + enum dma_data_direction dir); /* * Enumeration for sync targets */