mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
scsi: introduce sdev_prefix_printk()
Like scmd_printk(), but the device name is passed in as a string. Can be used by eg ULDs which do not have access to the scsi_cmnd structure. Signed-off-by: Hannes Reinecke <[email protected]> Reviewed-by: Robert Elliott <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
This commit is contained in:
parent
f75ae8ed08
commit
22e0d99415
6 changed files with 17 additions and 11 deletions
|
|
@ -244,6 +244,15 @@ struct scsi_dh_data {
|
|||
#define sdev_dbg(sdev, fmt, a...) \
|
||||
dev_dbg(&(sdev)->sdev_gendev, fmt, ##a)
|
||||
|
||||
/*
|
||||
* like scmd_printk, but the device name is passed in
|
||||
* as a string pointer
|
||||
*/
|
||||
#define sdev_prefix_printk(l, sdev, p, fmt, a...) \
|
||||
(p) ? \
|
||||
sdev_printk(l, sdev, "[%s] " fmt, p, ##a) : \
|
||||
sdev_printk(l, sdev, fmt, ##a)
|
||||
|
||||
#define scmd_printk(prefix, scmd, fmt, a...) \
|
||||
(scmd)->request->rq_disk ? \
|
||||
sdev_printk(prefix, (scmd)->device, "[%s] " fmt, \
|
||||
|
|
|
|||
Loading…
Reference in a new issue