From: James Bottomley <James.Bottomley@SteelEye.com>
To: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: linux-scsi@vger.kernel.org
Subject: Re: [PATCH] SCSI: Make error printing more user friendly
Date: Fri, 16 Feb 2007 09:10:59 -0600 [thread overview]
Message-ID: <1171638659.3443.8.camel@mulgrave.il.steeleye.com> (raw)
In-Reply-To: <yq1hctvycyg.fsf@sermon.lab.mkp.net>
I think all of this is OK except this piece
On Fri, 2007-02-09 at 03:03 -0500, Martin K. Petersen wrote:
> #define scmd_printk(prefix, scmd, fmt, a...) \
> + (&(scmd)->request->rq_disk) ? \
> + printk(prefix "%s: " fmt, (char *) &(scmd)->request->rq_disk->disk_name, ##a) : \
> dev_printk(prefix, &(scmd)->device->sdev_gendev, fmt, ##a)
I think we should be going through dev_printk as the primary,
particularly as doing this would make the output of sdev_printk
different from scmd_printk. How about
#define scmd_printk(prefix, scmd, fmt, a...) \
(scmd)->request->rq_disk ? \
sdev_printk(prefix, (scmd)->device, "(%s) " fmt, \
(scmd)->request->rq_disk->disk_name, ##a) : \
sdev_printk(prefix, (scmd)->device, fmt, ##a)
?
The other nasty is that we can't actually deref rq_disk unless
<linux/blkdev.h> is included. You'll find megaraid_sas.c fails to
compile becuase of this. It can probably be fixed by including blkdev.h
from scsi_device.h
James
next prev parent reply other threads:[~2007-02-16 15:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-09 8:03 [PATCH] SCSI: Make error printing more user friendly Martin K. Petersen
2007-02-16 15:10 ` James Bottomley [this message]
2007-02-19 15:43 ` Martin K. Petersen
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=1171638659.3443.8.camel@mulgrave.il.steeleye.com \
--to=james.bottomley@steeleye.com \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.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