I don't see a reason why nr should be unsigned for set_bit, but signed for
clear_bit. This probably got copy&pasted across architectures.

Signed-off-by: Ralf Ramsauer <[email protected]>
---
 hypervisor/arch/arm/include/asm/bitops.h   | 2 +-
 hypervisor/arch/arm64/include/asm/bitops.h | 2 +-
 hypervisor/arch/x86/include/asm/bitops.h   | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/hypervisor/arch/arm/include/asm/bitops.h 
b/hypervisor/arch/arm/include/asm/bitops.h
index bf1bfdf9..34b1fe1b 100644
--- a/hypervisor/arch/arm/include/asm/bitops.h
+++ b/hypervisor/arch/arm/include/asm/bitops.h
@@ -31,7 +31,7 @@
                      : "+Qo" (*(volatile unsigned long *)addr));
 
 static inline __attribute__((always_inline)) void
-clear_bit(int nr, volatile unsigned long *addr)
+clear_bit(unsigned int nr, volatile unsigned long *addr)
 {
        unsigned long ret, val;
 
diff --git a/hypervisor/arch/arm64/include/asm/bitops.h 
b/hypervisor/arch/arm64/include/asm/bitops.h
index aa211087..b7dd6204 100644
--- a/hypervisor/arch/arm64/include/asm/bitops.h
+++ b/hypervisor/arch/arm64/include/asm/bitops.h
@@ -26,7 +26,7 @@
        } while (0)
 
 static inline __attribute__((always_inline)) void
-clear_bit(int nr, volatile unsigned long *addr)
+clear_bit(unsigned int nr, volatile unsigned long *addr)
 {
        u32 ret;
        u64 tmp;
diff --git a/hypervisor/arch/x86/include/asm/bitops.h 
b/hypervisor/arch/x86/include/asm/bitops.h
index 2f88fb49..1f07db47 100644
--- a/hypervisor/arch/x86/include/asm/bitops.h
+++ b/hypervisor/arch/x86/include/asm/bitops.h
@@ -32,7 +32,7 @@
 #define CONST_MASK(nr)                 (1 << ((nr) & 7))
 
 static inline __attribute__((always_inline)) void
-clear_bit(int nr, volatile unsigned long *addr)
+clear_bit(unsigned int nr, volatile unsigned long *addr)
 {
        if (__builtin_constant_p(nr)) {
                asm volatile("lock andb %1,%0"
-- 
2.22.0

-- 
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jailhouse-dev/20190713181037.4358-2-ralf.ramsauer%40oth-regensburg.de.
For more options, visit https://groups.google.com/d/optout.

Reply via email to