From: Hans de Goede Date: Sat, 13 Sep 2014 10:26:49 +0000 (+0200) Subject: uas: Cleanup uas_log_cmd_state usage X-Git-Tag: fixes-for-v3.18-merge-window~16^2~63 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1ad7ed5af3d85d0d8b3cdc5a4b823272b85c46cf;p=pandora-kernel.git 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 Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed