diff options
author | mchehab@s-opensource.com <mchehab@s-opensource.com> | 2017-03-30 16:11:36 -0400 |
---|---|---|
committer | Jonathan Corbet <corbet@lwn.net> | 2017-04-02 16:31:49 -0400 |
commit | 0e056eb5530da802c07f080d6bbd43c50e799efd (patch) | |
tree | 52ef7df0208878f5bae8f90f12eedfc3cb6a51e7 | |
parent | 40bf19a8d9af96c0fd3a2b94a407d7eada6f2853 (diff) |
kernel-api.rst: fix a series of errors when parsing C files
./lib/string.c:134: WARNING: Inline emphasis start-string without end-string.
./mm/filemap.c:522: WARNING: Inline interpreted text or phrase reference start-string without end-string.
./mm/filemap.c:1283: ERROR: Unexpected indentation.
./mm/filemap.c:3003: WARNING: Inline interpreted text or phrase reference start-string without end-string.
./mm/vmalloc.c:1544: WARNING: Inline emphasis start-string without end-string.
./mm/page_alloc.c:4245: ERROR: Unexpected indentation.
./ipc/util.c:676: ERROR: Unexpected indentation.
./drivers/pci/irq.c:35: WARNING: Block quote ends without a blank line; unexpected unindent.
./security/security.c:109: ERROR: Unexpected indentation.
./security/security.c:110: WARNING: Definition list ends without a blank line; unexpected unindent.
./block/genhd.c:275: WARNING: Inline strong start-string without end-string.
./block/genhd.c:283: WARNING: Inline strong start-string without end-string.
./include/linux/clk.h:134: WARNING: Inline emphasis start-string without end-string.
./include/linux/clk.h:134: WARNING: Inline emphasis start-string without end-string.
./ipc/util.c:477: ERROR: Unknown target name: "s".
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
-rw-r--r-- | block/genhd.c | 7 | ||||
-rw-r--r-- | drivers/pci/irq.c | 2 | ||||
-rw-r--r-- | include/linux/clk.h | 4 | ||||
-rw-r--r-- | ipc/util.c | 12 | ||||
-rw-r--r-- | lib/string.c | 2 | ||||
-rw-r--r-- | mm/filemap.c | 18 | ||||
-rw-r--r-- | mm/page_alloc.c | 3 | ||||
-rw-r--r-- | mm/vmalloc.c | 2 | ||||
-rw-r--r-- | security/security.c | 12 |
9 files changed, 36 insertions, 26 deletions
diff --git a/block/genhd.c b/block/genhd.c index b26a5ea115d0..a53bfd19a0ec 100644 --- a/block/genhd.c +++ b/block/genhd.c | |||
@@ -271,16 +271,17 @@ void blkdev_show(struct seq_file *seqf, off_t offset) | |||
271 | /** | 271 | /** |
272 | * register_blkdev - register a new block device | 272 | * register_blkdev - register a new block device |
273 | * | 273 | * |
274 | * @major: the requested major device number [1..255]. If @major=0, try to | 274 | * @major: the requested major device number [1..255]. If @major = 0, try to |
275 | * allocate any unused major number. | 275 | * allocate any unused major number. |
276 | * @name: the name of the new block device as a zero terminated string | 276 | * @name: the name of the new block device as a zero terminated string |
277 | * | 277 | * |
278 | * The @name must be unique within the system. | 278 | * The @name must be unique within the system. |
279 | * | 279 | * |
280 | * The return value depends on the @major input parameter. | 280 | * The return value depends on the @major input parameter: |
281 | * | ||
281 | * - if a major device number was requested in range [1..255] then the | 282 | * - if a major device number was requested in range [1..255] then the |
282 | * function returns zero on success, or a negative error code | 283 | * function returns zero on success, or a negative error code |
283 | * - if any unused major number was requested with @major=0 parameter | 284 | * - if any unused major number was requested with @major = 0 parameter |
284 | * then the return value is the allocated major number in range | 285 | * then the return value is the allocated major number in range |
285 | * [1..255] or a negative error code otherwise | 286 | * [1..255] or a negative error code otherwise |
286 | */ | 287 | */ |
diff --git a/drivers/pci/irq.c b/drivers/pci/irq.c index 6684f153ab57..f9f2a0324ecc 100644 --- a/drivers/pci/irq.c +++ b/drivers/pci/irq.c | |||
@@ -31,7 +31,7 @@ static void pci_note_irq_problem(struct pci_dev *pdev, const char *reason) | |||
31 | * driver). | 31 | * driver). |
32 | * | 32 | * |
33 | * Returns: | 33 | * Returns: |
34 | * a suggestion for fixing it (although the driver is not required to | 34 | * a suggestion for fixing it (although the driver is not required to |
35 | * act on this). | 35 | * act on this). |
36 | */ | 36 | */ |
37 | enum pci_lost_interrupt_reason pci_lost_interrupt(struct pci_dev *pdev) | 37 | enum pci_lost_interrupt_reason pci_lost_interrupt(struct pci_dev *pdev) |
diff --git a/include/linux/clk.h b/include/linux/clk.h index e9d36b3e49de..024cd07870d0 100644 --- a/include/linux/clk.h +++ b/include/linux/clk.h | |||
@@ -132,8 +132,8 @@ int clk_get_phase(struct clk *clk); | |||
132 | * @q: clk compared against p | 132 | * @q: clk compared against p |
133 | * | 133 | * |
134 | * Returns true if the two struct clk pointers both point to the same hardware | 134 | * Returns true if the two struct clk pointers both point to the same hardware |
135 | * clock node. Put differently, returns true if struct clk *p and struct clk *q | 135 | * clock node. Put differently, returns true if @p and @q |
136 | * share the same struct clk_core object. | 136 | * share the same &struct clk_core object. |
137 | * | 137 | * |
138 | * Returns false otherwise. Note that two NULL clks are treated as matching. | 138 | * Returns false otherwise. Note that two NULL clks are treated as matching. |
139 | */ | 139 | */ |
diff --git a/ipc/util.c b/ipc/util.c index 798cad18dd87..3459a16a9df9 100644 --- a/ipc/util.c +++ b/ipc/util.c | |||
@@ -474,7 +474,7 @@ void ipc_rcu_free(struct rcu_head *head) | |||
474 | * Check user, group, other permissions for access | 474 | * Check user, group, other permissions for access |
475 | * to ipc resources. return 0 if allowed | 475 | * to ipc resources. return 0 if allowed |
476 | * | 476 | * |
477 | * @flag will most probably be 0 or S_...UGO from <linux/stat.h> | 477 | * @flag will most probably be 0 or ``S_...UGO`` from <linux/stat.h> |
478 | */ | 478 | */ |
479 | int ipcperms(struct ipc_namespace *ns, struct kern_ipc_perm *ipcp, short flag) | 479 | int ipcperms(struct ipc_namespace *ns, struct kern_ipc_perm *ipcp, short flag) |
480 | { | 480 | { |
@@ -672,10 +672,12 @@ int ipc_update_perm(struct ipc64_perm *in, struct kern_ipc_perm *out) | |||
672 | * | 672 | * |
673 | * This function does some common audit and permissions check for some IPC_XXX | 673 | * This function does some common audit and permissions check for some IPC_XXX |
674 | * cmd and is called from semctl_down, shmctl_down and msgctl_down. | 674 | * cmd and is called from semctl_down, shmctl_down and msgctl_down. |
675 | * It must be called without any lock held and | 675 | * It must be called without any lock held and: |
676 | * - retrieves the ipc with the given id in the given table. | 676 | * |
677 | * - performs some audit and permission check, depending on the given cmd | 677 | * - retrieves the ipc with the given id in the given table. |
678 | * - returns a pointer to the ipc object or otherwise, the corresponding error. | 678 | * - performs some audit and permission check, depending on the given cmd |
679 | * - returns a pointer to the ipc object or otherwise, the corresponding | ||
680 | * error. | ||
679 | * | 681 | * |
680 | * Call holding the both the rwsem and the rcu read lock. | 682 | * Call holding the both the rwsem and the rcu read lock. |
681 | */ | 683 | */ |
diff --git a/lib/string.c b/lib/string.c index ed83562a53ae..b5c9a1168d3a 100644 --- a/lib/string.c +++ b/lib/string.c | |||
@@ -131,7 +131,7 @@ EXPORT_SYMBOL(strncpy); | |||
131 | * @src: Where to copy the string from | 131 | * @src: Where to copy the string from |
132 | * @size: size of destination buffer | 132 | * @size: size of destination buffer |
133 | * | 133 | * |
134 | * Compatible with *BSD: the result is always a valid | 134 | * Compatible with ``*BSD``: the result is always a valid |
135 | * NUL-terminated string that fits in the buffer (unless, | 135 | * NUL-terminated string that fits in the buffer (unless, |
136 | * of course, the buffer size is zero). It does not pad | 136 | * of course, the buffer size is zero). It does not pad |
137 | * out the result like strncpy() does. | 137 | * out the result like strncpy() does. |
diff --git a/mm/filemap.c b/mm/filemap.c index 1694623a6289..c5808b7a5fb1 100644 --- a/mm/filemap.c +++ b/mm/filemap.c | |||
@@ -519,7 +519,7 @@ EXPORT_SYMBOL(filemap_write_and_wait); | |||
519 | * | 519 | * |
520 | * Write out and wait upon file offsets lstart->lend, inclusive. | 520 | * Write out and wait upon file offsets lstart->lend, inclusive. |
521 | * | 521 | * |
522 | * Note that `lend' is inclusive (describes the last byte to be written) so | 522 | * Note that @lend is inclusive (describes the last byte to be written) so |
523 | * that this function can be used to write to the very end-of-file (end = -1). | 523 | * that this function can be used to write to the very end-of-file (end = -1). |
524 | */ | 524 | */ |
525 | int filemap_write_and_wait_range(struct address_space *mapping, | 525 | int filemap_write_and_wait_range(struct address_space *mapping, |
@@ -1277,12 +1277,14 @@ EXPORT_SYMBOL(find_lock_entry); | |||
1277 | * | 1277 | * |
1278 | * PCG flags modify how the page is returned. | 1278 | * PCG flags modify how the page is returned. |
1279 | * | 1279 | * |
1280 | * FGP_ACCESSED: the page will be marked accessed | 1280 | * @fgp_flags can be: |
1281 | * FGP_LOCK: Page is return locked | 1281 | * |
1282 | * FGP_CREAT: If page is not present then a new page is allocated using | 1282 | * - FGP_ACCESSED: the page will be marked accessed |
1283 | * @gfp_mask and added to the page cache and the VM's LRU | 1283 | * - FGP_LOCK: Page is return locked |
1284 | * list. The page is returned locked and with an increased | 1284 | * - FGP_CREAT: If page is not present then a new page is allocated using |
1285 | * refcount. Otherwise, %NULL is returned. | 1285 | * @gfp_mask and added to the page cache and the VM's LRU |
1286 | * list. The page is returned locked and with an increased | ||
1287 | * refcount. Otherwise, NULL is returned. | ||
1286 | * | 1288 | * |
1287 | * If FGP_LOCK or FGP_CREAT are specified then the function may sleep even | 1289 | * If FGP_LOCK or FGP_CREAT are specified then the function may sleep even |
1288 | * if the GFP flags specified for FGP_CREAT are atomic. | 1290 | * if the GFP flags specified for FGP_CREAT are atomic. |
@@ -3001,7 +3003,7 @@ EXPORT_SYMBOL(generic_file_write_iter); | |||
3001 | * @gfp_mask: memory allocation flags (and I/O mode) | 3003 | * @gfp_mask: memory allocation flags (and I/O mode) |
3002 | * | 3004 | * |
3003 | * The address_space is to try to release any data against the page | 3005 | * The address_space is to try to release any data against the page |
3004 | * (presumably at page->private). If the release was successful, return `1'. | 3006 | * (presumably at page->private). If the release was successful, return '1'. |
3005 | * Otherwise return zero. | 3007 | * Otherwise return zero. |
3006 | * | 3008 | * |
3007 | * This may also be called if PG_fscache is set on a page, indicating that the | 3009 | * This may also be called if PG_fscache is set on a page, indicating that the |
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index eaa64d2ffdc5..c1b68edaf106 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -4242,7 +4242,8 @@ EXPORT_SYMBOL(free_pages_exact); | |||
4242 | * nr_free_zone_pages() counts the number of counts pages which are beyond the | 4242 | * nr_free_zone_pages() counts the number of counts pages which are beyond the |
4243 | * high watermark within all zones at or below a given zone index. For each | 4243 | * high watermark within all zones at or below a given zone index. For each |
4244 | * zone, the number of pages is calculated as: | 4244 | * zone, the number of pages is calculated as: |
4245 | * managed_pages - high_pages | 4245 | * |
4246 | * nr_free_zone_pages = managed_pages - high_pages | ||
4246 | */ | 4247 | */ |
4247 | static unsigned long nr_free_zone_pages(int offset) | 4248 | static unsigned long nr_free_zone_pages(int offset) |
4248 | { | 4249 | { |
diff --git a/mm/vmalloc.c b/mm/vmalloc.c index b4024d688f38..c24db06f15c4 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c | |||
@@ -1540,7 +1540,7 @@ void vfree_atomic(const void *addr) | |||
1540 | * have CONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG, but making the calling | 1540 | * have CONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG, but making the calling |
1541 | * conventions for vfree() arch-depenedent would be a really bad idea) | 1541 | * conventions for vfree() arch-depenedent would be a really bad idea) |
1542 | * | 1542 | * |
1543 | * NOTE: assumes that the object at *addr has a size >= sizeof(llist_node) | 1543 | * NOTE: assumes that the object at @addr has a size >= sizeof(llist_node) |
1544 | */ | 1544 | */ |
1545 | void vfree(const void *addr) | 1545 | void vfree(const void *addr) |
1546 | { | 1546 | { |
diff --git a/security/security.c b/security/security.c index d0e07f269b2d..23555c5504f6 100644 --- a/security/security.c +++ b/security/security.c | |||
@@ -103,10 +103,14 @@ static int lsm_append(char *new, char **result) | |||
103 | * to avoid security registration races. This method may also be used | 103 | * to avoid security registration races. This method may also be used |
104 | * to check if your LSM is currently loaded during kernel initialization. | 104 | * to check if your LSM is currently loaded during kernel initialization. |
105 | * | 105 | * |
106 | * Return true if: | 106 | * Returns: |
107 | * -The passed LSM is the one chosen by user at boot time, | 107 | * |
108 | * -or the passed LSM is configured as the default and the user did not | 108 | * true if: |
109 | * choose an alternate LSM at boot time. | 109 | * |
110 | * - The passed LSM is the one chosen by user at boot time, | ||
111 | * - or the passed LSM is configured as the default and the user did not | ||
112 | * choose an alternate LSM at boot time. | ||
113 | * | ||
110 | * Otherwise, return false. | 114 | * Otherwise, return false. |
111 | */ | 115 | */ |
112 | int __init security_module_enable(const char *module) | 116 | int __init security_module_enable(const char *module) |