Skip to content

Commit cffe57b

Browse files
bagasmeakpm00
authored andcommitted
Documentation: highmem: use literal block for code example in highmem.h comment
When building htmldocs on Linus's tree, there are inline emphasis warnings on include/linux/highmem.h: Documentation/vm/highmem:166: ./include/linux/highmem.h:154: WARNING: Inline emphasis start-string without end-string. Documentation/vm/highmem:166: ./include/linux/highmem.h:157: WARNING: Inline emphasis start-string without end-string. These warnings above are due to comments in code example at the mentioned lines above are enclosed by double dash (--), which confuses Sphinx as inline markup delimiters instead. Fix these warnings by indenting the code example with literal block indentation and making the comments C comments. Link: https://lkml.kernel.org/r/[email protected] Fixes: 85a85e7 ("Documentation/vm: move "Using kmap-atomic" to highmem.h") Signed-off-by: Bagas Sanjaya <[email protected]> Reviewed-by: Ira Weiny <[email protected]> Tested-by: Ira Weiny <[email protected]> Cc: "Matthew Wilcox (Oracle)" <[email protected]> Cc: "Fabio M. De Francesco" <[email protected]> Cc: Sebastian Andrzej Siewior <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 39d35ed commit cffe57b

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

include/linux/highmem.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -149,19 +149,19 @@ static inline void *kmap_local_folio(struct folio *folio, size_t offset);
149149
* It is used in atomic context when code wants to access the contents of a
150150
* page that might be allocated from high memory (see __GFP_HIGHMEM), for
151151
* example a page in the pagecache. The API has two functions, and they
152-
* can be used in a manner similar to the following:
152+
* can be used in a manner similar to the following::
153153
*
154-
* -- Find the page of interest. --
155-
* struct page *page = find_get_page(mapping, offset);
154+
* // Find the page of interest.
155+
* struct page *page = find_get_page(mapping, offset);
156156
*
157-
* -- Gain access to the contents of that page. --
158-
* void *vaddr = kmap_atomic(page);
157+
* // Gain access to the contents of that page.
158+
* void *vaddr = kmap_atomic(page);
159159
*
160-
* -- Do something to the contents of that page. --
161-
* memset(vaddr, 0, PAGE_SIZE);
160+
* // Do something to the contents of that page.
161+
* memset(vaddr, 0, PAGE_SIZE);
162162
*
163-
* -- Unmap that page. --
164-
* kunmap_atomic(vaddr);
163+
* // Unmap that page.
164+
* kunmap_atomic(vaddr);
165165
*
166166
* Note that the kunmap_atomic() call takes the result of the kmap_atomic()
167167
* call, not the argument.

0 commit comments

Comments
 (0)