diff options
author | Victor Dodon <printesoi@chromium.org> | 2016-02-17 13:42:37 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-02-20 23:21:53 -0500 |
commit | ef976ea33b4c44d6cd14ee63cb237c6bab40f91b (patch) | |
tree | 4406ace892e024ac0e81fd276892c5e56162c59e /drivers/usb/storage/debug.c | |
parent | f9cfabcecd0c46617d0f56388cb2f4bd90f4d5ca (diff) |
usb: storage: use usb_store_dbg instead of US_DEBUGPX
The US_DEBUGPX macro uses printk without specifying a kernel log level, so
the default kernel log level is used, which may not match LOGLEVEL_DEBUG
used in usb_stor_dbg. Remove the macro and use usb_store_dbg instead.
Signed-off-by: Victor Dodon <printesoi@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/storage/debug.c')
-rw-r--r-- | drivers/usb/storage/debug.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/usb/storage/debug.c b/drivers/usb/storage/debug.c index 57bf3ad41fb6..5a12c03138f8 100644 --- a/drivers/usb/storage/debug.c +++ b/drivers/usb/storage/debug.c | |||
@@ -57,7 +57,6 @@ | |||
57 | void usb_stor_show_command(const struct us_data *us, struct scsi_cmnd *srb) | 57 | void usb_stor_show_command(const struct us_data *us, struct scsi_cmnd *srb) |
58 | { | 58 | { |
59 | char *what = NULL; | 59 | char *what = NULL; |
60 | int i; | ||
61 | 60 | ||
62 | switch (srb->cmnd[0]) { | 61 | switch (srb->cmnd[0]) { |
63 | case TEST_UNIT_READY: what = "TEST_UNIT_READY"; break; | 62 | case TEST_UNIT_READY: what = "TEST_UNIT_READY"; break; |
@@ -153,10 +152,8 @@ void usb_stor_show_command(const struct us_data *us, struct scsi_cmnd *srb) | |||
153 | default: what = "(unknown command)"; break; | 152 | default: what = "(unknown command)"; break; |
154 | } | 153 | } |
155 | usb_stor_dbg(us, "Command %s (%d bytes)\n", what, srb->cmd_len); | 154 | usb_stor_dbg(us, "Command %s (%d bytes)\n", what, srb->cmd_len); |
156 | usb_stor_dbg(us, "bytes: "); | 155 | usb_stor_dbg(us, "bytes: %*ph\n", min_t(int, srb->cmd_len, 16), |
157 | for (i = 0; i < srb->cmd_len && i < 16; i++) | 156 | (const unsigned char *)srb->cmnd); |
158 | US_DEBUGPX(" %02x", srb->cmnd[i]); | ||
159 | US_DEBUGPX("\n"); | ||
160 | } | 157 | } |
161 | 158 | ||
162 | void usb_stor_show_sense(const struct us_data *us, | 159 | void usb_stor_show_sense(const struct us_data *us, |
@@ -174,11 +171,10 @@ void usb_stor_show_sense(const struct us_data *us, | |||
174 | if (what == NULL) | 171 | if (what == NULL) |
175 | what = "(unknown ASC/ASCQ)"; | 172 | what = "(unknown ASC/ASCQ)"; |
176 | 173 | ||
177 | usb_stor_dbg(us, "%s: ", keystr); | ||
178 | if (fmt) | 174 | if (fmt) |
179 | US_DEBUGPX("%s (%s%x)\n", what, fmt, ascq); | 175 | usb_stor_dbg(us, "%s: %s (%s%x)\n", keystr, what, fmt, ascq); |
180 | else | 176 | else |
181 | US_DEBUGPX("%s\n", what); | 177 | usb_stor_dbg(us, "%s: %s\n", keystr, what); |
182 | } | 178 | } |
183 | 179 | ||
184 | void usb_stor_dbg(const struct us_data *us, const char *fmt, ...) | 180 | void usb_stor_dbg(const struct us_data *us, const char *fmt, ...) |