mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [patch] small cleanups
@ 2006-02-05 11:42 Pavel Machek
  2006-02-06  0:41 ` Andrew Morton
  0 siblings, 1 reply; 2+ messages in thread
From: Pavel Machek @ 2006-02-05 11:42 UTC (permalink / raw)
  To: Andrew Morton, kernel list

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

Signed-off-by: Pavel Machek <pavel@suse.cz>

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!

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [patch] small cleanups
  2006-02-05 11:42 [patch] small cleanups Pavel Machek
@ 2006-02-06  0:41 ` Andrew Morton
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Morton @ 2006-02-06  0:41 UTC (permalink / raw)
  To: Pavel Machek; +Cc: linux-kernel

Pavel Machek <pavel@ucw.cz> wrote:
>
> 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.



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-02-06  0:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-05 11:42 [patch] small cleanups Pavel Machek
2006-02-06  0:41 ` Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®