All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] Fix some wrong comments.
@ 2013-06-20 10:10 Tang Chen
  2013-06-20 10:10 ` [PATCH 1/5] page_isolation: Fix a comment typo in test_pages_isolated() Tang Chen
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Tang Chen @ 2013-06-20 10:10 UTC (permalink / raw)
  To: bcrl, akpm, hpa, trivial, linux-kernel

Fix some wrong comments found when reading code.

Tang Chen (5):
  page_isolation: Fix a comment typo in test_pages_isolated()
  page_migrate: Fix wrong comment in
    address_space_operations->migratepage()
  aio: Fix wrong comment in aio_complete()
  memblock: Fix wrong comment in __next_free_mem_range()
  bootmem, numa: Fix a comment typo in
    register_page_bootmem_info_node()

 fs/aio.c            |    2 +-
 include/linux/fs.h  |    4 ++--
 mm/memblock.c       |    2 +-
 mm/memory_hotplug.c |    4 ++--
 mm/page_isolation.c |    8 ++++----
 5 files changed, 10 insertions(+), 10 deletions(-)


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

* [PATCH 1/5] page_isolation: Fix a comment typo in test_pages_isolated()
  2013-06-20 10:10 [PATCH 0/5] Fix some wrong comments Tang Chen
@ 2013-06-20 10:10 ` Tang Chen
  2013-06-20 13:17   ` Zhang Yanfei
  2013-06-20 10:10 ` [PATCH 2/5] page_migrate: Fix wrong comment in address_space_operations->migratepage() Tang Chen
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 10+ messages in thread
From: Tang Chen @ 2013-06-20 10:10 UTC (permalink / raw)
  To: bcrl, akpm, hpa, trivial, linux-kernel

pageblock_nr_page should be pageblock_nr_pages, and fist is
a typo of first.

Signed-off-by: Tang Chen <tangchen@cn.fujitsu.com>
---
 mm/page_isolation.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/mm/page_isolation.c b/mm/page_isolation.c
