From mboxrd@z Thu Jan 1 00:00:00 1970 From: Martin Schwidefsky Subject: Re: [PATCH v2 03/12] s390/bitops: add test_and_clear_bit_inv() Date: Thu, 25 Jan 2018 14:53:41 +0100 Message-ID: <20180125145341.3a536ea0@mschwideX1> References: <20180125132848.175942-1-borntraeger@de.ibm.com> <20180125132848.175942-4-borntraeger@de.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Cornelia Huck , KVM , linux-s390 , Janosch Frank , David Hildenbrand , Heiko Carstens , Michael Mueller To: Christian Borntraeger Return-path: Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:50234 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750980AbeAYNxt (ORCPT ); Thu, 25 Jan 2018 08:53:49 -0500 Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w0PDqYml017907 for ; Thu, 25 Jan 2018 08:53:49 -0500 Received: from e06smtp13.uk.ibm.com (e06smtp13.uk.ibm.com [195.75.94.109]) by mx0a-001b2d01.pphosted.com with ESMTP id 2fqf703sh4-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Thu, 25 Jan 2018 08:53:48 -0500 Received: from localhost by e06smtp13.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 25 Jan 2018 13:53:46 -0000 In-Reply-To: <20180125132848.175942-4-borntraeger@de.ibm.com> Sender: kvm-owner@vger.kernel.org List-ID: On Thu, 25 Jan 2018 14:28:39 +0100 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 > Reviewed-by: David Hildenbrand > Reviewed-by: Cornelia Huck > 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 31e400c..86e5b2f 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); Acked-by: Martin Schwidefsky -- blue skies, Martin. "Reality continues to ruin my life." - Calvin.