Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp340075pxm; Wed, 2 Mar 2022 16:48:48 -0800 (PST) X-Google-Smtp-Source: ABdhPJxlLgppBG4FIlt+JlN8iN9XLSfs6ZGerQgJg5DDrQZCHcUU0POnwsrSf5PAnSKwV1CZX4pi X-Received: by 2002:a17:902:700b:b0:148:ee33:70fe with SMTP id y11-20020a170902700b00b00148ee3370femr34010718plk.38.1646268528641; Wed, 02 Mar 2022 16:48:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646268528; cv=none; d=google.com; s=arc-20160816; b=NuJ1as1uTIWOG4FemisERT16DY5JcZP9avhy/b0DSE+M2NF3Jr+CBUtR6sCR+6b+GP FoFrLBW0Y4A73I2ql/lLxshSwANxb/MusXFZh8cLSh2+OGkgE/Mi1chfCb5DxxQdu4tL 64+y2R1rv1j0RUQ3SHhuH7Hg4mP2N9+Gmd2r/qMh1j5gP4OgPJlj7zProp2mYekabdlK NXY8ENVgDh8VaWA9lAOMfd+81H7alt2bwFWJ7CY3iHFggDC1nKj+lUWk7N3xOQtAUDPB pOkLQoPsUfjUDZTpUVVc5sRvOD2aiakYJ+awWEcE9CcOYKJhc/57SzWFsLZBxUmGF3Ka K4pg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :mime-version:accept-language:in-reply-to:references:message-id:date :thread-index:thread-topic:subject:to:from; bh=vh6outi/BOzGYqkmQKhpwIyNxnTFhCkfZi6Cr74cnlc=; b=W4DrIqHpDqMWrJP08nXnFPrpBoYBrPjd5BVF3AlLonfTmByB9TkYOF/wCpUDNE1vRC 7jslp5+YqG+SyB9gsXFL8sUuUHzNKSYCxJS2oR82Zr+XzPHp7c/DqkjsR4Ci2dWLOBq0 m7V1weLgS0refrUNPrQtL/dldcGRWiHobBO6X2eU4icJUp78tY7sPmF4iEAu+aI937XG QLKPe/sYOGPMUPGn509eZ3UhsE8SYhAbZ85ez+JBZW4Zm+cf4k2alrh13X5m973IMPrq UEOmYw9m2BYpsF26WXszbJ0VQ2+sWq1dXFYL60ymROe+3/cyChu7O+XeBgrnMrAdfn3c 1zRQ== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id ay33-20020a056a00302100b004f41c4fe832si562942pfb.92.2022.03.02.16.48.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Mar 2022 16:48:48 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 65EB410BBDA; Wed, 2 Mar 2022 16:10:46 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230083AbiCCAL1 convert rfc822-to-8bit (ORCPT + 99 others); Wed, 2 Mar 2022 19:11:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60790 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230081AbiCCALY (ORCPT ); Wed, 2 Mar 2022 19:11:24 -0500 Received: from eu-smtp-delivery-151.mimecast.com (eu-smtp-delivery-151.mimecast.com [185.58.86.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 7D0CC10A7D4 for ; Wed, 2 Mar 2022 16:10:40 -0800 (PST) Received: from AcuMS.aculab.com (156.67.243.121 [156.67.243.121]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id uk-mta-9-TaJDYF8zPkim1JgaaMOOTA-1; Thu, 03 Mar 2022 00:10:37 +0000 X-MC-Unique: TaJDYF8zPkim1JgaaMOOTA-1 Received: from AcuMS.Aculab.com (fd9f:af1c:a25b:0:994c:f5c2:35d6:9b65) by AcuMS.aculab.com (fd9f:af1c:a25b:0:994c:f5c2:35d6:9b65) with Microsoft SMTP Server (TLS) id 15.0.1497.28; Thu, 3 Mar 2022 00:10:36 +0000 Received: from AcuMS.Aculab.com ([fe80::994c:f5c2:35d6:9b65]) by AcuMS.aculab.com ([fe80::994c:f5c2:35d6:9b65%12]) with mapi id 15.00.1497.028; Thu, 3 Mar 2022 00:10:36 +0000 From: David Laight To: 'Krzysztof Kozlowski' , "David S. Miller" , Jakub Kicinski , "linux-nfc@lists.01.org" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: RE: [RESEND PATCH v2 4/6] nfc: llcp: use test_bit() Thread-Topic: [RESEND PATCH v2 4/6] nfc: llcp: use test_bit() Thread-Index: AQHYLmtWg0E/2bVm5kqjDz1/h/f2VKysyObA Date: Thu, 3 Mar 2022 00:10:36 +0000 Message-ID: <7fc4cb250bb8406cadf80649e366b249@AcuMS.aculab.com> References: <20220302192523.57444-1-krzysztof.kozlowski@canonical.com> <20220302192523.57444-5-krzysztof.kozlowski@canonical.com> In-Reply-To: <20220302192523.57444-5-krzysztof.kozlowski@canonical.com> Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.202.205.107] MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=C51A453 smtp.mailfrom=david.laight@aculab.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: aculab.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Krzysztof Kozlowski > Sent: 02 March 2022 19:25 > > Use test_bit() instead of open-coding it, just like in other places > touching the bitmap. Except it isn't a bitmap, it is just a structure member that contains bits. So all the other places should be changes to use C shifts and masks (etc). David > > Signed-off-by: Krzysztof Kozlowski > --- > net/nfc/llcp_core.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/net/nfc/llcp_core.c b/net/nfc/llcp_core.c > index 5ad5157aa9c5..b70d5042bf74 100644 > --- a/net/nfc/llcp_core.c > +++ b/net/nfc/llcp_core.c > @@ -383,7 +383,7 @@ u8 nfc_llcp_get_sdp_ssap(struct nfc_llcp_local *local, > pr_debug("WKS %d\n", ssap); > > /* This is a WKS, let's check if it's free */ > - if (local->local_wks & BIT(ssap)) { > + if (test_bit(ssap, &local->local_wks)) { > mutex_unlock(&local->sdp_lock); > > return LLCP_SAP_MAX; > -- > 2.32.0 - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)