[PATCH] staging: lustre: remove memset(0) after LIBCFS_ALLOC

2014-06-14 Thread Vitaly Osipov
Joe Perches mentioned on driverdev-devel that memset after LIBCFS_ALLOC is not necessary as it is already done during LIBCFS_ALLOC_POST. This commit removes these unnecessary memsets. Based on the results of running a cocci patch along the lines of: @@ expression E1, E2; @@ LIBCFS_ALLOC (E1,E2);

[PATCH 1/2] staging: rtl8712: replace kmalloc(..., sizeof(T))

2014-06-14 Thread Vitaly Osipov
As suggested by Andy Shevchenko on driverdev-devel, replace v = ... sizeof(struct type_of_v) -> sizeof(*v) Based on a cocci patch along the lines of @@ type T; expression E; identifier V; @@ T *V; ... - V = kmalloc(sizeof(T), E); + V = kmalloc(sizeof(*V), E); @@ type T; expression E; identifier

[PATCH 2/2] staging: rtl8712: use kcalloc instead of kmalloc(x*y, ...)

2014-06-14 Thread Vitaly Osipov
Replaced kmalloc(x*y, ...) with kcalloc(x,y,...) Signed-off-by: Vitaly Osipov --- drivers/staging/rtl8712/rtl871x_mlme.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/rtl8712/rtl871x_mlme.c b/drivers/staging/rtl8712/rtl871x_mlme.c index 26b8f37..8561841 1

Re: [PATCH 2/2] staging: tidspbridge: Fix function pointer spacing in struct definition

2014-06-14 Thread Jeff Oczek
On Fri, Jun 13, 2014 at 08:31:40PM -0700, Joe Perches wrote: > On Fri, 2014-06-13 at 22:48 -0400, Jeff Oczek wrote: > > -s32(*fread) (void *, size_t, size_t, void *); > > -s32(*fseek) (void *, long, int); > > -s32(*ftell) (void *); > > -s32(*fclose) (void *); > > - void *(*fopen)

[PATCH v2 1/2] staging: tidspbridge: Add parameter names to function ptrs in struct dbll_attrs

2014-06-14 Thread Jeff Oczek
Add more descriptive names to function pointers in definition of struct dbll_attrs Signed-off-by: Jeff Oczek --- drivers/staging/tidspbridge/include/dspbridge/dblldefs.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/tidspbridge/include/dspbridge/

[PATCH v2 2/2] staging: tidspbridge: Fix whitespace for pointers in function headers

2014-06-14 Thread Jeff Oczek
Change style in function headers from 'type * ptr' to 'type *ptr' Signed-off-by: Jeff Oczek --- drivers/staging/tidspbridge/include/dspbridge/dblldefs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/tidspbridge/include/dspbridge/dblldefs.h b/drivers/sta

[PATCH 2/2] staging/fwserial: (coding style) remove not needed return statements

2014-06-14 Thread Radek Dostal
Style-only modifications to make checkpatch.pl -f a bit happier. Fixes warning: "void function return statements are not generally useful" Signed-off-by: Radek Dostal --- drivers/staging/fwserial/fwserial.c |2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/fwserial/fwserial

[PATCH 1/2] staging/fwserial: (coding style) add blank line after every declaration

2014-06-14 Thread Radek Dostal
Style-only modifications to make checkpatch.pl -f a bit happier. Fixes warning: "Missing a blank line after declarations" Signed-off-by: Radek Dostal --- drivers/staging/fwserial/fwserial.c |4 1 file changed, 4 insertions(+) diff --git a/drivers/staging/fwserial/fwserial.c b/drivers/

Re: [PATCH 2/2] staging: rtl8712: use kcalloc instead of kmalloc(x*y, ...)

2014-06-14 Thread Jonas Gorski
On Sat, Jun 14, 2014 at 1:48 PM, Vitaly Osipov wrote: > Replaced kmalloc(x*y, ...) with kcalloc(x,y,...) > > Signed-off-by: Vitaly Osipov > --- > drivers/staging/rtl8712/rtl871x_mlme.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/staging/rtl8712/rtl871x_mlme

Re: [PATCH] staging: ced1401: fix sparse warning for ced1401

2014-06-14 Thread Greg KH
On Sat, Jun 14, 2014 at 02:04:38PM +0900, Seunghun Lee wrote: > This patch fixes below warning. > > drivers/staging/ced1401/ced_ioc.c:703:30: warning: incorrect type in > assignment (different address spaces) > drivers/staging/ced1401/ced_ioc.c:703:30:expected void *[usertype] > lpvBuf

Re: [PATCH] staging: iio: fix coding style

