From: Ian Jackson Subject: Re: [PATCH v10 02/19] libxl: change ao_device_remove to ao_device Date: Fri, 20 Jul 2012 17:35:58 +0100 Message-ID: <20489.35054.634761.547760@mariner.uk.xensource.com> References: <1342793548-10239-1-git-send-email-roger.pau@citrix.com> <1342793548-10239-3-git-send-email-roger.pau@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1342793548-10239-3-git-send-email-roger.pau@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Roger Pau Monne Cc: "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org Roger Pau Monne writes ("[PATCH v10 02/19] libxl: change ao_device_remove to ao_device"): > Introduce a new structure to track state of device backends, that will > be used in following patches on this series. > > This structure if used for both device creation and device > destruction and removes libxl__ao_device_remove. Thanks. Acked-by: Ian Jackson > +static void device_qemu_timeout(libxl__egc *egc, libxl__ev_time *ev, > + const struct timeval *requested_abs) > +{ > + libxl__ao_device *aodev = CONTAINER_OF(ev, *aodev, timeout); > + STATE_AO_GC(aodev->ao); > + char *be_path = libxl__device_backend_path(gc, aodev->dev); > + char *state_path = GCSPRINTF("%s/state", be_path); > + int rc = 0; > + > + libxl__ev_time_deregister(gc, &aodev->timeout); This last call is unnecessary, but harmless. A timeout is already deregistered when the event system calls the handler. Ian.