From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=42017 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PIgeG-0001wa-Mj for qemu-devel@nongnu.org; Wed, 17 Nov 2010 06:58:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PIgeF-0006o6-K7 for qemu-devel@nongnu.org; Wed, 17 Nov 2010 06:58:00 -0500 Received: from mail-qy0-f173.google.com ([209.85.216.173]:65454) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PIgeF-0006nx-HJ for qemu-devel@nongnu.org; Wed, 17 Nov 2010 06:57:59 -0500 Received: by qyl33 with SMTP id 33so6513288qyl.4 for ; Wed, 17 Nov 2010 03:57:58 -0800 (PST) Sender: Paolo Bonzini Message-ID: <4CE3C341.9040903@redhat.com> Date: Wed, 17 Nov 2010 12:57:53 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <61e9609833bd34a1e1766d7b7b9faae6a86503cb.1289969012.git.yamahata@valinux.co.jp> In-Reply-To: <61e9609833bd34a1e1766d7b7b9faae6a86503cb.1289969012.git.yamahata@valinux.co.jp> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH 1/7] qbus: add functions to walk both devices and busses List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Isaku Yamahata Cc: skandasa@cisco.com, Anthony Liguori , etmartin@cisco.com, wexu2@cisco.com, mst@redhat.com, qemu-devel@nongnu.org On 11/17/2010 05:50 AM, Isaku Yamahata wrote: > +/* Returns 0 to walk children,> 0 to terminate walk,< 0 to skip walk. */ Shouldn't this be the other way round according to the code (< 0 to terminate, > 0 to skip children)? > +/* Returns > 0 if either devfn or busfn terminate walk, 0 otherwise. */ This should be "returns != 0". It can return a value > 0 if the toplevel callback asks to skip the children, < 0 if any callback (including the toplevel) asks to terminate the walk, 0 otherwise. Paolo