2014-06-14 Thread Jonathan Cameron
On 13/06/14 06:56, Jimmy Picard wrote: This patch fixes coding style reported by checkpatch.pl that missing a blank line after declarations. Signed-off-by: Jimmy Picard Hmm. This is in the trivial enough to be marginally annoying category of basically noise. Normally I'd only take this as par

Re: [PATCH] staging: iio: fix coding style

2014-06-14 Thread Jonathan Cameron
On 09/04/14 19:09, Joel Porquet wrote: As suggested by checkpatch.pl, use dev_info() instead of printk(KERN_INFO ...) to print message. Signed-off-by: Joel Porquet This line has been removed by another patch in the meantime. --- Only tested by compilation. drivers/staging/iio/trigger/iio-tr

does drivers/staging/rtl8821ae/btcoexist/HalBtc8812a1Ant.c have an uncommon character set ?

2014-06-14 Thread Toralf Förster
The html formatter of the static checker Cppcheck stumbles over that file. In fact, even this small python snippet : #!/usr/bin/env python import io source_filename = "./drivers/staging/rtl8821ae/btcoexist/HalBtc8812a1Ant.c"; try: with io.open(source_filename, 'r') as input_file:

[PATCH] staging: remove non-ascii-characters from HalBtc8812a1Ant.c

2014-06-14 Thread Toralf Förster
those characters breaks the html-formatter tool of Cppcheck Signed-off-by: Toralf Förster --- drivers/staging/rtl8821ae/btcoexist/HalBtc8812a1Ant.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/staging/rtl8821ae/btcoexist/HalBtc8812a1Ant.c b/driver

[PATCH] staging: keucr: fix Missing blank line after declarations

2014-06-14 Thread Benedict Boerger
fix two Missing blank line after declarations issue reported by checkpatch.pl Done to complete an eudyptula task. Signed-off-by: Benedict Boerger --- drivers/staging/keucr/usb.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging/keucr/usb.c b/drivers/staging/keucr/usb.c index

Re: [PATCH] staging: remove non-ascii-characters from HalBtc8812a1Ant.c

2014-06-14 Thread Stefan Lippers-Hollmann
Hi On Saturday 14 June 2014, Toralf Förster wrote: > those characters breaks the html-formatter tool of Cppcheck [...] > - if(up >= n) // if �s�� n ��2�� retry count��0, > �h�ռeWiFi duration > + if(up >= n) // [the same goes for all other lines of

[PATCH] staging: ced1401: userspace: use1401.c: Cleaning up potential strncpy missing null-terminate

2014-06-14 Thread Rickard Strandqvist
Replacing strncpy with strlcpy to avoid strings that lacks null terminate. There is also a wrong use of strncat, it should have used sizeof - strlen. This was found using a static code analysis program called cppcheck. Rickard Strandqvist (1): staging: ced1401: userspace: use1401.c: Cleaning u

[PATCH] staging: ced1401: userspace: use1401.c: Cleaning up potential strncpy missing null-terminate

2014-06-14 Thread Rickard Strandqvist
Replacing strncpy with strlcpy to avoid strings that lacks null terminate. Signed-off-by: Rickard Strandqvist --- drivers/staging/ced1401/userspace/use1401.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/staging/ced1401/userspace/use1401.c b/drivers/st

[PATCH] staging: ced1401: userspace: use1401.c: Cleaning up if statement that always evaluates to true

2014-06-14 Thread Rickard Strandqvist
Unsigned variable can't be negative so it is unnecessary to test it. Signed-off-by: Rickard Strandqvist --- drivers/staging/ced1401/userspace/use1401.c |9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/staging/ced1401/userspace/use1401.c b/drivers/staging/c

[PATCH] staging: ced1401: userspace: use1401.c: Cleaning up if statement that always evaluates to true

2014-06-14 Thread Rickard Strandqvist
This if statement that always evaluates to true. Unsigned variable can't be negative so it is unnecessary to test it. This can of course also mean that there is a problem with this error test is 0 bytes an error? This was found using a static code analysis program called cppcheck. Rickard Strand

[PATCH] staging: imx-drm: ipu-v3: ipu-common.c: Cleaning up return of uninitialized variable

2014-06-14 Thread Rickard Strandqvist
Before when there was an error a uninitialized variable would be returnd. Now it returns -ENODEV This was found using a static code analysis program called cppcheck. Rickard Strandqvist (1): staging: imx-drm: ipu-v3: ipu-common.c: Cleaning up return of uninitialized variable drivers/staging

[PATCH] staging: imx-drm: ipu-v3: ipu-common.c: Cleaning up return of uninitialized variable

2014-06-14 Thread Rickard Strandqvist
Before when there was an error a uninitialized variable would be returnd. Now it returns -ENODEV Signed-off-by: Rickard Strandqvist --- drivers/staging/imx-drm/ipu-v3/ipu-common.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/imx-drm/ipu-v3/ipu-common