Linux Btrfs filesystem development
 help / color / mirror / Atom feed
* [PATCH] btrfs: change return type from int to bool in check_eb_range()
@ 2026-04-23 14:03 fdmanana
  2026-04-23 14:57 ` Johannes Thumshirn
  2026-04-23 21:45 ` Qu Wenruo
  0 siblings, 2 replies; 3+ messages in thread
From: fdmanana @ 2026-04-23 14:03 UTC (permalink / raw)
  To: linux-btrfs

From: Filipe Manana <fdmanana@suse.com>

The function always returns true or false but the its return type is
defined as int, which makes no sense. Change it to bool.

Signed-off-by: Filipe Manana <fdmanana@suse.com>
---
 fs/btrfs/extent_io.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index 2b0aec031a9a..0597b0041aa7 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -3983,8 +3983,8 @@ int read_extent_buffer_pages(struct extent_buffer *eb, int mirror_num,
  *
  * Caller should not touch the dst/src memory if this function returns error.
  */
-static inline int check_eb_range(const struct extent_buffer *eb,
-				 unsigned long start, unsigned long len)
+static inline bool check_eb_range(const struct extent_buffer *eb,
+				  unsigned long start, unsigned long len)
 {
 	unsigned long offset;
 
-- 
2.47.2


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

* Re: [PATCH] btrfs: change return type from int to bool in check_eb_range()
  2026-04-23 14:03 [PATCH] btrfs: change return type from int to bool in check_eb_range() fdmanana
@ 2026-04-23 14:57 ` Johannes Thumshirn
  2026-04-23 21:45 ` Qu Wenruo
  1 sibling, 0 replies; 3+ messages in thread
From: Johannes Thumshirn @ 2026-04-23 14:57 UTC (permalink / raw)
  To: fdmanana, linux-btrfs

Looks good,

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>


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

* Re: [PATCH] btrfs: change return type from int to bool in check_eb_range()
  2026-04-23 14:03 [PATCH] btrfs: change return type from int to bool in check_eb_range() fdmanana
  2026-04-23 14:57 ` Johannes Thumshirn
@ 2026-04-23 21:45 ` Qu Wenruo
  1 sibling, 0 replies; 3+ messages in thread
From: Qu Wenruo @ 2026-04-23 21:45 UTC (permalink / raw)
  To: fdmanana, linux-btrfs



在 2026/4/23 23:33, fdmanana@kernel.org 写道:
> From: Filipe Manana <fdmanana@suse.com>
> 
> The function always returns true or false but the its return type is
> defined as int, which makes no sense. Change it to bool.
> 
> Signed-off-by: Filipe Manana <fdmanana@suse.com>

Reviewed-by: Qu Wenruo <wqu@suse.com>

Thanks,
Qu

> ---
>   fs/btrfs/extent_io.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
> index 2b0aec031a9a..0597b0041aa7 100644
> --- a/fs/btrfs/extent_io.c
> +++ b/fs/btrfs/extent_io.c
> @@ -3983,8 +3983,8 @@ int read_extent_buffer_pages(struct extent_buffer *eb, int mirror_num,
>    *
>    * Caller should not touch the dst/src memory if this function returns error.
>    */
> -static inline int check_eb_range(const struct extent_buffer *eb,
> -				 unsigned long start, unsigned long len)
> +static inline bool check_eb_range(const struct extent_buffer *eb,
> +				  unsigned long start, unsigned long len)
>   {
>   	unsigned long offset;
>   


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

end of thread, other threads:[~2026-04-23 21:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-23 14:03 [PATCH] btrfs: change return type from int to bool in check_eb_range() fdmanana
2026-04-23 14:57 ` Johannes Thumshirn
2026-04-23 21:45 ` Qu Wenruo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox