From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Hildenbrand Subject: Re: [PATCH 03/12] s390/bitops: add test_and_clear_bit_inv() Date: Tue, 16 Jan 2018 21:13:09 +0100 Message-ID: <69389a23-be84-21da-3b17-167c0d1e72fc@redhat.com> References: <20180116200217.211897-1-borntraeger@de.ibm.com> <20180116200217.211897-4-borntraeger@de.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20180116200217.211897-4-borntraeger@de.ibm.com> Content-Language: en-US Sender: kvm-owner@vger.kernel.org List-Archive: List-Post: To: Christian Borntraeger , Cornelia Huck Cc: KVM , linux-s390 , Janosch Frank , Michael Mueller List-ID: On 16.01.2018 21:02, Christian Borntraeger wrote: > From: Jens Freimann > > This patch adds a MSB0 bit numbering version of test_and_clear_bit(). > > Signed-off-by: Jens Freimann > Signed-off-by: Michael Mueller > Reviewed-by: Pierre Morel > Reviewed-by: Halil Pasic > Reviewed-by: Christian Borntraeger > Signed-off-by: Christian Borntraeger > --- > 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); > Reviewed-by: David Hildenbrand -- Thanks, David / dhildenb