From: Randy Dunlap Date: Wed, 27 Jun 2007 21:09:48 +0000 (-0700) Subject: eventfd: clean compile when CONFIG_EVENTFD=n X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=d2fd89962cd5de6b1fb9c1c789b56bc16f58f121;p=openwrt%2Fstaging%2Fblogic.git 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 --- diff --git a/include/linux/eventfd.h b/include/linux/eventfd.h index 0d6ecc60b94d..b489fc6d0b62 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 */