[PATCH 6/6] Staging: android: Add parenthesis to macros with complex values in pmem.c

2012-01-20 Thread Kashyap Gada
diff --git a/drivers/staging/android/pmem.c b/drivers/staging/android/pmem.c index c589c0c..b685c18 100644 --- a/drivers/staging/android/pmem.c +++ b/drivers/staging/android/pmem.c @@ -38,17 +38,17 @@ * the file should not be released until put_pmem_file is called */ #define PMEM_FLAGS_BUSY 0x1

[PATCH 2/2] Staging: android: binder: Don't call dump_stack in binder_vma_open

2012-01-20 Thread Arve Hjønnevåg
If user-space partially unmaps the driver, binder_vma_open would dump the kernel stack. This is not a kernel bug however and will be treated as if the whole area was unmapped once binder_vma_close gets called. Signed-off-by: Arve Hjønnevåg --- drivers/staging/android/binder.c |1 - 1 files c

[PATCH 1/2] Staging: android: binder: Add some error checks

2012-01-20 Thread Arve Hjønnevåg
- Add a mutex to protect against two processes mmapping the same binder_proc. - After locking mmap_sem, check that the vma we want to access (still) points to the same mm_struct. - Use proc->tsk instead of current to get the files struct since this is where we get the rlimit from. Signed-off

[PATCH 5/5] Staging: android: Add KERN_ facility level in printk () in pmem.c

