[PATCH] iio: trigger: free trigger resource correctly

2017-01-17 Thread Alison Schofield
Using iio_trigger_put() to free a trigger leads to release of a resource we never held. Replace with iio_trigger_free(). Signed-off-by: Alison Schofield --- Patches to use devm_* funcs are ready to follow this for the interrupt & bfin-timer triggers.

[PATCH] drivers: staging: rtl8188eu: include: statements using pointers enclosed in parantheses

2017-01-17 Thread Kartikey Singh
Macros with complex values enclosed in parentheses Signed-off-by: Kartikey Singh --- drivers/staging/rtl8188eu/include/wifi.h | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/drivers/staging/rtl8188eu/include/wifi.h

Re: [PATCH] staging: fbtft: replace decimal with 4-digit octal permissions

2017-01-17 Thread Andy Shevchenko
On Wed, Jan 18, 2017 at 1:38 AM, Stefano Manni wrote: > Following error detected by checkpatch.pl: > > ERROR: Use 4 digit octal (0777) not decimal permissions > > Signed-off-by: Stefano Manni > --- > drivers/staging/fbtft/flexfb.c | 18

[PATCH] staging: fbtft: replace decimal with 4-digit octal permissions

2017-01-17 Thread Stefano Manni
Following error detected by checkpatch.pl: ERROR: Use 4 digit octal (0777) not decimal permissions Signed-off-by: Stefano Manni --- drivers/staging/fbtft/flexfb.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git

[PATCH 1/5] staging: vchiq_core: Reduce the memdump size

2017-01-17 Thread Stefan Wahren
From: Phil Elwell This reduces the memory dump size to a sufficient value of 16 bytes. Signed-off-by: Phil Elwell Signed-off-by: Stefan Wahren --- .../vc04_services/interface/vchiq_arm/vchiq_core.c |8 1 file

[PATCH 4/5] staging: vc04_services: Fix messages appearing twice

2017-01-17 Thread Stefan Wahren
From: Phil Elwell An issue was observed when flushing openmax components which generate a large number of messages returning buffers to host. We occasionally found a duplicate message from 16 messages prior, resulting in a buffer returned twice. So fix the issue by adding

[PATCH 3/5] staging: vchiq_arm: Service callbacks must not fail

2017-01-17 Thread Stefan Wahren
From: Phil Elwell Service callbacks are not allowed to return an error. The internal callback that delivers events and messages to user tasks does not enqueue them if the service is closing, but this is not an error and should not be reported as such. Signed-off-by: Phil

[PATCH 0/5] staging: vc04_services: Upstream fixes

2017-01-17 Thread Stefan Wahren
This patch series contain several fixes from the Foundation kernel and based on this pull request [1] from Phil Elwell. Since the original commits wasn't ready for mainline submission i reworked them. [1] - https://github.com/anholt/linux/pull/63 Phil Elwell (5): staging: vchiq_core: Reduce

[PATCH 5/5] staging: vchiq_arm: Avoid premature message stalls

2017-01-17 Thread Stefan Wahren
From: Phil Elwell The constants MAX_COMPLETIONS and MSG_QUEUE_SIZE control the number of messages that can be outstanding to each client before the system as a whole stalls. If the numbers are too small then unnecessary thread switching will occur while waiting for a

[PATCH 2/5] staging: vchiq_arm: Fix unlocked access to dequeue_pending

2017-01-17 Thread Stefan Wahren
From: Phil Elwell The dequeue_pending flag wasn't protected by a spinlock in the service_callback. So fix this to make it safe. Signed-off-by: Phil Elwell Signed-off-by: Stefan Wahren ---

[PATCH 0/2] staging: rtl8188eu: fix typesign issues

2017-01-17 Thread Pierre-Yves Kerbrat
This patch fixes 2 issues detected with sparse (-Wtypesign) Pierre-Yves Kerbrat (2): staging: rtl8188eu: fix type of wpa_ielen in rtw_get_cipher_info staging: rtl8188eu: fix type sign of len in rtw_get_bcn_info drivers/staging/rtl8188eu/core/rtw_ieee80211.c | 4 ++-- 1 file changed, 2

[PATCH 1/2] staging: rtl8188eu: fix type of wpa_ielen in rtw_get_cipher_info

