[PATCH] staging: rtl8192e: Remove unnecessary use of goto

2016-12-13 Thread rahul . g4
From: Rahul Goyal 

This patch removes unnecessary goto branch
when memory unallocated.

Signed-off-by: Rahul Goyal 
---
 drivers/staging/rtl8192e/rtllib_crypt_wep.c |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtllib_crypt_wep.c 
b/drivers/staging/rtl8192e/rtllib_crypt_wep.c
index b3343a5..2b1d2709 100644
--- a/drivers/staging/rtl8192e/rtllib_crypt_wep.c
+++ b/drivers/staging/rtl8192e/rtllib_crypt_wep.c
@@ -37,8 +37,8 @@ static void *prism2_wep_init(int keyidx)
struct prism2_wep_data *priv;
 
priv = kzalloc(sizeof(*priv), GFP_ATOMIC);
-   if (priv == NULL)
-   goto fail;
+   if (!priv)
+   return NULL;
priv->key_idx = keyidx;
 
priv->tx_tfm = crypto_alloc_skcipher("ecb(arc4)", 0, CRYPTO_ALG_ASYNC);
-- 
1.7.9.5

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


Re: [PATCH v2 5/5] staging: lustre: headers: use proper byteorder functions in lustre_idl.h

2016-12-13 Thread Dan Carpenter
It used to be that great swathes of Lustre were used in both user space
and kernel space.  We had huge unused modules in the kernel that were
only used for user space.

regards,
dan carpenter

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


Re: [PATCH] staging: rtl8192e: Remove unnecessary use of goto

2016-12-13 Thread Dan Carpenter
On Tue, Dec 13, 2016 at 01:41:24PM +0530, rahul...@samsung.com wrote:
> From: Rahul Goyal 
> 
> This patch removes unnecessary goto branch
> when memory unallocated.
> 
> Signed-off-by: Rahul Goyal 
> ---
>  drivers/staging/rtl8192e/rtllib_crypt_wep.c |4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/rtl8192e/rtllib_crypt_wep.c 
> b/drivers/staging/rtl8192e/rtllib_crypt_wep.c
> index b3343a5..2b1d2709 100644
> --- a/drivers/staging/rtl8192e/rtllib_crypt_wep.c
> +++ b/drivers/staging/rtl8192e/rtllib_crypt_wep.c
> @@ -37,8 +37,8 @@ static void *prism2_wep_init(int keyidx)
>   struct prism2_wep_data *priv;
>  
>   priv = kzalloc(sizeof(*priv), GFP_ATOMIC);
> - if (priv == NULL)
> - goto fail;
> + if (!priv)
> + return NULL;

There isn't really anything in CodingStyle against these things (I am a
CodingStyle author).  I personally hate "goto fail" but if everyone
decided to do their own personal coding style it becomes a hassle.

regards,
dan carpenter

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


Re: [PATCH] staging: rtl8192e: Remove unnecessary use of goto

2016-12-13 Thread Greg KH
On Tue, Dec 13, 2016 at 01:41:24PM +0530, rahul...@samsung.com wrote:
> From: Rahul Goyal 
> 
> This patch removes unnecessary goto branch
> when memory unallocated.

Goto's are good, embrace them and learn to love the power!

Sorry, not going to take this patch.

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


Re: [PATCH] staging: Remove slicoss driver

2016-12-13 Thread Greg Kroah-Hartman
On Mon, Dec 12, 2016 at 07:32:07PM -0800, Guenter Roeck wrote:
> There is now a different driver for the slicoss devices in
> drivers/net/ethernet/alacritech/. That driver supports the same PCI
> device IDs as the driver in staging. Both drivers use the same
> configuration symbol (CONFIG_SLICOSS), which causes build failures
> for the staging driver. Presumably the driver in staging is obsolete
> and can be removed.
> 
> Cc: Tobias Klauser 
> Cc: David S. Miller 
> Cc: Lino Sanfilippo 
> Cc: Lior Dotan 
> Cc: Christopher Harrer 
> Signed-off-by: Guenter Roeck 
> ---
>  MAINTAINERS   |6 -
>  drivers/staging/Kconfig   |2 -
>  drivers/staging/Makefile  |1 -
>  drivers/staging/slicoss/Kconfig   |   14 -
>  drivers/staging/slicoss/Makefile  |1 -
>  drivers/staging/slicoss/README|7 -
>  drivers/staging/slicoss/TODO  |   36 -
>  drivers/staging/slicoss/slic.h|  573 ---
>  drivers/staging/slicoss/slichw.h  |  652 
>  drivers/staging/slicoss/slicoss.c | 3131 
> -
>  10 files changed, 4423 deletions(-)
>  delete mode 100644 drivers/staging/slicoss/Kconfig
>  delete mode 100644 drivers/staging/slicoss/Makefile
>  delete mode 100644 drivers/staging/slicoss/README
>  delete mode 100644 drivers/staging/slicoss/TODO
>  delete mode 100644 drivers/staging/slicoss/slic.h
>  delete mode 100644 drivers/staging/slicoss/slichw.h
>  delete mode 100644 drivers/staging/slicoss/slicoss.c

