From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by ro-out-1112.google.com with SMTP id p7so2106482roc for ; Mon, 05 Nov 2007 19:13:13 -0800 (PST) Date: Tue, 6 Nov 2007 11:12:07 +0800 From: WANG Cong Subject: [git Patch] mm/util.c: Remove needless code Message-ID: <20071106031207.GA2478@hacking> Reply-To: WANG Cong MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Sender: owner-linux-mm@kvack.org Return-Path: To: LKML Cc: Christoph Lameter , linux-mm@kvack.org, Andrew Morton , Dong Pu List-ID: If the code can be executed there, 'new_size' is always larger than 'ks'. Thus min() is needless. Signed-off-by: WANG Cong Signed-off-by: Dong Pu Cc: Christoph Lameter --- mm/util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/util.c b/mm/util.c index 5f64026..295c7aa 100644 --- a/mm/util.c +++ b/mm/util.c @@ -96,7 +96,7 @@ void *krealloc(const void *p, size_t new_size, gfp_t flags) ret = kmalloc_track_caller(new_size, flags); if (ret) { - memcpy(ret, p, min(new_size, ks)); + memcpy(ret, p, ks); kfree(p); } return ret; -- 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: email@kvack.org