aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/storage/scsiglue.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2013-04-19 14:44:00 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-04-19 14:46:50 -0400
commit191648d03d20229523d9a75b8abef56421298d28 (patch)
tree2de4891a95fe1d2ee4b8326bb9834033b763d37e /drivers/usb/storage/scsiglue.c
parentf1175daa5312dd1b3f5940413c7c41ed195066f7 (diff)
usb: storage: Convert US_DEBUGP to usb_stor_dbg
Use a more current logging style with dev_printk where possible. o Convert uses of US_DEBUGP to usb_stor_dbg o Add "struct us_data *" to usb_stor_dbg uses o usb_stor_dbg now uses struct device */dev_vprint_emit o Removed embedded function names o Coalesce formats o Remove trailing whitespace o Remove useless OOM messages o Remove useless function entry/exit logging o Convert some US_DEBUGP uses to dev_info and dev_dbg Object size is slightly reduced when debugging is enabled, slightly increased with no debugging because some initialization and removal messages are now always emitted. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/storage/scsiglue.c')
-rw-r--r--drivers/usb/storage/scsiglue.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/usb/storage/scsiglue.c b/drivers/usb/storage/scsiglue.c
index 92f35abee92d..4faa982807f2 100644
--- a/drivers/usb/storage/scsiglue.c
+++ b/drivers/usb/storage/scsiglue.c
@@ -313,8 +313,6 @@ static int queuecommand_lck(struct scsi_cmnd *srb,
313{ 313{
314 struct us_data *us = host_to_us(srb->device->host); 314 struct us_data *us = host_to_us(srb->device->host);
315 315
316 US_DEBUGP("%s called\n", __func__);
317
318 /* check for state-transition errors */ 316 /* check for state-transition errors */
319 if (us->srb != NULL) { 317 if (us->srb != NULL) {
320 printk(KERN_ERR USB_STORAGE "Error in %s: us->srb = %p\n", 318 printk(KERN_ERR USB_STORAGE "Error in %s: us->srb = %p\n",
@@ -324,7 +322,7 @@ static int queuecommand_lck(struct scsi_cmnd *srb,
324 322
325 /* fail the command if we are disconnecting */ 323 /* fail the command if we are disconnecting */
326 if (test_bit(US_FLIDX_DISCONNECTING, &us->dflags)) { 324 if (test_bit(US_FLIDX_DISCONNECTING, &us->dflags)) {
327 US_DEBUGP("Fail command during disconnect\n"); 325 usb_stor_dbg(us, "Fail command during disconnect\n");
328 srb->result = DID_NO_CONNECT << 16; 326 srb->result = DID_NO_CONNECT << 16;
329 done(srb); 327 done(srb);
330 return 0; 328 return 0;
@@ -349,7 +347,7 @@ static int command_abort(struct scsi_cmnd *srb)
349{ 347{
350 struct us_data *us = host_to_us(srb->device->host); 348 struct us_data *us = host_to_us(srb->device->host);
351 349
352 US_DEBUGP("%s called\n", __func__); 350 usb_stor_dbg(us, "%s called\n", __func__);
353 351
354 /* us->srb together with the TIMED_OUT, RESETTING, and ABORTING 352 /* us->srb together with the TIMED_OUT, RESETTING, and ABORTING
355 * bits are protected by the host lock. */ 353 * bits are protected by the host lock. */
@@ -358,7 +356,7 @@ static int command_abort(struct scsi_cmnd *srb)
358 /* Is this command still active? */ 356 /* Is this command still active? */
359 if (us->srb != srb) { 357 if (us->srb != srb) {
360 scsi_unlock(us_to_host(us)); 358 scsi_unlock(us_to_host(us));
361 US_DEBUGP ("-- nothing to abort\n"); 359 usb_stor_dbg(us, "-- nothing to abort\n");
362 return FAILED; 360 return FAILED;
363 } 361 }
364 362
@@ -386,7 +384,7 @@ static int device_reset(struct scsi_cmnd *srb)
386 struct us_data *us = host_to_us(srb->device->host); 384 struct us_data *us = host_to_us(srb->device->host);
387 int result; 385 int result;
388 386
389 US_DEBUGP("%s called\n", __func__); 387 usb_stor_dbg(us, "%s called\n", __func__);
390 388
391 /* lock the device pointers and do the reset */ 389 /* lock the device pointers and do the reset */
392 mutex_lock(&(us->dev_mutex)); 390 mutex_lock(&(us->dev_mutex));
@@ -402,7 +400,8 @@ static int bus_reset(struct scsi_cmnd *srb)
402 struct us_data *us = host_to_us(srb->device->host); 400 struct us_data *us = host_to_us(srb->device->host);
403 int result; 401 int result;
404 402
405 US_DEBUGP("%s called\n", __func__); 403 usb_stor_dbg(us, "%s called\n", __func__);
404
406 result = usb_stor_port_reset(us); 405 result = usb_stor_port_reset(us);
407 return result < 0 ? FAILED : SUCCESS; 406 return result < 0 ? FAILED : SUCCESS;
408} 407}