]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/blobdiff - net/nfc/nci/hci.c
networking: make skb_push & __skb_push return void pointers
[mirror_ubuntu-hirsute-kernel.git] / net / nfc / nci / hci.c
index a0ab26d535dca7492facc16f7aa11796732d685a..3f93df58d9f171e6d1016ff3a389104bcc89c538 100644 (file)
@@ -170,7 +170,7 @@ static int nci_hci_send_data(struct nci_dev *ndev, u8 pipe,
                return -ENOMEM;
 
        skb_reserve(skb, NCI_DATA_HDR_SIZE + 2);
-       *skb_push(skb, 1) = data_type;
+       *(u8 *)skb_push(skb, 1) = data_type;
 
        do {
                len = conn_info->max_pkt_payload_len;
@@ -184,10 +184,10 @@ static int nci_hci_send_data(struct nci_dev *ndev, u8 pipe,
                        len = conn_info->max_pkt_payload_len - skb->len - 1;
                }
 
-               *skb_push(skb, 1) = cb;
+               *(u8 *)skb_push(skb, 1) = cb;
 
                if (len > 0)
-                       memcpy(skb_put(skb, len), data + i, len);
+                       skb_put_data(skb, data + i, len);
 
                r = nci_send_data(ndev, conn_info->conn_id, skb);
                if (r < 0)
@@ -472,12 +472,13 @@ void nci_hci_data_received_cb(void *context,
                        return;
                }
 
-               *skb_put(hcp_skb, NCI_HCI_HCP_PACKET_HEADER_LEN) = pipe;
+               *(u8 *)skb_put(hcp_skb, NCI_HCI_HCP_PACKET_HEADER_LEN) = pipe;
 
                skb_queue_walk(&ndev->hci_dev->rx_hcp_frags, frag_skb) {
                        msg_len = frag_skb->len - NCI_HCI_HCP_PACKET_HEADER_LEN;
-                       memcpy(skb_put(hcp_skb, msg_len), frag_skb->data +
-                              NCI_HCI_HCP_PACKET_HEADER_LEN, msg_len);
+                       skb_put_data(hcp_skb,
+                                    frag_skb->data + NCI_HCI_HCP_PACKET_HEADER_LEN,
+                                    msg_len);
                }
 
                skb_queue_purge(&ndev->hci_dev->rx_hcp_frags);