From: David Rientjes <rientjes@google.com>
To: Jeff Liu <jeff.liu@oracle.com>
Cc: linux-mm@kvack.org, Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] kernel/res_counter.c: move BUG() to the default choice of switch at res_counter_member()
Date: Fri, 25 Jan 2013 13:52:33 -0800 (PST) [thread overview]
Message-ID: <alpine.DEB.2.00.1301251352030.26610@chino.kir.corp.google.com> (raw)
In-Reply-To: <51023F89.9030807@oracle.com>
On Fri, 25 Jan 2013, Jeff Liu wrote:
> diff --git a/kernel/res_counter.c b/kernel/res_counter.c
> index ff55247..748a3bc 100644
> --- a/kernel/res_counter.c
> +++ b/kernel/res_counter.c
> @@ -135,10 +135,9 @@ res_counter_member(struct res_counter *counter, int member)
> return &counter->failcnt;
> case RES_SOFT_LIMIT:
> return &counter->soft_limit;
> + default:
> + BUG();
> };
> -
> - BUG();
> - return NULL;
> }
>
> ssize_t res_counter_read(struct res_counter *counter, int member,
This doesn't work for CONFIG_BUG=n, you still need a return value. I
think the original version was better.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
prev parent reply other threads:[~2013-01-25 21:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-25 8:17 Jeff Liu
2013-01-25 21:52 ` David Rientjes [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=alpine.DEB.2.00.1301251352030.26610@chino.kir.corp.google.com \
--to=rientjes@google.com \
--cc=akpm@linux-foundation.org \
--cc=jeff.liu@oracle.com \
--cc=linux-mm@kvack.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