From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:41700) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ri3BU-0001de-27 for qemu-devel@nongnu.org; Tue, 03 Jan 2012 07:09:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ri3BS-00007M-UM for qemu-devel@nongnu.org; Tue, 03 Jan 2012 07:09:40 -0500 MIME-Version: 1.0 In-Reply-To: <4F02EDBA.8090808@redhat.com> References: <1325527237-24146-1-git-send-email-pbonzini@redhat.com> <1325527237-24146-2-git-send-email-pbonzini@redhat.com> <20120103115448.GB28826@stefanha-thinkpad.localdomain> <4F02EDBA.8090808@redhat.com> Date: Tue, 3 Jan 2012 12:09:37 +0000 Message-ID: From: Stefan Hajnoczi Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 1/8] notifier: switch to QLIST List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-trivial@nongnu.org, qemu-devel@nongnu.org On Tue, Jan 3, 2012 at 11:59 AM, Paolo Bonzini wrote: > On 01/03/2012 12:54 PM, Stefan Hajnoczi wrote: >> >> On Mon, Jan 02, 2012 at 07:00:30PM +0100, Paolo Bonzini wrote: >>> >>> =A0void notifier_list_add(NotifierList *list, Notifier *notifier) >>> =A0{ >>> - =A0 =A0QTAILQ_INSERT_HEAD(&list->notifiers, notifier, node); >>> + =A0 =A0QLIST_INSERT_HEAD(&list->notifiers, notifier, node); >>> =A0} >>> >>> -void notifier_list_remove(NotifierList *list, Notifier *notifier) >>> +void notifier_remove(Notifier *notifier) >> >> >> Why introduce this asymmetry with notifier_list_add() and >> notifier_remove()? =A0Please make the function names consistent. > > > Because notifier_list_add adds the notifier to a specific NotifierList; > notifier_remove removes the notifier from whatever list it is in. > > Normally whoever implements notifiers does not have access to the > NotifierList, so there are wrappers for both notifier_list_add and > notifier_list_remove. =A0This patch changes things so that the wrappers f= or > notifier_remove are not needed anymore (though this series was already bi= g > enough, so I left the wrappers in). I see. Stefan