diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2021-09-01 15:13:02 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2021-09-01 15:13:02 -0700 |
commit | 4cdc4cc2ad35f92338497d53d3e8b7876cf2a51d (patch) | |
tree | 6d603bb48eeed47a4d37547c3a96c79800a2390f /include/asm-generic/bitops | |
parent | 57c78a234e809e3a0516491e37ae5ccc6eeb21e8 (diff) | |
parent | 8f76f9c46952659dd925c21c3f62a0d05a3f3e71 (diff) |
Merge tag 'asm-generic-5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic
Pull asm-generic updates from Arnd Bergmann:
"The main content for 5.15 is a series that cleans up the handling of
strncpy_from_user() and strnlen_user(), removing a lot of slightly
incorrect versions of these in favor of the lib/strn*.c helpers that
implement these correctly and more efficiently.
The only architectures that retain a private version now are mips,
ia64, um and parisc. I had offered to convert those at all, but Thomas
Bogendoerfer wanted to keep the mips version for the moment until he
had a chance to do regression testing.
The branch also contains two patches for bitops and for ffs()"
* tag 'asm-generic-5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic:
bitops/non-atomic: make @nr unsigned to avoid any DIV
asm-generic: ffs: Drop bogus reference to ffz location
asm-generic: reverse GENERIC_{STRNCPY_FROM,STRNLEN}_USER symbols
asm-generic: remove extra strn{cpy_from,len}_user declarations
asm-generic: uaccess: remove inline strncpy_from_user/strnlen_user
s390: use generic strncpy/strnlen from_user
microblaze: use generic strncpy/strnlen from_user
csky: use generic strncpy/strnlen from_user
arc: use generic strncpy/strnlen from_user
hexagon: use generic strncpy/strnlen from_user
h8300: remove stale strncpy_from_user
asm-generic/uaccess.h: remove __strncpy_from_user/__strnlen_user
Diffstat (limited to 'include/asm-generic/bitops')
-rw-r--r-- | include/asm-generic/bitops/builtin-ffs.h | 2 | ||||
-rw-r--r-- | include/asm-generic/bitops/ffs.h | 2 | ||||
-rw-r--r-- | include/asm-generic/bitops/non-atomic.h | 14 |
3 files changed, 9 insertions, 9 deletions
diff --git a/include/asm-generic/bitops/builtin-ffs.h b/include/asm-generic/bitops/builtin-ffs.h index 1dacfdb4247e..7b129329046b 100644 --- a/include/asm-generic/bitops/builtin-ffs.h +++ b/include/asm-generic/bitops/builtin-ffs.h @@ -8,7 +8,7 @@ * * This is defined the same way as * the libc and compiler builtin ffs routines, therefore - * differs in spirit from the above ffz (man ffs). + * differs in spirit from ffz (man ffs). */ #define ffs(x) __builtin_ffs(x) diff --git a/include/asm-generic/bitops/ffs.h b/include/asm-generic/bitops/ffs.h index e81868b2c0f0..323fd5d6ae26 100644 --- a/include/asm-generic/bitops/ffs.h +++ b/include/asm-generic/bitops/ffs.h @@ -8,7 +8,7 @@ * * This is defined the same way as * the libc and compiler builtin ffs routines, therefore - * differs in spirit from the above ffz (man ffs). + * differs in spirit from ffz (man ffs). */ static inline int ffs(int x) { diff --git a/include/asm-generic/bitops/non-atomic.h b/include/asm-generic/bitops/non-atomic.h index 365377fb104b..078cc68be2f1 100644 --- a/include/asm-generic/bitops/non-atomic.h +++ b/include/asm-generic/bitops/non-atomic.h @@ -14,7 +14,7 @@ * may be that only one operation succeeds. */ static __always_inline void -arch___set_bit(int nr, volatile unsigned long *addr) +arch___set_bit(unsigned int nr, volatile unsigned long *addr) { unsigned long mask = BIT_MASK(nr); unsigned long *p = ((unsigned long *)addr) + BIT_WORD(nr); @@ -24,7 +24,7 @@ arch___set_bit(int nr, volatile unsigned long *addr) #define __set_bit arch___set_bit static __always_inline void -arch___clear_bit(int nr, volatile unsigned long *addr) +arch___clear_bit(unsigned int nr, volatile unsigned long *addr) { unsigned long mask = BIT_MASK(nr); unsigned long *p = ((unsigned long *)addr) + BIT_WORD(nr); @@ -43,7 +43,7 @@ arch___clear_bit(int nr, volatile unsigned long *addr) * may be that only one operation succeeds. */ static __always_inline -void arch___change_bit(int nr, volatile unsigned long *addr) +void arch___change_bit(unsigned int nr, volatile unsigned long *addr) { unsigned long mask = BIT_MASK(nr); unsigned long *p = ((unsigned long *)addr) + BIT_WORD(nr); @@ -62,7 +62,7 @@ void arch___change_bit(int nr, volatile unsigned long *addr) * but actually fail. You must protect multiple accesses with a lock. */ static __always_inline int -arch___test_and_set_bit(int nr, volatile unsigned long *addr) +arch___test_and_set_bit(unsigned int nr, volatile unsigned long *addr) { unsigned long mask = BIT_MASK(nr); unsigned long *p = ((unsigned long *)addr) + BIT_WORD(nr); @@ -83,7 +83,7 @@ arch___test_and_set_bit(int nr, volatile unsigned long *addr) * but actually fail. You must protect multiple accesses with a lock. */ static __always_inline int -arch___test_and_clear_bit(int nr, volatile unsigned long *addr) +arch___test_and_clear_bit(unsigned int nr, volatile unsigned long *addr) { unsigned long mask = BIT_MASK(nr); unsigned long *p = ((unsigned long *)addr) + BIT_WORD(nr); @@ -96,7 +96,7 @@ arch___test_and_clear_bit(int nr, volatile unsigned long *addr) /* WARNING: non atomic and it can be reordered! */ static __always_inline int -arch___test_and_change_bit(int nr, volatile unsigned long *addr) +arch___test_and_change_bit(unsigned int nr, volatile unsigned long *addr) { unsigned long mask = BIT_MASK(nr); unsigned long *p = ((unsigned long *)addr) + BIT_WORD(nr); @@ -113,7 +113,7 @@ arch___test_and_change_bit(int nr, volatile unsigned long *addr) * @addr: Address to start counting from */ static __always_inline int -arch_test_bit(int nr, const volatile unsigned long *addr) +arch_test_bit(unsigned int nr, const volatile unsigned long *addr) { return 1UL & (addr[BIT_WORD(nr)] >> (nr & (BITS_PER_LONG-1))); } |