* [PATCH] dev_alloc_name: fix kernel-doc formatting, typos, etc.
@ 2010-12-17 21:40 Randy Dunlap
2010-12-17 21:53 ` Stephen Hemminger
0 siblings, 1 reply; 3+ messages in thread
From: Randy Dunlap @ 2010-12-17 21:40 UTC (permalink / raw)
To: netdev; +Cc: davem
From: Randy Dunlap <randy.dunlap@oracle.com>
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.
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
---
net/core/dev.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
--- lnx-2637-rc6.orig/net/core/dev.c
+++ lnx-2637-rc6/net/core/dev.c
@@ -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)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] dev_alloc_name: fix kernel-doc formatting, typos, etc.
2010-12-17 21:40 [PATCH] dev_alloc_name: fix kernel-doc formatting, typos, etc Randy Dunlap
@ 2010-12-17 21:53 ` Stephen Hemminger
2010-12-17 22:00 ` Randy Dunlap
0 siblings, 1 reply; 3+ messages in thread
From: Stephen Hemminger @ 2010-12-17 21:53 UTC (permalink / raw)
To: Randy Dunlap; +Cc: netdev, davem
On Fri, 17 Dec 2010 13:40:46 -0800
Randy Dunlap <randy.dunlap@oracle.com> 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
--
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] dev_alloc_name: fix kernel-doc formatting, typos, etc.
2010-12-17 21:53 ` Stephen Hemminger
@ 2010-12-17 22:00 ` Randy Dunlap
0 siblings, 0 replies; 3+ messages in thread
From: Randy Dunlap @ 2010-12-17 22:00 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: netdev, davem
On Fri, 17 Dec 2010 13:53:55 -0800 Stephen Hemminger wrote:
> On Fri, 17 Dec 2010 13:40:46 -0800
> Randy Dunlap <randy.dunlap@oracle.com> 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
OK, thanks.
I'll see if a tool fix is possible.
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-12-17 22:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-17 21:40 [PATCH] dev_alloc_name: fix kernel-doc formatting, typos, etc Randy Dunlap
2010-12-17 21:53 ` Stephen Hemminger
2010-12-17 22:00 ` Randy Dunlap
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).