From patchwork Sun Jul 7 10:03:33 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wang Shilong X-Patchwork-Id: 2824541 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 28768C0AB2 for ; Sun, 7 Jul 2013 10:03:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3BE012012B for ; Sun, 7 Jul 2013 10:03:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4484C20122 for ; Sun, 7 Jul 2013 10:03:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751964Ab3GGKDi (ORCPT ); Sun, 7 Jul 2013 06:03:38 -0400 Received: from mail-pd0-f176.google.com ([209.85.192.176]:43922 "EHLO mail-pd0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751700Ab3GGKDh (ORCPT ); Sun, 7 Jul 2013 06:03:37 -0400 Received: by mail-pd0-f176.google.com with SMTP id t12so3160474pdi.35 for ; Sun, 07 Jul 2013 03:03:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:x-mailer; bh=MNbBQ6GGAlGDDhJliaqauaktW72TJTK//GbIMiuRaQ0=; b=aYxmVDOuDOi+tfPJlbElQ5fAaeye14SOVdvAMcBfN1G3fA75vRScxEeUwwxbvGgJXw OcEoa2ePbqxG1A3JJJowKGxjA80KDIcdg2engEaMOcqS0YAH+334r/K+4K6HH/PS4rGB gdWGn7WpVK/EIHajzyuCd9mmiYLVHPeXZXtUmBj7baJwYyXXsdfdjXfwKmS6RcwaCrqk 9P0yH5l7JcVgJZ4Q+mtiLEjweebRXuU0f/wMl/t+c8gNPhSrZOXPRtRExyukyWx7lWuk ehsX5+k1IKkRU+aCfJygHmn4mc//guYR/923RTLy/FmE9MP+HCP5v/09+LyYclr/gwxG 9vaQ== X-Received: by 10.68.227.36 with SMTP id rx4mr12962668pbc.1.1373191417456; Sun, 07 Jul 2013 03:03:37 -0700 (PDT) Received: from localhost.localdomain.localdomain ([223.65.190.13]) by mx.google.com with ESMTPSA id nr8sm5415547pbc.6.2013.07.07.03.03.35 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Sun, 07 Jul 2013 03:03:36 -0700 (PDT) From: Wang Shilong To: linux-btrfs@vger.kernel.org Subject: [PATCH V2] Btrfs-progs: fix compile warning in btrfs_free_block_groups() Date: Sun, 7 Jul 2013 18:03:33 +0800 Message-Id: <1373191413-4581-1-git-send-email-wangshilong1991@gmail.com> X-Mailer: git-send-email 1.7.11.7 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, 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 From: Wang Shilong extent-tree.c: In function 'btrfs_free_block_groups': extent-tree.c:3189:12: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] Signed-off-by: Wang Shilong --- V1->V2: use 'uintptr_t' instead of 'unsigned long'(Thanks Stefan) --- extent-tree.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/extent-tree.c b/extent-tree.c index f597e16..494cf21 100644 --- a/extent-tree.c +++ b/extent-tree.c @@ -18,6 +18,7 @@ #include #include +#include #include "kerncompat.h" #include "radix-tree.h" #include "ctree.h" @@ -3180,7 +3181,8 @@ int btrfs_free_block_groups(struct btrfs_fs_info *info) break; ret = get_state_private(&info->block_group_cache, start, &ptr); if (!ret) { - cache = (struct btrfs_block_group_cache *)ptr; + cache = (struct btrfs_block_group_cache *) + (uintptr_t)ptr; if (cache->free_space_ctl) { btrfs_remove_free_space_cache(cache); kfree(cache->free_space_ctl);