From: Ryan Arnold <rsa@us.ibm.com>
To: "Randy.Dunlap" <rddunlap@osdl.org>
Cc: Andrew Morton <akpm@osdl.org>,
Kernel Mailing List <linux-kernel@vger.kernel.org>,
Paul Mackerras <paulus@samba.org>
Subject: Re: [announce][draft3] HVCS for inclusion in 2.6 tree
Date: Wed, 28 Jul 2004 11:39:29 -0500 [thread overview]
Message-ID: <1091032768.14771.283.camel@localhost> (raw)
In-Reply-To: <20040727155011.77897e68.rddunlap@osdl.org>
On Tue, 2004-07-27 at 17:50, Randy.Dunlap wrote:
> +struct hvcs_partner_info {};
>
> Ugly comments style. Which comment goes with which
> data? Commenting data can be very helpful, but most of these
> are close to useless since they are so obvious.
> And put a space after "/*".
Right, this is definitely more obvious now. I think I can pretty much
remove the comments now that the element names make sense.
> +int hvcs_convert(long to_convert)
> +{
> + switch (to_convert) {
> + case H_Success:
> + return 0;
> + case H_Parameter:
> + return -EINVAL;
> + case H_Hardware:
> + return -EIO;
> + case H_Busy:
>
> Can these H_values be converted from that coding style?
Converted to what/how? I am confused by your question.
>
> + /* This is a very small struct and will be freed soon */
> + next_partner_info = kmalloc(sizeof(struct hvcs_partner_info),
> + GFP_ATOMIC);
>
> Where is it freed?
>
It is freed in hvcs_free_partner_info() because the partner info that is
allocated needs to have scope outside of the hvcs_get_partner_info()
call.
> config PC9800_OLDLP
>
> This patch segment won't apply since PC9800 has been removed.
I'll make future patches against 2.6.8-rc2.
> +#define __ALIGNED__ __attribute__((__aligned__(8)))
>
> Why aligned? why 8? (just curious) Could use a comment if it's important.
Randy, here's an explanation given by Hollis Blanchard and Paul
Mackerras that I'll add to the code as a comment.
The hcall interface involves putting 8 chars into each of two registers.
We load up those 2 registers (in arch/ppc64/hvconsole.c) by casting
char[16] to long[2]. It would work without __ALIGNED__, but a little
(tiny) bit slower because an unaligned load is slower than aligned load.
I took care of all the other formatting things you pointed out.
Thanks for the suggestions Randy. Hopefully I'll have a patch out this
afternoon encompassing your suggestions.
Ryan S. Arnold
IBM Linux Technology Center
next prev parent reply other threads:[~2004-07-28 18:58 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-14 15:42 [announce] HVCS for inclusion in 2.6 tree Ryan Arnold
2004-07-18 2:00 ` Paul Mackerras
2004-07-19 15:54 ` Ryan Arnold
2004-07-22 20:26 ` Ryan Arnold
2004-07-23 1:57 ` Andrew Morton
2004-07-26 14:41 ` Ryan Arnold
2004-07-23 2:16 ` Andrew Morton
2004-07-27 20:08 ` [announce][draft3] " Ryan Arnold
2004-07-27 22:50 ` Randy.Dunlap
2004-07-28 16:39 ` Ryan Arnold [this message]
2004-07-28 20:12 ` Randy.Dunlap
2004-07-28 20:18 ` [announce][draft4] " Ryan Arnold
2004-07-29 17:41 ` Jeff Garzik
2004-08-02 14:24 ` Ryan Arnold
2004-07-28 20:36 ` [announce][draft3] " Paul Mackerras
2004-07-28 17:00 ` Ryan Arnold
2004-07-27 23:02 ` Randy.Dunlap
2004-07-23 2:21 ` [announce] " Andrew Morton
2004-07-26 12:57 ` Ryan Arnold
2004-07-23 2:29 ` Andrew Morton
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=1091032768.14771.283.camel@localhost \
--to=rsa@us.ibm.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=paulus@samba.org \
--cc=rddunlap@osdl.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox