dev_alloc_name: fix kernel-doc formatting, typos, etc.
Subsystems (2)
PATCH 1/1 dev_alloc_name: fix kernel-doc formatting, typos, etc.
From: Randy Dunlap <[email protected]>
The '%' sign needs to be duplicated so that the kernel-doc tools will print a '%' sign instead of just printed "ltd".
Also fixes some punctuation/grammar and formatting.
--- net/core/dev.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
net/core/dev.c +4 -3
@@ -925,13 +925,14 @@ static int __dev_alloc_name(struct net ** @dev: device * @name: name format string * -* Passed a format string - eg "lt%d" it will try and find a suitable +* Passed a format string - e.g. "lt%%d", it will try to find a suitable * id. It scans list of devices to build up a free map, then chooses * the first empty slot. The caller must hold the dev_base or rtnl lock * while allocating the name and adding the device in order to avoid * duplicates. -* Limited to bits_per_byte * page size devices (ie 32K on most platforms). -* Returns the number of the unit assigned or a negative errno code. +* Limited to bits_per_byte * page size devices +* (i.e. 32K on most platforms). +* Returns: the number of the unit assigned or a negative errno code. */ int dev_alloc_name (struct net_device *dev,const char *name)
Quoted 2 lines · On Fri, 17 Dec 2010 13:40:46 -0800 Randy Dunlap <[email protected]> wrote:
- * Passed a format string - eg "lt%d" it will try and find a suitable
+ * Passed a format string - e.g. "lt%%d", it will try to find a suitable
This is wrong.
The obvious case of:
alloc_etherdev() ends up calling __dev_alloc_name with "eth%d"
in fact __dev_alloc_name called with "lt%%d" will return -EINVAL
Quoted 10 lines · On Fri, 17 Dec 2010 13:53:55 -0800 Stephen Hemminger wrote:
Quoted 2 lines · On Fri, 17 Dec 2010 13:40:46 -0800 Randy Dunlap <[email protected]> wrote:
- * Passed a format string - eg "lt%d" it will try and find a suitable
+ * Passed a format string - e.g. "lt%%d", it will try to find a suitableThis is wrong.
The obvious case of:
alloc_etherdev()ends up calling__dev_alloc_namewith "eth%d"
in fact__dev_alloc_namecalled with "lt%%d" will return-EINVAL
OK, thanks.
I'll see if a tool fix is possible.
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***