From d2fd89962cd5de6b1fb9c1c789b56bc16f58f121 Mon Sep 17 00:00:00 2001 From: Randy Dunlap Date: Wed, 27 Jun 2007 14:09:48 -0700 Subject: [PATCH] eventfd: clean compile when CONFIG_EVENTFD=n Fix gcc warning and add parameter checking when CONFIG_EVENTFD=n: fs/aio.c: In function 'aio_complete': fs/aio.c:955: warning: statement with no effect Signed-off-by: Randy Dunlap Cc: Davide Libenzi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/eventfd.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/linux/eventfd.h b/include/linux/eventfd.h index 0d6ecc60b9..b489fc6d0b 100644 --- a/include/linux/eventfd.h +++ b/include/linux/eventfd.h @@ -19,7 +19,8 @@ int eventfd_signal(struct file *file, int n); #else /* CONFIG_EVENTFD */ #define eventfd_fget(fd) ERR_PTR(-ENOSYS) -#define eventfd_signal(f, n) 0 +static inline int eventfd_signal(struct file *file, int n) +{ return 0; } #endif /* CONFIG_EVENTFD */ -- 2.39.5