2017-01-17 Thread Pierre-Yves Kerbrat
wpa_ielen was declared u32 when we actually use an int Fix sparse (-Wtypesign) issues: drivers/staging/rtl8188eu/core/rtw_ieee80211.c:1008:60: warning: incorrect type in argument 2 (different signedness) drivers/staging/rtl8188eu/core/rtw_ieee80211.c:1008:60:expected int *wpa_ie_len

[PATCH 2/2] staging: rtl8188eu: fix type sign of len in rtw_get_bcn_info

2017-01-17 Thread Pierre-Yves Kerbrat
len was declared unsigned int where we use an int Fix sparse (-Wtypesign) issues: drivers/staging/rtl8188eu/core/rtw_ieee80211.c:1081:88: warning: incorrect type in argument 3 (different signedness) drivers/staging/rtl8188eu/core/rtw_ieee80211.c:1081:88:expected int *len

Re: [PATCH v3 2/2] hv_utils: implement Hyper-V PTP source

2017-01-17 Thread Thomas Gleixner
On Tue, 17 Jan 2017, Vitaly Kuznetsov wrote: > Stephen Hemminger writes: > >> static int hv_timesync_init(struct hv_util_service *srv) > >> { > >>INIT_WORK(, hv_set_host_time); > >> + > >> + hv_ptp_clock = ptp_clock_register(_hyperv_info, NULL); > >> + if

[PATCH] Fix coding style errors "open brace go on the same line"

2017-01-17 Thread Adrien Descamps
Open braces for enum, union and struct go on the same line. Signed-off-by: Adrien Descamps Reviewed-by: Eric Anholt --- .../interface/vchi/connections/connection.h| 3 +-- .../interface/vchi/message_drivers/message.h | 9

Re: [PATCH v2 4/4] staging: greybus: audio: Ensure proper byte order

2017-01-17 Thread Mark Greer
On Tue, Jan 17, 2017 at 08:19:30PM +0530, Vaibhav Agarwal wrote: > From: Vaibhav Agarwal > > Proper byte order was completely disregarded for multi byte data shared > between AP and module (and APB1). Fix this. > > Signed-off-by: Vaibhav Agarwal

Re: [PATCH v3 1/2] hv_util: switch to using timespec64

2017-01-17 Thread Thomas Gleixner
On Tue, 17 Jan 2017, Vitaly Kuznetsov wrote: > do_settimeofday() is deprecated, use do_settimeofday64() instead. > > Signed-off-by: Vitaly Kuznetsov > Acked-by: John Stultz Acked-by: Thomas Gleixner

Re: [PATCH v2 1/4] staging: greybus: audio: Avoid less than zero check for le32 variable

2017-01-17 Thread Mark Greer
Hi Vaibhav. On Tue, Jan 17, 2017 at 08:19:27PM +0530, Vaibhav Agarwal wrote: > mixer control->info call back function checks for -ve values to rebase > min and max values. However, le32 variable is used to fetch values from > GB module FW. Thus -ve value checking is not required. Fix this!! nit:

Re: [PATCH v2 2/4] staging: greybus: audio: Initialize sig_bits before configuring hwparams

2017-01-17 Thread Mark Greer
On Tue, Jan 17, 2017 at 08:19:28PM +0530, Vaibhav Agarwal wrote: > From: Vaibhav Agarwal > > Uninitialized variable sig_bits was used while configuring stream params > for codec module. These params are used to configure PCM settings for > APBridgeA. > > Usually,

Re: [PATCH v2 3/4] staging: greybus: audio: Cleanup junk codec registers

2017-01-17 Thread Mark Greer
On Tue, Jan 17, 2017 at 08:19:29PM +0530, Vaibhav Agarwal wrote: > From: Vaibhav Agarwal > > Dummy codec register were initially added while populating dummy codec > mixer controls until module topology parser was available. Now, these > dummy registers are nowhere

[PATCH] drivers: staging: Fix "space required after that ','" errors

2017-01-17 Thread simran singhal
Fix checkpatch.pl "space required after that ','" errors Signed-off-by: simran singhal diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c index d7d85b3..6380b41 100644 ---

Re: [PATCH v3 0/2] hv_util: adjust system time smoothly

2017-01-17 Thread Vitaly Kuznetsov
Stephen Hemminger writes: > On Tue, 17 Jan 2017 16:27:17 +0100 > Vitaly Kuznetsov wrote: > >> With TimeSync version 4 protocol support we started updating system time >> continuously through the whole lifetime of Hyper-V guests. Every 5 seconds

Re: [PATCH v3 2/2] hv_utils: implement Hyper-V PTP source

2017-01-17 Thread Vitaly Kuznetsov
Stephen Hemminger writes: > On Tue, 17 Jan 2017 16:27:19 +0100 > Vitaly Kuznetsov wrote: > >> With TimeSync version 4 protocol support we started updating system time >> continuously through the whole lifetime of Hyper-V guests. Every 5 seconds

Re: [PATCH v3 2/2] hv_utils: implement Hyper-V PTP source

2017-01-17 Thread Stephen Hemminger
On Tue, 17 Jan 2017 16:27:19 +0100 Vitaly Kuznetsov wrote: > With TimeSync version 4 protocol support we started updating system time > continuously through the whole lifetime of Hyper-V guests. Every 5 seconds > there is a time sample from the host which triggers

Re: [PATCH v3 0/2] hv_util: adjust system time smoothly

2017-01-17 Thread Stephen Hemminger
On Tue, 17 Jan 2017 16:27:17 +0100 Vitaly Kuznetsov wrote: > With TimeSync version 4 protocol support we started updating system time > continuously through the whole lifetime of Hyper-V guests. Every 5 seconds > there is a time sample from the host which triggers

[PATCH v3 0/2] hv_util: adjust system time smoothly

2017-01-17 Thread Vitaly Kuznetsov
With TimeSync version 4 protocol support we started updating system time continuously through the whole lifetime of Hyper-V guests. Every 5 seconds there is a time sample from the host which triggers do_settimeofday[64](). While the time from the host is very accurate such adjustments may cause

[PATCH v3 1/2] hv_util: switch to using timespec64

2017-01-17 Thread Vitaly Kuznetsov
do_settimeofday() is deprecated, use do_settimeofday64() instead. Signed-off-by: Vitaly Kuznetsov Acked-by: John Stultz --- drivers/hv/hv_util.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/hv/hv_util.c

[PATCH v3 2/2] hv_utils: implement Hyper-V PTP source

2017-01-17 Thread Vitaly Kuznetsov
With TimeSync version 4 protocol support we started updating system time continuously through the whole lifetime of Hyper-V guests. Every 5 seconds there is a time sample from the host which triggers do_settimeofday[64](). While the time from the host is very accurate such adjustments may cause

[PATCH v2 4/4] staging: greybus: audio: Ensure proper byte order

2017-01-17 Thread Vaibhav Agarwal
From: Vaibhav Agarwal Proper byte order was completely disregarded for multi byte data shared between AP and module (and APB1). Fix this. Signed-off-by: Vaibhav Agarwal --- drivers/staging/greybus/audio_module.c | 2 +-

[PATCH v2 2/4] staging: greybus: audio: Initialize sig_bits before configuring hwparams

2017-01-17 Thread Vaibhav Agarwal
From: Vaibhav Agarwal Uninitialized variable sig_bits was used while configuring stream params for codec module. These params are used to configure PCM settings for APBridgeA. Usually, this is dependent on codec capability and thus populated via codec dai_driver

[PATCH v2 3/4] staging: greybus: audio: Cleanup junk codec registers

2017-01-17 Thread Vaibhav Agarwal
From: Vaibhav Agarwal Dummy codec register were initially added while populating dummy codec mixer controls until module topology parser was available. Now, these dummy registers are nowhere used and thus can be safely removed. Since ASoC framework requires a valid

[PATCH v2 0/4] Cleanup greybus audio driver

2017-01-17 Thread Vaibhav Agarwal
This patch series include following cleanup changes in GB Audio driver. - Avoid unnecessary checks for le32 variables - Initialize sig_bits before configuring hw_params - Remove junk codec register mapping - Ensure proper byte ordering Next task is to enable build for GB codec driver. However

[PATCH v2 1/4] staging: greybus: audio: Avoid less than zero check for le32 variable

2017-01-17 Thread Vaibhav Agarwal
mixer control->info call back function checks for -ve values to rebase min and max values. However, le32 variable is used to fetch values from GB module FW. Thus -ve value checking is not required. Fix this!! Signed-off-by: Vaibhav Agarwal ---

Re: [PATCH] staging: fsl-mc: fix coding stye errors

2017-01-17 Thread Dan Carpenter
On Tue, Jan 17, 2017 at 12:47:30AM -0800, Joe Perches wrote: > On Tue, 2017-01-17 at 11:27 +0300, Dan Carpenter wrote: > > On Tue, Jan 17, 2017 at 09:11:28AM +0100, Dhananjay Balan wrote: > > > Split line at boolean operator. > > > > > > Error was reported by checkpatch.pl as > > > WARNING: Avoid

Re: [PATCH RFC] hv_utils: implement Hyper-V PTP source

2017-01-17 Thread Vitaly Kuznetsov
Thomas Gleixner writes: > On Fri, 13 Jan 2017, Vitaly Kuznetsov wrote: >> With TimeSync version 4 protocol support we started updating system time >> continuously through the whole lifetime of Hyper-V guests. Every 5 seconds >> there is a time sample from the host which

[PATCH v2 10/15] staging: iio: isl29028: remove out of memory log message

2017-01-17 Thread Brian Masney
If the call to devm_iio_device_alloc() fails, then isl29028_probe() logs a message saying that memory cannot be allocated. The user's system most likely has larger issues at this point. This patch removes that error message since the error code is passed on and the message is not necessary.

[PATCH v2 14/15] staging: iio: isl29028: only set ALS scale when ALS/IR sensing is enabled

2017-01-17 Thread Brian Masney
isl29028_chip_init_and_power_on() calls isl29028_set_als_scale() and this is not needed until the user actually needs to take a reading from the ALS/IR sensor. This patch moves the isl29028_set_als_scale() call from isl29028_chip_init_and_power_on() to isl29028_set_als_ir_mode(). This sets the

[PATCH v2 15/15] staging: iio: isl29028: add runtime power management support

2017-01-17 Thread Brian Masney
This patch adds runtime power management support to the isl29028 driver. It defaults to powering off the device after two seconds of inactivity. isl29028_chip_init_and_power_on() currently only zeros the CONFIGURE register on the chip, which will cause the chip to turn off. This patch also

Re: [PATCH] staging: fsl-mc: fix coding stye errors

2017-01-17 Thread Joe Perches
On Tue, 2017-01-17 at 11:27 +0300, Dan Carpenter wrote: > On Tue, Jan 17, 2017 at 09:11:28AM +0100, Dhananjay Balan wrote: > > Split line at boolean operator. > > > > Error was reported by checkpatch.pl as > > WARNING: Avoid multiple line dereference - prefer 'mc_msi_domain->host_data' [] > >

[PATCH v2 05/15] staging: iio: isl29028: remove unused define ISL29028_DEV_ATTR

2017-01-17 Thread Brian Masney
The #define ISL29028_DEV_ATTR was not used so this patch removes the unnecessary code. Signed-off-by: Brian Masney --- drivers/staging/iio/light/isl29028.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/iio/light/isl29028.c

[PATCH v2 13/15] staging: iio: isl29028: only set proximity sampling rate when proximity is enabled

2017-01-17 Thread Brian Masney
isl29028_chip_init_and_power_on() calls isl29028_set_proxim_sampling() and this is not needed until the user actually needs to take a proximity reading. This patch moves the isl29028_set_proxim_sampling() call from isl29028_chip_init_and_power_on() to isl29028_enable_proximity(). This sets the

[PATCH v2 04/15] staging: iio: isl29028: change newlines to improve readability

2017-01-17 Thread Brian Masney
Add and remove newlines to improve code readability in preparation for moving the driver out of staging. Signed-off-by: Brian Masney --- drivers/staging/iio/light/isl29028.c | 33 - 1 file changed, 24 insertions(+), 9 deletions(-) diff

[PATCH v2 12/15] staging: iio: isl29028: remove enable flag from isl29028_enable_proximity()

2017-01-17 Thread Brian Masney
isl29028_enable_proximity() has a boolean argument named enable. This function is only called once and the enable flag is set to true in that call. This patch removes the enable parameter from that function. Signed-off-by: Brian Masney --- The device gets runtime power

[PATCH v2 08/15] staging: iio: isl29028: made error messages consistent

2017-01-17 Thread Brian Masney
The wording and style of the different error messages was not consistent. This patch makes the wording and style consistent throughout the driver. Signed-off-by: Brian Masney --- drivers/staging/iio/light/isl29028.c | 56 1 file

[PATCH v2 01/15] staging: iio: isl29028: made alignment of variables in struct isl29028_chip consistent

2017-01-17 Thread Brian Masney
The alignment of the variables in the struct isl29028_chip is not consistent. This changes all of the variables to use consistent alignment to improve the code readability. Signed-off-by: Brian Masney --- drivers/staging/iio/light/isl29028.c | 10 +- 1 file

[PATCH v2 11/15] staging: iio: isl29028: remove unnecessary parenthesis

2017-01-17 Thread Brian Masney
isl29028_write_raw() contains unnecessary parenthesis when checking to see if the passed in lux scale is valid. This patch removes the unnecessary parenthesis. Signed-off-by: Brian Masney --- drivers/staging/iio/light/isl29028.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH v2 02/15] staging: iio: isl29028: fix alignment of function arguments

