summaryrefslogtreecommitdiff
path: root/patches/0054-struct-proto_ops-sig.cocci
diff options
context:
space:
mode:
Diffstat (limited to 'patches/0054-struct-proto_ops-sig.cocci')
-rw-r--r--patches/0054-struct-proto_ops-sig.cocci36
1 files changed, 18 insertions, 18 deletions
diff --git a/patches/0054-struct-proto_ops-sig.cocci b/patches/0054-struct-proto_ops-sig.cocci
index 64df8ab5..1d190dcd 100644
--- a/patches/0054-struct-proto_ops-sig.cocci
+++ b/patches/0054-struct-proto_ops-sig.cocci
@@ -42,12 +42,12 @@ send_func(...)
...
}
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0)
++#if LINUX_VERSION_IS_LESS(4,1,0)
+static int backport_send(struct kiocb *iocb, struct socket *sock, struct msghdr *msg, size_t len)
+{
+ return send_func(sock, msg, len);
+}
-+#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0) */
++#endif /* LINUX_VERSION_IS_LESS(4,1,0) */
@ mod_recv depends on proto_ops @
identifier proto_ops.recv_func;
@@ -59,24 +59,24 @@ recv_func(...)
...
}
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0)
++#if LINUX_VERSION_IS_LESS(4,1,0)
+static int backport_recv(struct kiocb *iocb, struct socket *sock,
+ struct msghdr *msg, size_t len, int flags)
+{
+ return recv_func(sock, msg, len, flags);
+}
-+#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0) */
++#endif /* LINUX_VERSION_IS_LESS(4,1,0) */
@ mod_proto_ops_tx depends on proto_ops && mod_send @
identifier s, proto_ops.send_func, mod_send.backport_send;
@@
struct proto_ops s = {
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0)
++#if LINUX_VERSION_IS_GEQ(4,1,0)
.sendmsg = send_func,
+#else
+ .sendmsg = backport_send,
-+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0) */
++#endif /* LINUX_VERSION_IS_GEQ(4,1,0) */
};
@ mod_proto_ops_rx depends on proto_ops && mod_recv @
@@ -84,11 +84,11 @@ identifier s, proto_ops.recv_func, mod_recv.backport_recv;
@@
struct proto_ops s = {
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0)
++#if LINUX_VERSION_IS_GEQ(4,1,0)
.recvmsg = recv_func,
+#else
+ .recvmsg = backport_recv,
-+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0) */
++#endif /* LINUX_VERSION_IS_GEQ(4,1,0) */
};
@ mod_sock_send_callers depends on proto_ops@
@@ -99,11 +99,11 @@ identifier sock, msg, len, sk;
send_func(struct socket *sock, struct msghdr *msg, size_t len)
{
...
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0)
++#if LINUX_VERSION_IS_GEQ(4,1,0)
return sk->sk_prot->sendmsg(sk, msg, len);
+#else
+ return sk->sk_prot->sendmsg(NULL, sk, msg, len);
-+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0) */
++#endif /* LINUX_VERSION_IS_GEQ(4,1,0) */
}
@ proto @
@@ -125,13 +125,13 @@ send_func(...)
...
}
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0)
++#if LINUX_VERSION_IS_LESS(4,1,0)
+static int backport_send(struct kiocb *iocb, struct sock *sk,
+ struct msghdr *msg, size_t len)
+{
+ return send_func(sk, msg, len);
+}
-+#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0) */
++#endif /* LINUX_VERSION_IS_LESS(4,1,0) */
@ proto_mod_recv depends on proto @
identifier proto.recv_func;
@@ -143,25 +143,25 @@ recv_func(...)
...
}
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0)
++#if LINUX_VERSION_IS_LESS(4,1,0)
+static int backport_recv(struct kiocb *iocb, struct sock *sk,
+ struct msghdr *msg, size_t len,
+ int noblock, int flags, int *addr_len)
+{
+ return recv_func(sk, msg, len, noblock, flags, addr_len);
+}
-+#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0) */
++#endif /* LINUX_VERSION_IS_LESS(4,1,0) */
@ mod_proto_tx depends on proto && proto_mod_send @
identifier s, proto.send_func, proto_mod_send.backport_send;
@@
struct proto s = {
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0)
++#if LINUX_VERSION_IS_GEQ(4,1,0)
.sendmsg = send_func,
+#else
+ .sendmsg = backport_send,
-+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0) */
++#endif /* LINUX_VERSION_IS_GEQ(4,1,0) */
};
@ mod_proto_rx depends on proto && proto_mod_recv @
@@ -169,9 +169,9 @@ identifier s, proto.recv_func, proto_mod_recv.backport_recv;
@@
struct proto s = {
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0)
++#if LINUX_VERSION_IS_GEQ(4,1,0)
.recvmsg = recv_func,
+#else
+ .recvmsg = backport_recv,
-+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0) */
++#endif /* LINUX_VERSION_IS_GEQ(4,1,0) */
};