From: NAHieu Subject: Re: USB virt 2.6 split driver patch series Date: Tue, 22 Nov 2005 11:00:23 +0900 Message-ID: <5d7aca950511211800j9799a2dy3186ef4133213417@mail.gmail.com> References: <1132579104.31295.110.camel@localhost.localdomain> <20051121134940.GA25045@snarc.org> <1132581661.31295.134.camel@localhost.localdomain> <5d7aca950511210641n23d79fduc2e462c3dcd07810@mail.gmail.com> <1132586050.31295.145.camel@localhost.localdomain> <5d7aca950511210727i741148efl71f025577680d994@mail.gmail.com> <1132587554.31295.154.camel@localhost.localdomain> <5d7aca950511210902j5002bbfdxe52b1a32517d6c8b@mail.gmail.com> <1132593451.31295.171.camel@localhost.localdomain> <5d7aca950511211759i63ed353al8f95ea411bbd49ff@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <5d7aca950511211759i63ed353al8f95ea411bbd49ff@mail.gmail.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: harry Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On 11/22/05, NAHieu wrote: > I had a look at xenidc code, and found some code like this: > > -- > static void xenidc_endpoint_destroy_1(xenidc_callback * callback) > { > trace(); > > { > xenidc_endpoint_callback *endpoint_callback =3D > container_of(callback, xenidc_endpoint_callback, call= back); > > endpoint_callback->destroyed =3D 1; > > xenidc_work_wake_up(); > } > } > -- > > Why name it *destroy_1? it is a common practice to name a local > function with _ or __ as prefix. So for example > xenidc_endpoint_destroy_1() should be named > _xenidc_endpoint_destroy_1() or __xenidc_endpoint_destroy_1() > Oops, typo. I meant _xenidc_endpoint_destroy_1() should be named _xenidc_endpoint_destroy() or __xenidc_endpoint_destroy()