From: Pekka Enberg <penberg@gmail.com>
To: Ed L Cashin <ecashin@coraid.com>
Cc: Greg KH <greg@kroah.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ATA over Ethernet driver for 2.6.9
Date: Wed, 8 Dec 2004 11:53:09 +0200 [thread overview]
Message-ID: <84144f0204120801534470153c@mail.gmail.com> (raw)
In-Reply-To: <87acsrqval.fsf@coraid.com>
Hi Ed,
Few comments below.
On Mon, 06 Dec 2004 10:51:46 -0500, Ed L Cashin <ecashin@coraid.com> wrote:
> diff -urpN linux-2.6.9/drivers/block/aoe/all.h linux-2.6.9-aoe/drivers/block/aoe/all.h
> --- linux-2.6.9/drivers/block/aoe/all.h 1969-12-31 19:00:00.000000000 -0500
> +++ linux-2.6.9-aoe/drivers/block/aoe/all.h 2004-12-06 10:40:00.000000000 -0500
How about calling this aoe.h or similar?
> @@ -0,0 +1,156 @@
> +#include <linux/ctype.h>
> +#include <linux/string.h>
> +#include <linux/hdreg.h>
> +#include <linux/blkdev.h>
> +#include <linux/types.h>
> +#include <linux/fs.h>
> +#include <linux/module.h>
> +#include <linux/blkpg.h>
> +#include <linux/slab.h>
> +#include <linux/skbuff.h>
> +#include <linux/ioctl.h>
> +#include <linux/if.h>
> +#include <linux/netdevice.h>
> +#include <linux/kdev_t.h>
> +#include <linux/kernel.h>
> +#include <linux/init.h>
> +#include <linux/poll.h>
> +#include <linux/timer.h>
> +#include <linux/genhd.h>
> +#include <asm/uaccess.h>
> +#include <asm/namei.h>
> +#include <asm/semaphore.h>
This looks wrong. I don't see you using, for example, semaphores
everywhere you include this header. Please just move these includes to
the appropriate .c files.
> +enum {
> + DEVFL_UP = 1, /* device is installed in system and ready for AoE->ATA commands */
> + DEVFL_TKILL = (1<<1), /* flag for timer to know when to kill self */
> + DEVFL_EXT = (1<<2), /* device accepts lba48 commands */
> + DEVFL_CLOSEWAIT = (1<<3), /* device is waiting for all closes to revalidate */
> + DEVFL_WC_UPDATE = (1<<4), /* this device needs to update write cache status */
> + DEVFL_WORKON = (1<<4),
> +
> + BUFFL_FAIL = 1,
> +
> + MAXATADATA = 1024,
> + NPERSHELF = 10,
> + FREETAG = -1,
> +};
Perhaps it would be cleaner if you kept DEVFL flags in separate enum
block as they're related and have nothing to do with the rest?
> +typedef struct Buf Buf;
> +struct Buf {
Please don't introduce typedefs for structs. Furthermore, please make
the struct name start with a lower case letter like the rest of the
kernel.
> diff -urpN linux-2.6.9/drivers/block/aoe/aoeblk.c linux-2.6.9-aoe/drivers/block/aoe/aoeblk.c
> --- linux-2.6.9/drivers/block/aoe/aoeblk.c 1969-12-31 19:00:00.000000000 -0500
> +++ linux-2.6.9-aoe/drivers/block/aoe/aoeblk.c 2004-12-06 10:40:00.000000000 -0500
> +static int
> +aoeblk_open(struct inode *inode, struct file *filp)
> +{
> + Aoedev *d;
> + ulong flags;
> +
> + d = (Aoedev *) inode->i_bdev->bd_disk->private_data;
Please remove the redundant casts when converting from a void pointer.
The conversion is guaranteed by the C standard.
Pekka
prev parent reply other threads:[~2004-12-08 9:53 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-06 15:51 Ed L Cashin
2004-12-06 16:14 ` Arjan van de Ven
2004-12-10 16:19 ` Ed L Cashin
2004-12-06 16:21 ` Jan-Benedict Glaw
2004-12-06 16:11 ` Alan Cox
2004-12-06 17:06 ` Ed L Cashin
2004-12-07 13:00 ` Pavel Machek
2004-12-08 10:02 ` Helge Hafting
2004-12-08 15:44 ` Ed L Cashin
2004-12-08 15:53 ` Pavel Machek
2004-12-06 16:28 ` Adam Heath
2004-12-06 16:45 ` Ed L Cashin
2004-12-06 16:09 ` Alan Cox
2004-12-06 17:10 ` Adam Heath
2004-12-06 21:54 ` Greg KH
2004-12-09 15:48 ` Ed L Cashin
2004-12-09 16:37 ` Greg KH
2004-12-09 15:57 ` Ed L Cashin
2004-12-09 16:40 ` Greg KH
[not found] ` <87zn0n5vyd.fsf@coraid.com>
2004-12-09 16:42 ` Greg KH
2004-12-08 9:53 ` Pekka Enberg [this message]
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=84144f0204120801534470153c@mail.gmail.com \
--to=penberg@gmail.com \
--cc=ecashin@coraid.com \
--cc=greg@kroah.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome