LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH 1/1 linux-next] mm/page_alloc.c: don't redeclare mt in get_pageblock_migratetype()
@ 2015-03-11 18:08 Fabian Frederick
  2015-03-18 13:44 ` Vlastimil Babka
  0 siblings, 1 reply; 2+ messages in thread
From: Fabian Frederick @ 2015-03-11 18:08 UTC (permalink / raw)
  To: linux-kernel; +Cc: Fabian Frederick, linux-mm

mt is already declared above and global value not used after loop.
This fixes a shadow warning.

Signed-off-by: Fabian Frederick <fabf@skynet.be>
---
 mm/page_alloc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 1b84950..4ec8c23 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -1653,7 +1653,7 @@ int __isolate_free_page(struct page *page, unsigned int order)
 	if (order >= pageblock_order - 1) {
 		struct page *endpage = page + (1 << order) - 1;
 		for (; page < endpage; page += pageblock_nr_pages) {
-			int mt = get_pageblock_migratetype(page);
+			mt = get_pageblock_migratetype(page);
 			if (!is_migrate_isolate(mt) && !is_migrate_cma(mt))
 				set_pageblock_migratetype(page,
 							  MIGRATE_MOVABLE);
-- 
1.9.1


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

* Re: [PATCH 1/1 linux-next] mm/page_alloc.c: don't redeclare mt in get_pageblock_migratetype()
  2015-03-11 18:08 [PATCH 1/1 linux-next] mm/page_alloc.c: don't redeclare mt in get_pageblock_migratetype() Fabian Frederick
@ 2015-03-18 13:44 ` Vlastimil Babka
  0 siblings, 0 replies; 2+ messages in thread
From: Vlastimil Babka @ 2015-03-18 13:44 UTC (permalink / raw)
  To: Fabian Frederick, linux-kernel; +Cc: linux-mm

On 03/11/2015 07:08 PM, Fabian Frederick wrote:
> mt is already declared above and global value not used after loop.
> This fixes a shadow warning.
>
> Signed-off-by: Fabian Frederick <fabf@skynet.be>

Acked-by: Vlastimil Babka <vbabka@suse.cz>

> ---
>   mm/page_alloc.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index 1b84950..4ec8c23 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -1653,7 +1653,7 @@ int __isolate_free_page(struct page *page, unsigned int order)
>   	if (order >= pageblock_order - 1) {
>   		struct page *endpage = page + (1 << order) - 1;
>   		for (; page < endpage; page += pageblock_nr_pages) {
> -			int mt = get_pageblock_migratetype(page);
> +			mt = get_pageblock_migratetype(page);
>   			if (!is_migrate_isolate(mt) && !is_migrate_cma(mt))
>   				set_pageblock_migratetype(page,
>   							  MIGRATE_MOVABLE);
>


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

end of thread, other threads:[~2015-03-18 13:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-11 18:08 [PATCH 1/1 linux-next] mm/page_alloc.c: don't redeclare mt in get_pageblock_migratetype() Fabian Frederick
2015-03-18 13:44 ` Vlastimil Babka

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).