* [PATCH 1/1] mm: kmemleak: remove unneeded initialization of object to NULL
@ 2015-09-09 22:33 Alexey Klimov
2015-09-10 9:13 ` Catalin Marinas
0 siblings, 1 reply; 2+ messages in thread
From: Alexey Klimov @ 2015-09-09 22:33 UTC (permalink / raw)
To: linux-mm, catalin.marinas; +Cc: linux-kernel, akpm, klimov.linux, Alexey Klimov
Few lines below object is reinitialized by lookup_object()
so we don't need to init it by NULL in the beginning of
find_and_get_object().
Signed-off-by: Alexey Klimov <alexey.klimov@linaro.org>
---
mm/kmemleak.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/kmemleak.c b/mm/kmemleak.c
index f532f6a..444a771 100644
--- a/mm/kmemleak.c
+++ b/mm/kmemleak.c
@@ -488,7 +488,7 @@ static void put_object(struct kmemleak_object *object)
static struct kmemleak_object *find_and_get_object(unsigned long ptr, int alias)
{
unsigned long flags;
- struct kmemleak_object *object = NULL;
+ struct kmemleak_object *object;
rcu_read_lock();
read_lock_irqsave(&kmemleak_lock, flags);
--
2.1.4
--
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>
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/1] mm: kmemleak: remove unneeded initialization of object to NULL
2015-09-09 22:33 [PATCH 1/1] mm: kmemleak: remove unneeded initialization of object to NULL Alexey Klimov
@ 2015-09-10 9:13 ` Catalin Marinas
0 siblings, 0 replies; 2+ messages in thread
From: Catalin Marinas @ 2015-09-10 9:13 UTC (permalink / raw)
To: Alexey Klimov; +Cc: linux-mm, linux-kernel, akpm, klimov.linux
On Thu, Sep 10, 2015 at 01:33:49AM +0300, Alexey Klimov wrote:
> Few lines below object is reinitialized by lookup_object()
> so we don't need to init it by NULL in the beginning of
> find_and_get_object().
>
> Signed-off-by: Alexey Klimov <alexey.klimov@linaro.org>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
--
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>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-09-10 9:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-09 22:33 [PATCH 1/1] mm: kmemleak: remove unneeded initialization of object to NULL Alexey Klimov
2015-09-10 9:13 ` Catalin Marinas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).