NFC: Fix some code style and whitespace issues
authorSzymon Janc <szymon.janc@tieto.com>
Wed, 17 Oct 2012 13:23:39 +0000 (15:23 +0200)
committerSamuel Ortiz <sameo@linux.intel.com>
Fri, 26 Oct 2012 16:26:52 +0000 (18:26 +0200)
Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
net/nfc/core.c
net/nfc/hci/core.c
net/nfc/hci/llc.c
net/nfc/hci/llc_shdlc.c
net/nfc/llcp/llcp.c
net/nfc/nci/core.c
net/nfc/netlink.c
net/nfc/rawsock.c

index e94363dbbf4a5264520a08a107b16b34f07b008b..aa64ea441676a1ce9fc8c2417cc4487eaecf2cec 100644 (file)
@@ -198,7 +198,7 @@ static struct nfc_target *nfc_find_target(struct nfc_dev *dev, u32 target_idx)
        if (dev->n_targets == 0)
                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)
                        return &dev->targets[i];
        }
index 4b720ff20ee977f9517e1080f316849d59ceb8c3..bc571b0efb9228b97b6c4e19a6809adb6be2c0f3 100644 (file)
@@ -65,8 +65,9 @@ static void nfc_hci_msg_tx_work(struct work_struct *work)
                                                          -ETIME);
                        kfree(hdev->cmd_pending_msg);
                        hdev->cmd_pending_msg = NULL;
-               } else
+               } else {
                        goto exit;
+               }
        }
 
 next_msg:
@@ -535,7 +536,8 @@ static int hci_start_poll(struct nfc_dev *nfc_dev,
                return hdev->ops->start_poll(hdev, im_protocols, tm_protocols);
        else
                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)
@@ -639,9 +641,9 @@ static int hci_transceive(struct nfc_dev *nfc_dev, struct nfc_target *target,
                                                     cb_context);
                        if (r == 1)
                                r = -ENOTSUPP;
-               }
-               else
+               } else {
                        r = -ENOTSUPP;
+               }
                break;
        }
 
@@ -891,7 +893,7 @@ void nfc_hci_driver_failure(struct nfc_hci_dev *hdev, int err)
 }
 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);
 }
index ae1205ded87fda2769025d09b31c6c21632298a3..fe5e966e5b88efb9d24c24015ad38a3c4642e12a 100644 (file)
@@ -72,7 +72,7 @@ int nfc_llc_register(const char *name, struct nfc_llc_ops *ops)
        llc_engine->ops = ops;
 
        INIT_LIST_HEAD(&llc_engine->entry);
-       list_add_tail (&llc_engine->entry, &llc_engines);
+       list_add_tail(&llc_engine->entry, &llc_engines);
 
        return 0;
 }
index 01cbc72943cd55887a2aaac52ec045a2788cf9a3..27b313befc35eff1f5cfceb41f8ecf9be618c159 100644 (file)
@@ -634,9 +634,9 @@ static void llc_shdlc_sm_work(struct work_struct *work)
                        r = llc_shdlc_connect_initiate(shdlc);
                else
                        r = -ETIME;
-               if (r < 0)
+               if (r < 0) {
                        llc_shdlc_connect_complete(shdlc, r);
-               else {
+               else {
                        mod_timer(&shdlc->connect_timer, jiffies +
                                  msecs_to_jiffies(SHDLC_CONNECT_VALUE_MS));
 
@@ -682,9 +682,8 @@ static void llc_shdlc_sm_work(struct work_struct *work)
                        llc_shdlc_handle_send_queue(shdlc);
                }
 
-               if (shdlc->hard_fault) {
+               if (shdlc->hard_fault)
                        shdlc->llc_failure(shdlc->hdev, shdlc->hard_fault);
-               }
                break;
        default:
                break;
index 285bba8c7afc415d0ed021f894ae667e768c6391..c8b27afc16f90144efc7312bf233a852d0df0a88 100644 (file)
@@ -65,7 +65,8 @@ static void nfc_llcp_socket_release(struct nfc_llcp_local *local, bool listen)
                        struct nfc_llcp_sock *lsk, *n;
                        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_sk = &lsk->sk;
                                bh_lock_sock(accept_sk);
@@ -1111,7 +1112,7 @@ static void nfc_llcp_recv_snl(struct nfc_llcp_local *local,
        tlv_len = skb->len - LLCP_HEADER_SIZE;
        offset = 0;
 
-       while(offset < tlv_len) {
+       while (offset < tlv_len) {
                type = tlv[0];
                length = tlv[1];
 
@@ -1168,7 +1169,7 @@ static void nfc_llcp_recv_snl(struct nfc_llcp_local *local,
 
                        pr_debug("%p %d\n", llcp_sock, sap);
 
-               send_snl:
+send_snl:
                        nfc_llcp_send_snl(local, tid, sap);
                        break;
 
index 89446c8c40c7db49b80de8d7d3164103e01d1b25..5f98dc1bf03943abfd3315109acf94431858a9e2 100644 (file)
@@ -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,
                           __u8 comm_mode, __u8 *gb, size_t gb_len)
 {
index ab9edfdd4b85cfffa33ec6e7103d9f679e2d6ea5..614cfd0470b7e5cecf8f55779ca8a2c23687e2f9 100644 (file)
@@ -591,7 +591,7 @@ static int nfc_genl_start_poll(struct sk_buff *skb, struct genl_info *info)
        if (!info->attrs[NFC_ATTR_DEVICE_INDEX] ||
            ((!info->attrs[NFC_ATTR_IM_PROTOCOLS] &&
              !info->attrs[NFC_ATTR_PROTOCOLS]) &&
-            !info->attrs[NFC_ATTR_TM_PROTOCOLS]))
+             !info->attrs[NFC_ATTR_TM_PROTOCOLS]))
                return -EINVAL;
 
        idx = nla_get_u32(info->attrs[NFC_ATTR_DEVICE_INDEX]);
index 8b8a6a2b2badaf61e9c71a174809ca989438668f..313bf1bc848a8c45b755e838fc9cd595e1a833c2 100644 (file)
@@ -256,7 +256,6 @@ static int rawsock_recvmsg(struct kiocb *iocb, struct socket *sock,
        return rc ? : copied;
 }
 
-
 static const struct proto_ops rawsock_ops = {
        .family         = PF_NFC,
        .owner          = THIS_MODULE,