From patchwork Fri Dec 19 06:13:11 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Qu Wenruo X-Patchwork-Id: 5517551 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 64988BEEA8 for ; Fri, 19 Dec 2014 06:15:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8E9B620125 for ; Fri, 19 Dec 2014 06:15:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AEC8D2012B for ; Fri, 19 Dec 2014 06:15:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752024AbaLSGPT (ORCPT ); Fri, 19 Dec 2014 01:15:19 -0500 Received: from cn.fujitsu.com ([59.151.112.132]:17798 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1752013AbaLSGPS (ORCPT ); Fri, 19 Dec 2014 01:15:18 -0500 X-IronPort-AV: E=Sophos;i="5.04,848,1406563200"; d="scan'208";a="45493157" Received: from unknown (HELO edo.cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 19 Dec 2014 14:11:56 +0800 Received: from G08CNEXCHPEKD02.g08.fujitsu.local (localhost.localdomain [127.0.0.1]) by edo.cn.fujitsu.com (8.14.3/8.13.1) with ESMTP id sBJ6EpEx027650 for ; Fri, 19 Dec 2014 14:14:51 +0800 Received: from localhost.localdomain (10.167.226.33) by G08CNEXCHPEKD02.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server (TLS) id 14.3.181.6; Fri, 19 Dec 2014 14:15:17 +0800 From: Qu Wenruo To: Subject: [PATCH 4/5] btrfs-progs: Remove a unused function offset_to_bitmap() Date: Fri, 19 Dec 2014 14:13:11 +0800 Message-ID: <1418969592-21278-5-git-send-email-quwenruo@cn.fujitsu.com> X-Mailer: git-send-email 2.1.3 In-Reply-To: <1418969592-21278-1-git-send-email-quwenruo@cn.fujitsu.com> References: <1418969592-21278-1-git-send-email-quwenruo@cn.fujitsu.com> MIME-Version: 1.0 X-Originating-IP: [10.167.226.33] Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, 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 Fix the following clang warning: free-space-cache.c:464:19: warning: unused function 'offset_to_bitmap' [-Wunused-function] static inline u64 offset_to_bitmap(struct btrfs_free_space_ctl *ctl, ^ 1 warning generated. Signed-off-by: Qu Wenruo --- free-space-cache.c | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/free-space-cache.c b/free-space-cache.c index 220449e..99ad420 100644 --- a/free-space-cache.c +++ b/free-space-cache.c @@ -461,22 +461,6 @@ static inline unsigned long bytes_to_bits(u64 bytes, u32 unit) return (unsigned long)(bytes / unit); } -static inline u64 offset_to_bitmap(struct btrfs_free_space_ctl *ctl, - u64 offset) -{ - u64 bitmap_start; - u64 bytes_per_bitmap; - u32 sectorsize = ctl->sectorsize; - - bytes_per_bitmap = BITS_PER_BITMAP(sectorsize) * ctl->unit; - bitmap_start = offset - ctl->start; - bitmap_start = bitmap_start / bytes_per_bitmap; - bitmap_start *= bytes_per_bitmap; - bitmap_start += ctl->start; - - return bitmap_start; -} - static int tree_insert_offset(struct rb_root *root, u64 offset, struct rb_node *node, int bitmap) {