public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Zefan Li <lizefan@huawei.com>
To: Nicholas Mc Guire <der.herr@hofr.at>, Tejun Heo <tj@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Michal Hocko <mhocko@suse.com>, Vlastimil Babka <vbabka@suse.cz>,
	Ingo Molnar <mingo@kernel.org>,
	"Joonwoo Park" <joonwoop@codeaurora.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] cgroup: switch to BUG_ON()
Date: Wed, 5 Apr 2017 13:50:25 +0800	[thread overview]
Message-ID: <58E485A1.80208@huawei.com> (raw)
In-Reply-To: <1490545446-7305-1-git-send-email-der.herr@hofr.at>

On 2017/3/27 0:24, Nicholas Mc Guire wrote:
> Use BUG_ON() rather than an explicit if followed by BUG() for 
> improved readability and also consistency.
> 
> Signed-off-by: Nicholas Mc Guire <der.herr@hofr.at>
> ---
> 
> Found by coccinelle: bugon.cocci
> ./kernel/cgroup/cpuset.c:2125:2-5: WARNING: Use BUG_ON instead of if condition followed by BUG.
> ./kernel/cgroup/cpuset.c:2127:2-5: WARNING: Use BUG_ON instead of if condition followed by BUG.
> ./kernel/cgroup/cpuset.c:2143:2-5: WARNING: Use BUG_ON instead of if condition followed by BUG.
> 
> BUG_ON() wraps the explicit if condition and is actually in use for
> all conditional BUG() cases in cpuset.c except in this one function.
> 
> Patch was compile-tested with: x86_64_defconfig (implies CONFIG_CPUSETS=y)
> (checkpatch warnings for this patch seem to be false-positives - the 
>  BUG_ON should be fine)
> 
> Patch is against 4.11-rc3 (localversion-next is next-20170324)
> 

Acked-by: Zefan Li <lizefan@huawei.com>

      parent reply	other threads:[~2017-04-05  5:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-26 16:24 [PATCH] cgroup: switch to BUG_ON() Nicholas Mc Guire
2017-03-27 17:59 ` Tejun Heo
2017-04-05  5:50 ` Zefan Li [this message]

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=58E485A1.80208@huawei.com \
    --to=lizefan@huawei.com \
    --cc=akpm@linux-foundation.org \
    --cc=der.herr@hofr.at \
    --cc=joonwoop@codeaurora.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhocko@suse.com \
    --cc=mingo@kernel.org \
    --cc=tj@kernel.org \
    --cc=vbabka@suse.cz \
    /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