[PATCH v2 1/1] staging: lustre: drop uses of some OBD alloc and free functions

2015-04-12 Thread Julia Lawall
From: Julia Lawall Replace OBD_ALLOC, OBD_ALLOC_WAIT, OBD_ALLOC_PTR, and OBD_ALLOC_PTR_WAIT by kzalloc or calloc, as appropriate. Replace OBD_FREE and OBD_FREE_PTR by kfree. A simplified version of the semantic patch that makes these changes in the OBD_ALLOC/FREE case is as follows: (http://coc

[PATCH v2 0/1] drop uses of some OBD alloc and free functions

2015-04-12 Thread Julia Lawall
Replace OBD_ALLOC, OBD_ALLOC_WAIT, OBD_ALLOC_PTR, and OBD_ALLOC_PTR_WAIT by kzalloc or calloc, as appropriate. Replace OBD_FREE and OBD_FREE_PTR by kfree. The complete semantic patch that makes these changes is as follows: (http://coccinelle.lip6.fr/) // @@ expression ptr,e1,e2; @@ - OBD_ALLOC

[PATCH] drop uses of some OBD alloc and free functions

2015-04-12 Thread Julia Lawall
Replace OBD_ALLOC, OBD_ALLOC_WAIT, OBD_ALLOC_PTR, and OBD_ALLOC_PTR_WAIT by kzalloc or calloc, as appropriate. Replace OBD_FREE and OBD_FREE_PTR by kfree. The complete semantic patch that makes these changes is as follows: (http://coccinelle.lip6.fr/) // @@ expression ptr,e1,e2; @@ - OBD_ALLOC

[PATCH] staging: lustre: drop uses of some OBD alloc and free functions

2015-04-12 Thread Julia Lawall
From: Julia Lawall Replace OBD_ALLOC, OBD_ALLOC_WAIT, OBD_ALLOC_PTR, and OBD_ALLOC_PTR_WAIT by kzalloc or calloc, as appropriate. Replace OBD_FREE and OBD_FREE_PTR by kfree. A simplified version of the semantic patch that makes these changes in the OBD_ALLOC/FREE case is as follows: (http://coc

[PATCH] staging: lustre: llite: drop uses of OBD free functions

2015-04-12 Thread Julia Lawall
From: Julia Lawall Replace OBD_FREE and OBD_FREE_PTR by kfree. The semantic patch that makes these changes is as follows: (http://coccinelle.lip6.fr/) // @@ expression ptr, size; @@ - OBD_FREE(ptr, size); + kfree(ptr); @@ expression ptr; @@ - OBD_FREE_PTR(ptr); + kfree(ptr); // Signed-off

Re: [PATCH] Fix pointer cast for 32 bits arch

2015-04-12 Thread Geert Uytterhoeven
On Sun, Apr 12, 2015 at 8:14 PM, Joe Perches wrote: > On Sun, 2015-04-12 at 17:38 +0200, Geert Uytterhoeven wrote: >> Perhaps checkpatch should complain about casts outside header files? > > I think that's not feasible/desirable. > > type casting is pretty common and necessary. > There are 50k+ ca

Re: [PATCH] Fix pointer cast for 32 bits arch

2015-04-12 Thread Joe Perches
On Sun, 2015-04-12 at 17:38 +0200, Geert Uytterhoeven wrote: > Perhaps checkpatch should complain about casts outside header files? I think that's not feasible/desirable. type casting is pretty common and necessary. There are 50k+ casts in drivers/ alone. ___

[PATCH] staging: rtl8192u: Make core functions static

2015-04-12 Thread Nickolaus Woodruff
This patch fixes the following sparse warnings in r8192U_core.c: CHECK drivers/staging/rtl8192u/r8192U_core.c drivers/staging/rtl8192u/r8192U_core.c:3212:6: warning: symbol 'rtl819x_watchdog_wqcallback' was not declared. Should it be static? drivers/staging/rtl8192u/r8192U_core.c:3276:6: warni

Re: [PATCH] Fix pointer cast for 32 bits arch

2015-04-12 Thread Geert Uytterhoeven
On Sun, Apr 12, 2015 at 3:48 PM, Peter Senna Tschudin wrote: > On Sun, Apr 12, 2015 at 3:05 PM, Geert Uytterhoeven > wrote: >> On Sun, Apr 12, 2015 at 11:26 AM, Peter Senna Tschudin >> wrote: >>> Sparse compalins about casting void * to u64 on i386. >>> Change the cast to resource_size_t. >>> >>

Re: [PATCH] Fix pointer cast for 32 bits arch

2015-04-12 Thread Peter Senna Tschudin
On Sun, Apr 12, 2015 at 3:05 PM, Geert Uytterhoeven wrote: > On Sun, Apr 12, 2015 at 11:26 AM, Peter Senna Tschudin > wrote: >> Sparse compalins about casting void * to u64 on i386. >> Change the cast to resource_size_t. >> >> Signed-off-by: Peter Senna Tschudin >> --- >> >> Tested by compilatio

Re: [PATCH] Fix pointer cast for 32 bits arch

2015-04-12 Thread Geert Uytterhoeven
On Sun, Apr 12, 2015 at 11:26 AM, Peter Senna Tschudin wrote: > Sparse compalins about casting void * to u64 on i386. > Change the cast to resource_size_t. > > Signed-off-by: Peter Senna Tschudin > --- > > Tested by compilation only. Tested for x86 and x86_64. > > drivers/staging/goldfish/goldfi

Re: [PATCH] [media] omap4iss: avoid broken OMAP4 dependency

2015-04-12 Thread Laurent Pinchart
Hi Arnd, Thank you for the patch. On Friday 10 April 2015 22:20:20 Arnd Bergmann wrote: > The omap4iss driver uses an interface that used to be provided > by OMAP4 but has now been removed and replaced with a WARN_ON(1) > statement, which likely broke the iss_csiphy code at runtime. > > It also

[PATCH v3] Fix pointer cast for 32 bits arch

2015-04-12 Thread Peter Senna Tschudin
Sparse complains about casting void * to u64 on i386. Change the cast to resource_size_t. Also update the type of the first argument of gf_write64() from unsigned long to resource_size_t. Signed-off-by: Peter Senna Tschudin --- Changes from V2: - Fixed spelling of complains - Updated commit me

Re: [PATCH v2] Fix pointer cast for 32 bits arch

2015-04-12 Thread Andreas Schwab
Peter Senna Tschudin writes: > Sparse compalins about casting void * to u64 on i386. s/compalins/complains/ Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."

[PATCH v2] Fix pointer cast for 32 bits arch

2015-04-12 Thread Peter Senna Tschudin
Sparse compalins about casting void * to u64 on i386. Change the cast to resource_size_t. Also update the gf_write64 function definition changing the first argument type from unsigned long data to resource_size_t. Signed-off-by: Peter Senna Tschudin --- Changes from V1: - Updated commit message

[PATCH] Fix pointer cast for 32 bits arch

2015-04-12 Thread Peter Senna Tschudin
Sparse compalins about casting void * to u64 on i386. Change the cast to resource_size_t. Signed-off-by: Peter Senna Tschudin --- Tested by compilation only. Tested for x86 and x86_64. drivers/staging/goldfish/goldfish_nand.c | 3 ++- include/linux/goldfish.h | 2 +- 2 files ch