[PATCH] staging: lustre: fix sparse warnings related to lock context imbalance

2014-11-26 Thread Loic Pefferkorn
ustre/ptlrpc/../../lustre/ldlm/l_lock.c:57:17: warning: context imbalance in 'lock_res_and_lock' - wrong count at exit drivers/staging/lustre/lustre/libcfs/libcfs_lock.c:93:1: warning: context imbalance in 'cfs_percpt_lock' - wrong count at exit Signed-off-by: Loic Pefferkorn

[PATCH] staging: goldfish: Fix minor coding style

2014-12-13 Thread Loic Pefferkorn
Hello, The convention for checking for NULL pointers is !ptr and not ptr == NULL. This patch fixes such occurences in goldfish driver, it applies against next-20141212 Signed-off-by: Loic Pefferkorn --- drivers/staging/goldfish/goldfish_audio.c | 8 drivers/staging/goldfish

Re: [PATCH] staging: goldfish: Fix minor coding style

2014-12-13 Thread Loic Pefferkorn
> Whose convention is this? I can't find any mention in > Documention/CodingStyle. checkpatch.pl doesn't complain about them. > And there are almost three thousand examples in staging which don't > use this convention. > > linux-next$ grep -r "== NULL" drivers/staging/* | wc -l > 2844 Hi Jer

Re: [PATCH] staging: goldfish: Fix minor coding style

2014-12-13 Thread Loic Pefferkorn
On Sat, Dec 13, 2014 at 07:07:05PM +, One Thousand Gnomes wrote: > > Pointless churn. It makes it less readable if anything, and it removes > the type safety as you are now checking against 0 not (void *)0 > > NAK > > Alan The type safety is an interesting point I was not aware of. Just in

Re: staging: goldfish: Fix minor coding style

2014-12-15 Thread Loic Pefferkorn
On Mon, Dec 15, 2014 at 11:51:47AM +, One Thousand Gnomes wrote: > > Depends what you feel confident tackling. An interesting but > challenging one to look at as a newcomer might be > > https://bugzilla.kernel.org/show_bug.cgi?id=87951 > > because it provides you with an example .iso file yo

[PATCH v2] staging: lustre: fix sparse warnings related to lock context imbalance

2015-01-20 Thread Loic Pefferkorn
tre//lustre/obdclass/cl_object.c:204:6: warning: context imbalance in 'cl_object_attr_unlock' - unexpected unlock Signed-off-by: Loic Pefferkorn --- drivers/staging/lustre/lustre/libcfs/hash.c | 4 drivers/staging/lustre/lustre/libcfs/linux/linux-tracefile.c | 2 ++ drivers

[PATCH 6/6] staging: goldfish: avoid multiple assignments

2014-09-03 Thread Loic Pefferkorn
Coding style: avoid multiple assignments Signed-off-by: Loic Pefferkorn --- drivers/staging/goldfish/goldfish_nand.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/goldfish/goldfish_nand.c b/drivers/staging/goldfish/goldfish_nand.c index f177911..17cd439

[PATCH 4/6] staging: goldfish: fix alignment to match open parenthesis

2014-09-03 Thread Loic Pefferkorn
Coding style: fix alignment to match open parenthesis Signed-off-by: Loic Pefferkorn --- drivers/staging/goldfish/goldfish_audio.c | 21 +- drivers/staging/goldfish/goldfish_nand.c | 36 +++ 2 files changed, 28 insertions(+), 29 deletions(-) diff

[PATCH 2/6] staging: goldfish: remove useless space after a cast

2014-09-03 Thread Loic Pefferkorn
Coding style: remove useless space after a cast Signed-off-by: Loic Pefferkorn --- drivers/staging/goldfish/goldfish_nand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/goldfish/goldfish_nand.c b/drivers/staging/goldfish/goldfish_nand.c index 092604c

[PATCH 1/6] staging: goldfish: suppress consecutive blank lines

2014-09-03 Thread Loic Pefferkorn
Coding style: suppress consecutive blank lines Signed-off-by: Loic Pefferkorn --- drivers/staging/goldfish/goldfish_audio.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/goldfish/goldfish_audio.c b/drivers/staging/goldfish/goldfish_audio.c index c89d0b8..23a206d 100644

[PATCH 5/6] staging: goldfish: document mutex usage

