All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chen Gang <gang.chen@asianux.com>
To: akpm@linux-foundation.org, keescook@chromium.org,
	serge.hallyn@canonical.com, gorcunov@openvz.org,
	ebiederm@xmission.com,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: [PATCH] kernel: arg2 is unsigned long which is never < 0
Date: Wed, 06 Feb 2013 16:44:35 +0800	[thread overview]
Message-ID: <511217F3.6050800@asianux.com> (raw)


  arg2 will never < 0, for its type is 'unsigned long'

  so delete the waste code.


Signed-off-by: Chen Gang <gang.chen@asianux.com>
---
 kernel/sys.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/sys.c b/kernel/sys.c
index 24d1ef5..568b9ca 100644
--- a/kernel/sys.c
+++ b/kernel/sys.c
@@ -2027,7 +2027,7 @@ SYSCALL_DEFINE5(prctl, int, option, unsigned long, arg2, unsigned long, arg3,
 			error = get_dumpable(me->mm);
 			break;
 		case PR_SET_DUMPABLE:
-			if (arg2 < 0 || arg2 > 1) {
+			if (arg2 > 1) {
 				error = -EINVAL;
 				break;
 			}
-- 
1.7.7.6

             reply	other threads:[~2013-02-06  8:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-06  8:44 Chen Gang [this message]
2013-02-06  8:56 ` [PATCH] kernel: arg2 is unsigned long which is never < 0 Cyrill Gorcunov
2013-02-06 10:36   ` Chen Gang
2013-02-06 15:24     ` Serge Hallyn
2013-02-07  1:54       ` Chen Gang
2013-02-06 15:35     ` Cyrill Gorcunov
2013-02-06 19:41     ` Kees Cook
2013-02-07  1:38       ` Chen Gang

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=511217F3.6050800@asianux.com \
    --to=gang.chen@asianux.com \
    --cc=akpm@linux-foundation.org \
    --cc=ebiederm@xmission.com \
    --cc=gorcunov@openvz.org \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=serge.hallyn@canonical.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.