Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp499011pxa; Wed, 19 Aug 2020 07:18:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzzHskW0v/LsSqX6iQCn4Yq3bkdBLmCq3OsfGKEevLd1SBOPttn9POdQTj8WGu7aqUv5KL/ X-Received: by 2002:a17:907:2126:: with SMTP id qo6mr25077633ejb.536.1597846680597; Wed, 19 Aug 2020 07:18:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597846680; cv=none; d=google.com; s=arc-20160816; b=QmKr+e5BV9Fyi1R0NiWJnJKLWl8R7Q4xdlHe2sR5p+wBPZQYsPXrDQKnf4mXxyLpxl DMoXK1fBx4NTsYvAYyazz1ffIapCmELNLmkNxB4w0SAw2QtZo8WoG0EuM06S9Xwvf/l2 vDAX1qjuXHPJ7i1ZUAxjFJc6SmQkDaNsIDCYZ7jrgx4v9HEzhGSIxZ93SOVQPTsFLwwH z97RFdjpuBHe/KAQ7Z5uXAakxMuOZ/wV75GU5QeozDicyF1lROkBOxT+kQFAw2BGdoRQ xLKTmt5rNuv5sjjfo8EvLIgfzVtMblWmIq6F8Rg4lJ0OejjHXTFLNLQQtolSfreLpXcm nvBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=x+MGHPxwFGosSuIYrLOeFPpESQwnVKFPecqqv48mgPs=; b=U5rYDxNGHfLaJsI3S4bZNGJS1VQuM1BuMG/5gvRyAipDchs6e0nB8R9rEIk3hFUqp1 h6u7ADF872XJUMrNbPKltVRAEZUiLeleyDdeK5kDB4G0+c/VhgxFWd8orTvuhAeV3WIO 9nxcyk038yQD3D7cRsWox5ENFi9gaWayk/LuPDGi1hIf4TB6BdsnUOhttHsP6uosRSrc 3hsDrkpusAD5LQhaM0uMExBAc/VZMc3eHnyuh+1SRXFPLSqGIp2gNuO0SdkAl207BeVV KQSLipaVvGR5kyZDCqpISXV69KvXI2UmM/shQLxgWZAJrBdY0CoykaqQ8M9R3oyjpho8 UpGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=o2eskXGi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id b3si18769498edn.98.2020.08.19.07.17.36; Wed, 19 Aug 2020 07:18:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=o2eskXGi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1728479AbgHSOQu (ORCPT + 99 others); Wed, 19 Aug 2020 10:16:50 -0400 Received: from mail.kernel.org ([198.145.29.99]:36712 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726766AbgHSOQo (ORCPT ); Wed, 19 Aug 2020 10:16:44 -0400 Received: from localhost (unknown [213.57.247.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A24EE2078D; Wed, 19 Aug 2020 14:16:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597846603; bh=0CwqqpI/doCNdLbaPsaZaTuQDib4tuZ/A83w7/3MMDo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=o2eskXGibcBkg54wYhLtn6iK6N3yjHMgqcWmYdY5HTeTZWOy/hQpA0iA99BGxN7E1 aF0gsXiyBaPO9Svm8/EwjWV0hOwO0BxH05pJQBpcLZb6mxlKeUCJIYC2cTOimkRENn oPMo0JD2UtQn6i9nPrgqRAVh2rkzGVec1Qa6eejM= From: Leon Romanovsky To: Chris Mason , David Sterba , Josef Bacik Cc: Leon Romanovsky , linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/3] fs/btrfs: Fix -Wmissing-prototypes warnings Date: Wed, 19 Aug 2020 17:16:30 +0300 Message-Id: <20200819141630.1338693-4-leon@kernel.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200819141630.1338693-1-leon@kernel.org> References: <20200819141630.1338693-1-leon@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Leon Romanovsky Move function declaration to shared header file to fix multiple -Wmissing-prototypes warnings like below: fs/btrfs/zstd.c:369:5: warning: no previous prototype for ‘zstd_compress_pages’ [-Wmissing-prototypes] 369 | int zstd_compress_pages(struct list_head *ws, struct address_space *mapping, | ^~~~~~~~~~~~~~~~~~~ Signed-off-by: Leon Romanovsky --- fs/btrfs/compression.c | 35 ----------------------------------- fs/btrfs/compression.h | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 35 deletions(-) diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c index 1ab56a734e70..eeface30facd 100644 --- a/fs/btrfs/compression.c +++ b/fs/btrfs/compression.c @@ -29,41 +29,6 @@ #include "extent_io.h" #include "extent_map.h" -int zlib_compress_pages(struct list_head *ws, struct address_space *mapping, - u64 start, struct page **pages, unsigned long *out_pages, - unsigned long *total_in, unsigned long *total_out); -int zlib_decompress_bio(struct list_head *ws, struct compressed_bio *cb); -int zlib_decompress(struct list_head *ws, unsigned char *data_in, - struct page *dest_page, unsigned long start_byte, size_t srclen, - size_t destlen); -struct list_head *zlib_alloc_workspace(unsigned int level); -void zlib_free_workspace(struct list_head *ws); -struct list_head *zlib_get_workspace(unsigned int level); - -int lzo_compress_pages(struct list_head *ws, struct address_space *mapping, - u64 start, struct page **pages, unsigned long *out_pages, - unsigned long *total_in, unsigned long *total_out); -int lzo_decompress_bio(struct list_head *ws, struct compressed_bio *cb); -int lzo_decompress(struct list_head *ws, unsigned char *data_in, - struct page *dest_page, unsigned long start_byte, size_t srclen, - size_t destlen); -struct list_head *lzo_alloc_workspace(unsigned int level); -void lzo_free_workspace(struct list_head *ws); - -int zstd_compress_pages(struct list_head *ws, struct address_space *mapping, - u64 start, struct page **pages, unsigned long *out_pages, - unsigned long *total_in, unsigned long *total_out); -int zstd_decompress_bio(struct list_head *ws, struct compressed_bio *cb); -int zstd_decompress(struct list_head *ws, unsigned char *data_in, - struct page *dest_page, unsigned long start_byte, size_t srclen, - size_t destlen); -void zstd_init_workspace_manager(void); -void zstd_cleanup_workspace_manager(void); -struct list_head *zstd_alloc_workspace(unsigned int level); -void zstd_free_workspace(struct list_head *ws); -struct list_head *zstd_get_workspace(unsigned int level); -void zstd_put_workspace(struct list_head *ws); - static const char* const btrfs_compress_types[] = { "", "zlib", "lzo", "zstd" }; const char* btrfs_compress_type2str(enum btrfs_compression_type type) diff --git a/fs/btrfs/compression.h b/fs/btrfs/compression.h index 9f3dbe372631..8001b700ea3a 100644 --- a/fs/btrfs/compression.h +++ b/fs/btrfs/compression.h @@ -144,4 +144,39 @@ bool btrfs_compress_is_valid_type(const char *str, size_t len); int btrfs_compress_heuristic(struct inode *inode, u64 start, u64 end); +int zlib_compress_pages(struct list_head *ws, struct address_space *mapping, + u64 start, struct page **pages, unsigned long *out_pages, + unsigned long *total_in, unsigned long *total_out); +int zlib_decompress_bio(struct list_head *ws, struct compressed_bio *cb); +int zlib_decompress(struct list_head *ws, unsigned char *data_in, + struct page *dest_page, unsigned long start_byte, size_t srclen, + size_t destlen); +struct list_head *zlib_alloc_workspace(unsigned int level); +void zlib_free_workspace(struct list_head *ws); +struct list_head *zlib_get_workspace(unsigned int level); + +int lzo_compress_pages(struct list_head *ws, struct address_space *mapping, + u64 start, struct page **pages, unsigned long *out_pages, + unsigned long *total_in, unsigned long *total_out); +int lzo_decompress_bio(struct list_head *ws, struct compressed_bio *cb); +int lzo_decompress(struct list_head *ws, unsigned char *data_in, + struct page *dest_page, unsigned long start_byte, size_t srclen, + size_t destlen); +struct list_head *lzo_alloc_workspace(unsigned int level); +void lzo_free_workspace(struct list_head *ws); + +int zstd_compress_pages(struct list_head *ws, struct address_space *mapping, + u64 start, struct page **pages, unsigned long *out_pages, + unsigned long *total_in, unsigned long *total_out); +int zstd_decompress_bio(struct list_head *ws, struct compressed_bio *cb); +int zstd_decompress(struct list_head *ws, unsigned char *data_in, + struct page *dest_page, unsigned long start_byte, size_t srclen, + size_t destlen); +void zstd_init_workspace_manager(void); +void zstd_cleanup_workspace_manager(void); +struct list_head *zstd_alloc_workspace(unsigned int level); +void zstd_free_workspace(struct list_head *ws); +struct list_head *zstd_get_workspace(unsigned int level); +void zstd_put_workspace(struct list_head *ws); + #endif -- 2.26.2