[PATCH] staging: typec: Fix sparse warnings about incorrect types

2017-05-10 Thread Guru Das Srinagesh
:1484:32: warning: incorrect type in argument 1 (different base types) fusb302.c:1484:32:expected unsigned short [unsigned] [usertype] header fusb302.c:1484:32:got restricted __le16 [usertype] header Signed-off-by: Guru Das Srinagesh --- drivers/staging/typec/fusb302/fusb302.c | 4 ++-- 1

[PATCH] staging: typec: Fix sparse warnings about incorrect types

2017-05-09 Thread Guru Das Srinagesh
:32: warning: incorrect type in argument 1 (different base types) fusb302.c:1484:32:expected unsigned short [unsigned] [usertype] header fusb302.c:1484:32:got restricted __le16 [usertype] header Signed-off-by: Guru Das Srinagesh --- drivers/staging/typec/fusb302/fusb302.c | 4

Re: [PATCH v4] staging: lustre: llite: Fix variable length array warning

2017-05-09 Thread Guru Das Srinagesh
On Tue, May 09, 2017 at 11:31:36AM +0300, Dan Carpenter wrote: > Just ignore the warning. > Thank you for your comments on this patch. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-

[PATCH] staging: typec: Make undeclared symbol static

2017-05-09 Thread Guru Das Srinagesh
Fix sparse warning: drivers/staging/typec/tcpci.c:428:26: warning: symbol 'tcpci_tcpc_config' was not declared. Should it be static? Signed-off-by: Guru Das Srinagesh --- drivers/staging/typec/tcpci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/sta

[PATCH v4] staging: lustre: llite: Fix variable length array warning

2017-05-08 Thread Guru Das Srinagesh
Fix sparse warning "warning: Variable length array is used." by using kmalloc_array to allocate the required amount of memory instead and kfree to deallocate memory after use. Signed-off-by: Guru Das Srinagesh --- v4: - Changed kmalloc_array flags from GFP_KERNEL to GFP_A

Re: [PATCH v2] staging: lustre: llite: Fix variable length array warning

2017-05-07 Thread Guru Das Srinagesh
On Sun, May 07, 2017 at 04:24:51PM -0700, Joe Perches wrote: > On Sun, 2017-05-07 at 02:23 -0700, Guru Das Srinagesh wrote: > > Fix sparse warning "warning: Variable length array is used." by using > > kmalloc_array to allocate the required amount of memory instead an

[PATCH] staging: media: atomisp: Make undeclared symbols static

2017-05-07 Thread Guru Das Srinagesh
Fix sparse warnings: "symbol not declared; should it be static?" Signed-off-by: Guru Das Srinagesh --- drivers/staging/media/atomisp/pci/atomisp2/atomisp_fops.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/staging/media/atomisp/pc

[PATCH v3] staging: lustre: llite: Fix variable length array warning

2017-05-07 Thread Guru Das Srinagesh
Fix sparse warning "warning: Variable length array is used." by using kmalloc_array to allocate the required amount of memory instead and kfree to deallocate memory after use. Signed-off-by: Guru Das Srinagesh --- v3: - Fixed checkpatch warning: Comparison to NULL could be written

[PATCH v2] staging: lustre: llite: Fix variable length array warning

2017-05-07 Thread Guru Das Srinagesh
Fix sparse warning "warning: Variable length array is used." by using kmalloc_array to allocate the required amount of memory instead and kfree to deallocate memory after use. Signed-off-by: Guru Das Srinagesh --- v2: - Added missing check for NULL return value of kmalloc_array()

Re: [PATCH] staging: lustre: llite: Fix variable length array warning

2017-05-06 Thread Guru Das Srinagesh
On Fri, May 05, 2017 at 01:52:36AM -0700, Joe Perches wrote: > On Thu, 2017-05-04 at 23:41 -0700, Guru Das Srinagesh wrote: > > Fix sparse warning "warning: Variable length array is used." by using > > kmalloc_array to allocate the required amount of memory instead an

[PATCH] staging: lustre: llite: Fix variable length array warning

2017-05-04 Thread Guru Das Srinagesh
Fix sparse warning "warning: Variable length array is used." by using kmalloc_array to allocate the required amount of memory instead and kfree to deallocate memory after use. Signed-off-by: Guru Das Srinagesh --- drivers/staging/lustre/lustre/llite/xattr.c | 17 +--

[PATCH] staging: media: atomisp: use logical AND, not bitwise

2017-04-30 Thread Guru Das Srinagesh
Fixes sparse warning "dubious: x & !y" in logical expression. Signed-off-by: Guru Das Srinagesh --- .../media/atomisp/pci/atomisp2/css2400/runtime/binary/src/binary.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/media/atomisp/pci/at

[PATCH] staging: iio: ad9832: use 4-digit octal permissions

2017-03-30 Thread Guru Das Srinagesh
This fixes the coding style issue of using S_IWUSR in place of 4-digit octal numbers. Issue detected by checkpatch. Signed-off-by: Guru Das Srinagesh --- drivers/staging/iio/frequency/ad9832.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers