lkml.org 
[lkml]   [2014]   [Sep]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: [PATCH] staging: dgap: use schedule_timeout_interruptible() instead of dgap_ms_sleep()
From
Date
On Tue, 2014-09-16 at 09:31 +0300, Dan Carpenter wrote:
> There is no point in calling signal_pending() if you don't care about
> the return value.

So maybe make it __must_check?
---
include/linux/sched.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/sched.h b/include/linux/sched.h
index 7d799ea..03273c0 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -2692,7 +2692,7 @@ static inline int restart_syscall(void)
return -ERESTARTNOINTR;
}

-static inline int signal_pending(struct task_struct *p)
+static inline int __must_check signal_pending(struct task_struct *p)
{
return unlikely(test_tsk_thread_flag(p,TIF_SIGPENDING));
}



\
 
 \ /
  Last update: 2014-09-16 10:21    [W:0.066 / U:0.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site