From: NAHieu Subject: Re: USB virt 2.6 split driver patch series Date: Mon, 21 Nov 2005 23:41:10 +0900 Message-ID: <5d7aca950511210641n23d79fduc2e462c3dcd07810@mail.gmail.com> References: <1132579104.31295.110.camel@localhost.localdomain> <20051121134940.GA25045@snarc.org> <1132581661.31295.134.camel@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <1132581661.31295.134.camel@localhost.localdomain> 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, Vincent Hanquez List-Id: xen-devel@lists.xenproject.org On 11/21/05, harry wrote: > On Mon, 2005-11-21 at 14:49 +0100, Vincent Hanquez wrote: > > On Mon, Nov 21, 2005 at 01:18:24PM +0000, harry wrote: > > > o - I've reformatted all the code to the kernel coding style using > > > Lindent and not attempted to improve it after that. Some of the > > > formatting needs to be improved. > > > > some ? this is totally _not_ linux kernel coding style. > > please have a look at Documentation/CodingStyle and kill anonymous > > inline functions (braces in middle of functions). > > > > I have read Documentation/CodingStyle quite carefully and there is no > mention of using braces inside functions. I'm used to using braces to > define minimal scopes for local variables which makes the code easier to > read by minimising the number of variables you need to keep track of > when reading it and by declaring variables closer to where they are used > so it is easier to verify that they have been correctly initialised. > > Is this really banned? > I guess people complain because this is not a common practice. At least I never seen any code like that in the kernel. You could remove them because your functions are pretty short, and it easy enough to follow the code even if you put all the variables at the top of functions. Hieu