[PATCH 10/12] staging: iio: tsl2x7x: make logging consistent and correct newlines

2018-03-03 Thread Brian Masney
This patch updates all of the logging commands so that they are consistent with the other messages, includes __func__ in the message, and all of the messages include newlines. This patch also removes some debug log messages from tsl2x7x_prox_cal(). Signed-off-by: Brian Masney --- drivers/stagin

[PATCH 08/12] staging: iio: tsl2x7x: add error handling to tsl2x7x_prox_cal()

2018-03-03 Thread Brian Masney
tsl2x7x_prox_cal() did not have any error checks. This patch adds the missing error handling and ensures that any errors are reported to user space via in_proximity0_calibrate_store(). Signed-off-by: Brian Masney --- drivers/staging/iio/light/tsl2x7x.c | 36 ++--

[PATCH 00/12] staging cleanups

2018-03-03 Thread Brian Masney
Here is another patch series that inches the driver closer to moving out of staging. The most interesting changes are the last two in the series. One gets the proximity sensor working and the other one removes the unnecessary in_proximity0_calibscale_available sysfs attribute from two of the suppor

[PATCH 03/12] staging: iio: tsl2x7x: add common function for reading chip status

2018-03-03 Thread Brian Masney
There were three places where the same chunk of code was used to read the chip status. This patch creates a common function tsl2x7x_read_status() to reduce duplicate code. This patch also corrects tsl2x7x_event_handler() to properly check for an error after reading the chip status. Signed-off-by:

[PATCH 05/12] staging: iio: tsl2x7x: convert mutex_trylock() to mutex_lock()

2018-03-03 Thread Brian Masney
The driver uses mutex_lock() and mutex_trylock() in several places. Convert the mutex_trylock() to mutex_lock() for consistency with other IIO light drivers in mainline. Signed-off-by: Brian Masney --- drivers/staging/iio/light/tsl2x7x.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletion

[PATCH 07/12] staging: iio: tsl2x7x: correct 'Avoid CamelCase' warning from checkpatch

2018-03-03 Thread Brian Masney
The statP and calP variables triggered an 'Avoid CamelCase' warning from checkpatch.pl. This patch renames these variables to stat and cal to fix this warning. Signed-off-by: Brian Masney --- drivers/staging/iio/light/tsl2x7x.c | 26 +- 1 file changed, 13 insertions(+), 1

[PATCH 04/12] staging: iio: tsl2x7x: add common function for writing to the control register

2018-03-03 Thread Brian Masney
There were four places where the same chunk of code was used to write to the control register. This patch creates a common function tsl2x7x_write_control_reg() to reduce duplicate code. The function tsl2x7x_chip_off() did not correctly return an error code so this patch also corrects that issue.

[PATCH 02/12] staging: iio: tsl2x7x: add common function for clearing interrupts

2018-03-03 Thread Brian Masney
There were three places where the same chunk of code was used to clear interrupts. This patch creates a common function tsl2x7x_clear_interrupts() to reduce duplicate code. Signed-off-by: Brian Masney --- drivers/staging/iio/light/tsl2x7x.c | 52 + 1 file chan

[PATCH 09/12] staging: iio: tsl2x7x: add missing error checks