2012-01-20 Thread Kashyap Gada
diff --git a/drivers/staging/android/pmem.c b/drivers/staging/android/pmem.c index 65ba61a..c589c0c 100644 --- a/drivers/staging/android/pmem.c +++ b/drivers/staging/android/pmem.c @@ -831,7 +831,7 @@ static int pmem_connect(unsigned long connect, struct file *file) src_file = fget_light(c

[PATCH 4/4] Staging: android: Fix struct definitioni warning from static to const

2012-01-20 Thread Kashyap Gada
--- drivers/staging/android/ashmem.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/staging/android/ashmem.c b/drivers/staging/android/ashmem.c index 4a00174a5..9f1f27e 100644 --- a/drivers/staging/android/ashmem.c +++ b/drivers/staging/android/ashmem.c @@ -680,7

Re: [PATCH 2/2] Staging: android: Fix struct definition warning from static to const

2012-01-20 Thread Alan Cox
On Fri, 20 Jan 2012 21:33:17 + Kashyap Gada wrote: > diff --git a/drivers/staging/android/ashmem.c > b/drivers/staging/android/ashmem.c > index b4bc03e..4a00174a5 100644 > --- a/drivers/staging/android/ashmem.c > +++ b/drivers/staging/android/ashmem.c > @@ -680,7 +680,7 @@ static long ashmem

[PATCH 3/3] Staging: android: Fix brace coding style issue in pmem.c This is a patch to the pmem.c that fixes up two brace warnings found by checkpatch.pl tool

2012-01-20 Thread Kashyap Gada
diff --git a/drivers/staging/android/pmem.c b/drivers/staging/android/pmem.c index 7d97032..65ba61a 100644 --- a/drivers/staging/android/pmem.c +++ b/drivers/staging/android/pmem.c @@ -708,9 +708,8 @@ int get_pmem_addr(struct file *file, unsigned long *start, struct pmem_data *data;

Re: [PATCH 1/5] staging: zsmalloc: zsmalloc memory allocation library

2012-01-20 Thread Andrew Morton
On Mon, 9 Jan 2012 16:51:56 -0600 Seth Jennings wrote: > This patch creates a new memory allocation library named > zsmalloc. I haven't really begun to look at this yet. The code is using many fields of struct page in new ways. This is key information for anyone to effectively review the code

Re: [PATCH 0/5] staging: zsmalloc: memory allocator for compressed pages

2012-01-20 Thread Andrew Morton
On Mon, 9 Jan 2012 16:51:55 -0600 Seth Jennings wrote: > This patchset introduces a new memory allocation library named > zsmalloc. zsmalloc was designed to fulfill the needs > of users where: > 1) Memory is constrained, preventing contiguous page allocations > larger than order 0 and > 2

[PATCH 2/2] Staging: android: Fix struct definition warning from static to const

2012-01-20 Thread Kashyap Gada
diff --git a/drivers/staging/android/ashmem.c b/drivers/staging/android/ashmem.c index b4bc03e..4a00174a5 100644 --- a/drivers/staging/android/ashmem.c +++ b/drivers/staging/android/ashmem.c @@ -680,7 +680,7 @@ static long ashmem_ioctl(struct file *file, unsigned int cmd, unsigned long arg)

[PATCH] Staging: android: fix trailing whitespace issue in ashmem.c

2012-01-20 Thread Kashyap Gada
diff --git a/drivers/staging/android/ashmem.c b/drivers/staging/android/ashmem.c index 99052bf..b4bc03e 100644 --- a/drivers/staging/android/ashmem.c +++ b/drivers/staging/android/ashmem.c @@ -315,7 +315,7 @@ static int ashmem_mmap(struct file *file, struct vm_area_struct *vma) get_file(as

Re: [PATCH 1/6] staging:android_pmem.h: Fixes the space and other formating issues pointed out by checkpatch.pl

2012-01-20 Thread Joe Perches
On Fri, 2012-01-20 at 16:46 +0300, Dan Carpenter wrote: > On Fri, Jan 20, 2012 at 05:15:15AM -0800, Joe Perches wrote: > > @@ -2838,7 +2849,8 @@ > > if ($dstat ne '' && > > $dstat !~ /^(?:$Ident|-?$Constant),$/ && > > # 10, //

Re: [PATCH 1/6] staging:android_pmem.h: Fixes the space and other formating issues pointed out by checkpatch.pl

2012-01-20 Thread Andy Whitcroft
On Fri, Jan 20, 2012 at 05:29:04AM -0800, Joe Perches wrote: > On Fri, 2012-01-20 at 14:54 +0300, Dan Carpenter wrote: > > It still complains about the following macros where parenthesis are > > not needed. > > > > ERROR: Macros with complex values should be enclosed in parenthesis > > #156: FILE:

Re: [PATCH 1/6] staging:android_pmem.h: Fixes the space and other formating issues pointed out by checkpatch.pl

2012-01-20 Thread Dan Carpenter
On Fri, Jan 20, 2012 at 05:29:04AM -0800, Joe Perches wrote: > > #define PMEM_IS_FREE(id, index) (!(pmem[id].bitmap[index].allocated)) > > > > That has two pairs of unneeded paranthesis and we run the risk of > > reprogramming the kernel in lisp, by mistake. > > I think the outer parens are neces

Re: [PATCH 1/6] staging:android_pmem.h: Fixes the space and other formating issues pointed out by checkpatch.pl

2012-01-20 Thread Dan Carpenter
On Fri, Jan 20, 2012 at 05:15:15AM -0800, Joe Perches wrote: > @@ -2838,7 +2849,8 @@ > if ($dstat ne '' && > $dstat !~ /^(?:$Ident|-?$Constant),$/ && > # 10, // foo(), > $dstat !~ /^(?:$Ident|-?$Cons

Re: [PATCH 1/6] staging:android_pmem.h: Fixes the space and other formating issues pointed out by checkpatch.pl

2012-01-20 Thread Joe Perches
On Fri, 2012-01-20 at 14:54 +0300, Dan Carpenter wrote: > It still complains about the following macros where parenthesis are > not needed. > > ERROR: Macros with complex values should be enclosed in parenthesis > #156: FILE: staging/android/pmem.c:156: > +#define PMEM_IS_FREE(id, index) !(pmem[id

Re: [PATCH 1/6] staging:android_pmem.h: Fixes the space and other formating issues pointed out by checkpatch.pl

2012-01-20 Thread Joe Perches
On Fri, 2012-01-20 at 11:12 +, Andy Whitcroft wrote: > On Wed, Jan 18, 2012 at 6:54 PM, Dan Carpenter > wrote: > > On Wed, Jan 18, 2012 at 11:38:34PM +0530, Pradheep Shrinivasan wrote: > >>> > > -#define PMEM_IOCTL_MAGIC 'p' > >> > > +#define PMEM_IOCTL_MAGIC ('p') > >> > You don't need paren

Re: [PATCH 1/6] staging:android_pmem.h: Fixes the space and other formating issues pointed out by checkpatch.pl

2012-01-20 Thread Andy Whitcroft
On Fri, Jan 20, 2012 at 11:54 AM, Dan Carpenter wrote: > It still complains about the following macros where parenthesis are > not needed. > > ERROR: Macros with complex values should be enclosed in parenthesis > #156: FILE: staging/android/pmem.c:156: > +#define PMEM_IS_FREE(id, index) !(pmem[id]

Re: [PATCH 1/6] staging:android_pmem.h: Fixes the space and other formating issues pointed out by checkpatch.pl

2012-01-20 Thread Dan Carpenter
It still complains about the following macros where parenthesis are not needed. ERROR: Macros with complex values should be enclosed in parenthesis #156: FILE: staging/android/pmem.c:156: +#define PMEM_IS_FREE(id, index) !(pmem[id].bitmap[index].allocated) Let's just make the check look for an op

Re: [PATCH 1/6] staging:android_pmem.h: Fixes the space and other formating issues pointed out by checkpatch.pl

2012-01-20 Thread Andy Whitcroft
On Wed, Jan 18, 2012 at 6:54 PM, Dan Carpenter wrote: > On Wed, Jan 18, 2012 at 11:38:34PM +0530, Pradheep Shrinivasan wrote: >>> > > -#define PMEM_IOCTL_MAGIC 'p' >> > > +#define PMEM_IOCTL_MAGIC ('p') >> > >> > You don't need parenthesis here.  Did checkpatch really complain >> > about this? >>

Re: [PATCH 1/1] vme: code convention fix

2012-01-20 Thread Martyn Welch
On 20/01/12 09:11, Sam Hansen wrote: > Fixed a code convention violation in vme.h > > Signed-off-by: Sam Hansen Huh, wonder how that got missed when I ran checkpatch over these files. Good catch, Acked-by: Martyn Welch > --- > drivers/staging/vme/vme.h |2 +- > 1 files changed, 1 insert

[PATCH 1/1] vme: code convention fix

2012-01-20 Thread Sam Hansen
Fixed a code convention violation in vme.h Signed-off-by: Sam Hansen --- drivers/staging/vme/vme.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/staging/vme/vme.h b/drivers/staging/vme/vme.h index 9d38cee..c9d65bf 100644 --- a/drivers/staging/vme/vme.h +++ b/d