Odd, I already did this in my staging-next tree, which should be showing
up in linux-next, correct?  It's not merged into Linus's tree just yet,
give me a chance to get it to him please, I've been traveling. :)

thanks,

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


Vietnam

2016-12-13 Thread xuandat nguyen
I want to place an order, provide your website address, so I can review your 
product.
 Do you ship to Vietnam ?
 Do You accept 100% LC at sight or TT payment ?
 please let me know:
 Your minimum order quantity.
 Your FOB Prices and FOB Port.
 Your estimated delivery time.

thanks
Thanks & Best Regards
Nguyen Xuan Dat
Phone: +84 1273893843
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] greybus: timesync: replace init_timer with setup_timer

2016-12-13 Thread Xie Qirong
The combination of init_timer and setting up the data and function field
manually is equivalent to calling setup_timer(). This is an api 
consolidation only and improves readability.

Signed-off-by: Xie Qirong 
---

 setup_timer.cocci suggested the following improvement:
 drivers/staging/greybus/timesync.c:1058:1-11: Use setup_timer function 
 for function on line 1059.

 Patch was compile checked with: x86_64_defconfig + CONFIG_STAGING=y, 
 CONFIG_GREYBUS=m

 Kernel version: 4.9.0 (localversion-next is next-20161213)

 drivers/staging/greybus/timesync.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/greybus/timesync.c 
b/drivers/staging/greybus/timesync.c
index 29e6c1c..af83e12 100644
--- a/drivers/staging/greybus/timesync.c
+++ b/drivers/staging/greybus/timesync.c
@@ -1055,10 +1055,9 @@ int gb_timesync_svc_add(struct gb_svc *svc)
goto done;
}
 
-   init_timer(×ync_svc->ktime_timer);
-   timesync_svc->ktime_timer.function = gb_timesync_ktime_timer_fn;
+   setup_timer(×ync_svc->ktime_timer, gb_timesync_ktime_timer_fn,
+   (unsigned long)timesync_svc);
timesync_svc->ktime_timer.expires = jiffies + GB_TIMESYNC_KTIME_UPDATE;
-   timesync_svc->ktime_timer.data = (unsigned long)timesync_svc;
add_timer(×ync_svc->ktime_timer);
 done:
mutex_unlock(&gb_timesync_svc_list_mutex);
-- 
2.10.2


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


Re: [PATCH v2 5/5] staging: lustre: headers: use proper byteorder functions in lustre_idl.h

2016-12-13 Thread Oleg Drokin

On Dec 13, 2016, at 3:31 AM, Dan Carpenter wrote:

> It used to be that great swathes of Lustre were used in both user space
> and kernel space.  We had huge unused modules in the kernel that were
> only used for user space.

Huh?
There was nothing of the sort.
There were huge parts of code that were used by the server, but sue to no server
in staging client, ended up being unused, though.

There were also (much smaller) bits that were supporting userspace client
(that is, a library that was able to mount lustre servers completely from
userspace by hijacking libc calls), but that was mostly gone by the time
we got into staging anyway.

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


Re: [PATCH v2 1/7] selftest: sync: basic tests for sw_sync framework

2016-12-13 Thread Shuah Khan
Hi Gustavo,