2014-09-03 Thread Loic Pefferkorn
Coding style: document mutex usage Signed-off-by: Loic Pefferkorn --- drivers/staging/goldfish/goldfish_nand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/goldfish/goldfish_nand.c b/drivers/staging/goldfish/goldfish_nand.c index 3f13ef0..f177911 100644

[PATCH 3/6] staging: goldfish: document spinlock usage

2014-09-03 Thread Loic Pefferkorn
Coding style: document spinlock usage Signed-off-by: Loic Pefferkorn --- drivers/staging/goldfish/goldfish_audio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/goldfish/goldfish_audio.c b/drivers/staging/goldfish/goldfish_audio.c index 23a206d..ab723ab

[PATCH 0/6] staging: goldfish: fix coding style warnings

2014-09-03 Thread Loic Pefferkorn
truct mutex definition without comment Loic Pefferkorn (6): staging: goldfish: suppress consecutive blank lines staging: goldfish: remove useless space after a cast staging: goldfish: document spinlock usage staging: goldfish: fix alignment to match open parenthesis staging: goldfish: doc

Re: [PATCH 3/6] staging: goldfish: document spinlock usage

2014-09-03 Thread Loic Pefferkorn
On Wed, Sep 03, 2014 at 01:13:19PM +0100, One Thousand Gnomes wrote: > > This tells the reader nothing. It's good to document locking models but > > - you lock data not code (which is a detail a lot of programmers get wrong > in th design stage too) > - you need to documen

[PATCH v2 3/6] staging: goldfish: document spinlock usage

2014-09-03 Thread Loic Pefferkorn
Coding style: document spinlock usage Signed-off-by: Loic Pefferkorn --- drivers/staging/goldfish/goldfish_audio.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/goldfish/goldfish_audio.c b/drivers/staging/goldfish/goldfish_audio.c index 23a206d..b360d07 100644 --- a

[PATCH v2 0/6] staging: goldfish: fix coding style

2014-09-03 Thread Loic Pefferkorn
ition without comment -CHECK: multiple assignments should be avoided v2 changes: -document more specifically the usage of mutex and spinlock Loic Pefferkorn (6): staging: goldfish: suppress consecutive blank lines staging: goldfish: remove useless space after a cast staging: goldfish: doc

[PATCH v2 4/6] staging: goldfish: fix alignment to match open parenthesis

2014-09-03 Thread Loic Pefferkorn
Coding style: fix alignment to match open parenthesis Signed-off-by: Loic Pefferkorn --- drivers/staging/goldfish/goldfish_audio.c | 21 +- drivers/staging/goldfish/goldfish_nand.c | 36 +++ 2 files changed, 28 insertions(+), 29 deletions(-) diff

[PATCH v2 2/6] staging: goldfish: remove useless space after a cast

2014-09-03 Thread Loic Pefferkorn
Coding style: remove useless space after a cast Signed-off-by: Loic Pefferkorn --- drivers/staging/goldfish/goldfish_nand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/goldfish/goldfish_nand.c b/drivers/staging/goldfish/goldfish_nand.c index 092604c

[PATCH v2 5/6] staging: goldfish: document mutex usage

2014-09-03 Thread Loic Pefferkorn
Coding style: document mutex usage Signed-off-by: Loic Pefferkorn --- drivers/staging/goldfish/goldfish_nand.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/goldfish/goldfish_nand.c b/drivers/staging/goldfish/goldfish_nand.c index 3f13ef0..c6c85d3 100644 --- a/drivers

[PATCH v2 6/6] staging: goldfish: avoid multiple assignments

2014-09-03 Thread Loic Pefferkorn
Coding style: avoid multiple assignments Signed-off-by: Loic Pefferkorn --- drivers/staging/goldfish/goldfish_nand.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/goldfish/goldfish_nand.c b/drivers/staging/goldfish/goldfish_nand.c index c6c85d3..d68f216

[PATCH v2 1/6] staging: goldfish: suppress consecutive blank lines

2014-09-03 Thread Loic Pefferkorn
Coding style: suppress consecutive blank lines Signed-off-by: Loic Pefferkorn --- drivers/staging/goldfish/goldfish_audio.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/goldfish/goldfish_audio.c b/drivers/staging/goldfish/goldfish_audio.c index c89d0b8..23a206d 100644