From patchwork Mon Aug 19 18:21:01 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josef Bacik X-Patchwork-Id: 2846666 Return-Path: X-Original-To: patchwork-linux-btrfs@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 610A89F2F4 for ; Mon, 19 Aug 2013 18:21:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3FE3C201C7 for ; Mon, 19 Aug 2013 18:21:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E9937201BD for ; Mon, 19 Aug 2013 18:21:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751099Ab3HSSVF (ORCPT ); Mon, 19 Aug 2013 14:21:05 -0400 Received: from dkim2.fusionio.com ([66.114.96.54]:49264 "EHLO dkim2.fusionio.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751073Ab3HSSVE (ORCPT ); Mon, 19 Aug 2013 14:21:04 -0400 Received: from mx2.fusionio.com (unknown [10.101.1.160]) by dkim2.fusionio.com (Postfix) with ESMTP id 573C59A0364 for ; Mon, 19 Aug 2013 12:21:04 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fusionio.com; s=default; t=1376936464; bh=ZBm+PioL4wecDfWdi2MZkKeINyvDDHxaG6qTPOu8xFE=; h=From:To:Subject:Date; b=WEo8mOVA1Teq/yyuEe8ZEbQJ0lod18b7Nqw4wH5CQrcTAJNBX5xo2aUa6eG6KIivT T/jW9owmm2F3UB1B2DaSN+5+dgbCPnmvdXimgP1JzTR13/IjyUw5lQrHYX6MUDiaIk 2A6n7hZGxASFTR6dseBb7xnTJwXp1VBn28BaENqg= X-ASG-Debug-ID: 1376936463-0421b502222a4170001-6jHSXT Received: from CAS1.int.fusionio.com (cas1.int.fusionio.com [10.101.1.40]) by mx2.fusionio.com with ESMTP id ya9MhqETLX65kRSe (version=TLSv1 cipher=AES128-SHA bits=128 verify=NO) for ; Mon, 19 Aug 2013 12:21:03 -0600 (MDT) X-Barracuda-Envelope-From: JBacik@fusionio.com Received: from localhost (10.101.1.160) by mail.fusionio.com (10.101.1.40) with Microsoft SMTP Server (TLS) id 14.3.123.3; Mon, 19 Aug 2013 12:21:02 -0600 From: Josef Bacik To: Subject: [PATCH] Btrfs: fix some basic sparse errors Date: Mon, 19 Aug 2013 14:21:01 -0400 X-ASG-Orig-Subj: [PATCH] Btrfs: fix some basic sparse errors Message-ID: <1376936461-8285-1-git-send-email-jbacik@fusionio.com> X-Mailer: git-send-email 1.7.7.6 MIME-Version: 1.0 X-Originating-IP: [10.101.1.160] X-Barracuda-Connect: cas1.int.fusionio.com[10.101.1.40] X-Barracuda-Start-Time: 1376936463 X-Barracuda-Encrypted: AES128-SHA X-Barracuda-URL: http://10.101.1.181:8000/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at fusionio.com X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=9.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.138838 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, 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 Running sparse I found a few small things where we should have static functions that aren't used externally and we should be using unsigned values for bit fields. Thanks, Signed-off-by: Josef Bacik --- fs/btrfs/disk-io.c | 8 ++++---- fs/btrfs/send.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 3b12c26..f51cd95 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -1432,8 +1432,8 @@ int btrfs_add_log_tree(struct btrfs_trans_handle *trans, return 0; } -struct btrfs_root *btrfs_read_tree_root(struct btrfs_root *tree_root, - struct btrfs_key *key) +static struct btrfs_root *btrfs_read_tree_root(struct btrfs_root *tree_root, + struct btrfs_key *key) { struct btrfs_root *root; struct btrfs_fs_info *fs_info = tree_root->fs_info; @@ -1533,8 +1533,8 @@ fail: return ret; } -struct btrfs_root *btrfs_lookup_fs_root(struct btrfs_fs_info *fs_info, - u64 root_id) +static struct btrfs_root *btrfs_lookup_fs_root(struct btrfs_fs_info *fs_info, + u64 root_id) { struct btrfs_root *root; diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c index fc03a57..db7da68 100644 --- a/fs/btrfs/send.c +++ b/fs/btrfs/send.c @@ -54,8 +54,8 @@ struct fs_path { char *buf; int buf_len; - int reversed:1; - int virtual_mem:1; + unsigned int reversed:1; + unsigned int virtual_mem:1; char inline_buf[]; }; char pad[PAGE_SIZE];