diff options
author | Tejun Heo <htejun@gmail.com> | 2007-07-16 01:29:39 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-07-20 08:02:11 -0400 |
commit | b64bbc39f2122a2276578e40144af69ef01decd4 (patch) | |
tree | bd760da68bc785490ecd31060d892eeb7123782d /include | |
parent | 975530e8a33fdeb1ad80d82fde11d56bf9ed2760 (diff) |
libata: improve EH report formatting
Requiring LLDs to format multiple error description messages properly
doesn't work too well. Help LLDs a bit by making ata_ehi_push_desc()
insert ", " on each invocation. __ata_ehi_push_desc() is the raw
version without the automatic separator.
While at it, make ehi_desc interface proper functions instead of
macros.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/libata.h | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h index 5d3df6cde272..94b37d180680 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -910,16 +910,9 @@ extern void ata_do_eh(struct ata_port *ap, ata_prereset_fn_t prereset, | |||
910 | /* | 910 | /* |
911 | * ata_eh_info helpers | 911 | * ata_eh_info helpers |
912 | */ | 912 | */ |
913 | #define ata_ehi_push_desc(ehi, fmt, args...) do { \ | 913 | extern void __ata_ehi_push_desc(struct ata_eh_info *ehi, const char *fmt, ...); |
914 | (ehi)->desc_len += scnprintf((ehi)->desc + (ehi)->desc_len, \ | 914 | extern void ata_ehi_push_desc(struct ata_eh_info *ehi, const char *fmt, ...); |
915 | ATA_EH_DESC_LEN - (ehi)->desc_len, \ | 915 | extern void ata_ehi_clear_desc(struct ata_eh_info *ehi); |
916 | fmt , ##args); \ | ||
917 | } while (0) | ||
918 | |||
919 | #define ata_ehi_clear_desc(ehi) do { \ | ||
920 | (ehi)->desc[0] = '\0'; \ | ||
921 | (ehi)->desc_len = 0; \ | ||
922 | } while (0) | ||
923 | 916 | ||
924 | static inline void __ata_ehi_hotplugged(struct ata_eh_info *ehi) | 917 | static inline void __ata_ehi_hotplugged(struct ata_eh_info *ehi) |
925 | { | 918 | { |