diff options
author | Mike Rapoport <rppt@linux.ibm.com> | 2019-03-05 18:48:42 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-03-06 00:07:20 -0500 |
commit | a862f68a8b360086f248cbc3606029441b5f5197 (patch) | |
tree | c38cb46b547d865da3df438e3db0284003bdd5b1 /mm/page_alloc.c | |
parent | bc8ff3ca6589d63c6d10f5ee8bed38f74851b469 (diff) |
docs/core-api/mm: fix return value descriptions in mm/
Many kernel-doc comments in mm/ have the return value descriptions
either misformatted or omitted at all which makes kernel-doc script
unhappy:
$ make V=1 htmldocs
...
./mm/util.c:36: info: Scanning doc for kstrdup
./mm/util.c:41: warning: No description found for return value of 'kstrdup'
./mm/util.c:57: info: Scanning doc for kstrdup_const
./mm/util.c:66: warning: No description found for return value of 'kstrdup_const'
./mm/util.c:75: info: Scanning doc for kstrndup
./mm/util.c:83: warning: No description found for return value of 'kstrndup'
...
Fixing the formatting and adding the missing return value descriptions
eliminates ~100 such warnings.
Link: http://lkml.kernel.org/r/1549549644-4903-4-git-send-email-rppt@linux.ibm.com
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/page_alloc.c')
-rw-r--r-- | mm/page_alloc.c | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index c29828ec9183..4e1d9118ae52 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -4816,6 +4816,8 @@ static void *make_alloc_exact(unsigned long addr, unsigned int order, | |||
4816 | * This function is also limited by MAX_ORDER. | 4816 | * This function is also limited by MAX_ORDER. |
4817 | * | 4817 | * |
4818 | * Memory allocated by this function must be released by free_pages_exact(). | 4818 | * Memory allocated by this function must be released by free_pages_exact(). |
4819 | * | ||
4820 | * Return: pointer to the allocated area or %NULL in case of error. | ||
4819 | */ | 4821 | */ |
4820 | void *alloc_pages_exact(size_t size, gfp_t gfp_mask) | 4822 | void *alloc_pages_exact(size_t size, gfp_t gfp_mask) |
4821 | { | 4823 | { |
@@ -4836,6 +4838,8 @@ EXPORT_SYMBOL(alloc_pages_exact); | |||
4836 | * | 4838 | * |
4837 | * Like alloc_pages_exact(), but try to allocate on node nid first before falling | 4839 | * Like alloc_pages_exact(), but try to allocate on node nid first before falling |
4838 | * back. | 4840 | * back. |
4841 | * | ||
4842 | * Return: pointer to the allocated area or %NULL in case of error. | ||
4839 | */ | 4843 | */ |
4840 | void * __meminit alloc_pages_exact_nid(int nid, size_t size, gfp_t gfp_mask) | 4844 | void * __meminit alloc_pages_exact_nid(int nid, size_t size, gfp_t gfp_mask) |
4841 | { | 4845 | { |
@@ -4869,11 +4873,13 @@ EXPORT_SYMBOL(free_pages_exact); | |||
4869 | * nr_free_zone_pages - count number of pages beyond high watermark | 4873 | * nr_free_zone_pages - count number of pages beyond high watermark |
4870 | * @offset: The zone index of the highest zone | 4874 | * @offset: The zone index of the highest zone |
4871 | * | 4875 | * |
4872 | * nr_free_zone_pages() counts the number of counts pages which are beyond the | 4876 | * nr_free_zone_pages() counts the number of pages which are beyond the |
4873 | * high watermark within all zones at or below a given zone index. For each | 4877 | * high watermark within all zones at or below a given zone index. For each |
4874 | * zone, the number of pages is calculated as: | 4878 | * zone, the number of pages is calculated as: |
4875 | * | 4879 | * |
4876 | * nr_free_zone_pages = managed_pages - high_pages | 4880 | * nr_free_zone_pages = managed_pages - high_pages |
4881 | * | ||
4882 | * Return: number of pages beyond high watermark. | ||
4877 | */ | 4883 | */ |
4878 | static unsigned long nr_free_zone_pages(int offset) | 4884 | static unsigned long nr_free_zone_pages(int offset) |
4879 | { | 4885 | { |
@@ -4900,6 +4906,9 @@ static unsigned long nr_free_zone_pages(int offset) | |||
4900 | * | 4906 | * |
4901 | * nr_free_buffer_pages() counts the number of pages which are beyond the high | 4907 | * nr_free_buffer_pages() counts the number of pages which are beyond the high |
4902 | * watermark within ZONE_DMA and ZONE_NORMAL. | 4908 | * watermark within ZONE_DMA and ZONE_NORMAL. |
4909 | * | ||
4910 | * Return: number of pages beyond high watermark within ZONE_DMA and | ||
4911 | * ZONE_NORMAL. | ||
4903 | */ | 4912 | */ |
4904 | unsigned long nr_free_buffer_pages(void) | 4913 | unsigned long nr_free_buffer_pages(void) |
4905 | { | 4914 | { |
@@ -4912,6 +4921,8 @@ EXPORT_SYMBOL_GPL(nr_free_buffer_pages); | |||
4912 | * | 4921 | * |
4913 | * nr_free_pagecache_pages() counts the number of pages which are beyond the | 4922 | * nr_free_pagecache_pages() counts the number of pages which are beyond the |
4914 | * high watermark within all zones. | 4923 | * high watermark within all zones. |
4924 | * | ||
4925 | * Return: number of pages beyond high watermark within all zones. | ||
4915 | */ | 4926 | */ |
4916 | unsigned long nr_free_pagecache_pages(void) | 4927 | unsigned long nr_free_pagecache_pages(void) |
4917 | { | 4928 | { |
@@ -5358,7 +5369,8 @@ static int node_load[MAX_NUMNODES]; | |||
5358 | * from each node to each node in the system), and should also prefer nodes | 5369 | * from each node to each node in the system), and should also prefer nodes |
5359 | * with no CPUs, since presumably they'll have very little allocation pressure | 5370 | * with no CPUs, since presumably they'll have very little allocation pressure |
5360 | * on them otherwise. | 5371 | * on them otherwise. |
5361 | * It returns -1 if no node is found. | 5372 | * |
5373 | * Return: node id of the found node or %NUMA_NO_NODE if no node is found. | ||
5362 | */ | 5374 | */ |
5363 | static int find_next_best_node(int node, nodemask_t *used_node_mask) | 5375 | static int find_next_best_node(int node, nodemask_t *used_node_mask) |
5364 | { | 5376 | { |
@@ -6269,7 +6281,7 @@ unsigned long __init __absent_pages_in_range(int nid, | |||
6269 | * @start_pfn: The start PFN to start searching for holes | 6281 | * @start_pfn: The start PFN to start searching for holes |
6270 | * @end_pfn: The end PFN to stop searching for holes | 6282 | * @end_pfn: The end PFN to stop searching for holes |
6271 | * | 6283 | * |
6272 | * It returns the number of pages frames in memory holes within a range. | 6284 | * Return: the number of pages frames in memory holes within a range. |
6273 | */ | 6285 | */ |
6274 | unsigned long __init absent_pages_in_range(unsigned long start_pfn, | 6286 | unsigned long __init absent_pages_in_range(unsigned long start_pfn, |
6275 | unsigned long end_pfn) | 6287 | unsigned long end_pfn) |
@@ -6826,7 +6838,7 @@ void __init setup_nr_node_ids(void) | |||
6826 | * model has fine enough granularity to avoid incorrect mapping for the | 6838 | * model has fine enough granularity to avoid incorrect mapping for the |
6827 | * populated node map. | 6839 | * populated node map. |
6828 | * | 6840 | * |
6829 | * Returns the determined alignment in pfn's. 0 if there is no alignment | 6841 | * Return: the determined alignment in pfn's. 0 if there is no alignment |
6830 | * requirement (single node). | 6842 | * requirement (single node). |
6831 | */ | 6843 | */ |
6832 | unsigned long __init node_map_pfn_alignment(void) | 6844 | unsigned long __init node_map_pfn_alignment(void) |
@@ -6881,7 +6893,7 @@ static unsigned long __init find_min_pfn_for_node(int nid) | |||
6881 | /** | 6893 | /** |
6882 | * find_min_pfn_with_active_regions - Find the minimum PFN registered | 6894 | * find_min_pfn_with_active_regions - Find the minimum PFN registered |
6883 | * | 6895 | * |
6884 | * It returns the minimum PFN based on information provided via | 6896 | * Return: the minimum PFN based on information provided via |
6885 | * memblock_set_node(). | 6897 | * memblock_set_node(). |
6886 | */ | 6898 | */ |
6887 | unsigned long __init find_min_pfn_with_active_regions(void) | 6899 | unsigned long __init find_min_pfn_with_active_regions(void) |
@@ -8174,7 +8186,7 @@ static int __alloc_contig_migrate_range(struct compact_control *cc, | |||
8174 | * pageblocks in the range. Once isolated, the pageblocks should not | 8186 | * pageblocks in the range. Once isolated, the pageblocks should not |
8175 | * be modified by others. | 8187 | * be modified by others. |
8176 | * | 8188 | * |
8177 | * Returns zero on success or negative error code. On success all | 8189 | * Return: zero on success or negative error code. On success all |
8178 | * pages which PFN is in [start, end) are allocated for the caller and | 8190 | * pages which PFN is in [start, end) are allocated for the caller and |
8179 | * need to be freed with free_contig_range(). | 8191 | * need to be freed with free_contig_range(). |
8180 | */ | 8192 | */ |