[PATCH] PCI: Clean up a lot of sparse "Should it be static?" warnings.
[safe/jmp/linux-2.6] / ipc / mqueue.c
index 33f7152..0acf245 100644 (file)
@@ -23,6 +23,7 @@
 #include <linux/skbuff.h>
 #include <linux/netlink.h>
 #include <linux/syscalls.h>
+#include <linux/signal.h>
 #include <net/sock.h>
 #include "util.h"
 
@@ -976,8 +977,7 @@ asmlinkage long sys_mq_notify(mqd_t mqdes,
                             notification.sigev_notify != SIGEV_THREAD))
                        return -EINVAL;
                if (notification.sigev_notify == SIGEV_SIGNAL &&
-                       (notification.sigev_signo < 0 ||
-                        notification.sigev_signo > _NSIG)) {
+                       !valid_signal(notification.sigev_signo)) {
                        return -EINVAL;
                }
                if (notification.sigev_notify == SIGEV_THREAD) {