From: "Randy.Dunlap" <rddunlap@osdl.org>
To: Hollis Blanchard <hollisb@us.ibm.com>
Cc: linux-kernel@vger.kernel.org, viro@parcelfarce.linux.theplanet.co.uk
Subject: Re: [RFC] Host Virtual Serial Interface driver
Date: Mon, 9 Aug 2004 10:51:13 -0700 [thread overview]
Message-ID: <20040809105113.4923342d.rddunlap@osdl.org> (raw)
In-Reply-To: <1091827384.31867.21.camel@localhost>
On Fri, 06 Aug 2004 16:23:05 -0500 Hollis Blanchard wrote:
| Hi, I have a new char driver I'd like to get comments on. It is specific
| to IBM's p5 server line; I've included a description from the comments
| here:
...
| I've included the whole file below; it's pretty much self-contained. All
| comments welcome.
|
| --
|
| #include <linux/init.h>
| #include <linux/module.h>
| #include <linux/console.h>
| #include <linux/major.h>
| #include <linux/kernel.h>
| #include <linux/sysrq.h>
| #include <linux/tty.h>
| #include <linux/tty_flip.h>
| #include <linux/sched.h>
| #include <linux/kbd_kern.h>
| #include <linux/spinlock.h>
| #include <linux/ctype.h>
| #include <linux/interrupt.h>
| #include <linux/delay.h>
To the extent possible, we like to put the linux/* files in alpha
order, and same with the asm/* files. Separately, as you have them.
| #include <asm/uaccess.h>
| #include <asm/hvconsole.h>
| #include <asm/prom.h>
| #include <asm/hvcall.h>
| #include <asm/vio.h>
|
| #define __ALIGNED__ __attribute__((__aligned__(sizeof(long))))
You should explain this bit (__ALIGNED__).
| static inline int hdrlen(const uint8_t *packet)
| {
| const int lengths[] = { 4, 6, 6, 8, };
| struct hvsi_header *header = (struct hvsi_header *)packet;
|
| return lengths[VS_DATA_PACKET_HEADER - header->type];
| }
Any chance of bad data (value) in header->type ?
| if (hangup) {
| tty_hangup(hangup);
| }
extra braces (style); maybe in a few other places also.
--
~Randy
next prev parent reply other threads:[~2004-08-09 18:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-06 21:23 Hollis Blanchard
2004-08-09 17:51 ` Randy.Dunlap [this message]
2004-08-09 18:46 ` Hollis Blanchard
2004-08-09 18:48 ` Sam Ravnborg
2004-08-09 18:51 ` Hollis Blanchard
2004-08-09 19:00 ` Sam Ravnborg
2004-08-09 19:08 ` Hollis Blanchard
2004-08-09 19:12 ` Michael Buesch
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=20040809105113.4923342d.rddunlap@osdl.org \
--to=rddunlap@osdl.org \
--cc=hollisb@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@parcelfarce.linux.theplanet.co.uk \
/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®