2017-01-17 Thread Brian Masney
Two separate calls to regmap_update_bits() in isl29028_set_als_scale() and isl29028_set_als_ir_mode() did not have their function arguments on the next line aligned correctly to the open parenthesis. This patch corrects the alignment. Signed-off-by: Brian Masney ---

[PATCH v2 09/15] staging: iio: isl29028: remove unnecessary error logging in isl29028_chip_init_and_power_on()

2017-01-17 Thread Brian Masney
If the call to isl29028_chip_init_and_power_on() in isl29028_probe() fails, then isl29028_probe() will log an error message. All of the error paths in that call path already have error logging in place. This patch removes the unnecessary logging. Signed-off-by: Brian Masney

[PATCH v2 06/15] staging: iio: isl29028: move failure logging into isl29028_set_proxim_sampling()

2017-01-17 Thread Brian Masney
When isl29028_set_proxim_sampling() fails, it was up to both callers to log the failure message. This patch moves the logging into isl29028_set_proxim_sampling() to reduce the overall amount of code in the driver. Signed-off-by: Brian Masney ---

[PATCH v2 00/15] staging cleanups

2017-01-17 Thread Brian Masney
This patch set contains more of my cleanups to the isl29028 light driver in preparation for moving the driver out of staging. The main feature introduced by this patch set is support for runtime power management and autosuspend after two seconds. The rest of the patches are minor code

