From: Joe Perches <joe@perches.com>
To: Tim Chen <tim.c.chen@linux.intel.com>
Cc: linux-fsdevel <linux-fsdevel@vger.kernel.org>,
linux-scsi@vger.kernel.org,
linux-kernel <linux-kernel@vger.kernel.org>,
Matthew Wilcox <willy@linux.intel.com>,
Andi Kleen <ak@linux.intel.com>
Subject: Re: SCSI RAM driver ported to 3.3 kernel for file system and I/O testing
Date: Wed, 16 May 2012 10:18:27 -0700 [thread overview]
Message-ID: <1337188707.6903.4.camel@joe2Laptop> (raw)
In-Reply-To: <1337188023.3796.130.camel@schen9-DESK>
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...
next prev parent reply other threads:[~2012-05-16 17:18 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-16 17:07 SCSI RAM driver ported to 3.3 kernel for file system and I/O testing Tim Chen
2012-05-16 17:18 ` Joe Perches [this message]
2012-05-16 19:02 ` Tim Chen
2012-05-16 17:41 ` Bart Van Assche
2012-05-16 19:31 ` chetan loke
2012-05-16 19:35 ` Matthew Wilcox
2012-05-16 19:37 ` chetan loke
2012-05-16 19:43 ` Matthew Wilcox
2012-05-16 19:54 ` chetan loke
2012-05-16 20:22 ` Matthew Wilcox
2012-05-16 20:05 ` Tim Chen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1337188707.6903.4.camel@joe2Laptop \
--to=joe@perches.com \
--cc=ak@linux.intel.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=tim.c.chen@linux.intel.com \
--cc=willy@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).