All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] mm, compaction: remove set but not used variables 'a, b, c'
@ 2019-01-09  3:02 ` YueHaibing
  0 siblings, 0 replies; 5+ messages in thread
From: YueHaibing @ 2019-01-09  2:56 UTC (permalink / raw)
  To: Joonsoo Kim, Andrew Morton, Mel Gorman, Stephen Rothwell,
	Vlastimil Babka, Michal Hocko
  Cc: YueHaibing, linux-mm, linux-kernel, kernel-janitors

Fixes gcc '-Wunused-but-set-variable' warning:

mm/compaction.c: In function 'compact_zone':
mm/compaction.c:2063:22: warning:
 variable 'c' set but not used [-Wunused-but-set-variable]
mm/compaction.c:2063:19: warning:
 variable 'b' set but not used [-Wunused-but-set-variable]
mm/compaction.c:2063:16: warning:
 variable 'a' set but not used [-Wunused-but-set-variable]

This never used since 94d5992baaa5 ("mm, compaction: finish pageblock
scanning on contention")

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 mm/compaction.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/mm/compaction.c b/mm/compaction.c
index f73fe07..529f19a 100644
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -2060,7 +2060,6 @@ bool compaction_zonelist_suitable(struct alloc_context *ac, int order,
 	unsigned long last_migrated_pfn;
 	const bool sync = cc->mode != MIGRATE_ASYNC;
 	bool update_cached;
-	unsigned long a, b, c;
 
 	cc->migratetype = gfpflags_to_migratetype(cc->gfp_mask);
 	ret = compaction_suitable(cc->zone, cc->order, cc->alloc_flags,
@@ -2106,10 +2105,6 @@ bool compaction_zonelist_suitable(struct alloc_context *ac, int order,
 			cc->whole_zone = true;
 	}
 
-	a = cc->migrate_pfn;
-	b = cc->free_pfn;
-	c = (cc->free_pfn - cc->migrate_pfn) / pageblock_nr_pages;
-
 	last_migrated_pfn = 0;
 
 	/*

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH -next] mm, compaction: remove set but not used variables 'a, b, c'
@ 2019-01-09  3:02 ` YueHaibing
  0 siblings, 0 replies; 5+ messages in thread
From: YueHaibing @ 2019-01-09  3:02 UTC (permalink / raw)
  To: Joonsoo Kim, Andrew Morton, Mel Gorman, Stephen Rothwell,
	Vlastimil Babka, Michal Hocko
  Cc: YueHaibing, linux-mm, linux-kernel, kernel-janitors

Fixes gcc '-Wunused-but-set-variable' warning:

mm/compaction.c: In function 'compact_zone':
mm/compaction.c:2063:22: warning:
 variable 'c' set but not used [-Wunused-but-set-variable]
mm/compaction.c:2063:19: warning:
 variable 'b' set but not used [-Wunused-but-set-variable]
mm/compaction.c:2063:16: warning:
 variable 'a' set but not used [-Wunused-but-set-variable]

