batman-adv: annotate ->poll() instances
Sven Eckelmann
maintainerPATCH 1/1 batman-adv: annotate ->poll() instances
From: Al Viro <[email protected]>
Signed-off-by Al Viro <[email protected]>
[[email protected]: add compat code]
Signed-off-by Sven Eckelmann <[email protected]>
---
The patch is already in
https://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git/log/?h=for-next
--- compat-include/linux/types.h | 38 ++++++++++++++++++++++++++++++++++++++ net/batman-adv/icmp_socket.c | 2 +- net/batman-adv/log.c | 2 +- 3 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 compat-include/linux/types.h
compat-include/linux/types.h new file +38 -0
@@ -0,0 +1,38 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* Copyright (C) 2007-2017 B.A.T.M.A.N. contributors: +* +* Marek Lindner, Simon Wunderlich +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of version 2 of the GNU General Public +* License as published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, but +* WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, see <http://www.gnu.org/licenses/>. +* +* This file contains macros for maintaining compatibility with older versions +* of the Linux kernel. +*/ + +#ifndef _NET_BATMAN_ADV_COMPAT_LINUX_TYPES_H_ +#define _NET_BATMAN_ADV_COMPAT_LINUX_TYPES_H_ + +#include <linux/version.h> +#include_next <linux/types.h> + +#if LINUX_VERSION_CODE <KERNEL_VERSION (4 ,16 ,0 ) + +#ifdef __CHECK_POLL +typedef unsigned __bitwise __poll_t ; +#else +typedef unsigned __poll_t ; +#endif + +#endif /* < KERNEL_VERSION(4, 16, 0) */ + +#endif /* _NET_BATMAN_ADV_COMPAT_LINUX_TYPES_H_ */
net/batman-adv/icmp_socket.c +1 -1
@@ -297,7 +297,7 @@ static ssize_t batadv_socket_write(struct file *file, const char __user *buff,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;
net/batman-adv/log.c +1 -1
@@ -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;
Signature · 1 line
2.11.0