Commit 0f450772 authored by Szymon Janc's avatar Szymon Janc Committed by Samuel Ortiz

NFC: Fix some code style and whitespace issues

Signed-off-by: default avatarSzymon Janc <szymon.janc@tieto.com>
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent 7eda8b8e
...@@ -198,7 +198,7 @@ static struct nfc_target *nfc_find_target(struct nfc_dev *dev, u32 target_idx) ...@@ -198,7 +198,7 @@ static struct nfc_target *nfc_find_target(struct nfc_dev *dev, u32 target_idx)
if (dev->n_targets == 0) if (dev->n_targets == 0)
return NULL; return NULL;
for (i = 0; i < dev->n_targets ; i++) { for (i = 0; i < dev->n_targets; i++) {
if (dev->targets[i].idx == target_idx) if (dev->targets[i].idx == target_idx)
return &dev->targets[i]; return &dev->targets[i];
} }
......
...@@ -65,9 +65,10 @@ static void nfc_hci_msg_tx_work(struct work_struct *work) ...@@ -65,9 +65,10 @@ static void nfc_hci_msg_tx_work(struct work_struct *work)
-ETIME); -ETIME);
kfree(hdev->cmd_pending_msg); kfree(hdev->cmd_pending_msg);
hdev->cmd_pending_msg = NULL; hdev->cmd_pending_msg = NULL;
} else } else {
goto exit; goto exit;
} }
}
next_msg: next_msg:
if (list_empty(&hdev->msg_tx_queue)) if (list_empty(&hdev->msg_tx_queue))
...@@ -535,7 +536,8 @@ static int hci_start_poll(struct nfc_dev *nfc_dev, ...@@ -535,7 +536,8 @@ static int hci_start_poll(struct nfc_dev *nfc_dev,
return hdev->ops->start_poll(hdev, im_protocols, tm_protocols); return hdev->ops->start_poll(hdev, im_protocols, tm_protocols);
else else
return nfc_hci_send_event(hdev, NFC_HCI_RF_READER_A_GATE, return nfc_hci_send_event(hdev, NFC_HCI_RF_READER_A_GATE,
NFC_HCI_EVT_READER_REQUESTED, NULL, 0); NFC_HCI_EVT_READER_REQUESTED,
NULL, 0);
} }
static void hci_stop_poll(struct nfc_dev *nfc_dev) static void hci_stop_poll(struct nfc_dev *nfc_dev)
...@@ -639,9 +641,9 @@ static int hci_transceive(struct nfc_dev *nfc_dev, struct nfc_target *target, ...@@ -639,9 +641,9 @@ static int hci_transceive(struct nfc_dev *nfc_dev, struct nfc_target *target,
cb_context); cb_context);
if (r == 1) if (r == 1)
r = -ENOTSUPP; r = -ENOTSUPP;
} } else {
else
r = -ENOTSUPP; r = -ENOTSUPP;
}
break; break;
} }
...@@ -891,7 +893,7 @@ void nfc_hci_driver_failure(struct nfc_hci_dev *hdev, int err) ...@@ -891,7 +893,7 @@ void nfc_hci_driver_failure(struct nfc_hci_dev *hdev, int err)
} }
EXPORT_SYMBOL(nfc_hci_driver_failure); EXPORT_SYMBOL(nfc_hci_driver_failure);
void inline nfc_hci_recv_frame(struct nfc_hci_dev *hdev, struct sk_buff *skb) void nfc_hci_recv_frame(struct nfc_hci_dev *hdev, struct sk_buff *skb)
{ {
nfc_llc_rcv_from_drv(hdev->llc, skb); nfc_llc_rcv_from_drv(hdev->llc, skb);
} }
......
...@@ -72,7 +72,7 @@ int nfc_llc_register(const char *name, struct nfc_llc_ops *ops) ...@@ -72,7 +72,7 @@ int nfc_llc_register(const char *name, struct nfc_llc_ops *ops)
llc_engine->ops = ops; llc_engine->ops = ops;
INIT_LIST_HEAD(&llc_engine->entry); INIT_LIST_HEAD(&llc_engine->entry);
list_add_tail (&llc_engine->entry, &llc_engines); list_add_tail(&llc_engine->entry, &llc_engines);
return 0; return 0;
} }
......
...@@ -634,9 +634,9 @@ static void llc_shdlc_sm_work(struct work_struct *work) ...@@ -634,9 +634,9 @@ static void llc_shdlc_sm_work(struct work_struct *work)
r = llc_shdlc_connect_initiate(shdlc); r = llc_shdlc_connect_initiate(shdlc);
else else
r = -ETIME; r = -ETIME;
if (r < 0) if (r < 0) {
llc_shdlc_connect_complete(shdlc, r); llc_shdlc_connect_complete(shdlc, r);
else { } else {
mod_timer(&shdlc->connect_timer, jiffies + mod_timer(&shdlc->connect_timer, jiffies +
msecs_to_jiffies(SHDLC_CONNECT_VALUE_MS)); msecs_to_jiffies(SHDLC_CONNECT_VALUE_MS));
...@@ -682,9 +682,8 @@ static void llc_shdlc_sm_work(struct work_struct *work) ...@@ -682,9 +682,8 @@ static void llc_shdlc_sm_work(struct work_struct *work)
llc_shdlc_handle_send_queue(shdlc); llc_shdlc_handle_send_queue(shdlc);
} }
if (shdlc->hard_fault) { if (shdlc->hard_fault)
shdlc->llc_failure(shdlc->hdev, shdlc->hard_fault); shdlc->llc_failure(shdlc->hdev, shdlc->hard_fault);
}
break; break;
default: default:
break; break;
......
...@@ -65,7 +65,8 @@ static void nfc_llcp_socket_release(struct nfc_llcp_local *local, bool listen) ...@@ -65,7 +65,8 @@ static void nfc_llcp_socket_release(struct nfc_llcp_local *local, bool listen)
struct nfc_llcp_sock *lsk, *n; struct nfc_llcp_sock *lsk, *n;
struct sock *accept_sk; struct sock *accept_sk;
list_for_each_entry_safe(lsk, n, &llcp_sock->accept_queue, list_for_each_entry_safe(lsk, n,
&llcp_sock->accept_queue,
accept_queue) { accept_queue) {
accept_sk = &lsk->sk; accept_sk = &lsk->sk;
bh_lock_sock(accept_sk); bh_lock_sock(accept_sk);
...@@ -1111,7 +1112,7 @@ static void nfc_llcp_recv_snl(struct nfc_llcp_local *local, ...@@ -1111,7 +1112,7 @@ static void nfc_llcp_recv_snl(struct nfc_llcp_local *local,
tlv_len = skb->len - LLCP_HEADER_SIZE; tlv_len = skb->len - LLCP_HEADER_SIZE;
offset = 0; offset = 0;
while(offset < tlv_len) { while (offset < tlv_len) {
type = tlv[0]; type = tlv[0];
length = tlv[1]; length = tlv[1];
...@@ -1168,7 +1169,7 @@ static void nfc_llcp_recv_snl(struct nfc_llcp_local *local, ...@@ -1168,7 +1169,7 @@ static void nfc_llcp_recv_snl(struct nfc_llcp_local *local,
pr_debug("%p %d\n", llcp_sock, sap); pr_debug("%p %d\n", llcp_sock, sap);
send_snl: send_snl:
nfc_llcp_send_snl(local, tid, sap); nfc_llcp_send_snl(local, tid, sap);
break; break;
......
...@@ -577,7 +577,6 @@ static void nci_deactivate_target(struct nfc_dev *nfc_dev, ...@@ -577,7 +577,6 @@ static void nci_deactivate_target(struct nfc_dev *nfc_dev,
} }
} }
static int nci_dep_link_up(struct nfc_dev *nfc_dev, struct nfc_target *target, static int nci_dep_link_up(struct nfc_dev *nfc_dev, struct nfc_target *target,
__u8 comm_mode, __u8 *gb, size_t gb_len) __u8 comm_mode, __u8 *gb, size_t gb_len)
{ {
......
...@@ -256,7 +256,6 @@ static int rawsock_recvmsg(struct kiocb *iocb, struct socket *sock, ...@@ -256,7 +256,6 @@ static int rawsock_recvmsg(struct kiocb *iocb, struct socket *sock,
return rc ? : copied; return rc ? : copied;
} }
static const struct proto_ops rawsock_ops = { static const struct proto_ops rawsock_ops = {
.family = PF_NFC, .family = PF_NFC,
.owner = THIS_MODULE, .owner = THIS_MODULE,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment