mm/util.c: Remove needless code
Subsystems (2)
PATCH 1/1 mm/util.c: Remove needless code
If the code can be executed there, 'new_size' is always larger than 'ks'. Thus min() is needless.
--- mm/util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
mm/util.c +1 -1
@@ -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 [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 2 lines · WANG Cong
If the code can be executed there, '
new_size' is always larger than 'ks'. Thusmin()is needless.
Correct.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Andrew Morton
maintainerQuoted 17 lines · On Tue, 6 Nov 2007 11:12:07 +0800 WANG Cong <[email protected]> wrote:
If the code can be executed there, '
new_size' is always larger than 'ks'. Thusmin()is needless.Signed-off-by WANG Cong <[email protected]>Signed-off-by Dong Pu <[email protected]>Cc Christoph Lameter <[email protected]>--- mm/util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)mm/util.c +0
-0
mm/util.c void *krealloc(const void *p, size_t new_size, gfp_t flags) · line 102
Quoted 8 lines
mm/util.c +1
-1@@ -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;
Thanks. This was already fixed by
http://www.mail-archive.com/[email protected]/msg28294.html
(which is somewhere in one of my ever-growing number of for-2.6.24 queues)
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 5 lines
Thanks. This was already fixed by
http://www.mail-archive.com/[email protected]/msg28294.html
(which is somewhere in one of my ever-growing number of for-2.6.24 queues)
Thanks, Andrew.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>