From patchwork Sun Dec 24 14:30:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 17246 X-Patchwork-Delegate: sw@simonwunderlich.de Return-Path: X-Original-To: patchwork@open-mesh.org Delivered-To: patchwork@open-mesh.org Received: from open-mesh.org (localhost [IPv6:::1]) by open-mesh.org (Postfix) with ESMTP id 916E38224D; Sun, 24 Dec 2017 15:30:44 +0100 (CET) Authentication-Results: open-mesh.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=narfation.org header.i=@narfation.org header.b="Gxhs7t+z"; dkim-atps=neutral Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=79.140.41.39; helo=v3-1039.vlinux.de; envelope-from=sven@narfation.org; receiver= Received: from v3-1039.vlinux.de (narfation.org [79.140.41.39]) by open-mesh.org (Postfix) with ESMTPS id 8FA4F802C6 for ; Sun, 24 Dec 2017 15:30:37 +0100 (CET) Received: from sven-desktop.home.narfation.org (unknown [IPv6:2a00:c1a0:c0b7:7b00:6a17:29ff:fee0:e6ec]) by v3-1039.vlinux.de (Postfix) with ESMTPSA id 151411100ED for ; Sun, 24 Dec 2017 15:30:35 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=narfation.org; s=20121; t=1514125835; bh=AulSwF6XNGnXoUeX9/FBwT3gG+6s+bp6JyPlKuyYKn4=; h=From:To:Subject:Date:From; b=Gxhs7t+zpNIb8uQiurwMBuf+36rF1fclben/hGBMxUjNt1VYP6tv4Z8Yq4AWrTPeq qbHANCPXhx8l+KvuooA1e1zGH7EIEvY2vAaquboFA35POXA061Q05oDcKdT6WYZa39 5CG7gOqjJNHRjCX2CAHGhnFSLKsLlFHaftFAFp4Y= From: Sven Eckelmann To: b.a.t.m.a.n@lists.open-mesh.org Date: Sun, 24 Dec 2017 15:30:23 +0100 Message-Id: <20171224143023.4209-1-sven@narfation.org> X-Mailer: git-send-email 2.11.0 Subject: [B.A.T.M.A.N.] [PATCH] batman-adv: annotate ->poll() instances X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking Errors-To: b.a.t.m.a.n-bounces@lists.open-mesh.org Sender: "B.A.T.M.A.N" From: Al Viro Signed-off-by: Al Viro [sven@narfation.org: add compat code] Signed-off-by: Sven Eckelmann --- 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 diff --git a/compat-include/linux/types.h b/compat-include/linux/types.h new file mode 100644 index 00000000..f33f2bb2 --- /dev/null +++ b/compat-include/linux/types.h @@ -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 . + * + * 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 +#include_next + +#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_ */ diff --git a/net/batman-adv/icmp_socket.c b/net/batman-adv/icmp_socket.c index 8041cf10..581375d0 100644 --- a/net/batman-adv/icmp_socket.c +++ b/net/batman-adv/icmp_socket.c @@ -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; diff --git a/net/batman-adv/log.c b/net/batman-adv/log.c index da004980..9be74a44 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;