This never used since 94d5992baaa5 ("mm, compaction: finish pageblock
scanning on contention")

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 mm/compaction.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/mm/compaction.c b/mm/compaction.c
index f73fe07..529f19a 100644
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -2060,7 +2060,6 @@ bool compaction_zonelist_suitable(struct alloc_context *ac, int order,
 	unsigned long last_migrated_pfn;
 	const bool sync = cc->mode != MIGRATE_ASYNC;
 	bool update_cached;
-	unsigned long a, b, c;
 
 	cc->migratetype = gfpflags_to_migratetype(cc->gfp_mask);
 	ret = compaction_suitable(cc->zone, cc->order, cc->alloc_flags,
@@ -2106,10 +2105,6 @@ bool compaction_zonelist_suitable(struct alloc_context *ac, int order,
 			cc->whole_zone = true;
 	}
 
-	a = cc->migrate_pfn;
-	b = cc->free_pfn;
-	c = (cc->free_pfn - cc->migrate_pfn) / pageblock_nr_pages;
-
 	last_migrated_pfn = 0;
 
 	/*




^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH -next] mm, compaction: remove set but not used variables 'a, b, c'
@ 2019-01-09  3:02 ` YueHaibing
  0 siblings, 0 replies; 5+ messages in thread
From: YueHaibing @ 2019-01-09  3:02 UTC (permalink / raw)
  To: Joonsoo Kim, Andrew Morton, Mel Gorman, Stephen Rothwell,
	Vlastimil Babka, Michal Hocko
  Cc: YueHaibing, linux-mm, linux-kernel, kernel-janitors

Fixes gcc '-Wunused-but-set-variable' warning:

mm/compaction.c: In function 'compact_zone':
mm/compaction.c:2063:22: warning:
 variable 'c' set but not used [-Wunused-but-set-variable]
mm/compaction.c:2063:19: warning:
 variable 'b' set but not used [-Wunused-but-set-variable]
mm/compaction.c:2063:16: warning:
 variable 'a' set but not used [-Wunused-but-set-variable]

This never used since 94d5992baaa5 ("mm, compaction: finish pageblock
scanning on contention")

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 mm/compaction.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/mm/compaction.c b/mm/compaction.c
index f73fe07..529f19a 100644
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -2060,7 +2060,6 @@ bool compaction_zonelist_suitable(struct alloc_context *ac, int order,
 	unsigned long last_migrated_pfn;
 	const bool sync = cc->mode != MIGRATE_ASYNC;
 	bool update_cached;
-	unsigned long a, b, c;
 
 	cc->migratetype = gfpflags_to_migratetype(cc->gfp_mask);
 	ret = compaction_suitable(cc->zone, cc->order, cc->alloc_flags,
@@ -2106,10 +2105,6 @@ bool compaction_zonelist_suitable(struct alloc_context *ac, int order,
 			cc->whole_zone = true;
 	}
 
-	a = cc->migrate_pfn;
-	b = cc->free_pfn;
-	c = (cc->free_pfn - cc->migrate_pfn) / pageblock_nr_pages;
-
 	last_migrated_pfn = 0;
 
 	/*

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH -next] mm, compaction: remove set but not used variables 'a, b, c'
  2019-01-09  3:02 ` YueHaibing
@ 2019-01-09 10:15   ` Mel Gorman
  -1 siblings, 0 replies; 5+ messages in thread
From: Mel Gorman @ 2019-01-09 10:15 UTC (permalink / raw)
  To: YueHaibing
  Cc: Joonsoo Kim, Andrew Morton, Stephen Rothwell, Vlastimil Babka,
	Michal Hocko, linux-mm, linux-kernel, kernel-janitors

On Wed, Jan 09, 2019 at 03:02:47AM +0000, YueHaibing wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> mm/compaction.c: In function 'compact_zone':
> mm/compaction.c:2063:22: warning:
>  variable 'c' set but not used [-Wunused-but-set-variable]
> mm/compaction.c:2063:19: warning:
>  variable 'b' set but not used [-Wunused-but-set-variable]
> mm/compaction.c:2063:16: warning:
>  variable 'a' set but not used [-Wunused-but-set-variable]
> 
> This never used since 94d5992baaa5 ("mm, compaction: finish pageblock
> scanning on contention")
> 

Dang. This is left-over debugging code that got accidentally merged
during a rebase.  Andrew, can you pick this up as a fix to the mmotm
patch mm-compaction-finish-pageblock-scanning-on-contention.patch please?

Thanks YueHaibing.

-- 
Mel Gorman
SUSE Labs

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH -next] mm, compaction: remove set but not used variables 'a, b, c'
@ 2019-01-09 10:15   ` Mel Gorman
  0 siblings, 0 replies; 5+ messages in thread
From: Mel Gorman @ 2019-01-09 10:15 UTC (permalink / raw)
  To: YueHaibing
  Cc: Joonsoo Kim, Andrew Morton, Stephen Rothwell, Vlastimil Babka,
	Michal Hocko, linux-mm, linux-kernel, kernel-janitors

On Wed, Jan 09, 2019 at 03:02:47AM +0000, YueHaibing wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> mm/compaction.c: In function 'compact_zone':
> mm/compaction.c:2063:22: warning:
>  variable 'c' set but not used [-Wunused-but-set-variable]
> mm/compaction.c:2063:19: warning:
>  variable 'b' set but not used [-Wunused-but-set-variable]
> mm/compaction.c:2063:16: warning:
>  variable 'a' set but not used [-Wunused-but-set-variable]
> 
> This never used since 94d5992baaa5 ("mm, compaction: finish pageblock
> scanning on contention")
> 

Dang. This is left-over debugging code that got accidentally merged
during a rebase.  Andrew, can you pick this up as a fix to the mmotm
patch mm-compaction-finish-pageblock-scanning-on-contention.patch please?

Thanks YueHaibing.

-- 
Mel Gorman
SUSE Labs

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-01-09 10:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-09  2:56 [PATCH -next] mm, compaction: remove set but not used variables 'a, b, c' YueHaibing
2019-01-09  3:02 ` YueHaibing
2019-01-09  3:02 ` YueHaibing
2019-01-09 10:15 ` Mel Gorman
2019-01-09 10:15   ` Mel Gorman

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.