projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4dbbf67
)
nfc: llcp: use test_bit()
author
Krzysztof Kozlowski
<krzysztof.kozlowski@canonical.com>
Wed, 2 Mar 2022 19:25:21 +0000
(20:25 +0100)
committer
David S. Miller
<davem@davemloft.net>
Thu, 3 Mar 2022 10:43:37 +0000
(10:43 +0000)
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>
net/nfc/llcp_core.c
patch
|
blob
|
history
diff --git
a/net/nfc/llcp_core.c
b/net/nfc/llcp_core.c
index 5ad5157aa9c57f7624d0a825b180dcccce9e6a6a..b70d5042bf744c297403b58e19c25fef75165d10 100644
(file)
--- 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;