From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46942) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZyezD-0007z9-Ar for qemu-devel@nongnu.org; Tue, 17 Nov 2015 07:03:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zyez8-0006PG-BM for qemu-devel@nongnu.org; Tue, 17 Nov 2015 07:03:47 -0500 Received: from mx1.redhat.com ([209.132.183.28]:34980) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zyez8-0006P4-6I for qemu-devel@nongnu.org; Tue, 17 Nov 2015 07:03:42 -0500 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 (Postfix) with ESMTPS id 74D9646264 for ; Tue, 17 Nov 2015 12:03:41 +0000 (UTC) Message-ID: <1447761819.23726.74.camel@redhat.com> From: Gerd Hoffmann Date: Tue, 17 Nov 2015 13:03:39 +0100 In-Reply-To: <1447718794-19812-4-git-send-email-bsd@redhat.com> References: <1447718794-19812-1-git-send-email-bsd@redhat.com> <1447718794-19812-4-git-send-email-bsd@redhat.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v3 3/4] usb-mtp: Add support for inotify based file monitoring List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Bandan Das Cc: qemu-devel@nongnu.org Hi, > +#ifndef __linux__ > + return 1; > +#endif Hmm? Shouldn't the stubs avoid these kinds of #ifdefs? > - QLIST_FOREACH(iter, &o->children, list) { > + QLIST_FOREACH_SAFE(iter, &o->children, list, next) { > handles[i++] = iter->handle; > } No need for SAFE here, you don't change the list. > + if (usb_mtp_inotify_init(s)) { > + fprintf(stderr, "usb-mtp: file monitoring init failed\n"); > + } I guess we want a function/macro here for linux/non-linux, then report errors on linux only. Reporting inotify failures on systems which don't support inotify in the first place is just noise ... cheers, Gerd