[PATCH] eventfd: clean compile when CONFIG_EVENTFD=n

From: Randy Dunlap
Date: Mon Jun 25 2007 - 16:18:55 EST


From: Randy Dunlap <randy.dunlap@xxxxxxxxxx>

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 <randy.dunlap@xxxxxxxxxx>
---
include/linux/eventfd.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

--- linux-2.6.22-rc6.orig/include/linux/eventfd.h
+++ linux-2.6.22-rc6/include/linux/eventfd.h
@@ -19,7 +19,8 @@ int eventfd_signal(struct file *file, in
#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 */

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/