small cleanups
PATCH 1/1 small cleanups
While hacking system stopping, I ran around few trivial places that could be cleaned up... No code changes.
Signed-off-by Pavel Machek <[email protected]>
kernel/signal.c +4 -4
@@ -314,7 +314,7 @@ flush_signals(struct task_struct *t)unsigned long flags;spin_lock_irqsave (&t->sighand->siglock, flags); -clear_tsk_thread_flag (t,TIF_SIGPENDING ); +clear_tsk_thread_flag (t,TIF_SIGPENDING );flush_sigqueue (&t->pending);flush_sigqueue (&t->signal->shared_pending);spin_unlock_irqrestore (&t->sighand->siglock, flags);
@@ -403,7 +403,7 @@ void __exit_signal(struct task_struct *t sig =NULL ;/* Marker for below. */ }rcu_read_unlock (); -clear_tsk_thread_flag (tsk,TIF_SIGPENDING ); +clear_tsk_thread_flag (tsk,TIF_SIGPENDING );flush_sigqueue (&tsk->pending);if (sig) {/*
@@ -572,9 +572,9 @@ int dequeue_signal(struct task_struct *tif (!(tsk->signal->flags &SIGNAL_GROUP_EXIT )) tsk->signal->flags |=SIGNAL_STOP_DEQUEUED ; } -if ( signr && +if (signr && ((info->si_code & __SI_MASK) == __SI_TIMER) && - info->si_sys_private){ + info->si_sys_private) {/* * Release the siglock to ensure proper locking order * of timer locks outside of siglocks. Note, we leave
mm/pdflush.c +3 -4
@@ -17,8 +17,8 @@#include <linux/gfp.h> #include <linux/init.h> #include <linux/module.h> -#include <linux/fs.h> // Needed by writeback.h -#include <linux/writeback.h> // Prototypes pdflush_operation() +#include <linux/fs.h> /* Needed by writeback.h */ +#include <linux/writeback.h> /* Prototypes pdflush_operation() */ #include <linux/kthread.h> #include <linux/cpuset.h>
@@ -202,8 +202,7 @@ int pdflush_operation(void (*fn)(unsigneunsigned long flags;int ret =0 ; -if (fn ==NULL ) -BUG ();/* Hard to diagnose if it's deferred */ +BUG_ON (!fn);/* Hard to diagnose if it's deferred */ spin_lock_irqsave (&pdflush_lock, flags);if (list_empty (&pdflush_list)) {
Signature · 1 line
Thanks, Sharp!
Quoted 4 lines · Pavel Machek
While hacking system stopping, I ran around few trivial places that could be cleaned up... No code changes.
This patch is a bit too random for me.
Sure, if you wnat to do a cleanup of signal.c and pdflush.c then feel free to do so, but I don't think this does it. It's just a little touchup of a couple of places. My concern is that we could apply 1000 patches like that. Would much prefer less, larger, more comprehensive patches.