diff options
author | Johannes Berg <johannes.berg@intel.com> | 2017-02-07 23:04:11 +0100 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2017-02-09 14:52:26 +0100 |
commit | e13e44d9a81da4bf77d9869db5b4764fc0811d9f (patch) | |
tree | c610ae2b0f634df75fe88f65a047e5c741c9b0af /patches/0050-iov_iter/bluetooth.patch | |
parent | 46939c43903da6b202c95a0fcb24acce55fd63c0 (diff) |
backports: always use new version compare macros
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'patches/0050-iov_iter/bluetooth.patch')
-rw-r--r-- | patches/0050-iov_iter/bluetooth.patch | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/patches/0050-iov_iter/bluetooth.patch b/patches/0050-iov_iter/bluetooth.patch index ef5bd6a7..87506ff1 100644 --- a/patches/0050-iov_iter/bluetooth.patch +++ b/patches/0050-iov_iter/bluetooth.patch @@ -4,7 +4,7 @@ struct sk_buff *(*alloc_skb) (struct l2cap_chan *chan, unsigned long hdr_len, unsigned long len, int nb); -+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0) ++#if LINUX_VERSION_IS_LESS(3,19,0) + int (*memcpy_fromiovec) (struct l2cap_chan *chan, + unsigned char *kdata, + struct iovec *iov, @@ -17,7 +17,7 @@ return 0; } -+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0) ++#if LINUX_VERSION_IS_LESS(3,19,0) +static inline int l2cap_chan_no_memcpy_fromiovec(struct l2cap_chan *chan, + unsigned char *kdata, + struct iovec *iov, @@ -53,7 +53,7 @@ */ chan->data = skb; -+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0) ++#if LINUX_VERSION_IS_LESS(3,19,0) + memset(&msg, 0, sizeof(msg)); + msg.msg_iov = (struct iovec *) &iv; + msg.msg_iovlen = 1; @@ -61,7 +61,7 @@ iv.iov_base = skb->data; iv.iov_len = skb->len; -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0) ++#if LINUX_VERSION_IS_GEQ(3,19,0) memset(&msg, 0, sizeof(msg)); iov_iter_kvec(&msg.msg_iter, WRITE | ITER_KVEC, &iv, 1, skb->len); +#endif @@ -72,7 +72,7 @@ .suspend = chan_suspend_cb, .get_sndtimeo = chan_get_sndtimeo_cb, .alloc_skb = chan_alloc_skb_cb, -+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0) ++#if LINUX_VERSION_IS_LESS(3,19,0) + .memcpy_fromiovec = l2cap_chan_no_memcpy_fromiovec, +#endif @@ -84,7 +84,7 @@ memset(&msg, 0, sizeof(msg)); -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0) ++#if LINUX_VERSION_IS_GEQ(3,19,0) iov_iter_kvec(&msg.msg_iter, WRITE | ITER_KVEC, &iv, 1, total_len); +#else + msg.msg_iov = (struct iovec *) &iv; @@ -97,7 +97,7 @@ .resume = l2cap_chan_no_resume, .set_shutdown = l2cap_chan_no_set_shutdown, .get_sndtimeo = l2cap_chan_no_get_sndtimeo, -+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0) ++#if LINUX_VERSION_IS_LESS(3,19,0) + .memcpy_fromiovec = l2cap_chan_no_memcpy_fromiovec, +#endif }; @@ -109,7 +109,7 @@ struct sk_buff **frag; int sent = 0; -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0) ++#if LINUX_VERSION_IS_GEQ(3,19,0) if (copy_from_iter(skb_put(skb, count), count, &msg->msg_iter) != count) +#else + if (chan->ops->memcpy_fromiovec(chan, skb_put(skb, count), @@ -122,7 +122,7 @@ *frag = tmp; -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0) ++#if LINUX_VERSION_IS_GEQ(3,19,0) if (copy_from_iter(skb_put(*frag, count), count, &msg->msg_iter) != count) +#else @@ -138,7 +138,7 @@ return skb; } -+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0) ++#if LINUX_VERSION_IS_LESS(3,19,0) +static int l2cap_sock_memcpy_fromiovec_cb(struct l2cap_chan *chan, + unsigned char *kdata, + struct iovec *iov, int len) @@ -154,7 +154,7 @@ .set_shutdown = l2cap_sock_set_shutdown_cb, .get_sndtimeo = l2cap_sock_get_sndtimeo_cb, .alloc_skb = l2cap_sock_alloc_skb_cb, -+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0) ++#if LINUX_VERSION_IS_LESS(3,19,0) + .memcpy_fromiovec = l2cap_sock_memcpy_fromiovec_cb, +#endif }; @@ -166,7 +166,7 @@ memset(&msg, 0, sizeof(msg)); -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0) ++#if LINUX_VERSION_IS_GEQ(3,19,0) iov_iter_kvec(&msg.msg_iter, WRITE | ITER_KVEC, iv, 2, 1 + len); +#else + msg.msg_iov = (struct iovec *) &iv; @@ -179,7 +179,7 @@ .suspend = l2cap_chan_no_suspend, .set_shutdown = l2cap_chan_no_set_shutdown, .get_sndtimeo = l2cap_chan_no_get_sndtimeo, -+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0) ++#if LINUX_VERSION_IS_LESS(3,19,0) + .memcpy_fromiovec = l2cap_chan_no_memcpy_fromiovec, +#endif }; @@ -189,7 +189,7 @@ .resume = l2cap_chan_no_resume, .set_shutdown = l2cap_chan_no_set_shutdown, .get_sndtimeo = l2cap_chan_no_get_sndtimeo, -+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0) ++#if LINUX_VERSION_IS_LESS(3,19,0) + .memcpy_fromiovec = l2cap_chan_no_memcpy_fromiovec, +#endif }; |