Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp211857pxm; Wed, 2 Mar 2022 13:40:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJxtleiRlENsxnMCqLyCEQqM1xyo+JyGU3vocRPD47Ld8ONRhENfv68N9wPQTUBoF+oSf+dc X-Received: by 2002:a63:db43:0:b0:378:906c:2a3d with SMTP id x3-20020a63db43000000b00378906c2a3dmr15498518pgi.209.1646257222922; Wed, 02 Mar 2022 13:40:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646257222; cv=none; d=google.com; s=arc-20160816; b=BhU37qUlmTzYRyozFuVAuhrf3QDVfZwNt17GvZMytHtWoGXMFqIGam+B3MNkjIHuEe ql3OOT0MWKQlBi8uBNNyAtUapwh5RLinSQZNk0OFbbeMwvfsq/j+2txupSiuITHvetAo 1tp8L5sLUh/0VYsmf7dQVVOWng4YYxqvKjdWwFeB02MiPgDPU8wd5huAOgkHujAmSZjT TLlKXZ+fCnrfO1IEuxCa5EjcwpLtKy9sXeEv/LzgJIxNxMWwnhnfO1lEKeedQfvIoIjF 3YiuhT1wY5iJnRSwJB0kScOxysDG2mEw/MVatwcCJVfop8OQdScRDwXNYqCw47vEciZS aFLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=15HOmnObJXsVXxZJ5x/3DtxcDfRhMgZoa5zrHrITnNA=; b=TNRUt3YR8OXWBB3eC77OLgVh9Ho2mur6L32cEi+78o0Gr+tj4+gG2TKHrrqd6sv0pf sHAefZOACjLyPWVHJUV76Khp7we5dadrb46zq6w0xmK6hf1KD/Lun/z8THI/P2ajpmiY l9+FTqHrJp9n+KbVsJcQxRQyaEgB0aLI8Y4+k2FFE3UHSPa28jvL7oJxjrpl4JfZC7WD Q/l28FYrXvka4FqHXqKW/yI7+uj2TMGJRJ2dAPTGTqNeD/qnyf4xvk6PV2e+r6AuwXL1 rTudQYb2fOc85F6ho913hNDYyeSIs1PoPzsXiNHlyKk1GthnaUBbVo6TdgpzzA7fNH0y 563A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=m2iWuTsb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v10-20020a17090a088a00b001bcc9bc6a71si6586342pjc.162.2022.03.02.13.40.03; Wed, 02 Mar 2022 13:40:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=m2iWuTsb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240614AbiCBT0k (ORCPT + 99 others); Wed, 2 Mar 2022 14:26:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41082 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239806AbiCBT0T (ORCPT ); Wed, 2 Mar 2022 14:26:19 -0500 Received: from smtp-relay-internal-1.canonical.com (smtp-relay-internal-1.canonical.com [185.125.188.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 493FEC12F0 for ; Wed, 2 Mar 2022 11:25:36 -0800 (PST) Received: from mail-ej1-f70.google.com (mail-ej1-f70.google.com [209.85.218.70]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id B41C23F5FF for ; Wed, 2 Mar 2022 19:25:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1646249132; bh=15HOmnObJXsVXxZJ5x/3DtxcDfRhMgZoa5zrHrITnNA=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=m2iWuTsbzZ0fn/Kxc87HP8Lc1/jvXzwP/jkvWD8zKwW1boaOo5y1hRgPW1wGYmJcc ttXoRtM60lZ+cu1wGeS7r/MVffgFYd9DIMCN3etZVkNutEyKLBYdUnoIj7lckWI5MS Vu4ER0iEbVek0XQiQqJewXSgWJvoNqnya3mMAyEos4G0XvvaLnQqPMxQDEDiXmWxSg T/1nrCvTJuyNgnKVDC+liZ2RnE3c00Ai8xz8Obh3S+J2LsFd1Pyovca8QNQIY5EG1r EBmQsy4uBTPm1Q2626iVkSCa+0/YKmyRStvRGLcwce4WMD2b59yV2Otv5idpMFyUqq T1fEWaz8j53hQ== Received: by mail-ej1-f70.google.com with SMTP id nb1-20020a1709071c8100b006d03c250b6fso1486860ejc.11 for ; Wed, 02 Mar 2022 11:25:32 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=15HOmnObJXsVXxZJ5x/3DtxcDfRhMgZoa5zrHrITnNA=; b=rFOwvijZfdKJPMIZ5CWQDiwa1foS43FhTgHhki/Q7NeWni7Mr7scJOWas7ERPV6oOc qqIaVp4J+MeR+bIiPjmRUETRb3hHoOJ9dSKVw43q5XligDeBLsVOAYSqVRMMD2Yy6Lmv +WATV1wLCxmqqBpKBQ/IuBXL7id8zyJFvvhEaR/fvp/J0GHh35MVM+UWKTGq6MD+dyrL ECbw+K0bWgjQCAeIEweN59Xpf7emj6Ub1jOie+Ty0jHKZheRnml2QdUkq0aKmKjs+tKJ GFZmh2LT5v5rZhSUVqRUVeccyG/4aP4SPW5G1UtYGP6xRix71pi71VDQfQSGLvk2gIQn jdSw== X-Gm-Message-State: AOAM533+YP9Y+yu99eVJaPbDJE/t7c+c5Qce266lBZdKcPsCiEj137Y+ dEspijhikES6ldfQNp2L4wMRQ6iyKzyUducBjWOmgrjSMfuL9HsXhkT2CaUfupQm/6odfGQ6IIb uI9ECAifw2uIlAM9uPGnIhxaWzWIhHfgH1ulVGcnAIA== X-Received: by 2002:a17:906:7751:b0:6ce:e3c:81a6 with SMTP id o17-20020a170906775100b006ce0e3c81a6mr23328454ejn.278.1646249132425; Wed, 02 Mar 2022 11:25:32 -0800 (PST) X-Received: by 2002:a17:906:7751:b0:6ce:e3c:81a6 with SMTP id o17-20020a170906775100b006ce0e3c81a6mr23328438ejn.278.1646249132223; Wed, 02 Mar 2022 11:25:32 -0800 (PST) Received: from localhost.localdomain (xdsl-188-155-181-108.adslplus.ch. [188.155.181.108]) by smtp.gmail.com with ESMTPSA id i14-20020a50cfce000000b00415b0730921sm1482765edk.42.2022.03.02.11.25.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Mar 2022 11:25:31 -0800 (PST) From: Krzysztof Kozlowski To: Krzysztof Kozlowski , "David S. Miller" , Jakub Kicinski , linux-nfc@lists.01.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [RESEND PATCH v2 4/6] nfc: llcp: use test_bit() Date: Wed, 2 Mar 2022 20:25:21 +0100 Message-Id: <20220302192523.57444-5-krzysztof.kozlowski@canonical.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220302192523.57444-1-krzysztof.kozlowski@canonical.com> References: <20220302192523.57444-1-krzysztof.kozlowski@canonical.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 Use test_bit() instead of open-coding it, just like in other places touching the bitmap. 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