Skip to content

Commit

Permalink
nfc: llcp: use test_bit()
Browse files Browse the repository at this point in the history
Use test_bit() instead of open-coding it, just like in other places
touching the bitmap.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
krzk authored and davem330 committed Mar 3, 2022
1 parent 4dbbf67 commit a736491
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/nfc/llcp_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a736491

Please sign in to comment.