index 383bdbb..0cee10f 100644
--- a/mm/page_isolation.c
+++ b/mm/page_isolation.c
@@ -226,9 +226,9 @@ int test_pages_isolated(unsigned long start_pfn, unsigned long end_pfn,
 	int ret;
 
 	/*
-	 * Note: pageblock_nr_page != MAX_ORDER. Then, chunks of free page
-	 * is not aligned to pageblock_nr_pages.
-	 * Then we just check pagetype fist.
+	 * Note: pageblock_nr_pages != MAX_ORDER. Then, chunks of free pages
+	 * are not aligned to pageblock_nr_pages.
+	 * Then we just check migratetype first.
 	 */
 	for (pfn = start_pfn; pfn < end_pfn; pfn += pageblock_nr_pages) {
 		page = __first_valid_page(pfn, pageblock_nr_pages);
@@ -238,7 +238,7 @@ int test_pages_isolated(unsigned long start_pfn, unsigned long end_pfn,
 	page = __first_valid_page(start_pfn, end_pfn - start_pfn);
 	if ((pfn < end_pfn) || !page)
 		return -EBUSY;
-	/* Check all pages are free or Marked as ISOLATED */
+	/* Check all pages are free or marked as ISOLATED */
 	zone = page_zone(page);
 	spin_lock_irqsave(&zone->lock, flags);
 	ret = __test_page_isolated_in_pageblock(start_pfn, end_pfn,
-- 
1.7.1


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

* [PATCH 2/5] page_migrate: Fix wrong comment in address_space_operations->migratepage()
  2013-06-20 10:10 [PATCH 0/5] Fix some wrong comments Tang Chen
  2013-06-20 10:10 ` [PATCH 1/5] page_isolation: Fix a comment typo in test_pages_isolated() Tang Chen
@ 2013-06-20 10:10 ` Tang Chen
  2013-08-20 11:02   ` Jiri Kosina
  2013-06-20 10:10 ` [PATCH 3/5] aio: Fix wrong comment in aio_complete() Tang Chen
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 10+ messages in thread
From: Tang Chen @ 2013-06-20 10:10 UTC (permalink / raw)
  To: bcrl, akpm, hpa, trivial, linux-kernel

There is no parameter "sync" in address_space_operations->migratepage().
It should be mograte_mode. And the comment is for MIGRATE_ASYNC.

Signed-off-by: Tang Chen <tangchen@cn.fujitsu.com>
---
 include/linux/fs.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/fs.h b/include/linux/fs.h
index 43db02e..c1a76ac 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -372,8 +372,8 @@ struct address_space_operations {
 	int (*get_xip_mem)(struct address_space *, pgoff_t, int,
 						void **, unsigned long *);
 	/*
-	 * migrate the contents of a page to the specified target. If sync
-	 * is false, it must not block.
+	 * migrate the contents of a page to the specified target. If
+	 * migrate_mode is MIGRATE_ASYNC, it must not block.
 	 */
 	int (*migratepage) (struct address_space *,
 			struct page *, struct page *, enum migrate_mode);
-- 
1.7.1


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

* [PATCH 3/5] aio: Fix wrong comment in aio_complete()
  2013-06-20 10:10 [PATCH 0/5] Fix some wrong comments Tang Chen
  2013-06-20 10:10 ` [PATCH 1/5] page_isolation: Fix a comment typo in test_pages_isolated() Tang Chen
  2013-06-20 10:10 ` [PATCH 2/5] page_migrate: Fix wrong comment in address_space_operations->migratepage() Tang Chen
@ 2013-06-20 10:10 ` Tang Chen
  2013-06-20 10:10 ` [PATCH 4/5] memblock: Fix wrong comment in __next_free_mem_range() Tang Chen
  2013-06-20 10:10 ` [PATCH 5/5] bootmem, numa: Fix a comment typo in register_page_bootmem_info_node() Tang Chen
  4 siblings, 0 replies; 10+ messages in thread
From: Tang Chen @ 2013-06-20 10:10 UTC (permalink / raw)
  To: bcrl, akpm, hpa, trivial, linux-kernel

ctx->ctx_lock should be ctx->completion_lock.

Signed-off-by: Tang Chen <tangchen@cn.fujitsu.com>
---
 fs/aio.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/aio.c b/fs/aio.c
index 2bbcacf..e4a01fa 100644
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -623,7 +623,7 @@ void aio_complete(struct kiocb *iocb, long res, long res2)
 
 	/*
 	 * Add a completion event to the ring buffer. Must be done holding
-	 * ctx->ctx_lock to prevent other code from messing with the tail
+	 * ctx->completion_lock to prevent other code from messing with the tail
 	 * pointer since we might be called from irq context.
 	 */
 	spin_lock_irqsave(&ctx->completion_lock, flags);
-- 
1.7.1


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

* [PATCH 4/5] memblock: Fix wrong comment in __next_free_mem_range()
  2013-06-20 10:10 [PATCH 0/5] Fix some wrong comments Tang Chen
                   ` (2 preceding siblings ...)
  2013-06-20 10:10 ` [PATCH 3/5] aio: Fix wrong comment in aio_complete() Tang Chen
@ 2013-06-20 10:10 ` Tang Chen
  2013-06-20 10:10 ` [PATCH 5/5] bootmem, numa: Fix a comment typo in register_page_bootmem_info_node() Tang Chen
  4 siblings, 0 replies; 10+ messages in thread
From: Tang Chen @ 2013-06-20 10:10 UTC (permalink / raw)
  To: bcrl, akpm, hpa, trivial, linux-kernel

Remove one redundant "nid" in the comment.

Signed-off-by: Tang Chen <tangchen@cn.fujitsu.com>
---
 mm/memblock.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/mm/memblock.c b/mm/memblock.c
index c5fad93..a847bfe 100644
--- a/mm/memblock.c
+++ b/mm/memblock.c
@@ -566,7 +566,7 @@ int __init_memblock memblock_reserve(phys_addr_t base, phys_addr_t size)
 /**
  * __next_free_mem_range - next function for for_each_free_mem_range()
  * @idx: pointer to u64 loop variable
- * @nid: nid: node selector, %MAX_NUMNODES for all nodes
+ * @nid: node selector, %MAX_NUMNODES for all nodes
  * @out_start: ptr to phys_addr_t for start address of the range, can be %NULL
  * @out_end: ptr to phys_addr_t for end address of the range, can be %NULL
  * @out_nid: ptr to int for nid of the range, can be %NULL
-- 
1.7.1


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

* [PATCH 5/5] bootmem, numa: Fix a comment typo in register_page_bootmem_info_node()
  2013-06-20 10:10 [PATCH 0/5] Fix some wrong comments Tang Chen
                   ` (3 preceding siblings ...)
  2013-06-20 10:10 ` [PATCH 4/5] memblock: Fix wrong comment in __next_free_mem_range() Tang Chen
@ 2013-06-20 10:10 ` Tang Chen
  4 siblings, 0 replies; 10+ messages in thread
From: Tang Chen @ 2013-06-20 10:10 UTC (permalink / raw)
  To: bcrl, akpm, hpa, trivial, linux-kernel

Signed-off-by: Tang Chen <tangchen@cn.fujitsu.com>
---
 mm/memory_hotplug.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
index 1ad92b4..12ee2a0 100644
--- a/mm/memory_hotplug.c
+++ b/mm/memory_hotplug.c
@@ -220,13 +220,13 @@ void register_page_bootmem_info_node(struct pglist_data *pgdat)
 	pfn = pgdat->node_start_pfn;
 	end_pfn = pgdat_end_pfn(pgdat);
 
-	/* register_section info */
+	/* register section info */
 	for (; pfn < end_pfn; pfn += PAGES_PER_SECTION) {
 		/*
 		 * Some platforms can assign the same pfn to multiple nodes - on
 		 * node0 as well as nodeN.  To avoid registering a pfn against
 		 * multiple nodes we check that this pfn does not already
-		 * reside in some other node.
+		 * reside in some other nodes.
 		 */
 		if (pfn_valid(pfn) && (pfn_to_nid(pfn) == node))
 			register_page_bootmem_info_section(pfn);
-- 
1.7.1


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

* Re: [PATCH 1/5] page_isolation: Fix a comment typo in test_pages_isolated()
  2013-06-20 10:10 ` [PATCH 1/5] page_isolation: Fix a comment typo in test_pages_isolated() Tang Chen
@ 2013-06-20 13:17   ` Zhang Yanfei
  2013-06-21  1:12     ` Tang Chen
  0 siblings, 1 reply; 10+ messages in thread
From: Zhang Yanfei @ 2013-06-20 13:17 UTC (permalink / raw)
  To: Tang Chen; +Cc: bcrl, akpm, hpa, trivial, linux-kernel

On 06/20/2013 06:10 PM, Tang Chen wrote:
> pageblock_nr_page should be pageblock_nr_pages, and fist is
> a typo of first.
> 
> Signed-off-by: Tang Chen <tangchen@cn.fujitsu.com>
> ---
>  mm/page_isolation.c |    8 ++++----
>  1 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/mm/page_isolation.c b/mm/page_isolation.c
> index 383bdbb..0cee10f 100644
> --- a/mm/page_isolation.c
> +++ b/mm/page_isolation.c
> @@ -226,9 +226,9 @@ int test_pages_isolated(unsigned long start_pfn, unsigned long end_pfn,
>  	int ret;
>  
>  	/*
> -	 * Note: pageblock_nr_page != MAX_ORDER. Then, chunks of free page
> -	 * is not aligned to pageblock_nr_pages.
> -	 * Then we just check pagetype fist.
> +	 * Note: pageblock_nr_pages != MAX_ORDER. Then, chunks of free pages

pageblock_nr_pages is the count of pages while MAX_ORDER is a order. Here
may be pageblock_order != MAX_ORDER.

> +	 * are not aligned to pageblock_nr_pages.
> +	 * Then we just check migratetype first.
>  	 */
>  	for (pfn = start_pfn; pfn < end_pfn; pfn += pageblock_nr_pages) {
>  		page = __first_valid_page(pfn, pageblock_nr_pages);
> @@ -238,7 +238,7 @@ int test_pages_isolated(unsigned long start_pfn, unsigned long end_pfn,
>  	page = __first_valid_page(start_pfn, end_pfn - start_pfn);
>  	if ((pfn < end_pfn) || !page)
>  		return -EBUSY;
> -	/* Check all pages are free or Marked as ISOLATED */
> +	/* Check all pages are free or marked as ISOLATED */
>  	zone = page_zone(page);
>  	spin_lock_irqsave(&zone->lock, flags);
>  	ret = __test_page_isolated_in_pageblock(start_pfn, end_pfn,


-- 
Thanks.
Zhang Yanfei

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

* Re: [PATCH 1/5] page_isolation: Fix a comment typo in test_pages_isolated()
  2013-06-20 13:17   ` Zhang Yanfei
@ 2013-06-21  1:12     ` Tang Chen
  0 siblings, 0 replies; 10+ messages in thread
From: Tang Chen @ 2013-06-21  1:12 UTC (permalink / raw)
  To: Zhang Yanfei; +Cc: bcrl, akpm, hpa, trivial, linux-kernel

On 06/20/2013 09:17 PM, Zhang Yanfei wrote:
> On 06/20/2013 06:10 PM, Tang Chen wrote:
>> pageblock_nr_page should be pageblock_nr_pages, and fist is
>> a typo of first.
>>
>> Signed-off-by: Tang Chen<tangchen@cn.fujitsu.com>
>> ---
>>   mm/page_isolation.c |    8 ++++----
>>   1 files changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/mm/page_isolation.c b/mm/page_isolation.c
>> index 383bdbb..0cee10f 100644
>> --- a/mm/page_isolation.c
>> +++ b/mm/page_isolation.c
>> @@ -226,9 +226,9 @@ int test_pages_isolated(unsigned long start_pfn, unsigned long end_pfn,
>>   	int ret;
>>
>>   	/*
>> -	 * Note: pageblock_nr_page != MAX_ORDER. Then, chunks of free page
>> -	 * is not aligned to pageblock_nr_pages.
>> -	 * Then we just check pagetype fist.
>> +	 * Note: pageblock_nr_pages != MAX_ORDER. Then, chunks of free pages
>
> pageblock_nr_pages is the count of pages while MAX_ORDER is a order. Here
> may be pageblock_order != MAX_ORDER.

Hum, yes. Since we have:
	#define pageblock_nr_pages      (1UL << pageblock_order)

it should be pageblock_order.
>
>> +	 * are not aligned to pageblock_nr_pages.
>> +	 * Then we just check migratetype first.
>>   	 */
>>   	for (pfn = start_pfn; pfn<  end_pfn; pfn += pageblock_nr_pages) {
>>   		page = __first_valid_page(pfn, pageblock_nr_pages);
>> @@ -238,7 +238,7 @@ int test_pages_isolated(unsigned long start_pfn, unsigned long end_pfn,
>>   	page = __first_valid_page(start_pfn, end_pfn - start_pfn);
>>   	if ((pfn<  end_pfn) || !page)
>>   		return -EBUSY;
>> -	/* Check all pages are free or Marked as ISOLATED */
>> +	/* Check all pages are free or marked as ISOLATED */
>>   	zone = page_zone(page);
>>   	spin_lock_irqsave(&zone->lock, flags);
>>   	ret = __test_page_isolated_in_pageblock(start_pfn, end_pfn,
>
>

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

* Re: [PATCH 2/5] page_migrate: Fix wrong comment in address_space_operations->migratepage()
  2013-06-20 10:10 ` [PATCH 2/5] page_migrate: Fix wrong comment in address_space_operations->migratepage() Tang Chen
@ 2013-08-20 11:02   ` Jiri Kosina
  2013-08-20 11:05     ` Tang Chen
  0 siblings, 1 reply; 10+ messages in thread
From: Jiri Kosina @ 2013-08-20 11:02 UTC (permalink / raw)
  To: Tang Chen; +Cc: bcrl, akpm, hpa, linux-kernel

On Thu, 20 Jun 2013, Tang Chen wrote:

> There is no parameter "sync" in address_space_operations->migratepage().
> It should be mograte_mode. And the comment is for MIGRATE_ASYNC.

I am fixing this typo in changelog :) and applying the series.

> 
> Signed-off-by: Tang Chen <tangchen@cn.fujitsu.com>
> ---
>  include/linux/fs.h |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/include/linux/fs.h b/include/linux/fs.h
> index 43db02e..c1a76ac 100644
> --- a/include/linux/fs.h
> +++ b/include/linux/fs.h
> @@ -372,8 +372,8 @@ struct address_space_operations {
>  	int (*get_xip_mem)(struct address_space *, pgoff_t, int,
>  						void **, unsigned long *);
>  	/*
> -	 * migrate the contents of a page to the specified target. If sync
> -	 * is false, it must not block.
> +	 * migrate the contents of a page to the specified target. If
> +	 * migrate_mode is MIGRATE_ASYNC, it must not block.
>  	 */
>  	int (*migratepage) (struct address_space *,
>  			struct page *, struct page *, enum migrate_mode);
> -- 
> 1.7.1
> 

-- 
Jiri Kosina
SUSE Labs

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

* Re: [PATCH 2/5] page_migrate: Fix wrong comment in address_space_operations->migratepage()
  2013-08-20 11:02   ` Jiri Kosina
@ 2013-08-20 11:05     ` Tang Chen
  0 siblings, 0 replies; 10+ messages in thread
From: Tang Chen @ 2013-08-20 11:05 UTC (permalink / raw)
  To: Jiri Kosina; +Cc: bcrl, akpm, hpa, linux-kernel

On 08/20/2013 07:02 PM, Jiri Kosina wrote:
> On Thu, 20 Jun 2013, Tang Chen wrote:
>
>> There is no parameter "sync" in address_space_operations->migratepage().
>> It should be mograte_mode. And the comment is for MIGRATE_ASYNC.
>
> I am fixing this typo in changelog :) and applying the series.

Hi Jiri,

Thanks a lot. :)

>
>>
>> Signed-off-by: Tang Chen<tangchen@cn.fujitsu.com>
>> ---
>>   include/linux/fs.h |    4 ++--
>>   1 files changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/include/linux/fs.h b/include/linux/fs.h
>> index 43db02e..c1a76ac 100644
>> --- a/include/linux/fs.h
>> +++ b/include/linux/fs.h
>> @@ -372,8 +372,8 @@ struct address_space_operations {
>>   	int (*get_xip_mem)(struct address_space *, pgoff_t, int,
>>   						void **, unsigned long *);
>>   	/*
>> -	 * migrate the contents of a page to the specified target. If sync
>> -	 * is false, it must not block.
>> +	 * migrate the contents of a page to the specified target. If
>> +	 * migrate_mode is MIGRATE_ASYNC, it must not block.
>>   	 */
>>   	int (*migratepage) (struct address_space *,
>>   			struct page *, struct page *, enum migrate_mode);
>> --
>> 1.7.1
>>
>

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

end of thread, other threads:[~2013-08-20 11:06 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-20 10:10 [PATCH 0/5] Fix some wrong comments Tang Chen
2013-06-20 10:10 ` [PATCH 1/5] page_isolation: Fix a comment typo in test_pages_isolated() Tang Chen
2013-06-20 13:17   ` Zhang Yanfei
2013-06-21  1:12     ` Tang Chen
2013-06-20 10:10 ` [PATCH 2/5] page_migrate: Fix wrong comment in address_space_operations->migratepage() Tang Chen
2013-08-20 11:02   ` Jiri Kosina
2013-08-20 11:05     ` Tang Chen
2013-06-20 10:10 ` [PATCH 3/5] aio: Fix wrong comment in aio_complete() Tang Chen
2013-06-20 10:10 ` [PATCH 4/5] memblock: Fix wrong comment in __next_free_mem_range() Tang Chen
2013-06-20 10:10 ` [PATCH 5/5] bootmem, numa: Fix a comment typo in register_page_bootmem_info_node() Tang Chen

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.