[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1337188707.6903.4.camel@joe2Laptop>
Date: Wed, 16 May 2012 10:18:27 -0700
From: Joe Perches <joe@...ches.com>
To: Tim Chen <tim.c.chen@...ux.intel.com>
Cc: linux-fsdevel <linux-fsdevel@...r.kernel.org>,
linux-scsi@...r.kernel.org,
linux-kernel <linux-kernel@...r.kernel.org>,
Matthew Wilcox <willy@...ux.intel.com>,
Andi Kleen <ak@...ux.intel.com>
Subject: Re: SCSI RAM driver ported to 3.3 kernel for file system and I/O
testing
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-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists