From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: [PATCH] Add USB sys file-system support (v8) Date: Tue, 07 Oct 2008 15:09:10 -0500 Message-ID: <48EBC1E6.7000602@codemonkey.ws> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: qemu-devel@nongnu.org, kvm To: TJ Return-path: Received: from mail-gx0-f16.google.com ([209.85.217.16]:62301 "EHLO mail-gx0-f16.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754129AbYJGUJP (ORCPT ); Tue, 7 Oct 2008 16:09:15 -0400 Received: by gxk9 with SMTP id 9so7170948gxk.13 for ; Tue, 07 Oct 2008 13:09:13 -0700 (PDT) In-Reply-To: <1222903175.25554.28.camel@hephaestion> Sender: kvm-owner@vger.kernel.org List-ID: 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