[patch] small cleanups

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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]>

diff --git a/kernel/signal.c b/kernel/signal.c
index b373fc2..50eb4f5 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -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 *t
  		if (!(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
diff --git a/mm/pdflush.c b/mm/pdflush.c
index c4b6d0a..6f740ab 100644
--- a/mm/pdflush.c
+++ b/mm/pdflush.c
@@ -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)(unsigne
 	unsigned 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)) {

-- 
Thanks, Sharp!
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux