2011-05-24 13:34:21

by Luca Tettamanti

[permalink] [raw]
Subject: [PATCH] set_migratetype_isolate: remove unused variable.

Signed-off-by: Luca Tettamanti <[email protected]>
---
mm/page_alloc.c | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 9d5498e..bcbdaf1 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -5508,10 +5508,8 @@ int set_migratetype_isolate(struct page *page)
struct memory_isolate_notify arg;
int notifier_ret;
int ret = -EBUSY;
- int zone_idx;

zone = page_zone(page);
- zone_idx = zone_idx(zone);

spin_lock_irqsave(&zone->lock, flags);

--
1.7.5.1


2011-05-24 22:29:21

by Minchan Kim

[permalink] [raw]
Subject: Re: [PATCH] set_migratetype_isolate: remove unused variable.

On Tue, May 24, 2011 at 10:34 PM, Luca Tettamanti <[email protected]> wrote:
> Signed-off-by: Luca Tettamanti <[email protected]>
Reviewed-by: Minchan Kim <[email protected]>

If it's trivial, please write log body down.
Anyway, nice catch.
Thanks.

--
Kind regards,
Minchan Kim

2011-05-25 07:28:04

by Luca Tettamanti

[permalink] [raw]
Subject: Re: [PATCH] set_migratetype_isolate: remove unused variable.

On Wed, May 25, 2011 at 12:29 AM, Minchan Kim <[email protected]> wrote:
> On Tue, May 24, 2011 at 10:34 PM, Luca Tettamanti <[email protected]> wrote:
>> Signed-off-by: Luca Tettamanti <[email protected]>
> Reviewed-by: Minchan Kim <[email protected]>
>
> If it's trivial, please write log body down.

Ok, I'll keep that in mind.

> Anyway, nice catch.

I'm cheating ;-)
I'm working with warnings generated by gcc-4.6 and - yes - I'm
screening false positives and compiling the patches :-)

Luca

2011-05-25 07:36:12

by KOSAKI Motohiro

[permalink] [raw]
Subject: Re: [PATCH] set_migratetype_isolate: remove unused variable.

(2011/05/25 16:28), Luca Tettamanti wrote:
> On Wed, May 25, 2011 at 12:29 AM, Minchan Kim <[email protected]> wrote:
>> On Tue, May 24, 2011 at 10:34 PM, Luca Tettamanti <[email protected]> wrote:
>>> Signed-off-by: Luca Tettamanti <[email protected]>
>> Reviewed-by: Minchan Kim <[email protected]>
>>
>> If it's trivial, please write log body down.
>
> Ok, I'll keep that in mind.

If you fix zero patch description issue,
Reviewed-by: KOSAKI Motohiro <[email protected]>

Anyway, nice catch!

2011-05-25 20:32:09

by Luca Tettamanti

[permalink] [raw]
Subject: [PATCH v2] set_migratetype_isolate: remove unused variable.

zone_idx is never read inside the function.

Signed-off-by: Luca Tettamanti <[email protected]>
Reviewed-by: Minchan Kim <[email protected]>
Reviewed-by: KOSAKI Motohiro <[email protected]>
---
mm/page_alloc.c | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 9d5498e..bcbdaf1 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -5508,10 +5508,8 @@ int set_migratetype_isolate(struct page *page)
struct memory_isolate_notify arg;
int notifier_ret;
int ret = -EBUSY;
- int zone_idx;

zone = page_zone(page);
- zone_idx = zone_idx(zone);

spin_lock_irqsave(&zone->lock, flags);

--
1.7.5.1