openwrt/staging/blogic.git
6 years agostaging: wilc1000: rename pu8HdnNtwrksWidVal to avoid camelCase
Ajay Singh [Tue, 20 Feb 2018 14:57:50 +0000 (20:27 +0530)]
staging: wilc1000: rename pu8HdnNtwrksWidVal to avoid camelCase

Fix "Avoid camelCase" issue found by checkpatch.pl script.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: selftest: freeing an error pointer
Dan Carpenter [Thu, 22 Feb 2018 09:15:34 +0000 (12:15 +0300)]
staging: lustre: selftest: freeing an error pointer

We should just return directly if memdup_user() fails. The current code
tries to free "param" which is an error pointer so it will Oops.

Fixes: 2baddf262e98 ("staging: lustre: use memdup_user to allocate memory and copy from user")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: socklnd: simplify ksnc_rx_iov_space
NeilBrown [Tue, 20 Feb 2018 02:23:38 +0000 (13:23 +1100)]
staging: lustre: socklnd: simplify ksnc_rx_iov_space

ksnc_rx_iov_space is currently a union of two arrays,
one of 'struct kvec', the other of 'struct bio_vec'.

The 'struct bio_vec' option is never used.  The
array of kvec is used to read in a packet header, or
to read data that needs to be skipped so as to synchronize
with a packet boundary.
In each case the target memory location is a virtual address,
never a page, so 'struct bio_vec' is never needed.

When we read into a page, different code steps up a separate
array of 'struct bio_vec'.

So remove the bio_vec option, and remove the union ksock_rxiovspace..

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: fid: perform sanity checks before commiting
NeilBrown [Tue, 20 Feb 2018 02:23:38 +0000 (13:23 +1100)]
staging: lustre: fid: perform sanity checks before commiting

When fid fetches a new range from the server, it commits
to it (*output = *out) *before* performing sanity checks.
This looks backwards.
Don't commit to a value until it has been found to be sane.

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: fid: fix up debugfs access to ->lcs_space
NeilBrown [Tue, 20 Feb 2018 02:23:38 +0000 (13:23 +1100)]
staging: lustre: fid: fix up debugfs access to ->lcs_space

lcs_space can change while the lock is not held
if an RPC in underway.  This can be detected by
seq->ls_update being set.

In this case, reading or writing the value should return
-EBUSY.

Also, the D_INFO CDEBUG() which reports the lcs_space being
updated never fires, as it tests the wrong value -
ldebugfs_fid_write_common() returns 'count' on success.

Finally, this return value should be returned from
ldebugfs_fid_space_seq_write(), rather than always returning 'count',
so that errors can be detected.

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: fid: remove seq_fid_alloc_fini() and simplify
NeilBrown [Tue, 20 Feb 2018 02:23:38 +0000 (13:23 +1100)]
staging: lustre: fid: remove seq_fid_alloc_fini() and simplify

seq_fid_alloc_fini() is tiny and only called
from two places in the one function.  We can move
both those calls earlier and merge them so only
one call is needed.  At that point, there is no
value added by having a separate function.

Also instead of using ++ and -- on ->lcs_update to
toggle between 0 and 1, explicitly set to 0 or 1
as appropriate.

Moving the locking earlier means that the code which updates
seq->lcs_fid is now protected, so
ldebugfs_fid_fid_seq_show() now cannot see a torn value.

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: fid: use wait_event_cmd()
NeilBrown [Tue, 20 Feb 2018 02:23:38 +0000 (13:23 +1100)]
staging: lustre: fid: use wait_event_cmd()

Rather than open-coding a wait event loop twice,
use wait_event_cmd() to wait, dropping the spinlock
over schedule().
This does require duplicating part of the wait
condition, but that is just three tests on values that
are in registers or in cache, so the cost is small
and the increased readability is large.

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: fid: convert lcs_mutex to a spinlock
NeilBrown [Tue, 20 Feb 2018 02:23:38 +0000 (13:23 +1100)]
staging: lustre: fid: convert lcs_mutex to a spinlock

There is only one place where this lock is held
while the task might sleep - in
  ldebugfs_fid_space_seq_write()
while ldebugfs_fid_write_common() is called.

This call can easily be taken out of the locked region
by asking it to parse the user data into a local variable,
and then copying that variable into ->lcs_space while
holding the lock.

Note that ldebugfs_gid_write_common returns >0 on
success, so use that to gate updating ->lcs_space.

So make that change, and convert lcs_mutex to a spinlock
named lcs_lock.  spinlocks are slightly cheaper than mutexes
and using one makes is clear that the lock is only held for
a short time.

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: ptlrpc: list_for_each improvements.
NeilBrown [Tue, 20 Feb 2018 02:23:38 +0000 (13:23 +1100)]
staging: lustre: ptlrpc: list_for_each improvements.

1/ use list_for_each_entry_safe() instead of
   list_for_each_safe() and similar.

2/ use list_first_entry() and list_last_entry() where appropriate.

