On 03/03/2022 01:10, David Laight wrote:
> 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).
It's not declared as bitmap but it is unsigned long, so an appropriate
type (and same type) for test_bit.
These are improvements, not fixing any experienced issue, just looking correct
to me from the code point of view.
Changes since v1
1. Split from the fix.
Under QEMU only. The NFC/LLCP code was not really tested on a device.
Krzysztof Kozlowski (6):
nfc: llcp: nullify llcp_sock->dev on connect() error paths
nfc: llcp: simplify llcp_sock_connect() error paths
nfc: llcp: use centralized exiting of bind on errors
nfc: llcp: use test_bit()
nfc: llcp: protect nfc_llcp_sock_unlink() calls
nfc: llcp: Revert "NFC: Keep socket alive until the DISC PDU is
net/nfc/llcp.h | 1 -
net/nfc/llcp_core.c | 9 +--------
net/nfc/llcp_sock.c | 49 ++++++++++++++++++++++-----------------------
3 files changed, 25 insertions(+), 34 deletions(-)