From patchwork Wed May 2 12:35:44 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 156445 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 21A86B6FBD for ; Wed, 2 May 2012 22:36:31 +1000 (EST) Received: from localhost ([::1]:58181 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SPYnE-0006A1-Pq for incoming@patchwork.ozlabs.org; Wed, 02 May 2012 08:36:28 -0400 Received: from eggs.gnu.org ([208.118.235.92]:36109) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SPYn2-00068j-5k for qemu-devel@nongnu.org; Wed, 02 May 2012 08:36:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SPYmx-000364-DS for qemu-devel@nongnu.org; Wed, 02 May 2012 08:36:15 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50150) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SPYmx-00035s-4r for qemu-devel@nongnu.org; Wed, 02 May 2012 08:36:11 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q42CZkmU003474 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 2 May 2012 08:35:46 -0400 Received: from rincewind.home.kraxel.org (ovpn-116-58.ams2.redhat.com [10.36.116.58]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q42CZiZC014740; Wed, 2 May 2012 08:35:45 -0400 Message-ID: <4FA12A20.1030000@redhat.com> Date: Wed, 02 May 2012 14:35:44 +0200 From: Gerd Hoffmann User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.4) Gecko/20120422 Thunderbird/10.0.4 MIME-Version: 1.0 To: Anthony Liguori References: <1335896294-9530-1-git-send-email-aliguori@us.ibm.com> <1335896294-9530-6-git-send-email-aliguori@us.ibm.com> <4FA02D1A.1090807@us.ibm.com> In-Reply-To: <4FA02D1A.1090807@us.ibm.com> X-Enigmail-Version: 1.4 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Cc: Wanpeng Li , Paolo Bonzini , Peter Maydell , qemu-devel@nongnu.org, Andreas Faerber Subject: Re: [Qemu-devel] [PATCH 05/14] qdev: use wrapper for qdev_get_path X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org On 05/01/12 20:36, Anthony Liguori wrote: > Hi Gerd, > > Could you carefully review the USB changes here? I'm not really sure > what our contract is with the guest in terms of ABI compatibility. I > think it's good but it could use a second set of eyes. incremental fix attached. cheers, Gerd From 8823f1f5491639119d267289610fcad6dd1a0872 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Wed, 2 May 2012 14:30:54 +0200 Subject: [PATCH] fixup Signed-off-by: Gerd Hoffmann --- hw/usb/desc.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/usb/desc.c b/hw/usb/desc.c index 64352c9..84ea9f2 100644 --- a/hw/usb/desc.c +++ b/hw/usb/desc.c @@ -433,13 +433,11 @@ void usb_desc_create_serial(USBDevice *dev) int index = desc->id.iSerialNumber; char serial[64]; int dst; - char *path = NULL; + char *path; assert(index != 0 && desc->str[index] != NULL); dst = snprintf(serial, sizeof(serial), "%s", desc->str[index]); - if (hcd->parent_bus && hcd->parent_bus->parent) { - path = qdev_get_dev_path(hcd->parent_bus->parent); - } + path = qdev_get_dev_path(hcd); if (path) { dst += snprintf(serial+dst, sizeof(serial)-dst, "-%s", path); }