]> git.baikalelectronics.ru Git - kernel.git/commit
uas: Cleanup uas_log_cmd_state usage
authorHans de Goede <hdegoede@redhat.com>
Sat, 13 Sep 2014 10:26:49 +0000 (12:26 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 24 Sep 2014 04:42:12 +0000 (21:42 -0700)
commitb1b44447fb67745384960c01866be983ab7bfe53
tree7dbd23d73ce526fd2dcfe4478bbb830a3079c3c3
parent9a2396d7df472bb8094f82fd20ade4906791fd11
uas: Cleanup uas_log_cmd_state usage

Instead of doing:

uas_log_cmd_state(cmnd, __func__)
scmd_printk(KERN_ERR, cmnd, "error doing foo %d\n", err)

On error, resulting in 2 log calls for a single error, make uas_log_cmd_state
take a status code, and change calls like the above to:

uas_log_cmd_state(cmnd, "error doing foo", err)

Also change various sanity checks (which should never trigger) from:
"scmd_printk(KERN_ERR, cmnd, "sanity foo failed\n")" to calling the new
uas_log_cmd_state(), so that when they do trigger we get more info.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/storage/uas.c