[patch 2/3] staging: speakup: use tty_kopen instead of tty_open_by_driver

2017-07-09 Thread Okash Khawaja
This patch replaces call to tty_open_by_driver with a tty_kopen. Signed-off-by: Okash Khawaja --- drivers/staging/speakup/spk_ttyio.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/staging/speakup/spk_ttyio.c +++ b/drivers/staging/speakup/spk_ttyio.c @@ -164,7 +164,7 @@

[patch 1/3] tty: resolve tty contention between kernel and user space

2017-07-09 Thread Okash Khawaja
The commit 12e84c71b7d4ee (tty: export tty_open_by_driver) exports tty_open_by_device to allow tty to be opened from inside kernel which works fine except that it doesn't handle contention with user space or another kernel-space open of the same tty. For example, opening a tty from user space while

[patch 3/3] tty: undo export of tty_open_by_driver

2017-07-09 Thread Okash Khawaja
Since we have tty_kopen, we no longer need to export tty_open_by_driver. This patch makes this function static. Signed-off-by: Okash Khawaja --- drivers/tty/tty_io.c |3 +-- include/linux/tty.h |5 - 2 files changed, 1 insertion(+), 7 deletions(-) --- a/drivers/tty/tty_io.c +++ b/

[patch 0/3] Re: tty contention resulting from tty_open_by_device export

2017-07-09 Thread Okash Khawaja
On Sat, Jul 08, 2017 at 10:38:03AM +0200, Greg Kroah-Hartman wrote: > Overall, the idea looks sane to me. Keeping userspace from opening a > tty that the kernel has opened internally makes sense, hopefully > userspace doesn't get too confused when that happens. I don't think we > normally return

Re: [patch 2/3] staging: speakup: use tty_kopen instead of tty_open_by_driver

2017-07-09 Thread Greg Kroah-Hartman
On Sun, Jul 09, 2017 at 12:41:55PM +0100, Okash Khawaja wrote: > This patch replaces call to tty_open_by_driver with a tty_kopen. > > Signed-off-by: Okash Khawaja > > --- > drivers/staging/speakup/spk_ttyio.c |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > --- a/drivers/staging/

Re: [patch 1/3] tty: resolve tty contention between kernel and user space

2017-07-09 Thread Greg Kroah-Hartman
On Sun, Jul 09, 2017 at 12:41:54PM +0100, Okash Khawaja wrote: > The commit 12e84c71b7d4ee (tty: export tty_open_by_driver) exports > tty_open_by_device to allow tty to be opened from inside kernel which > works fine except that it doesn't handle contention with user space or > another kernel-space

Re: [patch 0/3] Re: tty contention resulting from tty_open_by_device export

2017-07-09 Thread Greg Kroah-Hartman
On Sun, Jul 09, 2017 at 12:41:53PM +0100, Okash Khawaja wrote: > On Sat, Jul 08, 2017 at 10:38:03AM +0200, Greg Kroah-Hartman wrote: > > Overall, the idea looks sane to me. Keeping userspace from opening a > > tty that the kernel has opened internally makes sense, hopefully > > userspace doesn't g

Re: [PATCH v2] staging: atomisp: use kstrdup to replace kmalloc and memcpy

2017-07-09 Thread hari prasath
On 8 July 2017 at 16:31, Sakari Ailus wrote: > Hi Hari, > > On Fri, Jul 07, 2017 at 08:15:21PM +0530, Hari Prasath wrote: >> kstrdup kernel primitive can be used to replace kmalloc followed by >> string copy. This was reported by coccinelle tool >> >> Signed-off-by: Hari Prasath >> --- >> .../me

Re: [patch 2/3] staging: speakup: use tty_kopen instead of tty_open_by_driver

