From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45765) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XqFld-00059H-2s for qemu-devel@nongnu.org; Mon, 17 Nov 2014 01:26:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XqFlW-00025u-Tc for qemu-devel@nongnu.org; Mon, 17 Nov 2014 01:26:29 -0500 Received: from szxga02-in.huawei.com ([119.145.14.65]:39648) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XqFlV-0001tp-GH for qemu-devel@nongnu.org; Mon, 17 Nov 2014 01:26:22 -0500 Message-ID: <546994F3.5060307@huawei.com> Date: Mon, 17 Nov 2014 14:25:55 +0800 From: Gonglei MIME-Version: 1.0 References: <1416203375-8185-1-git-send-email-junmuzi@gmail.com> In-Reply-To: <1416203375-8185-1-git-send-email-junmuzi@gmail.com> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] usb: delete error_report() for usb-bot List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jun Li Cc: juli@redhat.com, famz@redhat.com, qemu-devel@nongnu.org, kraxel@redhat.com 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 > --- > 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);