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
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html