public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: "Hironobu Ishii" <ishii.hironobu@jp.fujitsu.com>
To: Jens Axboe <axboe@suse.de>
Cc: linux-scsi <linux-scsi@vger.kernel.org>
Subject: [PATCH] Adding device name to messages from sr.c
Date: Wed, 31 Mar 2004 21:30:43 +0900	[thread overview]
Message-ID: <040901c4171c$4e4870f0$2987110a@lsd.css.fujitsu.com> (raw)

Hi Jens,

sr.c has some messages that does not tell us the error device.
This patch adds device name to such messages.
This is a patch for linux-2.6.5-rc3.

Please apply!

Thanks,
Hironobu Ishii


diff -urN linux-2.6.5-rc3/drivers/scsi/sr.c linux-2.6.5-rc3-work/drivers/scsi/sr.c
--- linux-2.6.5-rc3/drivers/scsi/sr.c 2004-03-30 19:02:47.000000000 +0900
+++ linux-2.6.5-rc3-work/drivers/scsi/sr.c 2004-03-30 20:39:16.000000000 +0900
@@ -321,11 +321,13 @@
   if (!in_interrupt())
    sr_set_blocklength(cd, 2048);
   else
-   printk("sr: can't switch blocksize: in interrupt\n");
+   printk("%s: can't switch blocksize: in interrupt\n",
+    cd->cdi.name);
  }
 
  if (s_size != 512 && s_size != 1024 && s_size != 2048) {
-  printk("sr: bad sector size %d\n", s_size);
+  printk("%s: bad sector size %d\n", 
+   cd->cdi.name, s_size);
   return 0;
  }
 
@@ -349,7 +351,8 @@
    size += sg[i].length;
 
   if (size != SCpnt->request_bufflen && SCpnt->use_sg) {
-   printk(KERN_ERR "sr: mismatch count %d, bytes %d\n",
+   printk(KERN_ERR "%s: mismatch count %d, bytes %d\n",
+     cd->cdi.name,
      size, SCpnt->request_bufflen);
    if (SCpnt->request_bufflen > size)
     SCpnt->request_bufflen = SCpnt->bufflen = size;
@@ -361,7 +364,7 @@
   */
  if (((unsigned int)SCpnt->request->sector % (s_size >> 9)) ||
      (SCpnt->request_bufflen % s_size)) {
-  printk("sr: unaligned transfer\n");
+  printk("%s: unaligned transfer\n", cd->cdi.name);
   return 0;
  }
 
@@ -724,15 +727,15 @@
  /* allocate a request for the TEST_UNIT_READY */
  SRpnt = scsi_allocate_request(cd->device, GFP_KERNEL);
  if (!SRpnt) {
-  printk(KERN_WARNING "(get_capabilities:) Request allocation "
-         "failure.\n");
+  printk(KERN_WARNING "%s: (get_capabilities:) Request allocation "
+   "failure.\n", cd->cdi.name);
   return;
  }
 
  /* allocate transfer buffer */
  buffer = kmalloc(512, GFP_KERNEL | GFP_DMA);
  if (!buffer) {
-  printk(KERN_ERR "sr: out of memory.\n");
+  printk(KERN_ERR "%s: out of memory.\n", cd->cdi.name);
   scsi_release_request(SRpnt);
   return;
  }


                 reply	other threads:[~2004-03-31 12:33 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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='040901c4171c$4e4870f0$2987110a@lsd.css.fujitsu.com' \
    --to=ishii.hironobu@jp.fujitsu.com \
    --cc=axboe@suse.de \
    --cc=linux-scsi@vger.kernel.org \
    /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