[PATCH] binder: fix "cast to pointer from integer of different size" warning

2017-09-03 Thread Jisheng Zhang
The binder driver now could cause warnings as below on 32bit platforms if ANDROID_BINDER_IPC_32BIT is unselected: drivers/android/binder.c:1550:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] This patch fix all of them. Signed-off-by: Jisheng Zhang

Re: [PATCH] iio staging: tsl2x7x: clean up limit checks

2017-09-03 Thread Brian Masney
On Sun, Sep 03, 2017 at 12:35:05PM +0100, Jonathan Cameron wrote: > On Mon, 21 Aug 2017 13:11:03 +0300 > Dan Carpenter wrote: > > > The second part of this patch is probably the most interesting. We > > use "TSL2X7X_MAX_LUX_TABLE_SIZE * 3" as the limit instead of just

[PATCH] staging: vchiq_2835_arm: Fix NULL ptr dereference in free_pagelist

2017-09-03 Thread Stefan Wahren
This fixes a NULL pointer dereference on RPi 2 with multi_v7_defconfig. The function page_address() could return NULL with enabled CONFIG_HIGHMEM. So fix this by using kmap() instead. Signed-off-by: Stefan Wahren Fixes: 71bad7f08641 ("staging: add bcm2708 vchiq driver")

[PATCH v2 6/8] staging: ccree: move over to BIT macro for bit defines

2017-09-03 Thread Gilad Ben-Yossef
Use BIT macro for bit definitions where needed. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_cipher.h | 10 +- drivers/staging/ccree/ssi_driver.c | 3 ++- drivers/staging/ccree/ssi_driver.h | 6 +++--- 3 files changed, 10 insertions(+), 9

[PATCH v2 4/8] staging: ccree: simplify resource release on error

2017-09-03 Thread Gilad Ben-Yossef
The resource release on probe/init error was being handled in an awkward manner and possibly leaking memory on certain (unlikely) error path. Fix it by simplifying the error resource release and making it easier to track. Reported-by: Dan Carpenter Signed-off-by: Gilad

[PATCH v2 3/8] staging: ccree: Use platform_get_irq and devm_request_irq

2017-09-03 Thread Gilad Ben-Yossef
From: Suniel Mahesh It is recommended to use managed function devm_request_irq(), which simplifies driver cleanup paths and driver code. This patch does the following: (a) replace platform_get_resource(), request_irq() and corresponding error handling with

[PATCH v2 8/8] staging: ccree: remove BUG macro usage

2017-09-03 Thread Gilad Ben-Yossef
Replace BUG() macro usage that crash the kernel with alternatives that signal error and/or try to recover. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_buffer_mgr.c | 14 ++ drivers/staging/ccree/ssi_cipher.c | 1 -

[PATCH v2 7/8] staging: ccree: replace noop macro with inline

2017-09-03 Thread Gilad Ben-Yossef
Replace noop macro with a noop inline function Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_driver.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/ccree/ssi_driver.h b/drivers/staging/ccree/ssi_driver.h index

[PATCH v2 5/8] staging: ccree: remove unused completion

2017-09-03 Thread Gilad Ben-Yossef
icache_setup_completion is no longer used. Remove it. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_driver.c | 2 -- drivers/staging/ccree/ssi_driver.h | 1 - 2 files changed, 3 deletions(-) diff --git a/drivers/staging/ccree/ssi_driver.c

[PATCH v2 2/8] staging: ccree: Convert to devm_ioremap_resource for map, unmap

2017-09-03 Thread Gilad Ben-Yossef
From: Suniel Mahesh It is recommended to use managed function devm_ioremap_resource(), which simplifies driver cleanup paths and driver code. This patch does the following: (a) replace request_mem_region(), ioremap() and corresponding error handling with

[PATCH v2 1/8] staging: ccree: Replace kzalloc with devm_kzalloc

2017-09-03 Thread Gilad Ben-Yossef
From: Suniel Mahesh It is recommended to use managed function devm_kzalloc, which simplifies driver cleanup paths and driver code. This patch does the following: (a) replace kzalloc with devm_kzalloc. (b) drop kfree(), because memory allocated with devm_kzalloc() is

[PATCH 0/8] staging: ccree: more cleanup work for 4.14

