[PATCH 31/32] staging: android: ion: ion.c fixed a 80 character line limit coding style issue

2016-07-24 Thread Nadim almas
From: sarique 

fixed a coding style issue.

Signed-off-by: Nadim almas 
---
 drivers/staging/android/ion/ion.c| 3 ++-
 drivers/staging/comedi/drivers/ssv_dnp.c | 4 ++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/android/ion/ion.c 
b/drivers/staging/android/ion/ion.c
index a2cf93b..52345df 100644
--- a/drivers/staging/android/ion/ion.c
+++ b/drivers/staging/android/ion/ion.c
@@ -1358,7 +1358,8 @@ static long ion_ioctl(struct file *filp, unsigned int 
cmd, unsigned long arg)
struct ion_handle *handle;
 
mutex_lock(&client->lock);
-   handle = ion_handle_get_by_id_nolock(client, 
data.handle.handle);
+   handle = ion_handle_get_by_id_nolock(client,
+data.handle.handle);
if (IS_ERR(handle)) {
mutex_unlock(&client->lock);
return PTR_ERR(handle);
diff --git a/drivers/staging/comedi/drivers/ssv_dnp.c 
b/drivers/staging/comedi/drivers/ssv_dnp.c
index f9f634f..5674427 100644
--- a/drivers/staging/comedi/drivers/ssv_dnp.c
+++ b/drivers/staging/comedi/drivers/ssv_dnp.c
@@ -121,9 +121,9 @@ static int dnp_dio_insn_config(struct comedi_device *dev,
}
 
val = inb(CSCDR);
-   if (data[0] == COMEDI_OUTPUT)
+   if (data[0] == COMEDI_OUTPUT) 
val |= mask;
-   else
+else
val &= ~mask;
outb(val, CSCDR);
 
-- 
2.7.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging: iio: ad5933: Return correct value for AD5933_OUT_RANGE.

2016-07-24 Thread Jonathan Cameron
On 21/07/16 16:23, Phil Turnbull wrote:
> The 'break' statement after calling ad5933_cmd only breaks out of the
> 'for' loop, which then unconditionally sets the return value to -EINVAL.
> Move the initialisation of 'ret' so we return the correct value.
> 
> Signed-off-by: Phil Turnbull 
As I have nothing in the fixes-togreg branch, I've applied this to
the fixes-togreg-post-rc1 as that's the next one that will go upstream.
I don't tend to send Greg fixes during the merge window as he is
rather busy and won't pick them up until after anyways!

This may be delayed by a few weeks though as I'm travelling.

Thanks,

Jonathan
> ---
>  drivers/staging/iio/impedance-analyzer/ad5933.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/iio/impedance-analyzer/ad5933.c 
> b/drivers/staging/iio/impedance-analyzer/ad5933.c
> index 9f43976..34a6990 100644
> --- a/drivers/staging/iio/impedance-analyzer/ad5933.c
> +++ b/drivers/staging/iio/impedance-analyzer/ad5933.c
> @@ -419,6 +419,7 @@ static ssize_t ad5933_store(struct device *dev,
>   mutex_lock(&indio_dev->mlock);
>   switch ((u32)this_attr->address) {
>   case AD5933_OUT_RANGE:
> + ret = -EINVAL;
>   for (i = 0; i < 4; i++)
>   if (val == st->range_avail[i]) {
>   st->ctrl_hb &= ~AD5933_CTRL_RANGE(0x3);
> @@ -426,7 +427,6 @@ static ssize_t ad5933_store(struct device *dev,
>   ret = ad5933_cmd(st, 0);
>   break;
>   }
> - ret = -EINVAL;
>   break;
>   case AD5933_IN_PGA_GAIN:
>   if (sysfs_streq(buf, "1")) {
> 

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 0/3] staging: wilc1000: Fine-tuning for two function implementations

2016-07-24 Thread SF Markus Elfring
From: Markus Elfring 

Further update suggestions were taken into account
after a patch was applied from static source code analysis.

Markus Elfring (3):
  Delete an unnecessary check before the function call "release_firmware"
  One function call less in mac_ioctl() after error detection
  Reduce scope for a few variables in mac_ioctl()

 drivers/staging/wilc1000/linux_wlan.c | 19 ---
 1 file changed, 8 insertions(+), 11 deletions(-)

-- 
2.9.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 1/3] staging: wilc1000: Delete an unnecessary check before the function call "release_firmware"

2016-07-24 Thread SF Markus Elfring
From: Markus Elfring 
Date: Sun, 24 Jul 2016 21:00:20 +0200

The release_firmware() function tests whether its argument is NULL and then
returns immediately. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring 
---
 drivers/staging/wilc1000/linux_wlan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/wilc1000/linux_wlan.c 
b/drivers/staging/wilc1000/linux_wlan.c
index 3a66255..cdef645 100644
--- a/drivers/staging/wilc1000/linux_wlan.c
+++ b/drivers/staging/wilc1000/linux_wlan.c
@@ -1223,7 +1223,7 @@ void wilc_netdev_cleanup(struct wilc *wilc)
vif[i] = netdev_priv(wilc->vif[i]->ndev);
}
 
-   if (wilc && wilc->firmware) {
+   if (wilc) {
release_firmware(wilc->firmware);
wilc->firmware = NULL;
}
-- 
2.9.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 2/3] staging: wilc1000: One function call less in mac_ioctl() after error detection

2016-07-24 Thread SF Markus Elfring
From: Markus Elfring 
Date: Sun, 24 Jul 2016 21:15:23 +0200

The kfree() function was called in two cases by the mac_ioctl() function
during error handling even if the passed variable did not contain a pointer
for a valid data item.

Improve this implementation detail by the introduction of another
jump label.

Signed-off-by: Markus Elfring 
---
 drivers/staging/wilc1000/linux_wlan.c | 8 +++-
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/wilc1000/linux_wlan.c 
b/drivers/staging/wilc1000/linux_wlan.c
index cdef645..7b1ebcc 100644
--- a/drivers/staging/wilc1000/linux_wlan.c
+++ b/drivers/staging/wilc1000/linux_wlan.c
@@ -1130,7 +1130,7 @@ static int mac_ioctl(struct net_device *ndev, struct 
ifreq *req, int cmd)
if (copy_to_user(wrq->u.data.pointer, buff, 
size)) {
netdev_err(ndev, "failed to copy\n");
ret = -EFAULT;
-   goto done;
+   goto free_buffer;
}
}
}
@@ -1144,11 +1144,9 @@ static int mac_ioctl(struct net_device *ndev, struct 
ifreq *req, int cmd)
goto done;
}
}
-
-done:
-
+free_buffer:
kfree(buff);
-
+done:
return ret;
 }
 
