Bluetooth: Make data pointer of hci_recv_stream_fragment const
The data pointer provided to hci_recv_stream_fragment function should have been marked const. The function has no business in modifying the original data. So fix this now. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
parent
940cbe3a6b
commit
5c7d2dd285
|
@ -1012,7 +1012,7 @@ int hci_remove_remote_oob_data(struct hci_dev *hdev, bdaddr_t *bdaddr,
|
||||||
void hci_event_packet(struct hci_dev *hdev, struct sk_buff *skb);
|
void hci_event_packet(struct hci_dev *hdev, struct sk_buff *skb);
|
||||||
|
|
||||||
int hci_recv_frame(struct hci_dev *hdev, struct sk_buff *skb);
|
int hci_recv_frame(struct hci_dev *hdev, struct sk_buff *skb);
|
||||||
int hci_recv_stream_fragment(struct hci_dev *hdev, void *data, int count);
|
int hci_recv_stream_fragment(struct hci_dev *hdev, const void *data, int count);
|
||||||
|
|
||||||
void hci_init_sysfs(struct hci_dev *hdev);
|
void hci_init_sysfs(struct hci_dev *hdev);
|
||||||
void hci_conn_init_sysfs(struct hci_conn *conn);
|
void hci_conn_init_sysfs(struct hci_conn *conn);
|
||||||
|
|
|
@ -3320,7 +3320,7 @@ int hci_recv_frame(struct hci_dev *hdev, struct sk_buff *skb)
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(hci_recv_frame);
|
EXPORT_SYMBOL(hci_recv_frame);
|
||||||
|
|
||||||
static int hci_reassembly(struct hci_dev *hdev, int type, void *data,
|
static int hci_reassembly(struct hci_dev *hdev, int type, const void *data,
|
||||||
int count, __u8 index)
|
int count, __u8 index)
|
||||||
{
|
{
|
||||||
int len = 0;
|
int len = 0;
|
||||||
|
@ -3430,7 +3430,7 @@ static int hci_reassembly(struct hci_dev *hdev, int type, void *data,
|
||||||
|
|
||||||
#define STREAM_REASSEMBLY 0
|
#define STREAM_REASSEMBLY 0
|
||||||
|
|
||||||
int hci_recv_stream_fragment(struct hci_dev *hdev, void *data, int count)
|
int hci_recv_stream_fragment(struct hci_dev *hdev, const void *data, int count)
|
||||||
{
|
{
|
||||||
int type;
|
int type;
|
||||||
int rem = 0;
|
int rem = 0;
|
||||||
|
@ -3439,7 +3439,7 @@ int hci_recv_stream_fragment(struct hci_dev *hdev, void *data, int count)
|
||||||
struct sk_buff *skb = hdev->reassembly[STREAM_REASSEMBLY];
|
struct sk_buff *skb = hdev->reassembly[STREAM_REASSEMBLY];
|
||||||
|
|
||||||
if (!skb) {
|
if (!skb) {
|
||||||
struct { char type; } *pkt;
|
const struct { char type; } *pkt;
|
||||||
|
|
||||||
/* Start of the frame */
|
/* Start of the frame */
|
||||||
pkt = data;
|
pkt = data;
|
||||||
|
|
Loading…
Reference in New Issue