2017-07-09 Thread Okash Khawaja
On Sun, Jul 09, 2017 at 01:50:55PM +0200, Greg Kroah-Hartman wrote: > On Sun, Jul 09, 2017 at 12:41:55PM +0100, Okash Khawaja wrote: > > This patch replaces call to tty_open_by_driver with a tty_kopen. > > > > Signed-off-by: Okash Khawaja > > > > --- > > drivers/staging/speakup/spk_ttyio.c |

[patch 4/3] tty: make tty_kopen return ENODEV in case of no TTY

2017-07-09 Thread Okash Khawaja
When TTY is not built, tty_kopen should return an error. This way calling code remains consistent, regardless of whether tty is built or not. This patch returns -ENODEV when there is no tty. Signed-off-by: Okash Khawaja --- include/linux/tty.h |2 +- 1 file changed, 1 insertion(+), 1 deleti

Re: [patch 1/3] tty: resolve tty contention between kernel and user space

2017-07-09 Thread Andy Shevchenko
On Sun, Jul 9, 2017 at 2:41 PM, Okash Khawaja wrote: > +struct tty_struct *tty_kopen(dev_t device) > +{ > + struct tty_struct *tty; > + struct tty_driver *driver = NULL; > + int index = -1; > + > + mutex_lock(&tty_mutex); > + driver = tty_lookup_driver(device, NULL,

[PATCH v3 1/5] Staging: android: remove unnecessary blank lines

2017-07-09 Thread Mateusz Nowotyński
Removes unnecessary blank lines in android/ion/ion_cma_heap.c Signed-off-by: Mateusz Nowotyński --- drivers/staging/android/ion/ion_cma_heap.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/android/ion/ion_cma_heap.c b/drivers/staging/android/ion/ion_cma_heap.c index a0949bc

[PATCH v3 4/5] Staging: android: Fix code alignment issue

2017-07-09 Thread Mateusz Nowotyński
Fixes code alignment issue in ion/ion.h Signed-off-by: Mateusz Nowotyński --- drivers/staging/android/ion/ion.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/android/ion/ion.h b/drivers/staging/android/ion/ion.h index fa9ed81..b91328a 100644 --- a/d

[PATCH v3 5/5] Staging: android: use BIT macro

2017-07-09 Thread Mateusz Nowotyński
Use BIT macro instead of left shifting in android/ion/ion.h Signed-off-by: Mateusz Nowotyński --- drivers/staging/android/ion/ion.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/android/ion/ion.h b/drivers/staging/android/ion/ion.h index b91328a..621e5f

[PATCH v3 3/5] Staging: android: Remove unnecessary blank lines

2017-07-09 Thread Mateusz Nowotyński
Removes unnecessary blank lines in android/ion/ion_system_heap.c Signed-off-by: Mateusz Nowotyński --- drivers/staging/android/ion/ion_system_heap.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/android/ion/ion_system_heap.c b/drivers/staging/android/ion/ion_system_heap.c

[PATCH v3 2/5] Staging: android: fix sizeof style issue

2017-07-09 Thread Mateusz Nowotyński
Converts sizeof(type) to sizeof(variable) in android/ion/ion_cma_heap.c Signed-off-by: Mateusz Nowotyński --- drivers/staging/android/ion/ion_cma_heap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/android/ion/ion_cma_heap.c b/drivers/staging/android/ion/i

Re: [PATCH v2 1/9] staging: iio: tsl2x7x: add of_match table for device tree support

2017-07-09 Thread Jonathan Cameron
On Thu, 6 Jul 2017 18:56:18 -0400 Brian Masney wrote: > Add device tree support for the tsl2x7x IIO driver with no custom > properties. The device tree documentation is in a separate commit so > that the changes to trivial-devices.txt can go in via the device > tree subsystem. > > Signed-off-by

Re: [PATCH v2 2/9] staging: iio: tsl2x7x: add device tree documentation

2017-07-09 Thread Jonathan Cameron
On Thu, 6 Jul 2017 18:56:19 -0400 Brian Masney wrote: > Add device tree documentation for the tsl2x7x IIO driver. > > Signed-off-by: Brian Masney > CC: Rob Herring > CC: Mark Rutland > CC: devicet...@vger.kernel.org For what it's worth given the simplicity of the patch Acked-by: Jonathan Ca

Re: [PATCH v2 3/9] staging: iio: tsl2x7x: remove redundant power_state sysfs attribute

2017-07-09 Thread Jonathan Cameron
On Thu, 6 Jul 2017 18:56:20 -0400 Brian Masney wrote: > The TSL2X7X driver has a custom power_state sysfs attribute. Remove this > attribute since the runtime power management code provides a sysfs > attribute to control the power state of the device. > > Signed-off-by: Brian Masney Applied. >

Re: [PATCH v2 4/9] staging: iio: tsl2x7x: remove tsl2x7x_i2c_read()

2017-07-09 Thread Jonathan Cameron
On Thu, 6 Jul 2017 18:56:21 -0400 Brian Masney wrote: > tsl2x7x_i2c_read() would call i2c_smbus_write_byte() and > i2c_smbus_read_byte(). These two i2c functions can be replaced with a > single call to i2c_smbus_read_byte_data(). This patch removes the > tsl2x7x_i2c_read() function and replaces

Re: [PATCH v2 5/9] staging: iio: tsl2x7x: cleaned up i2c calls in tsl2x7x_als_calibrate()

2017-07-09 Thread Jonathan Cameron
On Thu, 6 Jul 2017 18:56:22 -0400 Brian Masney wrote: > The calibration function calls i2c_smbus_write_byte() and > i2c_smbus_read_byte(). These two function calls are replaced with a > single call to i2c_smbus_read_byte_data() by this patch. This patch > also removes an unnecessary call that re

Re: [PATCH v2 6/9] staging: iio: tsl2x7x: refactor {read,write}_event_value to allow handling multiple iio_event_infos

2017-07-09 Thread Jonathan Cameron
On Thu, 6 Jul 2017 18:56:23 -0400 Brian Masney wrote: > tsl2x7x_read_thresh() and tsl2x7x_write_thresh() currently assumes > that IIO_EV_INFO_VALUE is the only iio_event_info that will be > passed in. This patch refactors these two functions so that > additional iio_event_infos can be passed in

Re: [PATCH v2 7/9] staging: iio: tsl2x7x: use usleep_range() instead of mdelay()

2017-07-09 Thread Jonathan Cameron
On Thu, 6 Jul 2017 18:56:24 -0400 Brian Masney wrote: > This driver in some cases can busy wait for upwards of 15ms. Since the > kernel at this point is not running in atomic context, and is running in > process context, we can safely use usleep_range() instead. This patch > changes the two occu

Re: [PATCH v2 8/9] staging: iio: tsl2x7x: migrate in_illuminance0_integration_time sysfs attribute to iio_chan_spec

2017-07-09 Thread Jonathan Cameron
On Thu, 6 Jul 2017 18:56:25 -0400 Brian Masney wrote: > The driver explicitly creates the in_illuminance0_integration_time sysfs > attribute outside the IIO core. This attribute is available in the IIO > core so this patches migrates the attribute to be created by > the iio_chan_spec. > > Signe

[PATCH] checkpatch: fixed alignment and comment style

2017-07-09 Thread Philipp Guendisch
This patch fixed alignment, comment style and one appearance of misordered constant in an if comparison. Semantic should not be affected by this patch. There are still a few warnings and even errors left which require a semantic change of the code to fix. e.g. use of in_atomic in drivers There ar

Re: [PATCH v2 9/9] staging: iio: tsl2x7x: check return value from tsl2x7x_invoke_change()

2017-07-09 Thread Jonathan Cameron
On Thu, 6 Jul 2017 18:56:26 -0400 Brian Masney wrote: > The return value from tsl2x7x_invoke_change() was not checked in most > places in the driver. This patch adds the proper error checks. The > return values inside tsl2x7x_invoke_change() are now checked by > this patch as well. > > Previous

Re: [PATCH] checkpatch: fixed alignment and comment style

2017-07-09 Thread Joe Perches
On Sun, 2017-07-09 at 19:39 +0200, Philipp Guendisch wrote: > This patch fixed alignment, comment style and one appearance of > misordered constant in an if comparison. > Semantic should not be affected by this patch. Your email subject is wrong. This is not a checkpatch patch. Your subject line

Re: [patch 1/3] tty: resolve tty contention between kernel and user space

2017-07-09 Thread Okash Khawaja
Hi, On Sun, Jul 09, 2017 at 06:04:17PM +0300, Andy Shevchenko wrote: > Above > 1. take mutex > 2. take reference > > Here: > 1. give mutex back > 2. give reference back > > I think we usually see symmetrical calls, i.e. > > 1. give reference back > 2. give mutex back > > So, what did I miss

Re: [PATCH v2] staging: atomisp: use kstrdup to replace kmalloc and memcpy

2017-07-09 Thread Sakari Ailus
On Sun, Jul 09, 2017 at 05:56:15PM +0530, hari prasath wrote: > On 8 July 2017 at 16:31, Sakari Ailus wrote: > > Hi Hari, > > > > On Fri, Jul 07, 2017 at 08:15:21PM +0530, Hari Prasath wrote: > >> kstrdup kernel primitive can be used to replace kmalloc followed by > >> string copy. This was report

[PATCH]

2017-07-09 Thread armetallica
>From 043428d63637a6dd8e52449b73dbb8341885d7e4 Mon Sep 17 00:00:00 2001 From: Armin Schoenlieb Date: Mon, 10 Jul 2017 01:12:52 +0200 Subject: [PATCH] Staging: media: atomisp2: fixed trailing whitespace error in atomisp_v4l2.c This is a patch to the atomisp_v4l2.c file that fixes up a trailing wh

[PATCH] staging: greybus: arche: wrap over-length lines

2017-07-09 Thread Mitchell Tasman
Adjust formatting of various statements to keep line length within the 80 column limit preferred by the Linux kernel coding style. Signed-off-by: Mitchell Tasman --- drivers/staging/greybus/arche-platform.c | 29 +++-- 1 file changed, 19 insertions(+), 10 deletions(-) di

[PATCH] staging: wilc1000: fix variable signedness

2017-07-09 Thread Ilia Sergachev
txq_count receives a value from wilc_wlan_handle_txq() and therefore should be u32 found using sparse: drivers/staging/wilc1000/linux_wlan.c:306:58: warning: incorrect type in argument 2 (different signedness) Signed-off-by: Ilia Sergachev --- drivers/staging/wilc1000/linux_wlan.c | 3 ++- 1 f

[PATCH]

2017-07-09 Thread armetallica
>From bb1aac6ae6b21b903d8743712e21aeb1a6b22163 Mon Sep 17 00:00:00 2001 From: Armin Schoenlieb Date: Mon, 10 Jul 2017 01:52:41 +0200 Subject: [PATCH] staging: unisys: visorbus: fix brace coding style issue in visorbus_main.c This is a patch to the visorbus_main.c file that fixes up six brace err

[PATCH 5/5] staging: ccree: fix switch case indentation

2017-07-09 Thread sleepingzucchini
From: Tyler Olivieri Patch to fix following checkpatch error: ERROR: switch and case should be at the same indent Signed-off-by: Tyler Olivieri --- drivers/staging/ccree/ssi_hash.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/staging/cc

[PATCH 1/5] staging: ccree: remove redudant semicolons

2017-07-09 Thread sleepingzucchini
From: Tyler Olivieri Patch to remove checkpatch warning: WARNING: Statements terminations use 1 semicolon Signed-off-by: Tyler Olivieri --- drivers/staging/ccree/ssi_buffer_mgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/ccree/ssi_buffer_mgr.c b/drive

[PATCH 3/5] staging: ccree: remove assignement in conditional

2017-07-09 Thread sleepingzucchini
From: Tyler Olivieri Patch to fix following checkpatch error: ERROR: do not use assignment in if condition Signed-off-by: Tyler Olivieri --- drivers/staging/ccree/ssi_hash.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/staging/ccree/ssi_hash.c b/drivers/sta

[PATCH 2/5] staging: ccree: fix placement of curly braces

2017-07-09 Thread sleepingzucchini
From: Tyler Olivieri Patch to fix checkpatch errors: ERROR: that open brace { should be on the previous line ERROR: open brace '{' following function declarations go on the next line Signed-off-by: Tyler Olivieri --- drivers/staging/ccree/ssi_buffer_mgr.c | 12 ++--- drivers/staging/ccree/ssi_

[PATCH 0/5] staging: ccree: fix checkpatch errors

2017-07-09 Thread sleepingzucchini
From: Tyler Olivieri This patchset fixes several checkpatch errors and warnings in /staging/ccree: ERROR: that open brace { should be on the previous line ERROR: open brace '{' following function declarations go on the next line WARNING: EXPORT_SYMBOL(foo); should immediately follow its function

[PATCH 4/5] staging: ccree: export symbol immediately following function

2017-07-09 Thread sleepingzucchini
From: Tyler Olivieri Patch to fix following checkpatch warning: WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable Signed-off-by: Tyler Olivieri --- drivers/staging/ccree/ssi_fips.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/ccree/ssi_fips.c

RE: [PATCH]

2017-07-09 Thread Kershner, David A
> -Original Message- > From: armetallica [mailto:armetall...@gmail.com] > Sent: Sunday, July 9, 2017 7:58 PM > To: gre...@linuxfoundation.org > Cc: *S-Par-Maintainer ; > de...@driverdev.osuosl.org; linux-ker...@vger.kernel.org > Subject: [PATCH] > > From bb1aac6ae6b21b903d8743712e21aeb1a6b

[PATCH v2] staging: greybus: arche: wrap over-length lines

2017-07-09 Thread Mitchell Tasman
Adjust formatting of various statements to keep line length within the 80 column limit preferred by the Linux kernel coding style. Signed-off-by: Mitchell Tasman --- Changes in v2: Add back a missing space in a comment drivers/staging/greybus/arche-platform.c | 29 +++--

Re: [greybus-dev] [PATCH v2] staging: greybus: arche: wrap over-length lines

2017-07-09 Thread Viresh Kumar
Hi Mitchell, On 09-07-17, 20:25, Mitchell Tasman wrote: > Adjust formatting of various statements to keep line length within > the 80 column limit preferred by the Linux kernel coding style. We try to follow that most of the time, but the end result should be easily readable. If it isn't, then w

[PATCHv3] staging: atomisp: use kstrdup to replace kmalloc and memcpy

2017-07-09 Thread Hari Prasath
kstrdup kernel primitive can be used to replace kmalloc followed by string copy. This was reported by coccinelle tool. Signed-off-by: Hari Prasath --- v1: Replace kmalloc followed by memcpy with kmemdup. Based on review comments from Alan Cox, this could better be done

Re: [PATCH v2] staging: atomisp: use kstrdup to replace kmalloc and memcpy

2017-07-09 Thread hari prasath
On 10 July 2017 at 01:22, Sakari Ailus wrote: > On Sun, Jul 09, 2017 at 05:56:15PM +0530, hari prasath wrote: >> On 8 July 2017 at 16:31, Sakari Ailus wrote: >> > Hi Hari, >> > >> > On Fri, Jul 07, 2017 at 08:15:21PM +0530, Hari Prasath wrote: >> >> kstrdup kernel primitive can be used to replace