public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Michael Wang <wangyun@linux.vnet.ibm.com>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 4/3] workqueue: code refine in wqattrs_equal()
Date: Wed, 5 Jun 2013 00:21:06 -0700	[thread overview]
Message-ID: <20130605072106.GC7303@mtj.dyndns.org> (raw)
In-Reply-To: <51AEE53C.5050704@linux.vnet.ibm.com>

On Wed, Jun 05, 2013 at 03:14:04PM +0800, Michael Wang wrote:
> code refine to save some line.
> 
> CC: Tejun Heo <tj@kernel.org>
> Signed-off-by: Michael Wang <wangyun@linux.vnet.ibm.com>
> ---
>  kernel/workqueue.c |    5 ++---
>  1 files changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/kernel/workqueue.c b/kernel/workqueue.c
> index ee8e29a..5fd4791 100644
> --- a/kernel/workqueue.c
> +++ b/kernel/workqueue.c
> @@ -3417,9 +3417,8 @@ static bool wqattrs_equal(const struct workqueue_attrs *a,
>  {
>  	if (a->nice != b->nice)
>  		return false;
> -	if (!cpumask_equal(a->cpumask, b->cpumask))
> -		return false;
> -	return true;
> +
> +	return cpumask_equal(a->cpumask, b->cpumask);

I don't know.  I kinda like the current form because we can add new
attributes easily without modifying existing lines.  The suggested
patch is frivolous.  It doesn't really improve anything.

Thanks.

-- 
tejun

  reply	other threads:[~2013-06-05  7:21 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-05  7:10 [PATCH 0/3] workqueue: code refine/clean for workqueue Michael Wang
2013-06-05  7:10 ` [PATCH 1/3] workqueue: move the internal helper from .h to .c Michael Wang
2013-06-05  7:19   ` Tejun Heo
2013-06-05  7:11 ` [PATCH 2/3] workqueue: remove the unused helper in .h Michael Wang
2013-06-05  7:24   ` Tejun Heo
2013-06-05  7:11 ` [PATCH 3/3] workqueue: add a check point in pwq_activate_delayed_work() Michael Wang
2013-06-05  7:17   ` Tejun Heo
2013-06-05  7:14 ` [PATCH 4/3] workqueue: code refine in wqattrs_equal() Michael Wang
2013-06-05  7:21   ` Tejun Heo [this message]
2013-06-05  7:15 ` [PATCH 0/3] workqueue: code refine/clean for workqueue Michael Wang
2013-06-05  7:39 ` Michael Wang

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=20130605072106.GC7303@mtj.dyndns.org \
    --to=tj@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=wangyun@linux.vnet.ibm.com \
    /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