first fruits - kill l2cap ->memcpy_fromiovec()
Just use copy_from_iter(). That's what this method is trying to do in all cases, in a very convoluted fashion. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
@@ -268,7 +268,7 @@ static void smp_send_cmd(struct l2cap_conn *conn, u8 code, u16 len, void *data)
|
||||
|
||||
memset(&msg, 0, sizeof(msg));
|
||||
|
||||
iov_iter_init(&msg.msg_iter, WRITE, (struct iovec *)iv, 2, 1 + len);
|
||||
iov_iter_kvec(&msg.msg_iter, WRITE | ITER_KVEC, iv, 2, 1 + len);
|
||||
|
||||
l2cap_chan_send(chan, &msg, 1 + len);
|
||||
|
||||
@@ -1629,7 +1629,6 @@ static const struct l2cap_ops smp_chan_ops = {
|
||||
.suspend = l2cap_chan_no_suspend,
|
||||
.set_shutdown = l2cap_chan_no_set_shutdown,
|
||||
.get_sndtimeo = l2cap_chan_no_get_sndtimeo,
|
||||
.memcpy_fromiovec = l2cap_chan_no_memcpy_fromiovec,
|
||||
};
|
||||
|
||||
static inline struct l2cap_chan *smp_new_conn_cb(struct l2cap_chan *pchan)
|
||||
@@ -1678,7 +1677,6 @@ static const struct l2cap_ops smp_root_chan_ops = {
|
||||
.resume = l2cap_chan_no_resume,
|
||||
.set_shutdown = l2cap_chan_no_set_shutdown,
|
||||
.get_sndtimeo = l2cap_chan_no_get_sndtimeo,
|
||||
.memcpy_fromiovec = l2cap_chan_no_memcpy_fromiovec,
|
||||
};
|
||||
|
||||
int smp_register(struct hci_dev *hdev)
|
||||
|
Reference in New Issue
Block a user