s390/bitops: add test_and_clear_bit_inv()
"Linux Kernel Mailing List" <[email protected]> Sat, 10 Feb 2018 22:00:22 +0000 (UTC)
| Newsgroups | gmane.linux.kernel.commits.head |
|---|---|
| Message-ID | <[email protected]> |
Web: https://git.kernel.org/torvalds/c/f3ec471a9832f8365836d70db4d52db9cc4dd6b1 Commit: f3ec471a9832f8365836d70db4d52db9cc4dd6b1 Parent: 19114beb73f774e466d9e39b8e8b961812c9f881 Refname: refs/heads/master Author: Jens Freimann <[email protected]> AuthorDate: Thu Mar 16 17:45:40 2017 +0100 Committer: Christian Borntraeger <[email protected]> CommitDate: Fri Jan 26 10:47:38 2018 +0100 s390/bitops: add test_and_clear_bit_inv() This patch adds a MSB0 bit numbering version of test_and_clear_bit(). Signed-off-by: Jens Freimann <[email protected]> Signed-off-by: Michael Mueller <[email protected]> Reviewed-by: Pierre Morel <[email protected]> Reviewed-by: Halil Pasic <[email protected]> Reviewed-by: Christian Borntraeger <[email protected]> Reviewed-by: David Hildenbrand <[email protected]> Reviewed-by: Cornelia Huck <[email protected]> Acked-by: Martin Schwidefsky <[email protected]> Signed-off-by: Christian Borntraeger <[email protected]> --- arch/s390/include/asm/bitops.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/s390/include/asm/bitops.h b/arch/s390/include/asm/bitops.h index 31e400c1a1f3..86e5b2fdee3c 100644 --- a/arch/s390/include/asm/bitops.h +++ b/arch/s390/include/asm/bitops.h @@ -261,6 +261,11 @@ static inline void clear_bit_inv(unsigned long nr, volatile unsigned long *ptr) return clear_bit(nr ^ (BITS_PER_LONG - 1), ptr); } +static inline int test_and_clear_bit_inv(unsigned long nr, volatile unsigned long *ptr) +{ + return test_and_clear_bit(nr ^ (BITS_PER_LONG - 1), ptr); +} + static inline void __set_bit_inv(unsigned long nr, volatile unsigned long *ptr) { return __set_bit(nr ^ (BITS_PER_LONG - 1), ptr); -- To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html