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

[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: [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

[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

[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 ---

[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

[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(-)

[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

[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(-)

[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

[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 ---

[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

[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

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

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

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

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] 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

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

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

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

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

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 >

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:

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:

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

[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

[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

[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

[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

[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

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(_mutex); > + driver =

[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

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 > > > > --- > >

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

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

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

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(-) >

[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(-) ---

[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

[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 +++

[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

[PATCH 2/2] staging: ccree: use sizeof(*var) in kmalloc

2017-07-09 Thread Gustavo A. R. Silva
Fix the following checkpatch warning: CHECK: Prefer kmalloc(sizeof(*buff_mgr_handle)...) over kmalloc(sizeof(struct buff_mgr_handle)...) Signed-off-by: Gustavo A. R. Silva --- drivers/staging/ccree/ssi_buffer_mgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH 1/2] staging: ccree: remove unnecessary cast on kmalloc

2017-07-09 Thread Gustavo A. R. Silva
The assignment operator implicitly converts a void pointer to the type of the pointer it is assigned to. This issue was detected using Coccinelle and the following semantic patch: @@ expression * e; expression arg1, arg2; type T; @@ - e=(T*) + e= kmalloc(arg1, arg2); Signed-off-by: Gustavo A.