From patchwork Mon Jan 19 06:45:03 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Qu Wenruo X-Patchwork-Id: 5654901 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.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id EFD37C058D for ; Mon, 19 Jan 2015 06:48:43 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1278420142 for ; Mon, 19 Jan 2015 06:48:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 05B89202A1 for ; Mon, 19 Jan 2015 06:48:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751464AbbASGrU (ORCPT ); Mon, 19 Jan 2015 01:47:20 -0500 Received: from cn.fujitsu.com ([59.151.112.132]:41939 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1751221AbbASGrU (ORCPT ); Mon, 19 Jan 2015 01:47:20 -0500 X-IronPort-AV: E=Sophos;i="5.04,848,1406563200"; d="scan'208";a="56253735" Received: from unknown (HELO edo.cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 19 Jan 2015 14:43:49 +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 t0J6kenc022555 for ; Mon, 19 Jan 2015 14:46:40 +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; Mon, 19 Jan 2015 14:47:20 +0800 From: Qu Wenruo To: Subject: [PATCH v2 01/10] btrfs-progs: Cleanup, use bitshift instead of immediate number in btrfs_open_ctree_flags. Date: Mon, 19 Jan 2015 14:45:03 +0800 Message-ID: <1421649912-14539-2-git-send-email-quwenruo@cn.fujitsu.com> X-Mailer: git-send-email 2.2.2 In-Reply-To: <1421649912-14539-1-git-send-email-quwenruo@cn.fujitsu.com> References: <1421649912-14539-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 Change the immediate number in btrfs_open_ctree_flags to bit shift. Signed-off-by: Qu Wenruo --- disk-io.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/disk-io.h b/disk-io.h index 4818109..e12870e 100644 --- a/disk-io.h +++ b/disk-io.h @@ -26,13 +26,13 @@ #define BTRFS_SUPER_MIRROR_SHIFT 12 enum btrfs_open_ctree_flags { - OPEN_CTREE_WRITES = 1, - OPEN_CTREE_PARTIAL = 2, - OPEN_CTREE_BACKUP_ROOT = 4, - OPEN_CTREE_RECOVER_SUPER = 8, - OPEN_CTREE_RESTORE = 16, - OPEN_CTREE_NO_BLOCK_GROUPS = 32, - OPEN_CTREE_EXCLUSIVE = 64, + OPEN_CTREE_WRITES = (1 << 0), + OPEN_CTREE_PARTIAL = (1 << 1), + OPEN_CTREE_BACKUP_ROOT = (1 << 2), + OPEN_CTREE_RECOVER_SUPER = (1 << 3), + OPEN_CTREE_RESTORE = (1 << 4), + OPEN_CTREE_NO_BLOCK_GROUPS = (1 << 5), + OPEN_CTREE_EXCLUSIVE = (1 << 6), }; static inline u64 btrfs_sb_offset(int mirror)