From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:55794) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T4vBh-0006WG-8l for qemu-devel@nongnu.org; Fri, 24 Aug 2012 10:48:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T4vBd-0004GD-Uc for qemu-devel@nongnu.org; Fri, 24 Aug 2012 10:48:41 -0400 Received: from mail-ee0-f45.google.com ([74.125.83.45]:51941) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T4vBd-0004Fx-LM for qemu-devel@nongnu.org; Fri, 24 Aug 2012 10:48:37 -0400 Received: by eeke53 with SMTP id e53so766324eek.4 for ; Fri, 24 Aug 2012 07:48:36 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <50379442.2070004@redhat.com> Date: Fri, 24 Aug 2012 16:48:34 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1345801763-24227-1-git-send-email-qemulist@gmail.com> <1345801763-24227-9-git-send-email-qemulist@gmail.com> In-Reply-To: <1345801763-24227-9-git-send-email-qemulist@gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 08/10] qdev: rename qdev_unplug to qdev_unplug_req List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Liu Ping Fan Cc: Liu Ping Fan , qemu-devel@nongnu.org, Anthony Liguori , Avi Kivity Il 24/08/2012 11:49, Liu Ping Fan ha scritto: > From: Liu Ping Fan > > Unplug divides into two steps: request and complete > The name "req" show more clearly about its meaning But not enough. Let's make it "qdev_request_unplug", and change the method name in the DeviceClass too. > and as to the complete, it is qdev_delete_subtree() Completing unplug is just qdev_free after commit da5a44e (qom: object_delete should unparent the object first, 2012-08-22). > Also adding ret to indicate the request can be eject or not This is also given by the Error object. Returning the same thing twice is guaranteed to give bugs because the two get out of sync. Paolo > Signed-off-by: Liu Ping Fan