2018-03-03 Thread Brian Masney
The functions in_illuminance0_calibrate_store() and in_illuminance0_lux_table_store() did not have complete error handling in place. This patch adds the missing error handling. Signed-off-by: Brian Masney --- drivers/staging/iio/light/tsl2x7x.c | 14 ++ 1 file changed, 10 insertions(

[PATCH 12/12] staging: iio: tsl2x7x: make proximity sensor function correctly

2018-03-03 Thread Brian Masney
The bits for setting up the proximity diode were not setup correctly and this was causing the proximity sensor to not function correctly. This patch sets up the correct bit mask in tsl2x7x_chip_on() based on what the data sheet expects. From page 35 of the TSL2771 data sheet: https://ams.com/eng/co

[PATCH 06/12] staging: iio: tsl2x7x: correctly return errors in tsl2x7x_get_prox()

2018-03-03 Thread Brian Masney
Not all errors that occurred in tsl2x7x_get_prox() were correctly reported in the return value. This patch changes the error handling so that errors are now returned properly. Note that the ret variable is from the call to tsl2x7x_read_status(), and it already has the correct error check. The -EIN

[PATCH 11/12] staging: iio: tsl2x7x: remove unnecessary sysfs attribute

2018-03-03 Thread Brian Masney
The tsl2771 and tmd2771 devices create the in_proximity0_calibscale_available sysfs attribute. These two particular devices do not support changing the proximity gain value on the chip so this patch removes that sysfs attribute. As expected, these two devices already did not create the IIO_CHAN_INF

[PATCH 01/12] staging: iio: tsl2x7x: remove power functions from tsl2X7X_platform_data

2018-03-03 Thread Brian Masney
The tsl2X7X_platform_data structure contains the platform_power, power_on, and power_off function pointers. These power management functions should not be in the platform data. These functions were likely used before the regulator framework was put in place. There are no users of these functions in

[PATCH] staging: rtl8723bs: Replace memset with eth_zero_addr

2018-03-03 Thread Arushi Singhal
Use eth_zero_addr to assign zero address to the given address array instead of memset when the second argument in memset is address of zero. Coccinelle was used to do the replacement and add the header file linux/etherdevice.h if not already present. The Coccinelle semantic patch that makes this c

Re: [Outreachy kernel] [PATCH] staging: rtl8723bs: Remove unnecessary semicolon.

2018-03-03 Thread Julia Lawall
On Sun, 4 Mar 2018, Arushi Singhal wrote: > Remove unnecessary semicolon using semicolon.cocci Coccinelle script. > > Signed-off-by: Arushi Singhal Acked-by: Julia Lawall > --- > drivers/staging/rtl8723bs/core/rtw_recv.c | 2 +- > drivers/staging/rtl8723bs/hal/rtl8723b_rf6052.c | 2 +-

Re: [Outreachy kernel] [PATCH] staging: media: Remove unnecessary semicolon

2018-03-03 Thread Julia Lawall
On Sun, 4 Mar 2018, Arushi Singhal wrote: > Remove unnecessary semicolon found using semicolon.cocci Coccinelle > script. > > Signed-off-by: Arushi Singhal Acked-by: Julia Lawall > --- > .../media/atomisp/pci/atomisp2/css2400/runtime/frame/src/frame.c| 2 > +- > 1 file changed, 1

Re: [Outreachy kernel] [PATCH] staging: rtlwifi: Remove nonessential semicolon

2018-03-03 Thread Julia Lawall
On Sun, 4 Mar 2018, Arushi Singhal wrote: > Remove non-essential semicolon after 'else' and 'switch' statements. Issue > found using semicolon.cocci Coccinelle script. > > Signed-off-by: Arushi Singhal Acked-by: Julia Lawall It seems strange that someone would write code like that... julia

Re: Query:Regarding object poison overwritten in binder_transaction

2018-03-03 Thread Greg Kroah-Hartman
On Sat, Mar 03, 2018 at 08:22:35PM +0530, Kohli, Gaurav wrote: > HI , > > Is there any known issue of slab poisoning in binder_transaction variable on > kernel 4.9, If you are using binder in an Android device with 4.9, please use the version in the android-common tree, as it has all of the newe

[PATCH] staging: media: Remove unnecessary semicolon

2018-03-03 Thread Arushi Singhal
Remove unnecessary semicolon found using semicolon.cocci Coccinelle script. Signed-off-by: Arushi Singhal --- .../media/atomisp/pci/atomisp2/css2400/runtime/frame/src/frame.c| 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/media/atomisp/pci/atomisp2/cs

[PATCH] staging: rtl8723bs: Remove unnecessary semicolon.

2018-03-03 Thread Arushi Singhal
Remove unnecessary semicolon using semicolon.cocci Coccinelle script. Signed-off-by: Arushi Singhal --- drivers/staging/rtl8723bs/core/rtw_recv.c | 2 +- drivers/staging/rtl8723bs/hal/rtl8723b_rf6052.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/r

[PATCH] staging: rtlwifi: Remove nonessential semicolon

2018-03-03 Thread Arushi Singhal
Remove non-essential semicolon after 'else' and 'switch' statements. Issue found using semicolon.cocci Coccinelle script. Signed-off-by: Arushi Singhal --- drivers/staging/rtlwifi/base.c | 6 +++--- drivers/staging/rtlwifi/phydm/phydm_rainfo.c | 1 - 2 files changed, 3 insertions(+

Re: [PATCH 6/6] Staging: iio: adis16209: Use sign_extend32 and adjust a switch statement

2018-03-03 Thread Jonathan Cameron
On Sat, 03 Mar 2018 21:07:53 +0530 Shreeya Patel wrote: > On Sat, 2018-03-03 at 16:05 +, Jonathan Cameron wrote: > > On Fri,  2 Mar 2018 19:04:49 +0530 > > Shreeya Patel wrote: > > > > > > > > Use sign_extend32 function instead of manually coding it. > > > Also, adjust a switch block to

Re: [PATCH 6/6] Staging: iio: adis16209: Use sign_extend32 and adjust a switch statement

2018-03-03 Thread Shreeya Patel
On Sat, 2018-03-03 at 16:05 +, Jonathan Cameron wrote: > On Fri,  2 Mar 2018 19:04:49 +0530 > Shreeya Patel wrote: > > > > > Use sign_extend32 function instead of manually coding it. > > Also, adjust a switch block to explicitly match channels > > and return -EINVAL as default case which mak

Re: [PATCH 5/6] Staging: iio: adis16209: Add some informatic comments

2018-03-03 Thread Shreeya Patel
On Sat, 2018-03-03 at 16:01 +, Jonathan Cameron wrote: > On Fri,  2 Mar 2018 19:02:48 +0530 > Shreeya Patel wrote: > > > > > Some of the register names does not make it's puporse > > very clear and hence, add some comments for more > > information. > > Also there are certain unit based comme

RE: [PATCH 2/3] PCI: hv: serialize the present/eject work items

2018-03-03 Thread Michael Kelley (EOSG)
> -Original Message- > From: linux-kernel-ow...@vger.kernel.org > On Behalf > Of Dexuan Cui > Sent: Friday, March 2, 2018 4:21 PM > To: bhelg...@google.com; linux-...@vger.kernel.org; KY Srinivasan > ; > Stephen Hemminger > Cc: linux-ker...@vger.kernel.org; driverdev-devel@linuxdriverpr

Re: [PATCH 6/6] Staging: iio: adis16209: Use sign_extend32 and adjust a switch statement

2018-03-03 Thread Jonathan Cameron
On Fri, 2 Mar 2018 19:04:49 +0530 Shreeya Patel wrote: > Use sign_extend32 function instead of manually coding it. > Also, adjust a switch block to explicitly match channels > and return -EINVAL as default case which makes the code > semantically more clear. > > Signed-off-by: Shreeya Patel Ch

Re: [PATCH 5/6] Staging: iio: adis16209: Add some informatic comments

2018-03-03 Thread Jonathan Cameron
On Fri, 2 Mar 2018 19:02:48 +0530 Shreeya Patel wrote: > Some of the register names does not make it's puporse > very clear and hence, add some comments for more > information. > Also there are certain unit based comments which are not > providing sufficient information, so expand those comments

Re: [PATCH 4/6] Staging: iio: adis16209: Remove unnecessary comments and group the definitions

2018-03-03 Thread Jonathan Cameron
On Fri, 2 Mar 2018 18:58:55 +0530 Shreeya Patel wrote: > Remove some unnecessay comments and group the control > register and register field macros together. > > Signed-off-by: Shreeya Patel Hi Shreeya, Nice patch. As you have probably already seen comment removal (and addition) is always o

Re: [PATCH 3/6] Staging: iio: adis16209: Add _REG postfix for registers

2018-03-03 Thread Jonathan Cameron
On Fri, 2 Mar 2018 18:55:56 +0530 Shreeya Patel wrote: > The defined names for registers does not make it very > clear that they are registers and hence, add _REG postfix. > This improves the readability of the code. > > Signed-off-by: Shreeya Patel Applied to the togreg branch of iio.git and

Re: [PATCH 2/6] Staging: iio: adis16209: Change the definition name

2018-03-03 Thread Jonathan Cameron
On Fri, 2 Mar 2018 18:53:41 +0530 Shreeya Patel wrote: > The change in the definition name makes it then obvious > what the units are throughout the driver and there will > be no need of the comment. > > Signed-off-by: Shreeya Patel Applied to the togreg branch of iio.git and pushed out as tes

Re: [PATCH 1/6] Staging: iio: adis16209: Arrange headers in alphabetical order

2018-03-03 Thread Jonathan Cameron
On Fri, 2 Mar 2018 18:49:23 +0530 Shreeya Patel wrote: > Arrange the headers in alphabetical order for cleanup > purpose. > > Signed-off-by: Shreeya Patel Applied to the togreg branch of iio.git and pushed out as testing (mostly to test other patches as I'd be really surprised if this one brok

Re: [PATCH v3] staging:iio:meter: Add name to function definition arguments

2018-03-03 Thread Jonathan Cameron
On Fri, 2 Mar 2018 20:38:47 -0300 Rodrigo Siqueira wrote: > On 02/24, Jonathan Cameron wrote: > > On Wed, 21 Feb 2018 16:54:35 -0300 > > Rodrigo Siqueira wrote: > > > > > This patch fixes the checkpatch.pl warning: > > > > > > drivers/staging/iio/meter/ade7854.h:157: WARNING: function defini

Query:Regarding object poison overwritten in binder_transaction

2018-03-03 Thread Kohli, Gaurav
HI , Is there any known issue of slab poisoning in binder_transaction variable on kernel 4.9,  it seems owner variable of spinlock is getting corrupted(which is last 8th byte of binder_transaction struct).    368.423462:   <2> [] print_trailer+0x13c/0x214    368.428998:   <2> [] check_bytes_a