From: "Randy.Dunlap" <rddunlap@osdl.org>
To: Will Dyson <will_dyson@pobox.com>
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Add lib/parser.c kernel-doc
Date: Mon, 17 Nov 2003 08:55:29 -0800 [thread overview]
Message-ID: <20031117085529.427bbb0b.rddunlap@osdl.org> (raw)
In-Reply-To: <1069061369.1139.83.camel@thalience>
On Mon, 17 Nov 2003 04:29:29 -0500 Will Dyson <will_dyson@pobox.com> wrote:
| On Mon, 2003-11-17 at 02:28, Jan-Benedict Glaw wrote:
| > On Sun, 2003-11-16 17:37:05 -0500, Will Dyson <will_dyson@pobox.com>
| > wrote in message <1069022225.19499.59.camel@thalience>:
| > > On Sun, 2003-11-16 at 03:16, Will Dyson wrote:
| >
| > > -int match_token(char *s, match_table_t table, substring_t args[]);
| > > -
| > > +int match_token(char *, match_table_t table, substring_t args[]);
| >
| > Dropping the blank line is okay, but I don't like dropping "s"
| > altogether:)
First, thanks for doing this since I never got around to it.
I like having the arg names in function prototypes, but they don't
have to be terribly descriptive IMO. Read the kernel-doc for
descriptions...
Consequently I don't find the arg-rename patch needed.
BTW, where did you find good references for creating kernel-doc?
...
| Got any ideas about how to name that argument in a way that is more
| helpful to a developer looking to use the functions? I was thinking
| "char *token" for match_token (because you must tokenize the argument
| string before feeding each token to match_token) and "substring_t arg"
| for the others.
|
| Here is a(nother) rediff of the kernel-doc patch, changing no prototypes
| at all. And also a follow-on that renames the arguments in the manner I
| describe in the previous paragraph. Feel free to provide an alternate
| renaming patch if you've got a better idea than "token" and "arg".
Evolution mangles in-line patches?? That's too bad.
Attachments are more difficult to review/reply to.
+++ b/include/linux/parser.h Mon Nov 17 04:02:55 2003
@@ -1,3 +1,14 @@
+/*
+ * linux/include/linux/parser.h
+ *
+ * Header for lib/parser.c
Don't need that last line. Kernel headers don't normally say things
like that, and it's #included by callers to parser as well as parser
itself. I.e., it's not only for lib/parser.c.
+++ b/lib/parser.c Mon Nov 17 04:02:55 2003
for match_token:
+ * Description: Detects which if any of a set of token strings has been passed
+ * to it. Tokens can include up to MAX_OPT_ARGS instances of basic c-style
+ * format identifiers which will be taken into account when matching the
+ * tokens, and whose locations will be returned in the @args array.
Use %MAX_OPT_ARGS consistently.
Don't need "c-style" at all IMO, or at least make it "C-style".
for match_strcpy:
+ * Description: Copies the set of characters represented by the given
+ * &substring_t @s to the c-style string @to. Caller guarantees that @to is
+ * large enough to hold the characters of @s.
s/c-style//
Thanks again.
--
~Randy
MOTD: Always include version info.
next prev parent reply other threads:[~2003-11-17 17:00 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-16 8:16 Will Dyson
2003-11-16 16:09 ` Matthew Wilcox
2003-11-16 18:20 ` Jamie Lokier
2003-11-16 18:33 ` viro
2003-11-16 22:21 ` Will Dyson
2003-11-16 22:37 ` Will Dyson
2003-11-17 7:28 ` Jan-Benedict Glaw
2003-11-17 9:29 ` Will Dyson
2003-11-17 16:55 ` Randy.Dunlap [this message]
2003-11-17 19:38 ` Pat LaVarre
2003-11-18 5:10 ` Will Dyson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20031117085529.427bbb0b.rddunlap@osdl.org \
--to=rddunlap@osdl.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=will_dyson@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®