All of lore.kernel.org
 help / color / mirror / Atom feed
From: Josef Bacik <josef@toxicpanda.com>
To: linux-btrfs@vger.kernel.org, kernel-team@fb.com
Subject: [PATCH 6/7] btrfs: remove the btrfs_item_end() helper
Date: Thu, 21 Oct 2021 14:58:36 -0400	[thread overview]
Message-ID: <f5e73b6e361933496b7bd331eeb4c22b0ec65b96.1634842475.git.josef@toxicpanda.com> (raw)
In-Reply-To: <cover.1634842475.git.josef@toxicpanda.com>

We're only using btrfs_item_end() from btrfs_item_end_nr(), so this can
be collapsed.

Signed-off-by: Josef Bacik <josef@toxicpanda.com>
---
 fs/btrfs/ctree.h | 16 +++++-----------
 1 file changed, 5 insertions(+), 11 deletions(-)

diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index dee251a92ae4..8c75224df83b 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -1969,17 +1969,6 @@ static inline struct btrfs_item *btrfs_item_nr(int nr)
 	return (struct btrfs_item *)btrfs_item_nr_offset(nr);
 }
 
-static inline u32 btrfs_item_end(const struct extent_buffer *eb,
-				 struct btrfs_item *item)
-{
-	return btrfs_raw_item_offset(eb, item) + btrfs_raw_item_size(eb, item);
-}
-
-static inline u32 btrfs_item_end_nr(const struct extent_buffer *eb, int nr)
-{
-	return btrfs_item_end(eb, btrfs_item_nr(nr));
-}
-
 #define BTRFS_ITEM_SETGET_FUNCS(member)						\
 static inline u32 btrfs_item_##member(const struct extent_buffer *eb,		\
 				      int slot)					\
@@ -2007,6 +1996,11 @@ static inline void btrfs_set_token_item_##member(struct btrfs_map_token *token,
 BTRFS_ITEM_SETGET_FUNCS(offset)
 BTRFS_ITEM_SETGET_FUNCS(size);
 
+static inline u32 btrfs_item_end_nr(const struct extent_buffer *eb, int nr)
+{
+	return btrfs_item_offset(eb, nr) + btrfs_item_size(eb, nr);
+}
+
 static inline void btrfs_item_key(const struct extent_buffer *eb,
 			   struct btrfs_disk_key *disk_key, int nr)
 {
-- 
2.26.3


  parent reply	other threads:[~2021-10-21 18:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-21 18:58 [PATCH 0/7] Cleanup btrfs_item_* related helpers Josef Bacik
2021-10-21 18:58 ` [PATCH 1/7] btrfs: use btrfs_item_size_nr/btrfs_item_offset_nr everywhere Josef Bacik
2021-10-21 23:26   ` Qu Wenruo
2021-10-21 18:58 ` [PATCH 2/7] btrfs: add btrfs_set_item_*_nr() helpers Josef Bacik
2021-10-21 18:58 ` [PATCH 3/7] btrfs: make btrfs_file_extent_inline_item_len take a slot Josef Bacik
2021-10-21 18:58 ` [PATCH 4/7] btrfs: introduce item_nr token variant helpers Josef Bacik
2021-10-21 18:58 ` [PATCH 5/7] btrfs: drop the _nr from the item helpers Josef Bacik
2021-10-21 18:58 ` Josef Bacik [this message]
2021-10-21 18:58 ` [PATCH 7/7] btrfs: rename btrfs_item_end_nr to btrfs_item_data_end Josef Bacik
2021-11-08 19:30 ` [PATCH 0/7] Cleanup btrfs_item_* related helpers David Sterba

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=f5e73b6e361933496b7bd331eeb4c22b0ec65b96.1634842475.git.josef@toxicpanda.com \
    --to=josef@toxicpanda.com \
    --cc=kernel-team@fb.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.