Skip to contentSkip to conversation

kernel-doc: fix function name in usercopy.c

PATCH In review Randy Dunlap 3 participants 4 messages Oct 9, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kernel-doc: fix function name in usercopy.c

From: Randy Dunlap <[email protected]>

Fix kernel-doc function name in usercopy.c.

---
 arch/i386/lib/usercopy.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/i386/lib/usercopy.c +1 -1
@@ -179,7 +179,7 @@ __clear_user(void __user *to, unsigned l
 EXPORT_SYMBOL(__clear_user);
 
 /**
- * strlen_user: - Get the size of a string in user space.
+ * strnlen_user: - Get the size of a string in user space.
  * @s: The string to measure.
  * @n: The maximum valid length
  *

---

#1 lore raw
Quoted 3 lines · Randy Dunlap

/**
- * strlen_user: - Get the size of a string in user space.
+ * strnlen_user: - Get the size of a string in user space.

It's better to not spend time fixing mismatches, but to teach kernel-doc extract function name from function itself.

	/**
	 * Get the size of a string in user space.
	 * @foo: bar
	 */
	 size_t strnlen_user()
#2 lore raw
Quoted 5 lines · On Mon, 9 Oct 2006 07:28:51 +0400 Alexey Dobriyan wrote:
Quoted 3 lines · Randy Dunlap

/**
- * strlen_user: - Get the size of a string in user space.
+ * strnlen_user: - Get the size of a string in user space.

Quoted 8 lines

It's better to not spend time fixing mismatches, but to teach kernel-doc extract function name from function itself.

	/**
	 * Get the size of a string in user space.
	 * @foo: bar
	 */
	 size_t strnlen_user()

OK, maybe a good idea. I'll add that to the wish list. However, we have seen examples of:

/**
* doc for foo
*/
int foo(int arg)
{
}

then someone inserts a new function bar() between the kernel-doc and foo(). How would we catch that (automated)?
other than by our review process?

---
~Randy

#3 lore raw
Quoted 25 lines · Randy Dunlap
Quoted 5 lines · On Mon, 9 Oct 2006 07:28:51 +0400 Alexey Dobriyan wrote:
Quoted 3 lines · Randy Dunlap

/**
- * strlen_user: - Get the size of a string in user space.
+ * strnlen_user: - Get the size of a string in user space.

Quoted 8 lines

It's better to not spend time fixing mismatches, but to teach kernel-doc extract function name from function itself.

	/**
	 * Get the size of a string in user space.
	 * @foo: bar
	 */
	 size_t strnlen_user()

OK, maybe a good idea. I'll add that to the wish list. However, we have seen examples of:

/**
* doc for foo
*/
int foo(int arg)
{
}

Quoted 3 lines

then someone inserts a new function bar() between the kernel-doc and foo(). How would we catch that (automated)?
other than by our review process?

Warn if the function signature of the documented function does not match the function and throw away the manpage then.

Eike