Re: [PATCH] Perverting cciss

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux