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

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 linux/printk.h +#include linux/vmw_vmci_defs.h Use inverse chrismas tree here. Longer include lines first, and soret

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

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

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 linux/printk.h +#include linux/vmw_vmci_defs.h Use inverse chrismas tree here. Longer include lines first, and soret alphabetically when lines are of the same length. So

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 linux/printk.h +#include linux/vmw_vmci_defs.h Use inverse chrismas tree here. Longer include lines

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

2012-07-28 Thread Dmitry Torokhov
On Sat, Jul 28, 2012 at 12:55:35PM -0700, Greg KH wrote: > On Fri, Jul 27, 2012 at 01:29:27PM -0700, Dmitry Torokhov wrote: > > On Fri, Jul 27, 2012 at 11:16:39AM -0700, Greg KH wrote: > > > On Fri, Jul 27, 2012 at 10:20:43AM -0700, Andrew Stiegmann wrote: > > > > > The kernel style is to use

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

2012-07-28 Thread Greg KH
On Fri, Jul 27, 2012 at 01:29:27PM -0700, Dmitry Torokhov wrote: > On Fri, Jul 27, 2012 at 11:16:39AM -0700, Greg KH wrote: > > 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: [Pv-drivers] [vmw_vmci 11/11] Apply the header code to make VMCI build

2012-07-28 Thread Greg KH
On Fri, Jul 27, 2012 at 01:29:27PM -0700, Dmitry Torokhov wrote: On Fri, Jul 27, 2012 at 11:16:39AM -0700, Greg KH wrote: 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: [Pv-drivers] [vmw_vmci 11/11] Apply the header code to make VMCI build

2012-07-28 Thread Dmitry Torokhov
On Sat, Jul 28, 2012 at 12:55:35PM -0700, Greg KH wrote: On Fri, Jul 27, 2012 at 01:29:27PM -0700, Dmitry Torokhov wrote: On Fri, Jul 27, 2012 at 11:16:39AM -0700, Greg KH wrote: On Fri, Jul 27, 2012 at 10:20:43AM -0700, Andrew Stiegmann wrote: The kernel style is to use lower_case for

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

2012-07-27 Thread Dmitry Torokhov
On Fri, Jul 27, 2012 at 11:16:39AM -0700, Greg KH wrote: > 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

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

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, And

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

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

2012-07-27 Thread Dmitry Torokhov
Hi Alan, On Fri, Jul 27, 2012 at 10:53:57AM +0100, Alan Cox wrote: > > +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 =

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

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-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 would

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/Kconfig

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

2012-07-27 Thread Andrew Stiegmann
...@linuxfoundation.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 index 2661f6e..fe38c7a 100644 --- a/drivers/misc/Kconfig

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

2012-07-27 Thread Dmitry Torokhov
Hi Alan, On Fri, Jul 27, 2012 at 10:53:57AM +0100, Alan Cox wrote: +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

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 but VMCI has

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

2012-07-27 Thread Andrew Stiegmann
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 Stiegmann wrote: The kernel style is to use lower_case for everything. So this would become: vmci_device_get

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

2012-07-27 Thread Greg KH
-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 Stiegmann wrote: The kernel style is to use lower_case

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 the code easier.

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

2012-07-27 Thread Andrew Stiegmann
: 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_PINNED) Looks like poor obscufation. Use a statis inline function if you

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

2012-07-27 Thread Dmitry Torokhov
On Fri, Jul 27, 2012 at 11:16:39AM -0700, Greg KH wrote: 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

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)) >

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

2012-07-26 Thread Andrew Stiegmann (stieg)
Adds all the necessary files to enable building of the VMCI module with the Linux Makefiles and Kconfig systems. Also adds the header files used for building modules against the driver. Signed-off-by: Andrew Stiegmann (stieg) --- drivers/misc/Kconfig|1 +

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

2012-07-26 Thread Andrew Stiegmann (stieg)
Adds all the necessary files to enable building of the VMCI module with the Linux Makefiles and Kconfig systems. Also adds the header files used for building modules against the driver. Signed-off-by: Andrew Stiegmann (stieg) astiegm...@vmware.com --- drivers/misc/Kconfig|

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)) +#define