On 11/01/2016 10:18 AM, Gustavo Padovan wrote:
> Hi Emilio,
> 
> 2016-10-19 Emilio López :
> 
>> These tests are based on the libsync test suite from Android.
>> This commit lays the ground for future tests, as well as includes
>> tests for a variety of basic allocation commands.
>>
>> Signed-off-by: Emilio López 
>> ---
>>  tools/testing/selftests/Makefile  |   1 +
>>  tools/testing/selftests/sync/.gitignore   |   1 +
>>  tools/testing/selftests/sync/Makefile |  18 +++
>>  tools/testing/selftests/sync/sw_sync.h|  46 +++
>>  tools/testing/selftests/sync/sync.c   | 221 
>> ++
>>  tools/testing/selftests/sync/sync.h   |  40 ++
>>  tools/testing/selftests/sync/sync_alloc.c |  74 ++
>>  tools/testing/selftests/sync/sync_test.c  |  71 ++
>>  tools/testing/selftests/sync/synctest.h   |  47 +++
>>  9 files changed, 519 insertions(+)
>>  create mode 100644 tools/testing/selftests/sync/.gitignore
>>  create mode 100644 tools/testing/selftests/sync/Makefile
>>  create mode 100644 tools/testing/selftests/sync/sw_sync.h
>>  create mode 100644 tools/testing/selftests/sync/sync.c
>>  create mode 100644 tools/testing/selftests/sync/sync.h
>>  create mode 100644 tools/testing/selftests/sync/sync_alloc.c
>>  create mode 100644 tools/testing/selftests/sync/sync_test.c
>>  create mode 100644 tools/testing/selftests/sync/synctest.h
>>
>> diff --git a/tools/testing/selftests/Makefile 
>> b/tools/testing/selftests/Makefile
>> index f770dba..69cf1a6 100644
>> --- a/tools/testing/selftests/Makefile
>> +++ b/tools/testing/selftests/Makefile
>> @@ -23,6 +23,7 @@ TARGETS += seccomp
>>  TARGETS += sigaltstack
>>  TARGETS += size
>>  TARGETS += static_keys
>> +TARGETS += sync
>>  TARGETS += sysctl
>>  ifneq (1, $(quicktest))
>>  TARGETS += timers
>> diff --git a/tools/testing/selftests/sync/.gitignore 
>> b/tools/testing/selftests/sync/.gitignore
>> new file mode 100644
>> index 000..f5091e7
>> --- /dev/null
>> +++ b/tools/testing/selftests/sync/.gitignore
>> @@ -0,0 +1 @@
>> +sync_test
>> diff --git a/tools/testing/selftests/sync/Makefile 
>> b/tools/testing/selftests/sync/Makefile
>> new file mode 100644
>> index 000..620a59a
>> --- /dev/null
>> +++ b/tools/testing/selftests/sync/Makefile
>> @@ -0,0 +1,18 @@
>> +CFLAGS += -O2 -g -std=gnu89 -pthread -Wall -Wextra
>> +CFLAGS += -I../../../../usr/include/
>> +LDFLAGS += -pthread
>> +
>> +TEST_PROGS = sync_test
>> +
>> +all: $(TEST_PROGS)
>> +
>> +include ../lib.mk
>> +
>> +OBJS = sync_test.o sync.o
>> +
>> +TESTS += sync_alloc.o
>> +
>> +sync_test: $(OBJS) $(TESTS)
>> +
>> +clean:
>> +$(RM) sync_test $(OBJS) $(TESTS)
>> diff --git a/tools/testing/selftests/sync/sw_sync.h 
>> b/tools/testing/selftests/sync/sw_sync.h
>> new file mode 100644
>> index 000..e2cfc6ba
>> --- /dev/null
>> +++ b/tools/testing/selftests/sync/sw_sync.h
>> @@ -0,0 +1,46 @@
>> +/*
>> + *  sw_sync abstraction
>> + *
>> + *  Copyright 2015-2016 Collabora Ltd.
>> + *
>> + *  Based on the implementation from the Android Open Source Project,
>> + *
>> + *  Copyright 2013 Google, Inc
>> + *
>> + *  Permission is hereby granted, free of charge, to any person obtaining a
>> + *  copy of this software and associated documentation files (the 
>> "Software"),
>> + *  to deal in the Software without restriction, including without 
>> limitation
>> + *  the rights to use, copy, modify, merge, publish, distribute, sublicense,
>> + *  and/or sell copies of the Software, and to permit persons to whom the
>> + *  Software is furnished to do so, subject to the following conditions:
>> + *
>> + *  The above copyright notice and this permission notice shall be included 
>> in
>> + *  all copies or substantial portions of the Software.
>> + *
>> + *  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 
>> OR
>> + *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
>> + *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
>> + *  THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
>> + *  OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
>> + *  ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
>> + *  OTHER DEALINGS IN THE SOFTWARE.
>> + */
>> +
>> +#ifndef SELFTESTS_SW_SYNC_H
>> +#define SELFTESTS_SW_SYNC_H
>> +
>> +/*
>> + * sw_sync is mainly intended for testing and should not be compiled into
>> + * production kernels
>> + */
>> +
>> +int sw_sync_timeline_create(void);
>> +int sw_sync_timeline_is_valid(int fd);
>> +int sw_sync_timeline_inc(int fd, unsigned int count);
>> +void sw_sync_timeline_destroy(int fd);
>> +
>> +int sw_sync_fence_create(int fd, const char *name, unsigned int value);
>> +int sw_sync_fence_is_valid(int fd);
>> +void sw_sync_fence_destroy(int fd);
>> +
>> +#endif
>> diff --git a/tools/testing/selftests/sync/sync.c 
>> b/tools/testing/selftests/sync/sync.c
>> new file mode 100644
>> i

