public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Lai Jiangshan <laijs@cn.fujitsu.com>
To: "Oleg Nesterov" <oleg@tv-sign.ru>, "Ingo Molnar" <mingo@elte.hu>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"Peter Zijlstra" <peterz@infradead.org>,
	"Eric Dumazet" <dada1@cosmosbay.com>,
	"Frédéric Weisbecker" <fweisbec@gmail.com>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>
Subject: [PATCH 3/3] workqueue: cleanup workqueue.c to make checkpatch happy
Date: Thu, 22 Jan 2009 17:14:36 +0800	[thread overview]
Message-ID: <497838FC.6050909@cn.fujitsu.com> (raw)


Warnings and errors from checkpatch's output are correct,
this patch fix them.

Only except this incorrect one:
 WARNING: use of in_atomic() is incorrect outside core kernel code
 #295: FILE: kernel/workqueue.c:292:
 +		if (unlikely(in_atomic() || lockdep_depth(current) > 0)) {

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
---
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 6cf7785..1d2f06f 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -120,7 +120,8 @@ static inline void set_wq_data(struct work_struct *work,
 static inline
 struct cpu_workqueue_struct *get_wq_data(struct work_struct *work)
 {
-	return (void *) (atomic_long_read(&work->data) & WORK_STRUCT_WQ_DATA_MASK);
+	return (void *)(atomic_long_read(&work->data)
+			& WORK_STRUCT_WQ_DATA_MASK);
 }
 
 static void insert_work(struct cpu_workqueue_struct *cwq,
@@ -292,7 +293,7 @@ static void run_workqueue(struct cpu_workqueue_struct *cwq)
 			printk(KERN_ERR "BUG: workqueue leaked lock or atomic: "
 					"%s/0x%08x/%d\n",
 					current->comm, preempt_count(),
-				       	task_pid_nr(current));
+					task_pid_nr(current));
 			printk(KERN_ERR "    last function: ");
 			print_symbol("%s\n", (unsigned long)f);
 			debug_show_held_locks(current);
@@ -533,7 +534,7 @@ static void wait_on_work(struct work_struct *work)
 }
 
 static int __cancel_work_timer(struct work_struct *work,
-				struct timer_list* timer)
+				struct timer_list *timer)
 {
 	int ret;
 
@@ -905,7 +906,7 @@ void destroy_workqueue(struct workqueue_struct *wq)
 
 	for_each_cpu_mask_nr(cpu, *cpu_map)
 		cleanup_workqueue_thread(per_cpu_ptr(wq->cpu_wq, cpu));
- 	cpu_maps_update_done();
+	cpu_maps_update_done();
 
 	free_percpu(wq->cpu_wq);
 	kfree(wq);



                 reply	other threads:[~2009-01-22  9:15 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=497838FC.6050909@cn.fujitsu.com \
    --to=laijs@cn.fujitsu.com \
    --cc=akpm@linux-foundation.org \
    --cc=dada1@cosmosbay.com \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=oleg@tv-sign.ru \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox