Skip to contentSkip to conversation

small cleanups

PATCH In review Pavel Machek 2 participants 2 messages Feb 5, 2006 – Feb 6, 2006 Memory management

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 small cleanups

While hacking system stopping, I ran around few trivial places that could be cleaned up... No code changes.

kernel/signal.c +4 -4
index b373fc2..50eb4f5 100644
@@ -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
mm/pdflush.c +3 -4
index c4b6d0a..6f740ab 100644
@@ -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)) {
Signature · 1 line
Thanks, Sharp!
#1 lore raw
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.