Re: [PATCH] staging: Remove slicoss driver

2016-12-13 Thread Guenter Roeck
On Tue, Dec 13, 2016 at 04:16:56AM -0800, Greg Kroah-Hartman wrote:
> On Mon, Dec 12, 2016 at 07:32:07PM -0800, Guenter Roeck wrote:
> > There is now a different driver for the slicoss devices in
> > drivers/net/ethernet/alacritech/. That driver supports the same PCI
> > device IDs as the driver in staging. Both drivers use the same
> > configuration symbol (CONFIG_SLICOSS), which causes build failures
> > for the staging driver. Presumably the driver in staging is obsolete
> > and can be removed.
> > 
> > Cc: Tobias Klauser 
> > Cc: David S. Miller 
> > Cc: Lino Sanfilippo 
> > Cc: Lior Dotan 
> > Cc: Christopher Harrer 
> > Signed-off-by: Guenter Roeck 
> > ---
> >  MAINTAINERS   |6 -
> >  drivers/staging/Kconfig   |2 -
> >  drivers/staging/Makefile  |1 -
> >  drivers/staging/slicoss/Kconfig   |   14 -
> >  drivers/staging/slicoss/Makefile  |1 -
> >  drivers/staging/slicoss/README|7 -
> >  drivers/staging/slicoss/TODO  |   36 -
> >  drivers/staging/slicoss/slic.h|  573 ---
> >  drivers/staging/slicoss/slichw.h  |  652 
> >  drivers/staging/slicoss/slicoss.c | 3131 
> > -
> >  10 files changed, 4423 deletions(-)
> >  delete mode 100644 drivers/staging/slicoss/Kconfig
> >  delete mode 100644 drivers/staging/slicoss/Makefile
> >  delete mode 100644 drivers/staging/slicoss/README
> >  delete mode 100644 drivers/staging/slicoss/TODO
> >  delete mode 100644 drivers/staging/slicoss/slic.h
> >  delete mode 100644 drivers/staging/slicoss/slichw.h
> >  delete mode 100644 drivers/staging/slicoss/slicoss.c
> 
> Odd, I already did this in my staging-next tree, which should be showing
> up in linux-next, correct?  It's not merged into Linus's tree just yet,
> give me a chance to get it to him please, I've been traveling. :)
> 

No problem. It was still in my copy of -next, so I thought it got lost.
Guess I should have updated it ;-). Sorry for the noise.

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


Re: [PATCH v2 5/5] staging: lustre: headers: use proper byteorder functions in lustre_idl.h

2016-12-13 Thread Dan Carpenter
On Tue, Dec 13, 2016 at 11:14:26AM -0500, Oleg Drokin wrote:
> 
> On Dec 13, 2016, at 3:31 AM, Dan Carpenter wrote:
> 
> > It used to be that great swathes of Lustre were used in both user space
> > and kernel space.  We had huge unused modules in the kernel that were
> > only used for user space.
> 
> Huh?
> There was nothing of the sort.
> There were huge parts of code that were used by the server, but sue to no 
> server
> in staging client, ended up being unused, though.
> 

Oh.  Right,  that's it.

regards,
dan carpenter

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


[GIT PULL] Staging/IIO driver changes for 4.10-rc1

2016-12-13 Thread Greg KH
The following changes since commit a25f0944ba9b1d8a6813fd6f1a86f1bd59ac25a6:

  Linux 4.9-rc5 (2016-11-13 10:32:32 -0800)

are available in the git repository at:

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

for you to fetch changes up to 3e0f9b2ca8e4839335e4d64ec0a75f4fd5111c4b:

  staging: comedi: comedidev.h: Document usage of 'detach' handler (2016-12-08 
21:01:23 +0100)


Staging/IIO patches for 4.10-rc1

