From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KnIrs-0002G2-VF for qemu-devel@nongnu.org; Tue, 07 Oct 2008 16:09:17 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KnIrr-0002FF-K4 for qemu-devel@nongnu.org; Tue, 07 Oct 2008 16:09:16 -0400 Received: from [199.232.76.173] (port=40567 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KnIrr-0002FA-9J for qemu-devel@nongnu.org; Tue, 07 Oct 2008 16:09:15 -0400 Received: from mail-gx0-f19.google.com ([209.85.217.19]:63187) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KnIrq-000190-Ox for qemu-devel@nongnu.org; Tue, 07 Oct 2008 16:09:15 -0400 Received: by gxk12 with SMTP id 12so7775217gxk.10 for ; Tue, 07 Oct 2008 13:09:13 -0700 (PDT) Message-ID: <48EBC1E6.7000602@codemonkey.ws> Date: Tue, 07 Oct 2008 15:09:10 -0500 From: Anthony Liguori MIME-Version: 1.0 References: <1220571341.2638.6.camel@hephaestion> <1220580385.2638.15.camel@hephaestion> <48C1346F.3000405@windriver.com> <1220640699.5470.15.camel@hephaestion> <48C1862C.3050307@windriver.com> <1220649226.9611.13.camel@hephaestion> <48C53B04.9030006@windriver.com> <1221679892.17792.6.camel@hephaestion> <48D16904.30104@codemonkey.ws> <1221691647.17792.55.camel@hephaestion> <48D81E26.9080802@codemonkey.ws> <1222133639.18297.13.camel@hephaestion> <1222896100.25554.3.camel@hephaestion> <1222903175.25554.28.camel@hephaestion> In-Reply-To: <1222903175.25554.28.camel@hephaestion> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH] Add USB sys file-system support (v8) Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: TJ Cc: qemu-devel@nongnu.org, kvm TJ wrote: > A bug crept into the version 7 patch whilst editing to help pass > checkpatch.pl tests. Inadvertently, in moving an assignment out of an > if() condition I replaced it with a test against the wrong variable. > This is the corrected patch. > ====== > Add USB sys file-system support > > This patch adds support for host USB devices discovered via: > > /sys/bus/usb/devices/* and opened from /dev/bus/usb/*/* > /dev/bus/usb/devices and opened from /dev/bus/usb/*/* > > in addition to the existing discovery via: > > /proc/bus/usb/devices and opened from /proc/bus/usb/*/* > > Signed-off-by: TJ > Applied. Thanks for keeping up with this patch. I'm very happy with how it turned out. One minor nit: > +static int usb_host_scan(void *opaque, USBScanFunc *func) > +{ > + FILE *f = 0; > + DIR *dir = 0; > + int ret = 0; > + const char *devices = "/devices"; > > + const char *opened = "husb: opened %s%s\n"; > When debug isn't enabled, these variables are unused and result in warnings (since they are only used in dprintf()). Could you follow up with a patch that either stuck these variables in an #ifdef or refactored the code to make these warnings disappear? Regards, Anthony Liguori