-- 
2.9.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 3/3] staging: wilc1000: Reduce scope for a few variables in mac_ioctl()

2016-07-24 Thread SF Markus Elfring
From: Markus Elfring 
Date: Sun, 24 Jul 2016 21:45:37 +0200

Three local variables were used only within a single case branch.

* Thus move the data type definition for "rssi" and "size" into the
  corresponding code block.

* The variable "length" was not modified after its initialisation.
  Thus pass a constant value in the affected function call instead.

Signed-off-by: Markus Elfring 
---
 drivers/staging/wilc1000/linux_wlan.c | 9 -
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/wilc1000/linux_wlan.c 
b/drivers/staging/wilc1000/linux_wlan.c
index 7b1ebcc..173be16 100644
--- a/drivers/staging/wilc1000/linux_wlan.c
+++ b/drivers/staging/wilc1000/linux_wlan.c
@@ -1094,8 +1094,6 @@ int wilc_mac_close(struct net_device *ndev)
 static int mac_ioctl(struct net_device *ndev, struct ifreq *req, int cmd)
 {
u8 *buff = NULL;
-   s8 rssi;
-   u32 size = 0, length = 0;
struct wilc_vif *vif;
s32 ret = 0;
struct wilc *wilc;
@@ -1110,8 +1108,7 @@ static int mac_ioctl(struct net_device *ndev, struct 
ifreq *req, int cmd)
case SIOCSIWPRIV:
{
struct iwreq *wrq = (struct iwreq *)req;
-
-   size = wrq->u.data.length;
+   u32 size = wrq->u.data.length;
 
if (size && wrq->u.data.pointer) {
buff = memdup_user(wrq->u.data.pointer,
@@ -1119,7 +1116,9 @@ static int mac_ioctl(struct net_device *ndev, struct 
ifreq *req, int cmd)
if (IS_ERR(buff))
return PTR_ERR(buff);
 
-   if (strncasecmp(buff, "RSSI", length) == 0) {
+   if (strncasecmp(buff, "RSSI", 0) == 0) {
+   s8 rssi;
+
ret = wilc_get_rssi(vif, &rssi);
netdev_info(ndev, "RSSI :%d\n", rssi);
 
-- 
2.9.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 31/32] staging: android: ion: ion.c fixed a 80 character line limit coding style issue

2016-07-24 Thread Greg KH
On Sun, Jul 24, 2016 at 12:37:31AM -0700, Nadim almas wrote:
> From: sarique 
> 
> fixed a coding style issue.

What issue?

> 
> Signed-off-by: Nadim almas 

Your From: and signed-off-by names do not match up :(

And where are the other 31 patches in this series?

thanks,

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[GIT PULL] Staging/IIO driver patches for 4.8-rc1

2016-07-24 Thread Greg KH
The following changes since commit a99cde438de0c4c0cecc1d1af1a55a75b10bfdef:

  Linux 4.7-rc6 (2016-07-03 23:01:00 -0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git/ 
tags/staging-4.8-rc1

for you to fetch changes up to 6c71ee3b6157fdbde5c839405b593876d3687eb9:

  Merge tag 'iio-for-4.8c' of 
git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next 
(2016-07-14 12:05:29 +0900)


Staging / IIO driver update for 4.8-rc1

Here is the big Staging and IIO driver update for 4.8-rc1.

We ended up adding more code than removing, again, but it's not all that
bad.  Lots of cleanups all over the staging tree, and new IIO drivers,
full details in the shortlog.

All of these have been in linux-next for a while with no reported issues.

Signed-off-by: Greg Kroah-Hartman 


Adriana Reus (1):
  mailmap: update Adriana Reus email address

Alex Zhuravlev (1):
  staging/lustre: LDLM_DEBUG() shouldn't be passed \n

Alison Schofield (12):
  iio: light: jsa1212: remove unneeded i2c check functionality test
  iio: adc: ad7266: claim direct mode during sensor read
  iio: adc: ad7476: use iio helper function to guarantee direct mode
  iio: adc: ad7887: use iio helper function to guarantee direct mode
  iio: adc: ad7923: use iio helper function to guarantee direct mode
  iio: adc: ad799x: use iio helper function to guarantee direct mode
  iio: adc: ad7793: claim direct mode when writing frequency
  iio: adc: ad7791: claim direct mode when writing frequency
  iio: light: tcs3414: use iio helper function to guarantee direct mode
  iio: light: tcs3472: use iio helper function to guarantee direct mode
  iio: light: isl29125: use iio helper function to guarantee direct mode
  iio: light: gp2ap020a00f: use iio helper function to lock direct mode

Andreas Dilger (1):
  staging: lustre: quiet lockdep recursive lock warning

Andrew F. Davis (15):
  iio: health/afe440x: Fix kernel-doc format
  iio: health/afe440x: Remove of_match_ptr and ifdefs
  iio: health/afe440x: Remove unneeded initializers
  iio: health/afe440x: Always use separate gain values
  iio: health/afe440x: Fix scan_index assignment
  iio: health/afe440x: Remove unneeded offset handling
  iio: health/afe4404: Remove LED3 input channel
  iio: health/afe440x: Remove channel names
  iio: health/afe440x: Use regmap fields
  iio: health/afe440x: Make gain settings a modifier for the stages
  iio: health/afe440x: Match LED currents to stages
  iio: health/afe440x: Remove unused definitions
  iio: health/afe4404: ENSEPGAIN is part of CONTROL2 register
  iio: adc: ti_am335x_adc: use variable names for sizeof() operator
  iio: adc: ti_am335x_adc: use SIMPLE_DEV_PM_OPS helper macro

Andriy Skulysh (1):
  staging/lustre/osc: glimpse lock should match only with granted locks

Arnd Bergmann (3):
  staging: lustre: hide call to Posix ACL in ifdef
  staging: comedi: avoid using timeval
  iio: as3935: improve error reporting in as3935_event_work

Ben Evans (1):
  staging/lustre/ptlrpc: Remove __ptlrpc_request_bufs_pack

Bharat Bhushan (1):
  staging: fsl-mc: fix asymmetry in destroy of mc_io

Bijosh Thykkoottathil (3):
  drivers:iio:light:isl29125: added macros for sensing range
  drivers:iio:accel:mma8452: added cleanup provision in case of failure.
  drivers:iio:accel:mma8452: removed unwanted return statements

Binoy Jayan (13):
  staging: lustre: lnet: Replace semaphore ln_rc_signal with completion
  rtl8192u: r8192_priv: Replace semaphore wx_sem with mutex
  rtl8192u: ieee80211_device: Replace semaphore wx_sem with mutex
  rtl8192u: Replace semaphore scan_sem with mutex
  rtl8192u: Remove unused semaphore rf_sem
  staging: wilc1000: Replace semaphore txq_event with completion
  staging: wilc1000: Replace semaphore txq_add_to_head_cs with mutex
  staging: wilc1000: Replace semaphore cfg_event with completion
  staging: wilc1000: Replace semaphore sync_event with completion
  staging: wilc1000: Remove semaphore close_exit_sync
  staging: wilc1000: message_queue: Move code to host interface
  staging: wilc1000: Replace kthread with workqueue for host interface
  staging: wilc1000: Change interface wilc_mq_send to wilc_enqueue_cmd

Bob Glossman (1):
  staging/lustre: Add newline to LU_OBJECT_DEBUG() message

Bruno Faccini (1):
  staging/lustre/llite: lock i_lock before __d_drop()

Chaehyun Lim (6):
  staging: wilc1000: change handle_cfg_param's return type to void
  staging: wilc1000: change data type of result in handle_cfg_param
  staging: wilc1000: rename result in handle_cfg_param
  staging: wilc1000: remove unused struct set_mac_addr
  staging: wil

Re: [PATCH 0/7] de-stage SW_SYNC validation frawework

2016-07-24 Thread Greg Kroah-Hartman
On Mon, Jul 18, 2016 at 04:12:45PM -0300, Gustavo Padovan wrote:
> Hi,
> 
> Do you think there is time to get this in for 4.8?

No, it was too late on my end, due to travel and vacation, sorry.  I'll
queue it up for 4.9-rc1.

thanks,

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel