Re: [vmw_vmci 11/11] Apply the header code to make VMCI build

2012-08-15 Thread Jan Engelhardt
On Thursday 2012-08-02 22:22, Sam Ravnborg wrote: >> On Friday 2012-07-27 12:34, Sam Ravnborg wrote: >> >> +#ifndef _VMCI_COMMONINT_H_ >> >> +#define _VMCI_COMMONINT_H_ >> >> + >> >> +#include >> >> +#include >> > >> >Use inverse chrismas tree here. >> >Longer include lines first, and soret alph

Re: [vmw_vmci 11/11] Apply the header code to make VMCI build

2012-08-02 Thread Sam Ravnborg
On Thu, Aug 02, 2012 at 09:50:02PM +0200, Jan Engelhardt wrote: > > On Friday 2012-07-27 12:34, Sam Ravnborg wrote: > >> +#ifndef _VMCI_COMMONINT_H_ > >> +#define _VMCI_COMMONINT_H_ > >> + > >> +#include > >> +#include > > > >Use inverse chrismas tree here. > >Longer include lines first, and sor

Re: [vmw_vmci 11/11] Apply the header code to make VMCI build

2012-08-02 Thread Jan Engelhardt
On Friday 2012-07-27 12:34, Sam Ravnborg wrote: >> +#ifndef _VMCI_COMMONINT_H_ >> +#define _VMCI_COMMONINT_H_ >> + >> +#include >> +#include > >Use inverse chrismas tree here. >Longer include lines first, and soret alphabetically when >lines are of the same length. So that's where unreadable in

Re: [vmw_vmci 11/11] Apply the header code to make VMCI build

2012-07-27 Thread Andrew Stiegmann
; Sent: Friday, July 27, 2012 12:53:20 PM > Subject: Re: [vmw_vmci 11/11] Apply the header code to make VMCI build > > > > > + > > > > +#define CAN_BLOCK(_f) (!((_f) & VMCI_QPFLAG_NONBLOCK)) > > > > +#define QP_PINNED(_f) ((_f) & VMCI_QPFLAG_PIN

Re: [vmw_vmci 11/11] Apply the header code to make VMCI build

2012-07-27 Thread Sam Ravnborg
> > > + > > > +#define CAN_BLOCK(_f) (!((_f) & VMCI_QPFLAG_NONBLOCK)) > > > +#define QP_PINNED(_f) ((_f) & VMCI_QPFLAG_PINNED) > > > > Looks like poor obscufation. > > Use a statis inline function if you need a helper for this. > > These definitions are intended more as a helper to make reading t

Re: [vmw_vmci 11/11] Apply the header code to make VMCI build

2012-07-27 Thread Greg KH
ists.linux-foundation.org, > > pv-driv...@vmware.com, vm-crosst...@vmware.com, csch...@vmware.com > > Sent: Friday, July 27, 2012 11:16:39 AM > > Subject: Re: [vmw_vmci 11/11] Apply the header code to make VMCI build > > > > On Fri, Jul 27, 2012 at 10:20:43AM -0700, Andrew S

Re: [vmw_vmci 11/11] Apply the header code to make VMCI build

2012-07-27 Thread Andrew Stiegmann
ent: Friday, July 27, 2012 11:16:39 AM > Subject: Re: [vmw_vmci 11/11] Apply the header code to make VMCI build > > On Fri, Jul 27, 2012 at 10:20:43AM -0700, Andrew Stiegmann wrote: > > > The kernel style is to use lower_case for everything. > > > So this would become: >

Re: [vmw_vmci 11/11] Apply the header code to make VMCI build

2012-07-27 Thread Greg KH
On Fri, Jul 27, 2012 at 10:20:43AM -0700, Andrew Stiegmann wrote: > > The kernel style is to use lower_case for everything. > > So this would become: > > > > vmci_device_get() > > > > This is obviously a very general comment and applies everywhere. > > I wish I could lower case these symbols

Re: [vmw_vmci 11/11] Apply the header code to make VMCI build

2012-07-27 Thread Andrew Stiegmann
ndation.org > Sent: Friday, July 27, 2012 3:34:55 AM > Subject: Re: [vmw_vmci 11/11] Apply the header code to make VMCI build > > Hi Andrew. > > A few things noted in the following.. > > > > > diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig > &

Re: [vmw_vmci 11/11] Apply the header code to make VMCI build

2012-07-27 Thread Sam Ravnborg
Hi Andrew. A few things noted in the following.. > > diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig > index 2661f6e..fe38c7a 100644 > --- a/drivers/misc/Kconfig > +++ b/drivers/misc/Kconfig > @@ -517,4 +517,5 @@ source "drivers/misc/lis3lv02d/Kconfig" > source "drivers/misc/carma/Kcon

Re: [vmw_vmci 11/11] Apply the header code to make VMCI build

2012-07-27 Thread Alan Cox
> +enum { > + VMCI_SUCCESS_QUEUEPAIR_ATTACH = 5, > + VMCI_SUCCESS_QUEUEPAIR_CREATE = 4, > + VMCI_SUCCESS_LAST_DETACH= 3, > + VMCI_SUCCESS_ACCESS_GRANTED = 2, > + VMCI_SUCCESS_ENTRY_DEAD = 1, We've got a nice collection of Linux error codes than you, and it

Re: [vmw_vmci 11/11] Apply the header code to make VMCI build

2012-07-26 Thread Greg KH
On Thu, Jul 26, 2012 at 04:39:40PM -0700, Andrew Stiegmann (stieg) wrote: > +#define ASSERT(cond) BUG_ON(!(cond)) Don't do that, you just crashed someone's box and now they have no way to recover it and tell you that you broke it. > +#define CAN_BLOCK(_f) (!((_f) & VMCI_QPFLAG_NONBLOCK)) > +#defi