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-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[SCSI Target Devel]
[Linux SCSI Target Infrastructure]
[Kernel Newbies]
[Share Photos]
[IDE]
[Security]
[Git]
[Netfilter]
[Bugtraq]
[Photos]
[Yosemite]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Linux ATA RAID]
[Linux IIO]
[Samba]
[Video 4 Linux]
[Device Mapper]
[Linux Resources]