Re: SCSI RAM driver ported to 3.3 kernel for file system and I/O testing

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

 



On Wed, 2012-05-16 at 10:07 -0700, Tim Chen wrote:
> I've ported Matthew's scsi RAM driver (originally posted in
> http://marc.info/?l=linux-scsi&m=120331663227540&w=2) to the 3.3 kernel.

just trivia:

> diff --git a/drivers/scsi/scsi_ram.c b/drivers/scsi/scsi_ram.c
[]
> +static void scsi_ram_too_big(struct scsi_cmnd *cmnd, unsigned int start,
> +				unsigned int len)
> +{
> +	printk(KERN_WARNING, "Request exceeded device capacity! %u %u\n", start, len);

Probably ignored a warning here. No comma after KERN_WARNING.

I'd add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt before
any include and use pr_<level> instead.

[]

> +static int scsi_ram_queuecommand(struct Scsi_Host *shost, struct scsi_cmnd *cmnd)
> +{
> +	struct scsi_ram_cmnd *ram_cmnd = (void *)&cmnd->SCp;
> +	struct scsi_ram_device *ram_device = scsi_ram_devices[cmnd->device->id];
> +	unsigned long flags;
> +
> +	pr_debug("%s: Queueing command\n", DRV_NAME);

No need for DRV_NAME when using pr_fmt

[]

> +static int scsi_ram_slave_alloc(struct scsi_device *sdev)
> +{
> +	struct scsi_ram_device *ram_device;
> +
> +	pr_debug("%s: slave_alloc %d:%d\n", DRV_NAME, sdev->id, sdev->lun);

here too, etc...


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


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux