Commit d2fd89962cd5de6b1fb9c1c789b56bc16f58f121

Authored by Randy Dunlap
Committed by Linus Torvalds
1 parent c0887eedb4

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 <randy.dunlap@oracle.com>
Cc: Davide Libenzi <davidel@xmailserver.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Showing 1 changed file with 2 additions and 1 deletions Side-by-side Diff

include/linux/eventfd.h
... ... @@ -19,7 +19,8 @@
19 19 #else /* CONFIG_EVENTFD */
20 20  
21 21 #define eventfd_fget(fd) ERR_PTR(-ENOSYS)
22   -#define eventfd_signal(f, n) 0
  22 +static inline int eventfd_signal(struct file *file, int n)
  23 +{ return 0; }
23 24  
24 25 #endif /* CONFIG_EVENTFD */
25 26