From: Ingo Molnar <mingo@elte.hu>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Jason Wessel <jason.wessel@windriver.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: kgdb: core
Date: Mon, 21 Apr 2008 16:12:52 +0200 [thread overview]
Message-ID: <20080421141252.GR9554@elte.hu> (raw)
In-Reply-To: <20080418150930.476ea7aa.akpm@linux-foundation.org>
* Andrew Morton <akpm@linux-foundation.org> wrote:
> > +/*
> > + * kgdb_skipexception - Bail out of KGDB when we've been triggered.
> > + * @exception: Exception vector number
> > + * @regs: Current &struct pt_regs.
> > + *
> > + * On some architectures we need to skip a breakpoint exception when
> > + * it occurs after a breakpoint has been removed.
> > + */
> > +extern int kgdb_skipexception(int exception, struct pt_regs *regs);
>
> Please just nuke all the interface comments in the header files. They
> duplicate the kernedoc comments at the definition site and we don't
> want to have to update both versions whenever we change something.
well that way we'll have to update _all_ arch versions whenever we
change something - while the reference prototype in kgdb.h should all
cover it. Do we really want to do that?
> > +/*
> > + * Functions each KGDB-supporting architecture must provide:
> > + */
> > +
> > +/*
> > + * kgdb_arch_init - Perform any architecture specific initalization.
> > + *
> > + * This function will handle the initalization of any architecture
> > + * specific callbacks.
> > + */
> > +extern int kgdb_arch_init(void);
>
> Well, these are trickier because there is an implementation of this
> function within each architecture. So I think that in this case it
> _does_ make sense to document the function in a common place, and the
> only common place is this header file.
>
> So please
>
> a) make this a kerneldoc comment and
>
> b) remove the kerneldoc at the definition site(s).
>
> (alternative: teach the kerneldoc system to go fishing in the various
> arch directories to find the appropriate documentation, but I don't
> know enough about kerneldoc to be able say anything about that).
well there's lkml feedback ping-pong effect here. It was pointed out in
earlier kgdb review that it's an "error" to put kerneldoc into header
files. I pointed out that it makes no sense to do otherwise but removed
the kerneldoc annotation to resolve the "objection".
> This should become a kernedoc comment, as this is the only place we
> can document it. So please add the leading /**
same deal - it was objected to in review.
> > +static const char hexchars[] = "0123456789abcdef";
> > +
> > +static int hex(char ch)
> > +{
> > + if ((ch >= 'a') && (ch <= 'f'))
> > + return ch - 'a' + 10;
> > + if ((ch >= '0') && (ch <= '9'))
> > + return ch - '0';
> > + if ((ch >= 'A') && (ch <= 'F'))
> > + return ch - 'A' + 10;
> > + return -1;
> > +}
>
> How many are we up to now?
>
> akpm:/usr/src/linux-2.6.25> grep -ri '"0123456789abcdef"' . | wc -l
> 40
>
> lol.
okay, hex_asc() it should use. Probably KGDB's code predates that of
kernel.h though ;-)
> Nice-looking code - kgb has improved rather a lot. I'm glad we
> finally got it in. [...]
thanks :)
> [...] Maybe one day I'll get to use it again :(
/me duly notes this request to break Andrew's systems even more frequently ;-)
Ingo
next prev parent reply other threads:[~2008-04-21 14:13 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200804181741.m3IHfTeC012089@hera.kernel.org>
2008-04-18 22:09 ` kgdb: core Andrew Morton
2008-04-21 14:12 ` Ingo Molnar [this message]
2008-04-22 4:46 ` Andrew Morton
2008-04-22 8:30 ` Ingo Molnar
2008-04-22 15:25 ` Randy Dunlap
2008-04-22 20:57 ` Andrew Morton
2008-04-22 21:02 ` Randy Dunlap
2008-04-22 21:19 ` Jason Wessel
2008-04-23 1:19 ` Randy Dunlap
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=20080421141252.GR9554@elte.hu \
--to=mingo@elte.hu \
--cc=akpm@linux-foundation.org \
--cc=jason.wessel@windriver.com \
--cc=linux-kernel@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.