Repository : ssh://git@open-mesh.org/batman-adv
On branch : master
commit e89f6ed0009c9ceee7f595427b85d8c4724c93f9 Author: Al Viro viro@zeniv.linux.org.uk Date: Sun Dec 24 15:30:23 2017 +0100
batman-adv: annotate ->poll() instances
Signed-off-by: Al Viro viro@zeniv.linux.org.uk [sven@narfation.org: add compat code] Signed-off-by: Sven Eckelmann sven@narfation.org
e89f6ed0009c9ceee7f595427b85d8c4724c93f9 compat-include/linux/{compiler.h => types.h} | 23 ++++++++++++----------- net/batman-adv/icmp_socket.c | 2 +- net/batman-adv/log.c | 2 +- 3 files changed, 14 insertions(+), 13 deletions(-)
diff --git a/compat-include/linux/compiler.h b/compat-include/linux/types.h similarity index 67% copy from compat-include/linux/compiler.h copy to compat-include/linux/types.h index 62b6a2f..f33f2bb 100644 --- a/compat-include/linux/compiler.h +++ b/compat-include/linux/types.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ /* Copyright (C) 2007-2017 B.A.T.M.A.N. contributors: * * Marek Lindner, Simon Wunderlich @@ -18,20 +19,20 @@ * of the Linux kernel. */
-#ifndef _NET_BATMAN_ADV_COMPAT_LINUX_COMPILER_H_ -#define _NET_BATMAN_ADV_COMPAT_LINUX_COMPILER_H_ +#ifndef _NET_BATMAN_ADV_COMPAT_LINUX_TYPES_H_ +#define _NET_BATMAN_ADV_COMPAT_LINUX_TYPES_H_
#include <linux/version.h> -#include_next <linux/compiler.h> +#include_next <linux/types.h>
-#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 19, 0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 16, 0)
-#define READ_ONCE(x) ACCESS_ONCE(x) +#ifdef __CHECK_POLL +typedef unsigned __bitwise __poll_t; +#else +typedef unsigned __poll_t; +#endif
-#define WRITE_ONCE(x, val) ({ \ - ACCESS_ONCE(x) = (val); \ -}) +#endif /* < KERNEL_VERSION(4, 16, 0) */
-#endif /* < KERNEL_VERSION(3, 19, 0) */ - -#endif /* _NET_BATMAN_ADV_COMPAT_LINUX_COMPILER_H_ */ +#endif /* _NET_BATMAN_ADV_COMPAT_LINUX_TYPES_H_ */ diff --git a/net/batman-adv/icmp_socket.c b/net/batman-adv/icmp_socket.c index b81826e..3396414 100644 --- a/net/batman-adv/icmp_socket.c +++ b/net/batman-adv/icmp_socket.c @@ -297,7 +297,7 @@ out: return len; }
-static unsigned int batadv_socket_poll(struct file *file, poll_table *wait) +static __poll_t batadv_socket_poll(struct file *file, poll_table *wait) { struct batadv_socket_client *socket_client = file->private_data;
diff --git a/net/batman-adv/log.c b/net/batman-adv/log.c index 1b959c7..0132696 100644 --- a/net/batman-adv/log.c +++ b/net/batman-adv/log.c @@ -185,7 +185,7 @@ static ssize_t batadv_log_read(struct file *file, char __user *buf, return error; }
-static unsigned int batadv_log_poll(struct file *file, poll_table *wait) +static __poll_t batadv_log_poll(struct file *file, poll_table *wait) { struct batadv_priv *bat_priv = file->private_data; struct batadv_priv_debug_log *debug_log = bat_priv->debug_log;