[PATCH v2 07/15] staging: iio: isl29028: move failure logging into isl29028_set_als_scale()

2017-01-17 Thread Brian Masney
When isl29028_set_als_scale() fails, it was up to both callers to log the failure message. This patch moves the logging into isl29028_set_als_scale() to reduce the overall amount of code in the driver. Signed-off-by: Brian Masney --- drivers/staging/iio/light/isl29028.c |

[PATCH v2 03/15] staging: iio: isl29028: combine isl29028_proxim_get() and isl29028_read_proxim()

2017-01-17 Thread Brian Masney
isl29028_proxim_get() checks to see if the promixity needs to be enabled on the chip and then calls isl29028_read_proxim(). There are no other callers of isl29028_read_proxim(). The naming between these two functions can be confusing so this patch combines the two to avoid the confusion.

Re: [PATCH] staging: fsl-mc: fix coding stye errors

2017-01-17 Thread Dan Carpenter
On Tue, Jan 17, 2017 at 09:11:28AM +0100, Dhananjay Balan wrote: > Split line at boolean operator. > > Error was reported by checkpatch.pl as > WARNING: Avoid multiple line dereference - prefer 'mc_msi_domain->host_data' > > Signed-off-by: Dhananjay Balan > --- >

[PATCH] staging: fsl-mc: fix coding stye errors

2017-01-17 Thread Dhananjay Balan
Split line at boolean operator. Error was reported by checkpatch.pl as WARNING: Avoid multiple line dereference - prefer 'mc_msi_domain->host_data' Signed-off-by: Dhananjay Balan --- drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c | 4 ++-- 1 file changed, 2