[PATCH 4/5] fs/fs_parse: Correct comments of fs_validate_description()

Zijun Hu posted 5 patches 10 months ago
There is a newer version of this series
[PATCH 4/5] fs/fs_parse: Correct comments of fs_validate_description()
Posted by Zijun Hu 10 months ago
From: Zijun Hu <quic_zijuhu@quicinc.com>

For fs_validate_description(), its comments easily mislead reader that
the function will search array @desc for duplicated entries with name
specified by parameter @name, but @name is not used for search actually.

Fix by marking name as owner's name of these parameter specifications.

Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com>
---
 fs/fs_parser.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/fs/fs_parser.c b/fs/fs_parser.c
index ef7876340a917876bc40df9cdde9232204125a75..77fd8133c1cf191158de13ec556a5e3c7c2bb12a 100644
--- a/fs/fs_parser.c
+++ b/fs/fs_parser.c
@@ -432,9 +432,9 @@ bool validate_constant_table(const struct constant_table *tbl, size_t tbl_size,
 }
 
 /**
- * fs_validate_description - Validate a parameter description
- * @name: The parameter name to search for.
- * @desc: The parameter description to validate.
+ * fs_validate_description - Validate a parameter specification array
+ * @name: Owner name of the parameter specification array
+ * @desc: The parameter specification array to validate.
  */
 bool fs_validate_description(const char *name,
 	const struct fs_parameter_spec *desc)

-- 
2.34.1
Re: (subset) [PATCH 4/5] fs/fs_parse: Correct comments of fs_validate_description()
Posted by Christian Brauner 10 months ago
On Thu, 10 Apr 2025 19:45:30 +0800, Zijun Hu wrote:
> For fs_validate_description(), its comments easily mislead reader that
> the function will search array @desc for duplicated entries with name
> specified by parameter @name, but @name is not used for search actually.
> 
> Fix by marking name as owner's name of these parameter specifications.
> 
> 
> [...]

Applied to the vfs-6.16.misc branch of the vfs/vfs.git tree.
Patches in the vfs-6.16.misc branch should appear in linux-next soon.

Please report any outstanding bugs that were missed during review in a
new review to the original patch series allowing us to drop it.

It's encouraged to provide Acked-bys and Reviewed-bys even though the
patch has now been applied. If possible patch trailers will be updated.

Note that commit hashes shown below are subject to change due to rebase,
trailer updates or similar. If in doubt, please check the listed branch.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: vfs-6.16.misc

[4/5] fs/fs_parse: Correct comments of fs_validate_description()
      https://git.kernel.org/vfs/vfs/c/a8fca9b51158