Skip to contentSkip to conversation

NFC: pn544: Adjust indentation in pn544_hci_check_presence

PATCH Applied Nathan Chancellor 2 participants 2 messages Dec 18, 2019 – Dec 20, 2019

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 NFC: pn544: Adjust indentation in pn544_hci_check_presence

Clang warns

../drivers/nfc/pn544/pn544.c:696:4: warning: misleading indentation; statement is not part of the previous 'if' [-Wmisleading-indentation]
return nfc_hci_send_cmd(hdev, NFC_HCI_RF_READER_A_GATE, ^
../drivers/nfc/pn544/pn544.c:692:3: note: previous statement is here

                if (target->nfcid1_len != 4 && target->nfcid1_len != 7 &&
                ^

1 warning generated.

This warning occurs because there is a space after the tab on this line. Remove it so that the indentation is consistent with the Linux kernel coding style and clang no longer warns.

Fixes da052850b911 ("NFC: Add pn544 presence check for different targets")
---
 drivers/nfc/pn544/pn544.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nfc/pn544/pn544.c +1 -1
index cda996f6954e..2b83156efe3f 100644
@@ -693,7 +693,7 @@ static int pn544_hci_check_presence(struct nfc_hci_dev *hdev,
 		    target->nfcid1_len != 10)
 			return -EOPNOTSUPP;
 
-		 return nfc_hci_send_cmd(hdev, NFC_HCI_RF_READER_A_GATE,
+		return nfc_hci_send_cmd(hdev, NFC_HCI_RF_READER_A_GATE,
 				     PN544_RF_READER_CMD_ACTIVATE_NEXT,
 				     target->nfcid1, target->nfcid1_len, NULL);
 	} else if (target->supported_protocols & (NFC_PROTO_JEWEL_MASK |
Signature · 1 line
2.24.1
maintainer Applied
#1 lore raw

From: Nathan Chancellor <[email protected]>
Date: Tue, 17 Dec 2019 18:21:52 -0700

Quoted 11 lines

Clang warns

../drivers/nfc/pn544/pn544.c:696:4: warning: misleading indentation; statement is not part of the previous 'if' [-Wmisleading-indentation]
return nfc_hci_send_cmd(hdev, NFC_HCI_RF_READER_A_GATE, ^
../drivers/nfc/pn544/pn544.c:692:3: note: previous statement is here

                if (target->nfcid1_len != 4 && target->nfcid1_len != 7 &&
                ^

1 warning generated.

Quoted 7 lines

This warning occurs because there is a space after the tab on this line. Remove it so that the indentation is consistent with the Linux kernel coding style and clang no longer warns.

Fixes da052850b911 ("NFC: Add pn544 presence check for different targets")

Applied to net-next, thanks.