2017-09-03 Thread Gilad Ben-Yossef
More cleanup work from Sunil and myself. I've previously sent some of these as part of a larger patch set. I've decided to split the patch set to smaller chunks to make it more manageable. This patch set applies on top of commit 28eb51f7468a ("staging:rtl8188eu:core Fix remove unneccessary else

[PATCH 10/10] staging/atomisp: Use ARRAY_SIZE macro

2017-09-03 Thread Thomas Meyer
Use ARRAY_SIZE macro, rather than explicitly coding some variant of it yourself. Found with: find -type f -name "*.c" -o -name "*.h" | xargs perl -p -i -e 's/\bsizeof\s*\(\s*(\w+)\s*\)\s*\ /\s*sizeof\s*\(\s*\1\s*\[\s*0\s*\]\s*\) /ARRAY_SIZE(\1)/g' and manual check/verification. Signed-off-by:

[PATCH 1/1] staging/atomisp: fix header guards

2017-09-03 Thread Nicolas Iooss
Files input_formatter_subsystem_defs.h begin with: #ifndef _if_subsystem_defs_h #define _if_subsystem_defs_h__ and end with: #endif /* _if_subsystem_defs_h__ */ The intent seems to have been to use _if_subsystem_defs_h__ everywhere but two underscores are missing in the initial

Re: [PATCH 4/4] staging: iio: tsl2x7x: constify i2c_device_id

2017-09-03 Thread Jonathan Cameron
On Tue, 22 Aug 2017 10:51:37 +0530 Arvind Yadav wrote: > Hi > > > On Tuesday 22 August 2017 01:50 AM, Dan Carpenter wrote: > > Don't say "[PATCH 4/4]". It's not a patchset or a part of an email > > thread. > Yes, It's part of these patchset. >[PATCH 1/4] misc:

Re: [PATCH] iio staging: tsl2x7x: clean up limit checks

2017-09-03 Thread Jonathan Cameron
On Mon, 21 Aug 2017 13:11:03 +0300 Dan Carpenter wrote: > The second part of this patch is probably the most interesting. We > use "TSL2X7X_MAX_LUX_TABLE_SIZE * 3" as the limit instead of just > "TSL2X7X_MAX_LUX_TABLE_SIZE". It creates a static checker warning that >

[PATCH 8/8] staging: ccree: remove BUG macro usage

2017-09-03 Thread Gilad Ben-Yossef
Replace BUG() macro usage that crash the kernel with alternatives that signal error and/or try to recover. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_buffer_mgr.c | 14 ++ drivers/staging/ccree/ssi_cipher.c | 1 -

[PATCH 2/8] staging: ccree: Convert to devm_ioremap_resource for map, unmap

2017-09-03 Thread Gilad Ben-Yossef
From: Suniel Mahesh It is recommended to use managed function devm_ioremap_resource(), which simplifies driver cleanup paths and driver code. This patch does the following: (a) replace request_mem_region(), ioremap() and corresponding error handling with

[PATCH 3/8] staging: ccree: Use platform_get_irq and devm_request_irq

2017-09-03 Thread Gilad Ben-Yossef
From: Suniel Mahesh It is recommended to use managed function devm_request_irq(), which simplifies driver cleanup paths and driver code. This patch does the following: (a) replace platform_get_resource(), request_irq() and corresponding error handling with

[PATCH 7/8] staging: ccree: replace noop macro with inline

2017-09-03 Thread Gilad Ben-Yossef
Replace noop macro with a noop inline function Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_driver.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/ccree/ssi_driver.h b/drivers/staging/ccree/ssi_driver.h index

[PATCH 6/8] staging: ccree: move over to BIT macro for bit defines

2017-09-03 Thread Gilad Ben-Yossef
Use BIT macro for bit definitions where needed. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_cipher.h | 10 +- drivers/staging/ccree/ssi_driver.c | 3 ++- drivers/staging/ccree/ssi_driver.h | 6 +++--- 3 files changed, 10 insertions(+), 9

[PATCH 5/8] staging: ccree: remove unused completion

2017-09-03 Thread Gilad Ben-Yossef
icache_setup_completion is no longer used. Remove it. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_driver.c | 2 -- drivers/staging/ccree/ssi_driver.h | 1 - 2 files changed, 3 deletions(-) diff --git a/drivers/staging/ccree/ssi_driver.c

[PATCH 1/8] staging: ccree: Replace kzalloc with devm_kzalloc

2017-09-03 Thread Gilad Ben-Yossef
From: Suniel Mahesh It is recommended to use managed function devm_kzalloc, which simplifies driver cleanup paths and driver code. This patch does the following: (a) replace kzalloc with devm_kzalloc. (b) drop kfree(), because memory allocated with devm_kzalloc() is

[PATCH 4/8] staging: ccree: simplify resource release on error

2017-09-03 Thread Gilad Ben-Yossef
The resource release on probe/init error was being handled in an awkward manner and possibly leaking memory on certain (unlikely) error path. Fix it by simplifying the error resource release and making it easier to track. Reported-by: Dan Carpenter Signed-off-by: Gilad

[PATCH 0/8] staging: ccree: more cleanup work for 4.14

2017-09-03 Thread Gilad Ben-Yossef
More cleanup work from Sunil and myself. I've previously sent some of these as part of a larger patch set. I've decided to split the patch set to smaller chunks to make it more manageable. This patch set applies on top of commit 28eb51f7468a ("staging:rtl8188eu:core Fix remove unneccessary else