Re: [PATCH 04/12] workqueue: simplify is_chained_work()

2012-09-30 Thread Tejun Heo
Hello, On Fri, Sep 28, 2012 at 05:52:02PM +0800, Lai Jiangshan wrote: > Main reason: I think the readability of your is the same as mine, > and your add two lines. > > Tiny reason: my code uses only one return. (I don't always keep one return, > but I try to keep it if it is still clean) > > Is

Re: [PATCH 04/12] workqueue: simplify is_chained_work()

2012-09-30 Thread Tejun Heo
Hello, On Fri, Sep 28, 2012 at 05:52:02PM +0800, Lai Jiangshan wrote: Main reason: I think the readability of your is the same as mine, and your add two lines. Tiny reason: my code uses only one return. (I don't always keep one return, but I try to keep it if it is still clean) Is there

Re: [PATCH 04/12] workqueue: simplify is_chained_work()

2012-09-28 Thread Lai Jiangshan
On 09/27/2012 02:28 AM, Tejun Heo wrote: > On Thu, Sep 27, 2012 at 01:20:35AM +0800, Lai Jiangshan wrote: >> is_chained_work() is too complicated. we can simply found out >> whether current task is worker by PF_WQ_WORKER or wq->rescuer. >> >> Signed-off-by: Lai Jiangshan >> --- >>

Re: [PATCH 04/12] workqueue: simplify is_chained_work()

2012-09-28 Thread Lai Jiangshan
On 09/27/2012 02:28 AM, Tejun Heo wrote: On Thu, Sep 27, 2012 at 01:20:35AM +0800, Lai Jiangshan wrote: is_chained_work() is too complicated. we can simply found out whether current task is worker by PF_WQ_WORKER or wq-rescuer. Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com ---

Re: [PATCH 04/12] workqueue: simplify is_chained_work()

2012-09-26 Thread Tejun Heo
On Thu, Sep 27, 2012 at 01:20:35AM +0800, Lai Jiangshan wrote: > is_chained_work() is too complicated. we can simply found out > whether current task is worker by PF_WQ_WORKER or wq->rescuer. > > Signed-off-by: Lai Jiangshan > --- > kernel/workqueue.c | 36

[PATCH 04/12] workqueue: simplify is_chained_work()

2012-09-26 Thread Lai Jiangshan
is_chained_work() is too complicated. we can simply found out whether current task is worker by PF_WQ_WORKER or wq->rescuer. Signed-off-by: Lai Jiangshan --- kernel/workqueue.c | 36 1 files changed, 12 insertions(+), 24 deletions(-) diff --git

[PATCH 04/12] workqueue: simplify is_chained_work()

2012-09-26 Thread Lai Jiangshan
is_chained_work() is too complicated. we can simply found out whether current task is worker by PF_WQ_WORKER or wq-rescuer. Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com --- kernel/workqueue.c | 36 1 files changed, 12 insertions(+), 24 deletions(-)

Re: [PATCH 04/12] workqueue: simplify is_chained_work()

2012-09-26 Thread Tejun Heo
On Thu, Sep 27, 2012 at 01:20:35AM +0800, Lai Jiangshan wrote: is_chained_work() is too complicated. we can simply found out whether current task is worker by PF_WQ_WORKER or wq-rescuer. Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com --- kernel/workqueue.c | 36