3/ When removing everything from a list, use
     while ((x = list_first_entry_or_null()) {
   as it makes the intent clear

4/ No need to take a spinlock in a structure that is about
   to be freed - we must have exclusive access at this stage.

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: fix assorted checkpatch errors
NeilBrown [Tue, 20 Feb 2018 20:42:20 +0000 (07:42 +1100)]
staging: lustre: fix assorted checkpatch errors

Possibly the most interesting is the for-loop with no body.
Rearranging and initializing end_dirent on each iteration of
the outer while, makes the intent clearer.

Reviewed-by: "Eremin, Dmitry" <dmitry.eremin@intel.com>
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: remove phantom struct cfs_crypto_hash_desc
NeilBrown [Tue, 20 Feb 2018 02:23:38 +0000 (13:23 +1100)]
staging: lustre: remove phantom struct cfs_crypto_hash_desc

There is no "struct cfs_crypto_hash_desc" structure.  There
are only pointers to this structure, which are cast back and
forth to struct ahash_request.
So discard cfs_crypto_hash_desc, and just use ahash_request directly.

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: discard libcfs_kvzalloc and linux-mem.c
NeilBrown [Tue, 20 Feb 2018 02:23:37 +0000 (13:23 +1100)]
staging: lustre: discard libcfs_kvzalloc and linux-mem.c

The only interesting difference between libcfs_kvzalloc()
and kvzalloc() is that the former appears to work
with GFP_NOFS, which the latter gives a WARN_ON_ONCE()
when that is attempted.

Each libcfs_kvzalloc() should really be analysed
and either converted to a kzalloc() call if the size is never
more than a page, or to use GFP_KERNEL if no locks are held.

If there is ever a case where locks are held and a large allocation
is needed, then some other technique should be used.

It might be nice to not always blindly zero pages too...

For now, just convert libcfs_kvzalloc() calls to
kvzalloc(), and let the warning remind us that there is work to do.

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: improve some libcfs_kvzalloc calls.
NeilBrown [Tue, 20 Feb 2018 02:23:37 +0000 (13:23 +1100)]
staging: lustre: improve some libcfs_kvzalloc calls.

Using vmalloc with GFP_NOFS is not supported as vmalloc
performs some internal allocations with GFP_KERNEL.

So in cases where the size passed to libcfs_kvzalloc()
is clearly at most 1 page, convert to kzalloc().
In cases where the call clearly doesn't hold any
filesystem locks, convert to GFP_KERNEL.

Unfortunately there are many more that are not easy to fix.

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: discard lu_buf allocation library.
NeilBrown [Tue, 20 Feb 2018 02:23:37 +0000 (13:23 +1100)]
staging: lustre: discard lu_buf allocation library.

This library code is unnecessarily generic, but also
not generic enough.  Library code that performs
allocations should always take a gfp_flags argument.

So discard the library and in the one file where it is used,
just use kzalloc or krealloc as needed.
In this context, it is clear that vmalloc is never needed.

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: discard libcfs_kvzalloc_cpt()
NeilBrown [Tue, 20 Feb 2018 02:23:37 +0000 (13:23 +1100)]
staging: lustre: discard libcfs_kvzalloc_cpt()

This function is used precisely once, and is sufficiently
trivial that it may as well be open-coded.

Doing so helpfully highlights the similarity
between the new kvzalloc_node() call and the already existing
kzalloc_node() call in the same function.

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: make signal-blocking functions inline
NeilBrown [Tue, 20 Feb 2018 02:23:37 +0000 (13:23 +1100)]
staging: lustre: make signal-blocking functions inline

cfs_block_sigsinv() and cfs_restore_sigs() are now
simple enough to inline them.
This means we can discard linux-prim.c

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: improve API and implementation of blocking signals.
NeilBrown [Tue, 20 Feb 2018 02:23:37 +0000 (13:23 +1100)]
staging: lustre: improve API and implementation of blocking signals.

According to comment for set_current_blocked() in
kernel/signal.c, changing ->blocked directly is wrong.
sigprocmask() should be called instead.

So change cfs_block_sigsinv() and cfs_restore_sigs()
to use sigprocmask().
For consistency, change them to pass the sigset_t by reference
rather than by value.

Also fix cfs_block_sigsinv() so that it correctly blocks
signals above 32 on a 32bit host.

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: simplify linux-prim.c
NeilBrown [Tue, 20 Feb 2018 02:23:37 +0000 (13:23 +1100)]
staging: lustre: simplify linux-prim.c

cfs_block_sigs() is never used.
cfs_clear_sigpending() is never used.
cfs_block_allsigs() is no longer used.

So those three functions can go.

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: lnet: remove cfs_block_allsigs calls.
NeilBrown [Tue, 20 Feb 2018 02:23:37 +0000 (13:23 +1100)]
staging: lustre: lnet: remove cfs_block_allsigs calls.

Both places that cfs_block_allsigs() is used here,
the goal is to turn an interruptible wait into an
uninterruptible way.
So instead of blocking the signals, change TASK_INTERRUPTIBLE to
TASK_NOLOAD.
In each case, no other functions called while signals are blocked
will sleep - just the one that has been fixed.
In one case, an extra 'interruptible' flag needs to be passed
down so the waiting decision can be made at the right place.

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: remove unnecessary cfs_block_allsigs() calls
NeilBrown [Tue, 20 Feb 2018 02:23:37 +0000 (13:23 +1100)]
staging: lustre: remove unnecessary cfs_block_allsigs() calls

Threads started by kthread_run() ignore all signals,
as kthreadd() calls ignore_signals(), and this is
inherited by all children.
So there is no need to call cfs_block_allsigs() in functions
that are only run from kthread_run().

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: remove linux-curproc.c
NeilBrown [Tue, 20 Feb 2018 02:23:37 +0000 (13:23 +1100)]
staging: lustre: remove linux-curproc.c

The only functionality remaining here is
cfs_curproc_cap_pack(),
and it can be trivially implemented as an inline
in curproc.h.
So do that and remove the file.

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: opencode cfs_cap_{raise, lower, raised}
NeilBrown [Tue, 20 Feb 2018 02:23:37 +0000 (13:23 +1100)]
staging: lustre: opencode cfs_cap_{raise, lower, raised}

Each of these functions is used precisely once, so having
a separate exported function seems like overkill.

cfs_cap_raised() is trivial - one line.
cfs_cap_raise() and cfs_cap_lower() are used as a pair
which is more effectively implemented with
override_cred() / revert_creds().

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: replace all CFS_CAP_* macros with CAP_*
NeilBrown [Tue, 20 Feb 2018 02:23:37 +0000 (13:23 +1100)]
staging: lustre: replace all CFS_CAP_* macros with CAP_*

Lustre defines a few CFS_CAP_* macros which are exactly the
same as the corresponding CAP_* macro, with one exception.

CFS_CAP_SYS_BOOT is 23
CAP_SYS_BOOT is 22.

CFS_CAP_SYS_BOOT is only used through CFS_CAP_FS_MASK and
causes capability 23 (CAP_SYS_NICE) to be dropped in certain
circumstances.
It is probable that the intention was to drop CAP_SYS_BOOT,
and this is what is now done.

CFS_CAP_CHOWN_MASK and CFS_CAP_SYS_RESOURCE_MASK are never
used, so they have been removed.

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: Remove unneeded cast
Christopher Diaz Riveros [Tue, 20 Feb 2018 16:37:22 +0000 (11:37 -0500)]
staging: rtl8188eu: Remove unneeded cast

Fix Coccinelle alert:

drivers/staging//rtl8188eu/os_dep/usb_intf.c:336:13-27: WARNING: casting value returned by memory allocation function to (struct adapter *) is useless.

This issue was detected by using the Coccinelle software.

Signed-off-by: Christopher Diaz Riveros <chrisadr@gentoo.org>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: emxx_udc: Remove unneeded cast
Christopher Diaz Riveros [Tue, 20 Feb 2018 16:35:53 +0000 (11:35 -0500)]
staging: emxx_udc: Remove unneeded cast

Fix Coccinelle alert:

drivers/staging//emxx_udc/emxx_udc.c:2689:19-21: WARNING: casting value returned by memory allocation function to (u8 *) is useless.

This issue was detected by using the Coccinelle software.

Signed-off-by: Christopher Diaz Riveros <chrisadr@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8723bs: Remove unneeded cast
Christopher Diaz Riveros [Tue, 20 Feb 2018 16:33:54 +0000 (11:33 -0500)]
staging: rtl8723bs: Remove unneeded cast

Fix Coccinelle alert:

drivers/staging//rtl8723bs/os_dep/sdio_intf.c:340:13-27: WARNING: casting value returned by memory allocation function to (struct adapter *) is useless.

This issue was detected by using the Coccinelle software.

Signed-off-by: Christopher Diaz Riveros <chrisadr@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: net: netlogic: Remove unneeded cast
Christopher Diaz Riveros [Tue, 20 Feb 2018 16:30:33 +0000 (11:30 -0500)]
staging: net: netlogic: Remove unneeded cast

Fix Coccinelle alert:

drivers/staging//netlogic/xlr_net.c:996:12-30: WARNING: casting value returned by memory allocation function to (struct xlr_adapter *) is useless.

This issue was detected by using the Coccinelle software.

Signed-off-by: Christopher Diaz Riveros <chrisadr@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoStaging: bcm2048: Fix function argument alignment in radio-bcm2048.c.
Quytelda Kahja [Tue, 20 Feb 2018 06:53:04 +0000 (22:53 -0800)]
Staging: bcm2048: Fix function argument alignment in radio-bcm2048.c.

Fix a coding style problem.

Signed-off-by: Quytelda Kahja <quytelda@tamalin.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoStaging: ks7010: hostif: Convert the ps_confirm_wait_inc() macro to a real function.
Quytelda Kahja [Tue, 20 Feb 2018 06:35:38 +0000 (22:35 -0800)]
Staging: ks7010: hostif: Convert the ps_confirm_wait_inc() macro to a real function.

Convert the unsafe macro into an inline function.

Signed-off-by: Quytelda Kahja <quytelda@tamalin.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoStaging: ks7010: hostif: Convert SME queue macros to real functions.
Quytelda Kahja [Tue, 20 Feb 2018 06:35:37 +0000 (22:35 -0800)]
Staging: ks7010: hostif: Convert SME queue macros to real functions.

Convert the unsafe macros into inline functions.

Signed-off-by: Quytelda Kahja <quytelda@tamalin.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoStaging: ks7010: sdio: Convert RX/TX queue macros into real functions.
Quytelda Kahja [Tue, 20 Feb 2018 06:35:36 +0000 (22:35 -0800)]
Staging: ks7010: sdio: Convert RX/TX queue macros into real functions.

Convert the unsafe macros into inline functions.

Signed-off-by: Quytelda Kahja <quytelda@tamalin.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: remove 'if' on field address
Dafna Hirschfeld [Thu, 22 Feb 2018 07:10:12 +0000 (09:10 +0200)]
staging: wilc1000: remove 'if' on field address

Remove 'if' statements testing struct's field address.
Since such statements always return true, they are redundant.

Signed-off-by: Dafna Hirschfeld <dafna3@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: pi433: fix CamelCase for addressFiltering
Valentin Vidic [Tue, 20 Feb 2018 14:13:07 +0000 (15:13 +0100)]
staging: pi433: fix CamelCase for addressFiltering

Fixes checkpatch warning:

  CHECK: Avoid CamelCase: <addressFiltering>

Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: pi433: fix CamelCase for thresholdDecrement
Valentin Vidic [Tue, 20 Feb 2018 14:03:30 +0000 (15:03 +0100)]
staging: pi433: fix CamelCase for thresholdDecrement

Fixes checkpatch warning:

  CHECK: Avoid CamelCase: <thresholdDecrement>

Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: pi433: fix CamelCase for txStartCondition
Valentin Vidic [Tue, 20 Feb 2018 13:56:45 +0000 (14:56 +0100)]
staging: pi433: fix CamelCase for txStartCondition

Fixes checkpatch warning:

  CHECK: Avoid CamelCase: <txStartCondition>

Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: comedi: Use '"%s:", __func__' instead of function name
Eisha Chen-yen-su [Tue, 20 Feb 2018 09:05:25 +0000 (10:05 +0100)]
staging: comedi: Use '"%s:", __func__' instead of function name

Replace all occurrences of functions' names in strings by a reference
to __func__, to improve robustness. Problem found with checkpatch.

Signed-off-by: Eisha Chen-yen-su <chenyensu0@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: comedi: Remove a "tracing" call
Eisha Chen-yen-su [Tue, 20 Feb 2018 09:05:24 +0000 (10:05 +0100)]
staging: comedi: Remove a "tracing" call

Remove a "tracing" call as it is not needed anymore
because there is an in-kernel function for that.

Signed-off-by: Eisha Chen-yen-su <chenyensu0@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: android: ion: Remove check of idev->debug_root
Yisheng Xie [Thu, 22 Feb 2018 10:58:40 +0000 (18:58 +0800)]
staging: android: ion: Remove check of idev->debug_root

We will go on initial idev if failed to create debug_root, and it does
not matter to check the return value of this debugfs call, just remove it.

Signed-off-by: Yisheng Xie <xieyisheng1@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: android: ion: Remove check of debug_file
Yisheng Xie [Thu, 22 Feb 2018 10:58:39 +0000 (18:58 +0800)]
staging: android: ion: Remove check of debug_file

There's no need to check the return value of debug_file for it is just a
debugfs and we will go on the following process if we failed to create
debug_file. So just remove it.

Signed-off-by: Yisheng Xie <xieyisheng1@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoMerge tag 'iio-for-4.17a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23...
Greg Kroah-Hartman [Tue, 20 Feb 2018 09:23:17 +0000 (10:23 +0100)]
Merge tag 'iio-for-4.17a' of git://git./linux/kernel/git/jic23/iio into staging-next

Jonathan writes:

First round of new devices, features and cleanups for IIO in the 4.17 cycle.

Outside of IIO
* Strongly typed 64bit int_sqrt function needed by the mlx90632

New device support
* adc081s
  - New driver supporting adc081s, adc101s and adc121s TI ADCs.
* ad5272
  - New driver supproting the ad5272 and ad5274 ADI digital potentiometers
    with DT bindings.
* axp20x_adc
  - support the AXP813 ADC - includes rework patches to prepare for this.
* mlx90632
  - New driver with dt bindings for this IR temperature sensor.

Features
* axp20x_adc
  - Add DT bindings and probing.
* dht11
  - The sensor has a wider range than advertised in the datasheet - support it.
* st_lsm6dsx
  - Add hardware timestamp su9pport.

Cleanups
* ABI docs
  - Update email contact for Matt Ranostay
* SPDX changes
  - Matt Ranostay has moved his drivers over to SPDX.  Currently we are making
    this an author choice in IIO.
* ad7192
  - Disable burnout current on misconfiguration.  No actually effect as
    they simply won't work otherwise.
* ad7476
  - Drop a license definition that was replicating information in SPDX tag.
ade7758
  - Expand buf_lock to cover both buffer and state protection allowing
    unintented uses of mlock in the core to be removed.
ade7759
  - Align parameters to opening parenthesis.
* at91_adc
  - Depend on sysfs instead of selecting it - for try wide consistency.
* ccs811
  - trivial naming type for a define.
* ep93xx
  - Drop a redundant return as a result checking platform_get_resource.
* hts221
  - Regmap conversion which simplifies the driver somewhat.
  - Clean up some restricted endian cast warnings.
  - Drop a trailing whitespace from a comment
  - Drop an unnecessary get_unaligned by changing to the right 16bit data type.
* ms5611
  - Fix coding style in the probe function (whitespace)
* st_accel
  - Use strlcpy instead of strncpy to avoid potentially truncating a string.

6 years agostaging: android: ion: Initialize dma_address of new sg list
Liam Mark [Fri, 16 Feb 2018 20:19:22 +0000 (12:19 -0800)]
staging: android: ion: Initialize dma_address of new sg list

Fix the dup_sg_table function to initialize the dma_address of the new
sg list entries instead of the source dma_address entries.

Since ION duplicates the sg_list this issue does not appear to result in
an actual bug.

Signed-off-by: Liam Mark <lmark@codeaurora.org>
Acked-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: use memdup_user to allocate memory and copy from user
Dafna Hirschfeld [Mon, 19 Feb 2018 19:57:37 +0000 (21:57 +0200)]
staging: lustre: use memdup_user to allocate memory and copy from user

Replace a call to kmalloc and a call to copy_from_user with a
call to memdup_user to simplify the code.
Issue found with coccicheck.

Signed-off-by: Dafna Hirschfeld <dafna3@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: pi433: Split subtraction across 2 lines
Eisha Chen-yen-su [Tue, 20 Feb 2018 00:47:26 +0000 (01:47 +0100)]
staging: pi433: Split subtraction across 2 lines

Split a subtraction across 2 lines in order to make these lines
no longer than 80 columns. Problem found with checkpatch.

Signed-off-by: Eisha Chen-yen-su <chenyensu0@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: pi433: Split some function calls
Eisha Chen-yen-su [Tue, 20 Feb 2018 00:47:25 +0000 (01:47 +0100)]
staging: pi433: Split some function calls

Split some function calls on several lines in order to make these
lines no longer than 80 columns. Problem found with checkpatch.

Signed-off-by: Eisha Chen-yen-su <chenyensu0@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: remove Unnecessary parentheses around 'hif_set_mc->cnt'
Ajay Singh [Mon, 19 Feb 2018 15:29:44 +0000 (20:59 +0530)]
staging: wilc1000: remove Unnecessary parentheses around 'hif_set_mc->cnt'

Fix "Unnecessary parentheses around 'hif_set_mc->cnt'" issue found by
checkpatch.pl script.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: rename wilc_remove_key() parameters to avoid camelCase
Ajay Singh [Mon, 19 Feb 2018 15:29:43 +0000 (20:59 +0530)]
staging: wilc1000: rename wilc_remove_key() parameters to avoid camelCase

Fix "Avoid camelCase" issue found by checkpatch.pl script.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: rename GetPeriodicRSSI to avoid camelCase
Ajay Singh [Mon, 19 Feb 2018 15:29:42 +0000 (20:59 +0530)]
staging: wilc1000: rename GetPeriodicRSSI to avoid camelCase

Fix "Avoid camelCase" issue found by checkpatch.pl script.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: rename ListenTimerCB to avoid camelCase
Ajay Singh [Mon, 19 Feb 2018 15:29:41 +0000 (20:59 +0530)]
staging: wilc1000: rename ListenTimerCB to avoid camelCase

Fix "Avoid camelCase" issue found by checkpatch.pl script.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: rename functions starting with TimerCB_ to avoid camelCase
Ajay Singh [Mon, 19 Feb 2018 15:29:40 +0000 (20:59 +0530)]
staging: wilc1000: rename functions starting with TimerCB_ to avoid camelCase

Fix "Avoid camelCase" issues found by checkpatch.pl script.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: rename functions starting with Handle_ to avoid camelCase
Ajay Singh [Mon, 19 Feb 2018 15:29:39 +0000 (20:59 +0530)]
staging: wilc1000: rename functions starting with Handle_ to avoid camelCase

Fix "Avoid camelCase" issue found by checkpatch.pl script.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: rename pstrRcvdNetworkInfo to avoid camelCase
Ajay Singh [Mon, 19 Feb 2018 15:29:38 +0000 (20:59 +0530)]
staging: wilc1000: rename pstrRcvdNetworkInfo to avoid camelCase

Fix "Avoid camelCase" issue found by checkpatch.pl script.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: rename pstrRcvdGnrlAsyncInfo to avoid camelCase
Ajay Singh [Mon, 19 Feb 2018 15:29:37 +0000 (20:59 +0530)]
staging: wilc1000: rename pstrRcvdGnrlAsyncInfo to avoid camelCase

Fix "Avoid camelCase" issue found by checkpatch.pl script.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: rename strHostIfStaInactiveT to avoid camelCase
Ajay Singh [Mon, 19 Feb 2018 15:29:36 +0000 (20:59 +0530)]
staging: wilc1000: rename strHostIfStaInactiveT to avoid camelCase

Fix "Avoid camelCase" issue found by checkpatch.pl script.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: rename pstrHostIfRegisterFrame to avoid camelCase
Ajay Singh [Mon, 19 Feb 2018 15:29:35 +0000 (20:59 +0530)]
staging: wilc1000: rename pstrHostIfRegisterFrame to avoid camelCase

Fix "Avoid camelCase" issue found by checkpatch.pl script.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: rename pstrHostIfRemainOnChan to avoid camelCase
Ajay Singh [Mon, 19 Feb 2018 15:29:34 +0000 (20:59 +0530)]
staging: wilc1000: rename pstrHostIfRemainOnChan to avoid camelCase

Fix "Avoid camelCase" issue found by checkpatch.pl script.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: rename host_int_get_assoc_res_info() parameters to avoid camelCase
Ajay Singh [Mon, 19 Feb 2018 15:29:33 +0000 (20:59 +0530)]
staging: wilc1000: rename host_int_get_assoc_res_info() parameters to avoid camelCase

Fix "Avoid camelCase" issues reported by checkpatch.pl script.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: rename strHostIfSetMulti to avoid camelCase
Ajay Singh [Mon, 19 Feb 2018 15:29:32 +0000 (20:59 +0530)]
staging: wilc1000: rename strHostIfSetMulti to avoid camelCase

Fix "Avoid camelCase" issue found by checkpatch.pl script.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: rename s8PowerMode & strPowerMgmtParam to avoid camelCase
Ajay Singh [Mon, 19 Feb 2018 15:29:31 +0000 (20:59 +0530)]
staging: wilc1000: rename s8PowerMode & strPowerMgmtParam to avoid camelCase

Fix "Avoid camelCase" issues found by checkpatch.pl script.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoStaging: gdm724x: tty: Remove unused macro 'gdm_tty_send_control'.
Quytelda Kahja [Sun, 18 Feb 2018 20:26:55 +0000 (12:26 -0800)]
Staging: gdm724x: tty: Remove unused macro 'gdm_tty_send_control'.

Remove the macro 'gdm_tty_send_control' which adds unnecessary complexity,
is unused, and has arguments that could mistakenly be evaluated multiple
times.

Signed-off-by: Quytelda Kahja <quytelda@tamalin.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoStaging: gdm724x: tty: Remove unnecessary macro 'gdm_tty_recv'.
Quytelda Kahja [Sun, 18 Feb 2018 20:26:54 +0000 (12:26 -0800)]
Staging: gdm724x: tty: Remove unnecessary macro 'gdm_tty_recv'.

Remove the macro 'gdm_tty_recv' which adds unnecessary complexity and has
arguments that could mistakenly be evaluated multiple times.

Signed-off-by: Quytelda Kahja <quytelda@tamalin.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoStaging: gdm724x: tty: Remove unnecessary macro 'gdm_tty_send'.
Quytelda Kahja [Sun, 18 Feb 2018 20:26:53 +0000 (12:26 -0800)]
Staging: gdm724x: tty: Remove unnecessary macro 'gdm_tty_send'.

Remove the macro 'gdm_tty_send' which adds unnecessary complexity and has
arguments that could mistakenly be evaluated multiple times.

Signed-off-by: Quytelda Kahja <quytelda@tamalin.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoStaging: gdm724x: mux: Check return value of register_lte_tty_driver().
Quytelda Kahja [Sun, 18 Feb 2018 07:06:35 +0000 (23:06 -0800)]
Staging: gdm724x: mux: Check return value of register_lte_tty_driver().

Check the return value of of the register_lte_tty_driver() call in the
module initialization function.

Signed-off-by: Quytelda Kahja <quytelda@tamalin.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoStaging: gdm724x: LTE: Fix argument list not aligned with parenthesis.
Quytelda Kahja [Fri, 16 Feb 2018 21:46:23 +0000 (13:46 -0800)]
Staging: gdm724x: LTE: Fix argument list not aligned with parenthesis.

Fix coding style warning from checkpatch.pl.

Signed-off-by: Quytelda Kahja <quytelda@tamalin.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging:r8188eu: Use lib80211 to decrypt WEP-frames
Ivan Safonov [Sun, 18 Feb 2018 11:37:38 +0000 (14:37 +0300)]
staging:r8188eu: Use lib80211 to decrypt WEP-frames

Use native lib80211 WEP decrypt instead of custom implementation.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8712: fix signedness of length to rtl8717_set_ie
Stefano Manni [Sun, 18 Feb 2018 19:52:13 +0000 (20:52 +0100)]
staging: rtl8712: fix signedness of length to rtl8717_set_ie

rtl8717_set_it() takes an unsigned int pointer as length,
fixed signedness in code using it.

Sparse warnings:

drivers/staging/rtl8712/ieee80211.c:191:53: warning: incorrect type in argument 5 (different signedness)
drivers/staging/rtl8712/ieee80211.c:191:53:    expected unsigned int [usertype] *frlen
drivers/staging/rtl8712/ieee80211.c:191:53:    got int *<noident>
drivers/staging/rtl8712/ieee80211.c:197:57: warning: incorrect type in argument 5 (different signedness)
drivers/staging/rtl8712/ieee80211.c:197:57:    expected unsigned int [usertype] *frlen
drivers/staging/rtl8712/ieee80211.c:197:57:    got int *<noident>
drivers/staging/rtl8712/ieee80211.c:199:63: warning: incorrect type in argument 5 (different signedness)
drivers/staging/rtl8712/ieee80211.c:199:63:    expected unsigned int [usertype] *frlen
drivers/staging/rtl8712/ieee80211.c:199:63:    got int *<noident>
drivers/staging/rtl8712/ieee80211.c:202:67: warning: incorrect type in argument 5 (different signedness)
drivers/staging/rtl8712/ieee80211.c:202:67:    expected unsigned int [usertype] *frlen
drivers/staging/rtl8712/ieee80211.c:202:67:    got int *<noident>
drivers/staging/rtl8712/ieee80211.c:206:73: warning: incorrect type in argument 5 (different signedness)
drivers/staging/rtl8712/ieee80211.c:206:73:    expected unsigned int [usertype] *frlen
drivers/staging/rtl8712/ieee80211.c:206:73:    got int *<noident>
drivers/staging/rtl8712/ieee80211.c:209:75: warning: incorrect type in argument 5 (different signedness)
drivers/staging/rtl8712/ieee80211.c:209:75:    expected unsigned int [usertype] *frlen
drivers/staging/rtl8712/ieee80211.c:209:75:    got int *<noident>

Signed-off-by: Stefano Manni <stefano.manni@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8712: make unsigned length for rtl8717_get{_wpa_, _wpa2_, _}ie
Stefano Manni [Sun, 18 Feb 2018 19:52:12 +0000 (20:52 +0100)]
staging: rtl8712: make unsigned length for rtl8717_get{_wpa_, _wpa2_, _}ie

Fixed r8712_get_ie, r8712_get_wpa_ie, r8712_get_wpa2_ie
to have a length as unsigned int pointer instead of signed.

Sparse warnings:

drivers/staging/rtl8712/rtl871x_ioctl_linux.c:173:27: warning: incorrect type in argument 3 (different signedness)
drivers/staging/rtl8712/rtl871x_ioctl_linux.c:173:27:    expected signed int *len
drivers/staging/rtl8712/rtl871x_ioctl_linux.c:173:27:    got unsigned int *<noident>
drivers/staging/rtl8712/rtl871x_ioctl_linux.c:613:35: warning: incorrect type in argument 3 (different signedness)
drivers/staging/rtl8712/rtl871x_ioctl_linux.c:613:35:    expected signed int *len
drivers/staging/rtl8712/rtl871x_ioctl_linux.c:613:35:    got unsigned int *<noident>
drivers/staging/rtl8712/rtl871x_ioctl_linux.c:1411:67: warning: incorrect type in argument 3 (different signedness)
drivers/staging/rtl8712/rtl871x_ioctl_linux.c:1411:67:    expected signed int *len
drivers/staging/rtl8712/rtl871x_ioctl_linux.c:1411:67:    got unsigned int *<noident>
drivers/staging/rtl8712/rtl871x_ioctl_linux.c:1992:33: warning: incorrect type in argument 2 (different signedness)
drivers/staging/rtl8712/rtl871x_ioctl_linux.c:1992:33:    expected int *rsn_ie_len
drivers/staging/rtl8712/rtl871x_ioctl_linux.c:1992:33:    got unsigned int *<noident>
drivers/staging/rtl8712/rtl871x_ioctl_linux.c:1998:33: warning: incorrect type in argument 2 (different signedness)
drivers/staging/rtl8712/rtl871x_ioctl_linux.c:1998:33:    expected int *rsn_ie_len
drivers/staging/rtl8712/rtl871x_ioctl_linux.c:1998:33:    got unsigned int *<noident>
drivers/staging/rtl8712/rtl871x_mlme.c:1701:59: warning: incorrect type in argument 3 (different signedness)
drivers/staging/rtl8712/rtl871x_mlme.c:1701:59:    expected signed int *len
drivers/staging/rtl8712/rtl871x_mlme.c:1701:59:    got unsigned int *<noident>

Signed-off-by: Stefano Manni <stefano.manni@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: comedi: Use '"%s:", __func__' instead of function name
Eisha Chen-yen-su [Sun, 18 Feb 2018 13:27:07 +0000 (14:27 +0100)]
staging: comedi: Use '"%s:", __func__' instead of function name

Replace an occurrence of the function name in a string by a reference
to __func__, to improve robustness. Problem found with checkpatch.

Signed-off-by: Eisha Chen-yen-su <chenyensu0@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8723bs: clean up conditionals
Dafna Hirschfeld [Sun, 18 Feb 2018 16:43:04 +0000 (18:43 +0200)]
staging: rtl8723bs: clean up conditionals

Move all closing braces and parentheses to the end of the line.
Remove braces from 'if' statements with a single 'then' line.
Move logical operators to the end of lines in multiline conditional.
Remove unnecessary parentheses.
Issues found with checkpatch.pl

Signed-off-by: Dafna Hirschfeld <dafna3@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: comedi: Add a missing space
Eisha Chen-yen-su [Sun, 18 Feb 2018 17:11:38 +0000 (18:11 +0100)]
staging: comedi: Add a missing space

Add a missing space so that the * is properly aligned with
the rest of the block comment. Problem found with checkpatch.

Signed-off-by: Eisha Chen-yen-su <chenyensu0@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: Replace function name in string with __func__
Dafna Hirschfeld [Sun, 18 Feb 2018 20:08:34 +0000 (22:08 +0200)]
staging: rtl8188eu: Replace function name in string with __func__

Replace hard coded function name FillH2CCmd_88E with __func__
and break the line to avoid more then 80 characters line.
Issue found using checkpatch.pl

Signed-off-by: Dafna Hirschfeld <dafna3@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: vt6655: remove additional blank line
Santha Meena Ramamoorthy [Sun, 18 Feb 2018 23:02:00 +0000 (15:02 -0800)]
staging: vt6655: remove additional blank line

Remove extra blank line inside a function to conform to Linux
kernel coding style. Problem detected using checkpatch.

Signed-off-by: Santha Meena Ramamoorthy <santhameena13@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: comedi: Remove a newline inside a dereference
Eisha Chen-yen-su [Mon, 19 Feb 2018 16:04:22 +0000 (17:04 +0100)]
staging: comedi: Remove a newline inside a dereference

Remove a new line inside a dereference so that it is not on
multiple lines.
And avoid making the line go over 80 columns by moving the whole
dma_alloc_coherent() call back 4 columns. Problem found with
checkpatch.

Signed-off-by: Eisha Chen-yen-su <chenyensu0@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoiio: add SPDX identifier for various drivers
Matt Ranostay [Sun, 18 Feb 2018 05:36:46 +0000 (21:36 -0800)]
iio: add SPDX identifier for various drivers

Add GPLv2+ SPDX identifier and update email for author's drivers.

Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
6 years agoiio: chemical: ccs811: Typo correction in HW_ID_VALUE constant define naming
Richard Lai [Tue, 13 Feb 2018 22:36:57 +0000 (22:36 +0000)]
iio: chemical: ccs811: Typo correction in HW_ID_VALUE constant define naming

This particular constant was named with prefix "CCS881", which should be
"CCS811" instead, just like the rest of constant names in the file, as this
driver implementation is for AMS CCS811 sensor. "CCS881" could literally be
referring to another sensor product unrelated to AMS CCS811 sensor.

Signed-off-by: Richard Lai <richard@richardman.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
6 years agoiio:pressure:ms5611: Fix coding style in probe function
rodrigosiqueira [Fri, 16 Feb 2018 19:44:41 +0000 (17:44 -0200)]
iio:pressure:ms5611: Fix coding style in probe function

This patch fixes the checkpatch.pl warning and error:

iio/pressure/ms5611.h:66: ERROR: code indent should use tabs where possible
iio/pressure/ms5611.h:66: WARNING: please, no spaces at the start of a line
iio/pressure/ms5611.h:66: ERROR: "foo* bar" should be "foo *bar"

Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
6 years agoiio: sysfs-bus-iio-*: update email contact
Matt Ranostay [Sat, 17 Feb 2018 02:36:21 +0000 (18:36 -0800)]
iio: sysfs-bus-iio-*: update email contact

Change email contact for ABI documention to author's current employer
on the following files:

* sysfs-bus-iio-chemical-vz89x
* sysfs-bus-iio-proximity-as3935

Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
6 years agoiio: dht11: Improve detection of sensor type
Harald Geyer [Sun, 11 Feb 2018 11:09:40 +0000 (11:09 +0000)]
iio: dht11: Improve detection of sensor type

The old code was based on a DHT11 datasheet which specifies a measurement
range of 20%-90% RH. Turns out the sensor actually reports values outside
this range, so we should support it as far as possible.

Reported-by: Edward Attfield <edward@attfield.ca>
Signed-off-by: Harald Geyer <harald@ccbib.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
6 years agostaging: ade7759: Fix open parenthesis alignment
rodrigosiqueira [Sat, 10 Feb 2018 20:23:15 +0000 (18:23 -0200)]
staging: ade7759: Fix open parenthesis alignment

This patch fixes the CHECKs reported by checkpatch.pl for "alignment
should match open parenthesis"

Signed-off-by: rodrigosiqueira <rodrigosiqueiramelo@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
6 years agostaging: wilc1000: fix line over 80 chars in wilc_wlan_handle_txq()
Ajay Singh [Fri, 16 Feb 2018 15:11:49 +0000 (20:41 +0530)]
staging: wilc1000: fix line over 80 chars in wilc_wlan_handle_txq()

Fix "line over 80 characters" issue reported by checkpatch.pl script.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: fix line over 80 chars in wilc_wlan_txq_filter_dup_tcp_ack()
Ajay Singh [Fri, 16 Feb 2018 15:11:48 +0000 (20:41 +0530)]
staging: wilc1000: fix line over 80 chars in wilc_wlan_txq_filter_dup_tcp_ack()

Fix "line over 80 characters" issue reported by checkpatch.pl.
Use temporary variable to avoid checkpatch.pl issue.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: fix line over 80 characters in tcp_process()
Ajay Singh [Fri, 16 Feb 2018 15:11:47 +0000 (20:41 +0530)]
staging: wilc1000: fix line over 80 characters in tcp_process()

Fix "line over 80 characters" issue found by checkpatch.pl script.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: fix line over 80 chars in add_tcp_pending_ack()
Ajay Singh [Fri, 16 Feb 2018 15:11:46 +0000 (20:41 +0530)]
staging: wilc1000: fix line over 80 chars in add_tcp_pending_ack()

Fix "line over 80 characters" issue reported by checkpatch.pl script.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: fix line over 80 chars in wilc_wlan_cfg_get_wid_value()
Ajay Singh [Fri, 16 Feb 2018 15:11:45 +0000 (20:41 +0530)]
staging: wilc1000: fix line over 80 chars in wilc_wlan_cfg_get_wid_value()

Fix "line over 80 character" issue found by checkpatch.pl script.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: fix line over 80 chars in wilc_wlan_cfg_indicate_rxi()
Ajay Singh [Fri, 16 Feb 2018 15:11:44 +0000 (20:41 +0530)]
staging: wilc1000: fix line over 80 chars in wilc_wlan_cfg_indicate_rxi()

Cleanup patch to fix "line over 80 characters" issue reported by
checkpatch.pl script.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: remove blank line before close brace in wilc_wlan_cfg_get_wid_value()
Ajay Singh [Fri, 16 Feb 2018 15:11:43 +0000 (20:41 +0530)]
staging: wilc1000: remove blank line before close brace in wilc_wlan_cfg_get_wid_value()

Cleanup patch to remove "Blank lines aren't necessary before a close
brace '}'" issue reported by checkpatch.pl script.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: fix line over 80 char in wilc_wlan_cfg_set_str()
Ajay Singh [Fri, 16 Feb 2018 15:11:42 +0000 (20:41 +0530)]
staging: wilc1000: fix line over 80 char in wilc_wlan_cfg_set_str()

Fix "line over 80 characters" issue found by checkpatch.pl script.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: fix open parenthesis alignment mismatch in wilc_parse_network_info()
Ajay Singh [Fri, 16 Feb 2018 15:11:41 +0000 (20:41 +0530)]
staging: wilc1000: fix open parenthesis alignment mismatch in wilc_parse_network_info()

Fix "Alignment should match open parenthesis" issue found by
checkpatch.pl script.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: fix line over 80 characters in sdio_clear_int_ext()
Ajay Singh [Fri, 16 Feb 2018 15:11:40 +0000 (20:41 +0530)]
staging: wilc1000: fix line over 80 characters in sdio_clear_int_ext()

Fix "line over 80 characters" issue found by checkpatch.pl script by
modifying the comment description.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: fix too many leading tabs warning in sdio_clear_int_ext()
Ajay Singh [Fri, 16 Feb 2018 15:11:39 +0000 (20:41 +0530)]
staging: wilc1000: fix too many leading tabs warning in sdio_clear_int_ext()

Refactor sdio_clear_int_ext() function to remove "Too many leading tabs"
warning reported by checkpatch.pl script.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: remove unnecessary comments to avoid line over 80 char issue
Ajay Singh [Fri, 16 Feb 2018 15:11:38 +0000 (20:41 +0530)]
staging: wilc1000: remove unnecessary comments to avoid line over 80 char issue

Fix "line over 80 characters" issue reported by checkpatch.pl script by
removing unnecessary comments.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: android: ion: Combine cache and uncache pools
Yisheng Xie [Mon, 12 Feb 2018 10:43:14 +0000 (18:43 +0800)]
staging: android: ion: Combine cache and uncache pools

Now we call dma_map in the dma_buf API callbacks and handle explicit
caching by the dma_buf sync API, which make cache and uncache pools
in the same handling flow, which can be combined.

Acked-by: Sumit Semwal <sumit.semwal@linaro.org>
Signed-off-by: Yisheng Xie <xieyisheng1@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: android: ion: Cleanup ion_page_pool_alloc_pages
Yisheng Xie [Mon, 12 Feb 2018 10:43:13 +0000 (18:43 +0800)]
staging: android: ion: Cleanup ion_page_pool_alloc_pages

ion_page_pool_alloc_pages calls alloc_pages to allocate pages for page
pools. If alloc_pages return NULL, it will return NULL, or it will
return the pages allocate from alloc_pages. So we can just return
alloc_pages without any judgement.

Acked-by: Sumit Semwal <sumit.semwal@linaro.org>
Signed-off-by: Yisheng Xie <xieyisheng1@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: android: ion: Return void instead of int
Yisheng Xie [Mon, 12 Feb 2018 10:43:12 +0000 (18:43 +0800)]
staging: android: ion: Return void instead of int

Now, nobody care about the return value of ion_page_pool_add, therefore
we can just make it return void.

Acked-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Yisheng Xie <xieyisheng1@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: android: ion: Remove dead code in ion_page_pool_free
Yisheng Xie [Mon, 12 Feb 2018 10:43:11 +0000 (18:43 +0800)]
staging: android: ion: Remove dead code in ion_page_pool_free

ion_page_pool_add will always return 0, however ion_page_pool_free will
call ion_page_pool_free_pages when ion_page_pool_add's return value is
not 0, so it is a dead code which can be removed.

Acked-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Yisheng Xie <xieyisheng1@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: android: ion: Remove lable debugfs_done
Yisheng Xie [Mon, 12 Feb 2018 10:43:10 +0000 (18:43 +0800)]
staging: android: ion: Remove lable debugfs_done

When failed to create debug_root, we will go on initail other part of
ion, so we can just info this message to user and do not need a lable
to jump.

Acked-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Yisheng Xie <xieyisheng1@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: android: ion: Avoid NULL point in error path
Yisheng Xie [Mon, 12 Feb 2018 10:43:09 +0000 (18:43 +0800)]
staging: android: ion: Avoid NULL point in error path

If we failed to create debugfs for ion at ion_device_create, the
debug_root of ion_device will be NULL, and then when try to create debug
file for shrinker of heap it will be create on the top of debugfs. If we
also failed to create this the debug file, it call dentry_path to found
the path of debug_root, then a NULL point will occur.

Fix this by avoiding call dentry_path, but show the debug name only when
failed to create debug file for shrinker.

Acked-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Yisheng Xie <xieyisheng1@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: android: ion: Nuke ion_page_pool_init
Yisheng Xie [Mon, 12 Feb 2018 10:43:08 +0000 (18:43 +0800)]
staging: android: ion: Nuke ion_page_pool_init

ion_page_pool.c now is used to apply pool APIs for system heap, which do
not need do any initial at device_initcall. Therefore ion_page_pool_init
can be nuked.

Signed-off-by: Yisheng Xie <xieyisheng1@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: android: ion: Remove unused include files for ion_page_pool.c
Yisheng Xie [Mon, 12 Feb 2018 10:43:07 +0000 (18:43 +0800)]
staging: android: ion: Remove unused include files for ion_page_pool.c

After rewrite of ion_page_pool, some of its include file is no need
anymore, just remove it.

Signed-off-by: Yisheng Xie <xieyisheng1@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: android: ion: Remove unused declaration ion_buffer_fault_user_mappings
Yisheng Xie [Mon, 12 Feb 2018 10:43:06 +0000 (18:43 +0800)]
staging: android: ion: Remove unused declaration ion_buffer_fault_user_mappings

ion_buffer_fault_user_mappings's definition has been removed and not be
used anymore, just remove its useless declaration.

Acked-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Yisheng Xie <xieyisheng1@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging:r8188eu: Remove unused struct pkt_file
Ivan Safonov [Sun, 4 Feb 2018 19:27:39 +0000 (22:27 +0300)]
staging:r8188eu: Remove unused struct pkt_file

Struct pkt_file is unused now, so remove it and correponding functions.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>