| From: Andrew Morton <akpm@linux-foundation.org> |
| Subject: minmax-add-in_range-macro-fix-fix |
| Date: Tue Jul 11 01:04:11 PM PDT 2023 |
| |
| convert remaining local in_range() definitions, kernel-wide |
| |
| Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org> |
| Signed-off-by: Andrew Morton <akpm@linux-foundation.org> |
| --- |
| |
| fs/btrfs/misc.h | 3 +-- |
| fs/ext2/balloc.c | 3 +-- |
| fs/ext4/ext4.h | 3 +-- |
| fs/ufs/util.h | 7 +------ |
| 4 files changed, 4 insertions(+), 12 deletions(-) |
| |
| --- a/fs/btrfs/misc.h~minmax-add-in_range-macro-fix-fix |
| +++ a/fs/btrfs/misc.h |
| @@ -7,8 +7,7 @@ |
| #include <linux/wait.h> |
| #include <linux/math64.h> |
| #include <linux/rbtree.h> |
| - |
| -#define in_range(b, first, len) ((b) >= (first) && (b) < (first) + (len)) |
| +#include <linux/minmax.h> |
| |
| /* |
| * Enumerate bits using enum autoincrement. Define the @name as the n-th bit. |
| --- a/fs/ext2/balloc.c~minmax-add-in_range-macro-fix-fix |
| +++ a/fs/ext2/balloc.c |
| @@ -16,6 +16,7 @@ |
| #include <linux/quotaops.h> |
| #include <linux/slab.h> |
| #include <linux/sched.h> |
| +#include <linux/minmax.h> |
| #include <linux/cred.h> |
| #include <linux/buffer_head.h> |
| #include <linux/capability.h> |
| @@ -36,8 +37,6 @@ |
| */ |
| |
| |
| -#define in_range(b, first, len) ((b) >= (first) && (b) <= (first) + (len) - 1) |
| - |
| struct ext2_group_desc * ext2_get_group_desc(struct super_block * sb, |
| unsigned int block_group, |
| struct buffer_head ** bh) |
| --- a/fs/ext4/ext4.h~minmax-add-in_range-macro-fix-fix |
| +++ a/fs/ext4/ext4.h |
| @@ -32,6 +32,7 @@ |
| #include <linux/sched/signal.h> |
| #include <linux/blockgroup_lock.h> |
| #include <linux/percpu_counter.h> |
| +#include <linux/minmax.h> |
| #include <linux/ratelimit.h> |
| #include <crypto/hash.h> |
| #include <linux/falloc.h> |
| @@ -3774,8 +3775,6 @@ static inline void set_bitmap_uptodate(s |
| set_bit(BH_BITMAP_UPTODATE, &(bh)->b_state); |
| } |
| |
| -#define in_range(b, first, len) ((b) >= (first) && (b) <= (first) + (len) - 1) |
| - |
| /* For ioend & aio unwritten conversion wait queues */ |
| #define EXT4_WQ_HASH_SZ 37 |
| #define ext4_ioend_wq(v) (&ext4__ioend_wq[((unsigned long)(v)) %\ |
| --- a/fs/ufs/util.h~minmax-add-in_range-macro-fix-fix |
| +++ a/fs/ufs/util.h |
| @@ -9,14 +9,9 @@ |
| |
| #include <linux/buffer_head.h> |
| #include <linux/fs.h> |
| +#include <linux/minmax.h> |
| #include "swab.h" |
| |
| - |
| -/* |
| - * some useful macros |
| - */ |
| -#define in_range(b,first,len) ((b)>=(first)&&(b)<(first)+(len)) |
| - |
| /* |
| * functions used for retyping |
| */ |
| _ |