linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/6] Enumerated bits in enum
@ 2022-10-11 12:58 David Sterba
  2022-10-11 12:58 ` [PATCH 1/6] btrfs: add helper for bit enumeration David Sterba
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: David Sterba @ 2022-10-11 12:58 UTC (permalink / raw)
  To: linux-btrfs; +Cc: David Sterba

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


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-10-14 12:58 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-11 12:58 [PATCH 0/6] Enumerated bits in enum David Sterba
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

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).