From: David Sterba <dsterba@suse.com>
To: linux-btrfs@vger.kernel.org
Cc: David Sterba <dsterba@suse.com>
Subject: [PATCH 0/6] Enumerated bits in enum
Date: Tue, 11 Oct 2022 14:58:45 +0200 [thread overview]
Message-ID: <cover.1665492943.git.dsterba@suse.com> (raw)
With some macro magic it's possible to let enum autoincrement define all
bits without manually specifying the value. How it's done is described
in the first patch, the rest are example conversions.
David Sterba (6):
btrfs: add helper for bit enumeration
btrfs: convert BTRFS_ILOCK-* defines to enum bit
btrfs: convert extent_io page op defines to enum bits
btrfs: convert EXTENT_* bits to enums
btrfs: convert QGROUP_* defines to enum bits
btrfs: convert __TRANS_* defines to enum bits
fs/btrfs/ctree.h | 9 +++--
fs/btrfs/extent-io-tree.h | 71 +++++++++++++++++++++------------------
fs/btrfs/extent_io.h | 17 ++++++----
fs/btrfs/misc.h | 8 +++++
fs/btrfs/qgroup.h | 9 +++--
fs/btrfs/transaction.h | 18 +++++-----
6 files changed, 78 insertions(+), 54 deletions(-)
--
2.37.3
next reply other threads:[~2022-10-11 12:59 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-11 12:58 David Sterba [this message]
2022-10-11 12:58 ` [PATCH 1/6] btrfs: add helper for bit enumeration David Sterba
2022-10-11 12:58 ` [PATCH 2/6] btrfs: convert BTRFS_ILOCK-* defines to enum bit David Sterba
2022-10-11 12:58 ` [PATCH 3/6] btrfs: convert extent_io page op defines to enum bits David Sterba
2022-10-11 12:58 ` [PATCH 4/6] btrfs: convert EXTENT_* bits to enums David Sterba
2022-10-11 12:58 ` [PATCH 5/6] btrfs: convert QGROUP_* defines to enum bits David Sterba
2022-10-11 12:58 ` [PATCH 6/6] btrfs: convert __TRANS_* " David Sterba
2022-10-14 12:58 ` [PATCH 0/6] Enumerated bits in enum Josef Bacik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1665492943.git.dsterba@suse.com \
--to=dsterba@suse.com \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).