* [PATCH] kernel/resource.c: fix new kernel-doc warnings
@ 2018-11-05 2:40 Randy Dunlap
2018-11-05 6:09 ` [tip:core/urgent] resource/docs: Fix " tip-bot for Randy Dunlap
0 siblings, 1 reply; 4+ messages in thread
From: Randy Dunlap @ 2018-11-05 2:40 UTC (permalink / raw)
To: LKML, Andrew Morton; +Cc: Borislav Petkov, X86 ML
From: Randy Dunlap <rdunlap@infradead.org>
Fix kernel-doc warnings in kernel/resource.c.
The first group of warnings is caused by a "/**" kernel-doc notation
marker but the function comments are not in kernel-doc format.
Also add another error return value here.
../kernel/resource.c:337: warning: Function parameter or member 'start' not described in 'find_next_iomem_res'
../kernel/resource.c:337: warning: Function parameter or member 'end' not described in 'find_next_iomem_res'
../kernel/resource.c:337: warning: Function parameter or member 'flags' not described in 'find_next_iomem_res'
../kernel/resource.c:337: warning: Function parameter or member 'desc' not described in 'find_next_iomem_res'
../kernel/resource.c:337: warning: Function parameter or member 'first_lvl' not described in 'find_next_iomem_res'
../kernel/resource.c:337: warning: Function parameter or member 'res' not described in 'find_next_iomem_res'
Add the missing function parameter documentation for the other warnings:
../kernel/resource.c:409: warning: Function parameter or member 'arg' not described in 'walk_iomem_res_desc'
../kernel/resource.c:409: warning: Function parameter or member 'func' not described in 'walk_iomem_res_desc'
Fixes: b69c2e20f6e4 ("resource: Clean it up a bit")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Borislav Petkov <bp@suse.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: x86@kernel.org
---
kernel/resource.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
--- lnx-420-rc1.orig/kernel/resource.c
+++ lnx-420-rc1/kernel/resource.c
@@ -318,14 +318,14 @@ int release_resource(struct resource *ol
EXPORT_SYMBOL(release_resource);
-/**
+/*
* Finds the lowest iomem resource that covers part of [start..end]. The
* caller must specify start, end, flags, and desc (which may be
* IORES_DESC_NONE).
*
* If a resource is found, returns 0 and *res is overwritten with the part
* of the resource that's within [start..end]; if none is found, returns
- * -1.
+ * -1. Returns -EINVAL for other invalid parameters.
*
* This function walks the whole tree and not just first level children
* unless @first_lvl is true.
@@ -390,7 +390,9 @@ static int __walk_iomem_res_desc(resourc
}
/**
- * Walks through iomem resources and calls func() with matching resource
+ * walk_iomem_res_desc - walk through iomem resources
+ *
+ * Walks through iomem resources and calls @func() with matching resource
* ranges. This walks through whole tree and not just first level children.
* All the memory ranges which overlap start,end and also match flags and
* desc are valid candidates.
@@ -399,6 +401,8 @@ static int __walk_iomem_res_desc(resourc
* @flags: I/O resource flags
* @start: start addr
* @end: end addr
+ * @arg: function argument for the callback @func
+ * @func: callback function that is called for each qualifying resource area
*
* NOTE: For a new descriptor search, define a new IORES_DESC in
* <linux/ioport.h> and set it in 'desc' of a target resource entry.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [tip:core/urgent] resource/docs: Fix new kernel-doc warnings
2018-11-05 2:40 [PATCH] kernel/resource.c: fix new kernel-doc warnings Randy Dunlap
@ 2018-11-05 6:09 ` tip-bot for Randy Dunlap
2018-11-05 9:33 ` Borislav Petkov
0 siblings, 1 reply; 4+ messages in thread
From: tip-bot for Randy Dunlap @ 2018-11-05 6:09 UTC (permalink / raw)
To: linux-tip-commits
Cc: akpm, peterz, rdunlap, torvalds, tglx, mingo, hpa, bp, linux-kernel
Commit-ID: f75d651587f719a813ebbbfeee570e6570731d55
Gitweb: https://git.kernel.org/tip/f75d651587f719a813ebbbfeee570e6570731d55
Author: Randy Dunlap <rdunlap@infradead.org>
AuthorDate: Sun, 4 Nov 2018 18:40:14 -0800
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Mon, 5 Nov 2018 07:05:04 +0100
resource/docs: Fix new kernel-doc warnings
The first group of warnings is caused by a "/**" kernel-doc notation
marker but the function comments are not in kernel-doc format.
Also add another error return value here.
../kernel/resource.c:337: warning: Function parameter or member 'start' not described in 'find_next_iomem_res'
../kernel/resource.c:337: warning: Function parameter or member 'end' not described in 'find_next_iomem_res'
../kernel/resource.c:337: warning: Function parameter or member 'flags' not described in 'find_next_iomem_res'
../kernel/resource.c:337: warning: Function parameter or member 'desc' not described in 'find_next_iomem_res'
../kernel/resource.c:337: warning: Function parameter or member 'first_lvl' not described in 'find_next_iomem_res'
../kernel/resource.c:337: warning: Function parameter or member 'res' not described in 'find_next_iomem_res'
Add the missing function parameter documentation for the other warnings:
../kernel/resource.c:409: warning: Function parameter or member 'arg' not described in 'walk_iomem_res_desc'
../kernel/resource.c:409: warning: Function parameter or member 'func' not described in 'walk_iomem_res_desc'
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Borislav Petkov <bp@suse.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Fixes: b69c2e20f6e4 ("resource: Clean it up a bit")
Link: http://lkml.kernel.org/r/dda2e4d8-bedd-3167-20fe-8c7d2d35b354@infradead.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
kernel/resource.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/kernel/resource.c b/kernel/resource.c
index b3a3a1fc499e..17bcb189d530 100644
--- a/kernel/resource.c
+++ b/kernel/resource.c
@@ -318,14 +318,14 @@ int release_resource(struct resource *old)
EXPORT_SYMBOL(release_resource);
-/**
+/*
* Finds the lowest iomem resource that covers part of [start..end]. The
* caller must specify start, end, flags, and desc (which may be
* IORES_DESC_NONE).
*
* If a resource is found, returns 0 and *res is overwritten with the part
* of the resource that's within [start..end]; if none is found, returns
- * -1.
+ * -1. Returns -EINVAL for other invalid parameters.
*
* This function walks the whole tree and not just first level children
* unless @first_lvl is true.
@@ -390,7 +390,9 @@ static int __walk_iomem_res_desc(resource_size_t start, resource_size_t end,
}
/**
- * Walks through iomem resources and calls func() with matching resource
+ * walk_iomem_res_desc - walk through iomem resources
+ *
+ * Walks through iomem resources and calls @func() with matching resource
* ranges. This walks through whole tree and not just first level children.
* All the memory ranges which overlap start,end and also match flags and
* desc are valid candidates.
@@ -399,6 +401,8 @@ static int __walk_iomem_res_desc(resource_size_t start, resource_size_t end,
* @flags: I/O resource flags
* @start: start addr
* @end: end addr
+ * @arg: function argument for the callback @func
+ * @func: callback function that is called for each qualifying resource area
*
* NOTE: For a new descriptor search, define a new IORES_DESC in
* <linux/ioport.h> and set it in 'desc' of a target resource entry.
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [tip:core/urgent] resource/docs: Fix new kernel-doc warnings
2018-11-05 6:09 ` [tip:core/urgent] resource/docs: Fix " tip-bot for Randy Dunlap
@ 2018-11-05 9:33 ` Borislav Petkov
2018-11-07 15:51 ` [tip:core/urgent] resource/docs: Complete kernel-doc style function documentation tip-bot for Borislav Petkov
0 siblings, 1 reply; 4+ messages in thread
From: Borislav Petkov @ 2018-11-05 9:33 UTC (permalink / raw)
To: rdunlap
Cc: linux-tip-commits, akpm, peterz, rdunlap, torvalds, tglx, mingo,
hpa, linux-kernel
On Sun, Nov 04, 2018 at 10:09:50PM -0800, tip-bot for Randy Dunlap wrote:
> Commit-ID: f75d651587f719a813ebbbfeee570e6570731d55
> Gitweb: https://git.kernel.org/tip/f75d651587f719a813ebbbfeee570e6570731d55
> Author: Randy Dunlap <rdunlap@infradead.org>
> AuthorDate: Sun, 4 Nov 2018 18:40:14 -0800
> Committer: Ingo Molnar <mingo@kernel.org>
> CommitDate: Mon, 5 Nov 2018 07:05:04 +0100
>
> resource/docs: Fix new kernel-doc warnings
>
> The first group of warnings is caused by a "/**" kernel-doc notation
> marker but the function comments are not in kernel-doc format.
Well, I'd prefer if we added those required parameters rather than not and
"degrading" that function documentation back.
---
From: Borislav Petkov <bp@suse.de>
Date: Mon, 5 Nov 2018 10:26:02 +0100
Subject: [PATCH] resource: Complete kernel-doc style function documentation
Add the missing kernel-doc style function parameters documentation.
Based on a patch by Randy Dunlap <rdunlap@infradead.org>.
Fixes: b69c2e20f6e4 ("resource: Clean it up a bit")
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Randy Dunlap <rdunlap@infradead.org>
---
kernel/resource.c | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
diff --git a/kernel/resource.c b/kernel/resource.c
index b3a3a1fc499e..b0fbf685c77a 100644
--- a/kernel/resource.c
+++ b/kernel/resource.c
@@ -319,16 +319,23 @@ int release_resource(struct resource *old)
EXPORT_SYMBOL(release_resource);
/**
- * Finds the lowest iomem resource that covers part of [start..end]. The
- * caller must specify start, end, flags, and desc (which may be
+ * Finds the lowest iomem resource that covers part of [@start..@end]. The
+ * caller must specify @start, @end, @flags, and @desc (which may be
* IORES_DESC_NONE).
*
- * If a resource is found, returns 0 and *res is overwritten with the part
- * of the resource that's within [start..end]; if none is found, returns
- * -1.
+ * If a resource is found, returns 0 and @*res is overwritten with the part
+ * of the resource that's within [@start..@end]; if none is found, returns
+ * -1 or -EINVAL for other invalid parameters.
*
* This function walks the whole tree and not just first level children
* unless @first_lvl is true.
+ *
+ * @start: start address of the resource searched for
+ * @end: end address of same resource
+ * @flags: flags which the resource must have
+ * @desc: descriptor the resource must have
+ * @first_lvl: walk only the first level children, if set
+ * @res: return ptr, if resource found
*/
static int find_next_iomem_res(resource_size_t start, resource_size_t end,
unsigned long flags, unsigned long desc,
@@ -399,6 +406,8 @@ static int __walk_iomem_res_desc(resource_size_t start, resource_size_t end,
* @flags: I/O resource flags
* @start: start addr
* @end: end addr
+ * @arg: function argument for the callback @func
+ * @func: callback function that is called for each qualifying resource area
*
* NOTE: For a new descriptor search, define a new IORES_DESC in
* <linux/ioport.h> and set it in 'desc' of a target resource entry.
--
2.19.1
--
Regards/Gruss,
Boris.
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [tip:core/urgent] resource/docs: Complete kernel-doc style function documentation
2018-11-05 9:33 ` Borislav Petkov
@ 2018-11-07 15:51 ` tip-bot for Borislav Petkov
0 siblings, 0 replies; 4+ messages in thread
From: tip-bot for Borislav Petkov @ 2018-11-07 15:51 UTC (permalink / raw)
To: linux-tip-commits; +Cc: hpa, linux-kernel, peterz, bp, tglx, torvalds, mingo
Commit-ID: f26621e60b35369bca9228bc936dc723b3e421af
Gitweb: https://git.kernel.org/tip/f26621e60b35369bca9228bc936dc723b3e421af
Author: Borislav Petkov <bp@suse.de>
AuthorDate: Mon, 5 Nov 2018 10:33:07 +0100
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Wed, 7 Nov 2018 16:47:47 +0100
resource/docs: Complete kernel-doc style function documentation
Add the missing kernel-doc style function parameters documentation.
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: akpm@linux-foundation.org
Cc: linux-tip-commits@vger.kernel.org
Cc: rdunlap@infradead.org
Fixes: b69c2e20f6e4 ("resource: Clean it up a bit")
Link: http://lkml.kernel.org/r/20181105093307.GA12445@zn.tnic
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
kernel/resource.c | 23 ++++++++++++++---------
1 file changed, 14 insertions(+), 9 deletions(-)
diff --git a/kernel/resource.c b/kernel/resource.c
index 17bcb189d530..b0fbf685c77a 100644
--- a/kernel/resource.c
+++ b/kernel/resource.c
@@ -318,17 +318,24 @@ int release_resource(struct resource *old)
EXPORT_SYMBOL(release_resource);
-/*
- * Finds the lowest iomem resource that covers part of [start..end]. The
- * caller must specify start, end, flags, and desc (which may be
+/**
+ * Finds the lowest iomem resource that covers part of [@start..@end]. The
+ * caller must specify @start, @end, @flags, and @desc (which may be
* IORES_DESC_NONE).
*
- * If a resource is found, returns 0 and *res is overwritten with the part
- * of the resource that's within [start..end]; if none is found, returns
- * -1. Returns -EINVAL for other invalid parameters.
+ * If a resource is found, returns 0 and @*res is overwritten with the part
+ * of the resource that's within [@start..@end]; if none is found, returns
+ * -1 or -EINVAL for other invalid parameters.
*
* This function walks the whole tree and not just first level children
* unless @first_lvl is true.
+ *
+ * @start: start address of the resource searched for
+ * @end: end address of same resource
+ * @flags: flags which the resource must have
+ * @desc: descriptor the resource must have
+ * @first_lvl: walk only the first level children, if set
+ * @res: return ptr, if resource found
*/
static int find_next_iomem_res(resource_size_t start, resource_size_t end,
unsigned long flags, unsigned long desc,
@@ -390,9 +397,7 @@ static int __walk_iomem_res_desc(resource_size_t start, resource_size_t end,
}
/**
- * walk_iomem_res_desc - walk through iomem resources
- *
- * Walks through iomem resources and calls @func() with matching resource
+ * Walks through iomem resources and calls func() with matching resource
* ranges. This walks through whole tree and not just first level children.
* All the memory ranges which overlap start,end and also match flags and
* desc are valid candidates.
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-11-07 15:52 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-05 2:40 [PATCH] kernel/resource.c: fix new kernel-doc warnings Randy Dunlap
2018-11-05 6:09 ` [tip:core/urgent] resource/docs: Fix " tip-bot for Randy Dunlap
2018-11-05 9:33 ` Borislav Petkov
2018-11-07 15:51 ` [tip:core/urgent] resource/docs: Complete kernel-doc style function documentation tip-bot for Borislav Petkov
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).