All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] usb: delete error_report() for usb-bot
@ 2014-11-17  5:49 Jun Li
  2014-11-17  6:25 ` Gonglei
  0 siblings, 1 reply; 2+ messages in thread
From: Jun Li @ 2014-11-17  5:49 UTC (permalink / raw)
  To: qemu-devel; +Cc: famz, juli, kraxel, Jun Li

When no device under usb-bot bus, usb_msd_handle_data() will print "usb-msd: Bad
LUN 0". This is not correct hints. So delete error_report here. When
scsi_device_find() return NULL, just goto fail.

This patch fixes following bug.
https://bugzilla.redhat.com/show_bug.cgi?id=1164665

Signed-off-by: Jun Li <junmuzi@gmail.com>
---
 hw/usb/dev-storage.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/hw/usb/dev-storage.c b/hw/usb/dev-storage.c
index 4539733..f386d62 100644
--- a/hw/usb/dev-storage.c
+++ b/hw/usb/dev-storage.c
@@ -424,7 +424,6 @@ static void usb_msd_handle_data(USBDevice *dev, USBPacket *p)
             DPRINTF("Command on LUN %d\n", cbw.lun);
             scsi_dev = scsi_device_find(&s->bus, 0, 0, cbw.lun);
             if (scsi_dev == NULL) {
-                error_report("usb-msd: Bad LUN %d", cbw.lun);
                 goto fail;
             }
             tag = le32_to_cpu(cbw.tag);
-- 
1.9.3

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [PATCH] usb: delete error_report() for usb-bot
  2014-11-17  5:49 [Qemu-devel] [PATCH] usb: delete error_report() for usb-bot Jun Li
@ 2014-11-17  6:25 ` Gonglei
  0 siblings, 0 replies; 2+ messages in thread
From: Gonglei @ 2014-11-17  6:25 UTC (permalink / raw)
  To: Jun Li; +Cc: juli, famz, qemu-devel, kraxel

On 2014/11/17 13:49, Jun Li wrote:

> When no device under usb-bot bus, usb_msd_handle_data() will print "usb-msd: Bad
> LUN 0". This is not correct hints. So delete error_report here. When
> scsi_device_find() return NULL, just goto fail.
> 

If the hints is incorrect, I think you should change the hint message, but not delete it,
because that's a recession.

Best regards,
-Gonglei

> This patch fixes following bug.
> https://bugzilla.redhat.com/show_bug.cgi?id=1164665
> 
> Signed-off-by: Jun Li <junmuzi@gmail.com>
> ---
>  hw/usb/dev-storage.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/hw/usb/dev-storage.c b/hw/usb/dev-storage.c
> index 4539733..f386d62 100644
> --- a/hw/usb/dev-storage.c
> +++ b/hw/usb/dev-storage.c
> @@ -424,7 +424,6 @@ static void usb_msd_handle_data(USBDevice *dev, USBPacket *p)
>              DPRINTF("Command on LUN %d\n", cbw.lun);
>              scsi_dev = scsi_device_find(&s->bus, 0, 0, cbw.lun);
>              if (scsi_dev == NULL) {
> -                error_report("usb-msd: Bad LUN %d", cbw.lun);
>                  goto fail;
>              }
>              tag = le32_to_cpu(cbw.tag);

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-11-17  6:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-17  5:49 [Qemu-devel] [PATCH] usb: delete error_report() for usb-bot Jun Li
2014-11-17  6:25 ` Gonglei

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.