Here's the "big" staging/iio pull request for 4.10-rc1.

Not as big as 4.9 was, but still just over a thousand changes.  We
almost broke even of lines added vs. removed, as the slicoss driver was
removed (got a "clean" driver for the same hardware through the netdev
tree), and some iio drivers were also dropped, but I think we ended up
adding a few thousand lines to the source tree in the end.  Other than
that it's a lot of minor fixes all over the place, nothing major stands
out at all.

All of these have been in linux-next for a while.  There will be a merge
conflict with Al's vfs tree in the lustre code, but the resolution for
that should be pretty simple, that too has been in linux-next.

Signed-off-by: Greg Kroah-Hartman 


Aditya Pandit (1):
  staging: lustre: llite: tar restore fails for HSM released files.

Akinobu Mita (1):
  iio: ti-adc0832: add triggered buffer support

Akshay Mariyanna (2):
  staging: ks7010: fix indent style in ks7010_sdio.c
  staging: ks7010: fix space related style issues in ks7010_sdio.c

Alex Briskin (1):
  staging:r8188eu: Remove space before comma

Alex Zhuravlev (3):
  staging: lustre: echo: request pages in batches
  staging: lustre: ptlrpc: imp_peer_committed_transno should increase
  staging: lustre: obdclass: lu_site_purge() to handle purge-all

Alexander Alemayhu (1):
  staging: i4l: pcbit: replace some include asm/*.h with linux/*.h

Alexander Boyko (1):
  staging: lustre: ptlrpc: race at req processing

Alexander Zarochentsev (1):
  staging: lustre: libcfs: remove lnet upcall code

Alison Schofield (5):
  iio: accel: mma8452: claim direct mode during raw reads
  iio: pressure: mpl3115: claim direct mode during raw reads
  iio: light: ltr501: claim direct mode during select raw reads
  iio: light: ltr501: claim direct mode during raw writes
  iio: humidity: hdc100x: add triggered buffer support for HDC100X

Amir Shehata (2):
  staging: lustre: ptlrpc: Introduce iovec to bulk descriptor
  staging/lustre/ptlrpc: Correctly calculate hrp->hrp_nthrs

Anchal Jain (1):
  staging: iio: cdc: ad7152: Add blank line after declarations to increase 
readability

Andrea Ghittino (1):
  staging: sm750fb: fix tabstop style warning

Andreas Dilger (11):
  staging: lustre: ptlrpc: remove old protocol compatibility
  staging: lustre: obdclass: variable llog chunk size
  staging: lustre: mdc: remove console spew from mdc_ioc_fid2path
  staging: lustre: idl: clean up file attribute flags
  staging: lustre: misc: clean up DFID related error messages
  staging: lustre: obdclass: remove structure holes to reduce memory
  staging: lustre: ldlm: remove ldlm_policy_data_t typedef usage from code
  staging: lustre: ldlm: remove ldlm_side_t typedef usage from code
  staging: lustre: ldlm: remove ldlm_wire_policy_data_t typedef usage from 
code
  staging: lustre: ldlm: rename LDLM_CANCEL_* flags
  staging: lustre: ldlm: change "int" to proper enum type

Andrew Kanner (1):
  staging: lustre: fixed shadowed variable in socklnd_cb.c

Andrew Perepechko (1):
  staging/lustre/llite: drop_caches hangs in cl_inode_fini()

Andrew Wellington (1):
  staging: lustre: llite: support SELinux context labelling

Andrey Shvetsov (13):
  staging: most: core: remove member add_link
  staging: most: core: remove read option from remove_link
  staging: most: core: remove processing of deprecated names
  staging: most: core: update examples on how to link channels
  staging: most: aim-network: fix startup scenario.
  staging: most: aim-network: setup mac address before ifup has finished
  staging: most: aim-network: avoid calling netdev_info()
  staging: most: hdm-usb: remove filtering of networking state
  staging: most: hdm-dim2: remove tracing of mac address
  staging: most: hdm-usb: fix mbo buffer leak
  staging: most: aim-networking: keep channels closed if ndo_open fails
  staging: most: hdm-usb: do h/w specific synchronization at configuration 
time
  staging: most: hdm-usb: introduce synchronization function

Andriy Skulysh (1):
  staging/lustre: conflicting PW & PR extent locks on a client

Anton Leshchenko (4):
  Staging: vme: Remove excessive blank lines.
  Staging: vme: Use BIT macro for bit field definitions.
  Staging: vme