From: Joakim Tjernlund <Joakim.Tjernlund@infinera.com>
To: "linux-ext4@vger.kernel.org" <linux-ext4@vger.kernel.org>
Subject: ext4 build errors
Date: Mon, 2 Oct 2017 14:23:02 +0000 [thread overview]
Message-ID: <1506954181.985.9.camel@infinera.com> (raw)
Hi ext4 devs
Adding the patch last in this mail cause lots of build errors in ext4, here is a few:
fs/ext4/balloc.c: In function ‘ext4_init_block_bitmap’:
fs/ext4/balloc.c:215:21: error: passing argument 2 of ‘__set_bit_le’ from incompatible pointer type [-Werror=incompatible-pointer-types]
ext4_set_bit(bit, bh->b_data);
^
In file included from ./arch/x86/include/asm/bitops.h:517:0,
from ./include/linux/bitops.h:36,
from ./include/linux/kernel.h:10,
from ./include/linux/list.h:8,
from ./include/linux/preempt.h:10,
from ./include/linux/spinlock.h:50,
from ./include/linux/seqlock.h:35,
from ./include/linux/time.h:5,
from fs/ext4/balloc.c:14:
./include/asm-generic/bitops/le.h:71:20: note: expected ‘long unsigned int *’ but argument is of type ‘char *’
static inline void __set_bit_le(int nr, unsigned long *addr)
^
fs/ext4/balloc.c:225:44: error: passing argument 2 of ‘__set_bit_le’ from incompatible pointer type [-Werror=incompatible-pointer-types]
ext4_set_bit(EXT4_B2C(sbi, tmp - start), bh->b_data);
^
In file included from ./arch/x86/include/asm/bitops.h:517:0,
from ./include/linux/bitops.h:36,
from ./include/linux/kernel.h:10,
from ./include/linux/list.h:8,
from ./include/linux/preempt.h:10,
from ./include/linux/spinlock.h:50,
from ./include/linux/seqlock.h:35,
from ./include/linux/time.h:5,
from fs/ext4/balloc.c:14:
./include/asm-generic/bitops/le.h:71:20: note: expected ‘long unsigned int *’ but argument is of type ‘char *’
static inline void __set_bit_le(int nr, unsigned long *addr)
^
fs/ext4/balloc.c:229:44: error: passing argument 2 of ‘__set_bit_le’ from incompatible pointer type [-Werror=incompatible-pointer-types]
ext4_set_bit(EXT4_B2C(sbi, tmp - start), bh->b_data);
^
In file included from ./arch/x86/include/asm/bitops.h:517:0,
from ./include/linux/bitops.h:36,
from ./include/linux/kernel.h:10,
from ./include/linux/list.h:8,
from ./include/linux/preempt.h:10,
from ./include/linux/spinlock.h:50,
from ./include/linux/seqlock.h:35,
from ./include/linux/time.h:5,
from fs/ext4/balloc.c:14:
./include/asm-generic/bitops/le.h:71:20: note: expected ‘long unsigned int *’ but argument is of type ‘char *’
static inline void __set_bit_le(int nr, unsigned long *addr)
^
fs/ext4/balloc.c:235:45: error: passing argument 2 of ‘__set_bit_le’ from incompatible pointer type [-Werror=incompatible-pointer-types]
ext4_set_bit(EXT4_B2C(sbi, tmp - start), bh->b_data);
I think ext4 needs some cleanup before my patch can be applied, what do you think?
Jocke
From 18c2d4659a33ac047b31a0e33c524811a2a8f642 Mon Sep 17 00:00:00 2001
From: Joakim Tjernlund <joakim.tjernlund@infinera.com>
Date: Thu, 9 Mar 2017 14:19:41 +0100
Subject: [PATCH 1/4] x86: Match bitops prototypes
Adjust bitops function prototype in arch/x86/include/asm/le.h
to match the generic ones in asm-generic/bitops/le.h
That is, replace void* with unsigned long*
---
include/asm-generic/bitops/le.h | 42 ++++++++++++++++++++++-------------------
1 file changed, 23 insertions(+), 19 deletions(-)
diff --git a/include/asm-generic/bitops/le.h b/include/asm-generic/bitops/le.h
index 6173154..92a3afa 100644
--- a/include/asm-generic/bitops/le.h
+++ b/include/asm-generic/bitops/le.h
@@ -8,20 +8,22 @@
#define BITOP_LE_SWIZZLE 0
-static inline unsigned long find_next_zero_bit_le(const void *addr,
- unsigned long size, unsigned long offset)
+static inline unsigned long find_next_zero_bit_le(const unsigned long *addr,
+ unsigned long size,
+ unsigned long offset)
{
return find_next_zero_bit(addr, size, offset);
}
-static inline unsigned long find_next_bit_le(const void *addr,
- unsigned long size, unsigned long offset)
+static inline unsigned long find_next_bit_le(const unsigned long *addr,
+ unsigned long size,
+ unsigned long offset)
{
return find_next_bit(addr, size, offset);
}
-static inline unsigned long find_first_zero_bit_le(const void *addr,
- unsigned long size)
+static inline unsigned long find_first_zero_bit_le(const unsigned long *addr,
+ unsigned long size)
{
return find_first_zero_bit(addr, size);
}
@@ -31,13 +33,15 @@ static inline unsigned long find_first_zero_bit_le(const void *addr,
#define BITOP_LE_SWIZZLE ((BITS_PER_LONG-1) & ~0x7)
#ifndef find_next_zero_bit_le
-extern unsigned long find_next_zero_bit_le(const void *addr,
- unsigned long size, unsigned long offset);
+extern unsigned long find_next_zero_bit_le(const unsigned long *addr,
+ unsigned long size,
+ unsigned long offset);
#endif
#ifndef find_next_bit_le
-extern unsigned long find_next_bit_le(const void *addr,
- unsigned long size, unsigned long offset);
+extern unsigned long find_next_bit_le(const unsigned long *addr,
+ unsigned long size,
+ unsigned long offset);
#endif
#ifndef find_first_zero_bit_le
@@ -49,47 +53,47 @@ extern unsigned long find_next_bit_le(const void *addr,
#error "Please fix <asm/byteorder.h>"
#endif
-static inline int test_bit_le(int nr, const void *addr)
+static inline int test_bit_le(int nr, const unsigned long *addr)
{
return test_bit(nr ^ BITOP_LE_SWIZZLE, addr);
}
-static inline void set_bit_le(int nr, void *addr)
+static inline void set_bit_le(int nr, unsigned long *addr)
{
set_bit(nr ^ BITOP_LE_SWIZZLE, addr);
}
-static inline void clear_bit_le(int nr, void *addr)
+static inline void clear_bit_le(int nr, unsigned long *addr)
{
clear_bit(nr ^ BITOP_LE_SWIZZLE, addr);
}
-static inline void __set_bit_le(int nr, void *addr)
+static inline void __set_bit_le(int nr, unsigned long *addr)
{
__set_bit(nr ^ BITOP_LE_SWIZZLE, addr);
}
-static inline void __clear_bit_le(int nr, void *addr)
+static inline void __clear_bit_le(int nr, unsigned long *addr)
{
__clear_bit(nr ^ BITOP_LE_SWIZZLE, addr);
}
-static inline int test_and_set_bit_le(int nr, void *addr)
+static inline int test_and_set_bit_le(int nr, unsigned long *addr)
{
return test_and_set_bit(nr ^ BITOP_LE_SWIZZLE, addr);
}
-static inline int test_and_clear_bit_le(int nr, void *addr)
+static inline int test_and_clear_bit_le(int nr, unsigned long *addr)
{
return test_and_clear_bit(nr ^ BITOP_LE_SWIZZLE, addr);
}
-static inline int __test_and_set_bit_le(int nr, void *addr)
+static inline int __test_and_set_bit_le(int nr, unsigned long *addr)
{
return __test_and_set_bit(nr ^ BITOP_LE_SWIZZLE, addr);
}
-static inline int __test_and_clear_bit_le(int nr, void *addr)
+static inline int __test_and_clear_bit_le(int nr, unsigned long *addr)
{
return __test_and_clear_bit(nr ^ BITOP_LE_SWIZZLE, addr);
}
--
2.10.2
next reply other threads:[~2017-10-02 14:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-02 14:23 Joakim Tjernlund [this message]
2017-10-02 14:55 ` ext4 build errors Theodore Ts'o
2017-10-02 15:15 ` Joakim Tjernlund
2017-10-02 16:54 ` Theodore Ts'o
2017-10-02 17:27 ` [EXTERNAL]Re: " Joakim Tjernlund
2017-10-02 18:40 ` Theodore Ts'o
2017-10-02 20:12 ` [EXTERNAL]Re: " Joakim Tjernlund
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=1506954181.985.9.camel@infinera.com \
--to=joakim.tjernlund@infinera.com \
--cc=linux-ext4@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