diff options
author | James Bottomley <James.Bottomley@steeleye.com> | 2005-10-02 12:45:08 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.(none)> | 2005-10-28 15:23:02 -0400 |
commit | 9ccfc756a70d454dfa82f48897e2883560c01a0e (patch) | |
tree | 9a6d3b10b1ec0e5fe7a63252a21598a03e93ad4e /include | |
parent | 9a41a62b74388827998253d62c58707e63cc5874 (diff) |
[SCSI] move the mid-layer printk's over to shost/starget/sdev_printk
This should eliminate (at least in the mid layer) to make numeric
assumptions about any of the enumeration variables. As a side effect,
it will also make all the messages consistent and line us up nicely for
the error logging strategy (if it ever shows itself again).
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/scsi/scsi_device.h | 6 | ||||
-rw-r--r-- | include/scsi/scsi_host.h | 4 |
2 files changed, 10 insertions, 0 deletions
diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index 7ece05666feb..7f621ab2865d 100644 --- a/include/scsi/scsi_device.h +++ b/include/scsi/scsi_device.h | |||
@@ -148,6 +148,9 @@ struct scsi_device { | |||
148 | #define transport_class_to_sdev(class_dev) \ | 148 | #define transport_class_to_sdev(class_dev) \ |
149 | to_scsi_device(class_dev->dev) | 149 | to_scsi_device(class_dev->dev) |
150 | 150 | ||
151 | #define sdev_printk(prefix, sdev, fmt, a...) \ | ||
152 | dev_printk(prefix, &(sdev)->sdev_gendev, fmt, ##a) | ||
153 | |||
151 | /* | 154 | /* |
152 | * scsi_target: representation of a scsi target, for now, this is only | 155 | * scsi_target: representation of a scsi target, for now, this is only |
153 | * used for single_lun devices. If no one has active IO to the target, | 156 | * used for single_lun devices. If no one has active IO to the target, |
@@ -177,6 +180,9 @@ static inline struct scsi_target *scsi_target(struct scsi_device *sdev) | |||
177 | #define transport_class_to_starget(class_dev) \ | 180 | #define transport_class_to_starget(class_dev) \ |
178 | to_scsi_target(class_dev->dev) | 181 | to_scsi_target(class_dev->dev) |
179 | 182 | ||
183 | #define starget_printk(prefix, starget, fmt, a...) \ | ||
184 | dev_printk(prefix, &(starget)->dev, fmt, ##a) | ||
185 | |||
180 | extern struct scsi_device *__scsi_add_device(struct Scsi_Host *, | 186 | extern struct scsi_device *__scsi_add_device(struct Scsi_Host *, |
181 | uint, uint, uint, void *hostdata); | 187 | uint, uint, uint, void *hostdata); |
182 | extern int scsi_add_device(struct Scsi_Host *host, uint channel, | 188 | extern int scsi_add_device(struct Scsi_Host *host, uint channel, |
diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h index 69313ba7505b..ea7ad7235397 100644 --- a/include/scsi/scsi_host.h +++ b/include/scsi/scsi_host.h | |||
@@ -609,6 +609,10 @@ struct Scsi_Host { | |||
609 | #define class_to_shost(d) \ | 609 | #define class_to_shost(d) \ |
610 | container_of(d, struct Scsi_Host, shost_classdev) | 610 | container_of(d, struct Scsi_Host, shost_classdev) |
611 | 611 | ||
612 | #define shost_printk(prefix, shost, fmt, a...) \ | ||
613 | dev_printk(prefix, &(shost)->shost_gendev, fmt, ##a) | ||
614 | |||
615 | |||
612 | int scsi_is_host_device(const struct device *); | 616 | int scsi_is_host_device(const struct device *); |
613 | 617 | ||
614 | static inline struct Scsi_Host *dev_to_shost(struct device *dev) | 618 | static inline struct Scsi_Host *dev_to_shost(struct device *dev) |