Re: [PATCH] Perverting cciss

From: Christoph Hellwig
Date: Sun Apr 08 2007 - 06:19:39 EST


On Fri, Apr 06, 2007 at 10:07:52AM -0700, Stephen Cameron wrote:
> How about something like this:
> (Since my mailer is sure to wreck the patch, it can be found intact here:
> http://cciss.cvs.sourceforge.net/*checkout*/cciss/patches/kernel.org-2.6/cciss_sg_io_block_pc.patch?revision=1.1

Looks good except for some codingstyle nits:

> @@ -45,7 +45,7 @@
> #include <linux/blkdev.h>
> #include <linux/genhd.h>
> #include <linux/completion.h>
> -
> +#include <scsi/sg.h>

Please don't remove the empty line after the include statements.

> + case SG_IO: return scsi_cmd_ioctl(filep, disk, cmd, argp);

should be split into two lines for readability.

Also is there a reason you don't want to pass down the various
other ioctls scsi_cmd_ioctl can handle to it?

> + if (blk_pc_request(cmd->rq)) {
> + if (cmd->rq->sense) {
> + if (cmd->rq->sense_len > cmd->err_info->SenseLen)
> + cmd->rq->sense_len = cmd->err_info->SenseLen;
> + memcpy(cmd->rq->sense, cmd->err_info->SenseInfo, cmd->rq->sense_len);
> + } else
> + cmd->rq->sense_len = 0;
> + }

Please add some linebreaks so that lines don't grow longer than 80
characters.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/