GitHub/moto-9609/android_kernel_motorola_exynos9610.git
8 years agostaging: ks7010: add a blank line after declarations
Jiong Du [Tue, 25 Oct 2016 11:40:50 +0000 (19:40 +0800)]
staging: ks7010: add a blank line after declarations

Fixes checkpatch warning: Missing a blank line after declarations

Signed-off-by: Jiong Du <jiongdu0.0@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: ks7010: split long line
Jiong Du [Tue, 25 Oct 2016 11:40:49 +0000 (19:40 +0800)]
staging: ks7010: split long line

Fixes checkpatch warning: line over 80 characters

Signed-off-by: Jiong Du <jiongdu0.0@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: ks7010: remove space before tab
Jiong Du [Tue, 25 Oct 2016 11:40:48 +0000 (19:40 +0800)]
staging: ks7010: remove space before tab

Fixes checkpatch warning: space before tabs

Signed-off-by: Jiong Du <jiongdu0.0@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: ks7010: fix complex macro error
Jiong Du [Tue, 25 Oct 2016 11:40:47 +0000 (19:40 +0800)]
staging: ks7010: fix complex macro error

Fixes checkpatch error: Macros with complex values should be enclosed in parentheses

Signed-off-by: Jiong Du <jiongdu0.0@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: ks7010: fix spacing errors
Jiong Du [Tue, 25 Oct 2016 11:40:46 +0000 (19:40 +0800)]
staging: ks7010: fix spacing errors

Fixes checkpatch errors: spacing errors

Signed-off-by: Jiong Du <jiongdu0.0@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: fsl-mc: uprev binary interface to match MC v10.x
Ioana Ciornei [Wed, 26 Oct 2016 16:20:34 +0000 (11:20 -0500)]
staging: fsl-mc: uprev binary interface to match MC v10.x

DPAA2 will not support MC firmware versions prior to MC v10.x.
Update the MC interface code and drivers to reflect this.
   -update the object .h files and code that builds commands to include
    the new command version in the command header
   -object versions are no longer available in the object attributes,
    so remove references to them and instead get the version from the
    new get_api_version() command
   -create/destroy commands for all objects have new arguments
   -dpmng_get_container_id() is replaced by dprc_get_container_id()

This supports a hardware ABI change and thus to match the new ABI
all the above changes need to happen in a single patch.

All MC firmware versions >= 10 will be supported going forward.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: fsl-mc: update copyright dates
Stuart Yoder [Wed, 26 Oct 2016 16:20:33 +0000 (11:20 -0500)]
staging: fsl-mc: update copyright dates

Many source files have evolved without copyright date
updates.  Update the dates to reflect work through
2016.

Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: fsl-mc: improve wording in comments
Stuart Yoder [Wed, 26 Oct 2016 16:20:32 +0000 (11:20 -0500)]
staging: fsl-mc: improve wording in comments

improve and clarify miscellaneous comments in the bus driver
and allocator

Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: fsl-mc: cleanup: improve clarity of messages
Stuart Yoder [Wed, 26 Oct 2016 16:20:31 +0000 (11:20 -0500)]
staging: fsl-mc: cleanup: improve clarity of messages

improve some messages by shortening and rewording

Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: fsl-mc: improve message clarity by adding __func__
Stuart Yoder [Wed, 26 Oct 2016 16:20:30 +0000 (11:20 -0500)]
staging: fsl-mc: improve message clarity by adding __func__

clarify some error messages by printing the actual function name
involved

Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: fsl-mc: improve pr_* messages
Stuart Yoder [Wed, 26 Oct 2016 16:20:29 +0000 (11:20 -0500)]
staging: fsl-mc: improve pr_* messages

define pr_fmt so non dev_* messages will have an fsl-mc prefix
and remove "fsl-mc" from messages where it would now be redundant

Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: fsl-mc: cleanup comment style
Stuart Yoder [Wed, 26 Oct 2016 16:20:28 +0000 (11:20 -0500)]
staging: fsl-mc: cleanup comment style

Be consistent and use kernel-preferred multi-line comment style
everywhere.

Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: fsl-mc: whitespace cleanup: improve alignment in prototypes
Ioana Ciornei [Wed, 26 Oct 2016 16:20:27 +0000 (11:20 -0500)]
staging: fsl-mc: whitespace cleanup: improve alignment in prototypes

To improve readability for structs and function definitions, separate type
and variable name by a single space, instead of an inconsistent number of
tabs.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: fsl-mc: whitespace cleanup: align function args
Ioana Ciornei [Wed, 26 Oct 2016 16:20:26 +0000 (11:20 -0500)]
staging: fsl-mc: whitespace cleanup: align function args

align function arguments that were not aligned to the starting parenthesis

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: fsl-mc: whitespace cleanup: remove extraenous tabs
Stuart Yoder [Wed, 26 Oct 2016 16:20:25 +0000 (11:20 -0500)]
staging: fsl-mc: whitespace cleanup: remove extraenous tabs

use one tab to separate name and value in #define definitions

Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: fsl-mc: whitespace cleanup: remove blank lines
Stuart Yoder [Wed, 26 Oct 2016 16:20:24 +0000 (11:20 -0500)]
staging: fsl-mc: whitespace cleanup: remove blank lines

remove instances of multiple blank lines in comments

Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: fsl-mc: update MAINTAINERS
Stuart Yoder [Wed, 26 Oct 2016 16:20:23 +0000 (11:20 -0500)]
staging: fsl-mc: update MAINTAINERS

-German has moved on to other things and wished to be
 removed as a maintainer
-cleanup the driver description to use the proper name
 of the driver (i.e. the fsl-mc bus driver) and remove incorrect
 references to Freescale

Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Acked-by: J. German Rivera <German.Rivera@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging:dgnc:dgnc_tty: fix Block comments should align the * on each line
Nadim Almas [Tue, 25 Oct 2016 09:22:21 +0000 (14:52 +0530)]
Staging:dgnc:dgnc_tty: fix Block comments should align the * on each line

Block comments should align the * on each line as reported by checkpatch.pl

Signed-off-by: Nadim Almas <nadim.902@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: most: hdm-usb: introduce synchronization function
Andrey Shvetsov [Tue, 25 Oct 2016 15:44:21 +0000 (17:44 +0200)]
staging: most: hdm-usb: introduce synchronization function

This patch introduces the function start_sync_ep() and relocates the
triggers for synchronization to this function.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: most: hdm-usb: do h/w specific synchronization at configuration time
Andrey Shvetsov [Tue, 25 Oct 2016 15:44:20 +0000 (17:44 +0200)]
staging: most: hdm-usb: do h/w specific synchronization at configuration time

This patch puts the synchronization procedure trigger for asynchronous
channels into the function hdm_configure_channel. Likewise, it removes
triggering of hardware specific synchronization for other channel types
from the probe function as it is not required.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: most: aim-networking: keep channels closed if ndo_open fails
Andrey Shvetsov [Tue, 25 Oct 2016 15:44:19 +0000 (17:44 +0200)]
staging: most: aim-networking: keep channels closed if ndo_open fails

This patch stops all started channels whenever the function most_nd_open
returns an error. Additionally, it renames variable wait_res to ret for
the consistency.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: media: davinci_vpfe: fix indentation issue in vpfe_video.c
Leo Sperling [Sun, 23 Oct 2016 12:02:23 +0000 (14:02 +0200)]
Staging: media: davinci_vpfe: fix indentation issue in vpfe_video.c

This is a patch to the vpfe_video.c file that fixes an indentation
warning reported by checkpatch.pl

Signed-off-by: Leo Sperling <leosperling97@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: iio: ad5933: avoid uninitialized variable in error case
Arnd Bergmann [Mon, 24 Oct 2016 15:22:01 +0000 (17:22 +0200)]
staging: iio: ad5933: avoid uninitialized variable in error case

The ad5933_i2c_read function returns an error code to indicate
whether it could read data or not. However ad5933_work() ignores
this return code and just accesses the data unconditionally,
which gets detected by gcc as a possible bug:

drivers/staging/iio/impedance-analyzer/ad5933.c: In function 'ad5933_work':
drivers/staging/iio/impedance-analyzer/ad5933.c:649:16: warning: 'status' may be used uninitialized in this function [-Wmaybe-uninitialized]

This adds minimal error handling so we only evaluate the
data if it was correctly read.

Link: https://patchwork.kernel.org/patch/8110281/
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8188eu: os_dep: remove unnecessary alloc fail message
Pierre-Yves Kerbrat [Wed, 19 Oct 2016 18:49:53 +0000 (20:49 +0200)]
staging: rtl8188eu: os_dep: remove unnecessary alloc fail message

Remove redundant alloc fail message
This patch fixes the warning found by checkpatch

Signed-off-by: Pierre-Yves Kerbrat <pkerbrat@free.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8188eu: os_dep: remove unnecessary parentheses
Pierre-Yves Kerbrat [Wed, 19 Oct 2016 18:49:52 +0000 (20:49 +0200)]
staging: rtl8188eu: os_dep: remove unnecessary parentheses

Remove parentheses in _rtw_init_queue to fix checkpatch warning

Signed-off-by: Pierre-Yves Kerbrat <pkerbrat@free.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8188eu: os_dep: fix missing spaces around operators
Pierre-Yves Kerbrat [Wed, 19 Oct 2016 18:49:51 +0000 (20:49 +0200)]
staging: rtl8188eu: os_dep: fix missing spaces around operators

Fix missing space around operators in rtw_alloc2d function in
osdep_service.c

Signed-off-by: Pierre-Yves Kerbrat <pkerbrat@free.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8188eu: os_dep: fix block comment alignment issue
Pierre-Yves Kerbrat [Wed, 19 Oct 2016 18:49:50 +0000 (20:49 +0200)]
staging: rtl8188eu: os_dep: fix block comment alignment issue

Fix coding style issue in block comment in osdep_service.c found by
checkpatch tool

Signed-off-by: Pierre-Yves Kerbrat <pkerbrat@free.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8188eu: os_dep: remove empty lines
Pierre-Yves Kerbrat [Wed, 19 Oct 2016 18:49:49 +0000 (20:49 +0200)]
staging: rtl8188eu: os_dep: remove empty lines

Remove unnecessary empty lines (issue found by checkpatch)

Signed-off-by: Pierre-Yves Kerbrat <pkerbrat@free.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: sm750fb: restructure multi-line comments to follow CodingStyle
Eric S. Stone [Sun, 23 Oct 2016 02:51:29 +0000 (19:51 -0700)]
staging: sm750fb: restructure multi-line comments to follow CodingStyle

Eliminates all checkpatch.pl BLOCK_COMMENT_STYLE warnings in
sm750fb, and coincidentally eliminates some line-length (80)
warnings.

Signed-off-by: Eric S. Stone <esstone@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging:r8188eu: Remove space before comma
Alex Briskin [Sat, 22 Oct 2016 11:34:28 +0000 (14:34 +0300)]
staging:r8188eu: Remove space before comma

Trivial style fix to remove unnecessary errors in checkpatch.pl

Signed-off-by: Alex Briskin <br.shurik@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging:vt6656:main_usb: fix Block comments should align the * on each line
Nadim Almas [Fri, 21 Oct 2016 16:29:05 +0000 (21:59 +0530)]
Staging:vt6656:main_usb: fix Block comments should align the * on each line

Block comments should align the * on each line as reported by checkpatch.pl

Signed-off-by: Nadim Almas <nadim.902@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: xgifb: Fix NULL pointer comparison warning
Maninder Singh [Thu, 20 Oct 2016 12:47:03 +0000 (18:17 +0530)]
Staging: xgifb: Fix NULL pointer comparison warning

Replace direct comparisons to NULL i.e.
'x == NULL' with '!x'.
This problem was detected by checkpatch.

Signed-off-by: Maninder Singh <maninder.s2@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: Remove unused function wilc_lock_timeout
Binoy Jayan [Thu, 20 Oct 2016 09:36:30 +0000 (15:06 +0530)]
staging: wilc1000: Remove unused function wilc_lock_timeout

Semaphore are going away in the future, so remove the unused function
wilc_lock_timeout which calls a semaphore api but has no users.

Signed-off-by: Binoy Jayan <binoy.jayan@linaro.org>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: visorbus: visorchannel: Refactor locking code to be statically deter...
Cathal Mullaney [Wed, 19 Oct 2016 21:43:25 +0000 (22:43 +0100)]
staging: unisys: visorbus: visorchannel: Refactor locking code to be statically deterministic.

This patch makes locking in visorchannel_signalempty statically
deterministic.
As a result this patch fixes the sparse warning:
Context imbalance in 'visorchannel_signalempty' - different lock
contexts for basic block.

The logic of the locking code doesn't change but the layout of the
original code is "frowned upon"
according to mails on sparse context checking.
Refactoring removes the warning and makes the code more readable.

Signed-off-by: Cathal Mullaney <chuckleberryfinn@gmail.com>
Tested-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wlan-ng: Replace data type declaration with variable of same type in prism2m...
Sergio Paracuellos [Wed, 19 Oct 2016 15:51:30 +0000 (17:51 +0200)]
staging: wlan-ng: Replace data type declaration with variable of same type in prism2mgmt.c

sizeof(var) instead of sizeof(struct XXX) is preferred.

It also fix the following checkpatch.pl script warning:
WARNING: line over 80 characters

Fix this two in prism2mgmt.c file.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wlan-ng: avoid CamelCase: hfa384x_KeyIDChanged
Sergio Paracuellos [Wed, 19 Oct 2016 15:59:23 +0000 (17:59 +0200)]
staging: wlan-ng: avoid CamelCase: hfa384x_KeyIDChanged

Replace CamelCase struct name with underscores to comply
with the standard kernel coding style.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wlan-ng: avoid CamelCase: hfa384x_PSUserCount
Sergio Paracuellos [Wed, 19 Oct 2016 15:59:22 +0000 (17:59 +0200)]
staging: wlan-ng: avoid CamelCase: hfa384x_PSUserCount

Replace CamelCase struct name with underscores to comply
with the standard kernel coding style.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wlan-ng: avoid CamelCase: hfa384x_AuthRequest
Sergio Paracuellos [Wed, 19 Oct 2016 15:59:21 +0000 (17:59 +0200)]
staging: wlan-ng: avoid CamelCase: hfa384x_AuthRequest

Replace CamelCase struct name with underscores to comply
with the standard kernel coding style.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wlan-ng: avoid CamelCase: hfa384x_LinkStatus
Sergio Paracuellos [Wed, 19 Oct 2016 15:59:20 +0000 (17:59 +0200)]
staging: wlan-ng: avoid CamelCase: hfa384x_LinkStatus

Replace CamelCase struct name with underscores to comply
with the standard kernel coding style.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wlan-ng: avoid CamelCase: hfa384x_HScanResult
Sergio Paracuellos [Wed, 19 Oct 2016 15:59:19 +0000 (17:59 +0200)]
staging: wlan-ng: avoid CamelCase: hfa384x_HScanResult

Replace CamelCase struct name with underscores to comply
with the standard kernel coding style.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wlan-ng: avoid CamelCase: hfa384x_HScanResultSub
Sergio Paracuellos [Wed, 19 Oct 2016 15:59:18 +0000 (17:59 +0200)]
staging: wlan-ng: avoid CamelCase: hfa384x_HScanResultSub

Replace CamelCase struct name with underscores to comply
with the standard kernel coding style.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wlan-ng: avoid CamelCase: hfa384x_ChInfoResult
Sergio Paracuellos [Wed, 19 Oct 2016 15:59:17 +0000 (17:59 +0200)]
staging: wlan-ng: avoid CamelCase: hfa384x_ChInfoResult

Replace CamelCase struct name with underscores to comply
with the standard kernel coding style.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wlan-ng: avoid CamelCase: hfa384x_CommTallies16
Sergio Paracuellos [Wed, 19 Oct 2016 15:59:16 +0000 (17:59 +0200)]
staging: wlan-ng: avoid CamelCase: hfa384x_CommTallies16

Replace CamelCase struct name with underscores to comply
with the standard kernel coding style.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wlan-ng: avoid CamelCase in fields of struct hfa384x_dbmcommsquality
Sergio Paracuellos [Wed, 19 Oct 2016 15:59:15 +0000 (17:59 +0200)]
staging: wlan-ng: avoid CamelCase in fields of struct hfa384x_dbmcommsquality

Replace CamelCase fields of struct with underscores to comply
with the standard kernel coding style

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wlan-ng: avoid CamelCase: hfa384x_WPAData
Sergio Paracuellos [Wed, 19 Oct 2016 15:59:14 +0000 (17:59 +0200)]
staging: wlan-ng: avoid CamelCase: hfa384x_WPAData

Replace CamelCase struct name with underscores to comply
with the standard kernel coding style.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wlan-ng: avoid CamelCase: hfa384x_HostScanRequest_data
Sergio Paracuellos [Wed, 19 Oct 2016 15:59:13 +0000 (17:59 +0200)]
staging: wlan-ng: avoid CamelCase: hfa384x_HostScanRequest_data

Replace CamelCase struct name and fields with underscores to comply
with the standard kernel coding style.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wlan-ng: avoid CamelCase: HFA384x_RID_CNFAPBCNint
Sergio Paracuellos [Wed, 19 Oct 2016 15:59:12 +0000 (17:59 +0200)]
staging: wlan-ng: avoid CamelCase: HFA384x_RID_CNFAPBCNint

Replace CamelCase define to comply with the standard kernel coding style.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: slicoss: replace memcpy_fromio with memcpy
Ryan Swan [Tue, 18 Oct 2016 21:26:43 +0000 (17:26 -0400)]
staging: slicoss: replace memcpy_fromio with memcpy

As per discusion with Lino Sanfilippo, memcpy is the proper way to copy
across dma memory, which also removes sparse warning that triggered
inquiry.

Signed-off-by: Ryan Swan <ryan@ryanswan.com>
Reviewed-by: Lino Sanfilippo <LinoSanfilippo@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: ks7010: Remove trailing whitespace
Jiong Du [Mon, 24 Oct 2016 13:50:41 +0000 (21:50 +0800)]
staging: ks7010: Remove trailing whitespace

Fixes checkpatch error: tailing whitespace

Signed-off-by: Jiong Du <jiongdu0.0@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: ks7010: ks7010_sdio.c: Fixing multiple assignments
Nick Rosbrook [Fri, 21 Oct 2016 17:15:13 +0000 (13:15 -0400)]
staging: ks7010: ks7010_sdio.c: Fixing multiple assignments

Running checkpatch on ks7010_sdio.c shows two locations where
multiple assignment statements are used.

This patch modifies the assignments into single assignments.

Signed-off-by: Nick Rosbrook <nrosbrook@mail.smcvt.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: ks7010: Corrected a spelling mistake
Nick Rosbrook [Thu, 20 Oct 2016 17:08:06 +0000 (13:08 -0400)]
staging: ks7010: Corrected a spelling mistake

This patch corrects the spelling of 'initialize' in ks7010_sdio.c.

The issue was found by checkpatch.

Signed-off-by: Nick Rosbrook <nrosbrook@mail.smcvt.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: ks7010: Add spaces around '*'
Nick Rosbrook [Wed, 19 Oct 2016 22:52:04 +0000 (18:52 -0400)]
staging: ks7010: Add spaces around '*'

Added spaces around a '*' in ks7010_sdio.c. Issue found by checkpatch.

Signed-off-by: Nick Rosbrook <nrosbrook@mail.smcvt.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: ks7010: ks_wlan_net: Use setup_timer instead of init_timer and data fields
Wei Yongjun [Tue, 18 Oct 2016 14:38:33 +0000 (14:38 +0000)]
staging: ks7010: ks_wlan_net: Use setup_timer instead of init_timer and data fields

Use setup_timer function instead of initializing timer with the function
and data fields

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: ks7010: convert list_for_each to entry variant
Wei Yongjun [Tue, 18 Oct 2016 14:37:47 +0000 (14:37 +0000)]
staging: ks7010: convert list_for_each to entry variant

convert list_for_each() to list_for_each_entry() where
applicable.

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: ks7010: remove unused including <linux/version.h>
Wei Yongjun [Tue, 18 Oct 2016 14:38:06 +0000 (14:38 +0000)]
staging: ks7010: remove unused including <linux/version.h>

Remove including <linux/version.h> that don't need it.

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: i4l: pcbit: remove duplicated include from capi.c
Wei Yongjun [Tue, 18 Oct 2016 14:37:10 +0000 (14:37 +0000)]
staging: i4l: pcbit: remove duplicated include from capi.c

Remove duplicated include.

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: i4l: pcbit: drv: remove duplicated include from drv.c
Wei Yongjun [Tue, 18 Oct 2016 14:37:26 +0000 (14:37 +0000)]
staging: i4l: pcbit: drv: remove duplicated include from drv.c

Remove duplicated include.

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rts5208: rtsx.c: Fix invalid use of sizeof in rtsx_probe()
Wei Yongjun [Mon, 17 Oct 2016 23:35:49 +0000 (23:35 +0000)]
staging: rts5208: rtsx.c: Fix invalid use of sizeof in rtsx_probe()

sizeof() when applied to a pointer typed expression gives the
size of the pointer, not that of the pointed data.

Fixes: 2eb9d8cbb3c3 ("staging: rts5208: rtsx.c: Alloc sizeof struct")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: bcm2708_vchiq: fix return value check in vchiq_init_state()
Wei Yongjun [Mon, 17 Oct 2016 15:05:36 +0000 (15:05 +0000)]
staging: bcm2708_vchiq: fix return value check in vchiq_init_state()

In case of error, the function kthread_create() returns ERR_PTR() and
never returns NULL. The NULL test in the return value check should be
replaced with IS_ERR().

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: bcm2708_vchiq: fix return value check in vchiq_platform_conn_state_changed()
Wei Yongjun [Mon, 17 Oct 2016 15:06:07 +0000 (15:06 +0000)]
staging: bcm2708_vchiq: fix return value check in vchiq_platform_conn_state_changed()

In case of error, the function kthread_create() returns ERR_PTR() and
never returns NULL. The NULL test in the return value check should be
replaced with IS_ERR().

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: bcm2708_vchiq: remove .owner field for driver
Wei Yongjun [Mon, 17 Oct 2016 15:08:14 +0000 (15:08 +0000)]
staging: bcm2708_vchiq: remove .owner field for driver

Remove .owner field if calls are used which set it automatically.

Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging/vchi: Add a TODO file of things I know we need to deal with.
Eric Anholt [Mon, 17 Oct 2016 19:44:05 +0000 (12:44 -0700)]
staging/vchi: Add a TODO file of things I know we need to deal with.

I've left out the downstream HDMI audio driver from the "to be
imported" section, as we'll want to handle it natively in vc4.  The
downstream kernel will likely continue to use that driver for a while
due to using the interim "vc4 firmware KMS" mode while vc4 gets its
featureset (such as HDMI audio!) completed.

I've also left out VC-CMA, which appears to be about having Linux
manage a CMA area that the firmware gets to make allocations out of.
I'm not clear on if this is useful (the firmware's need for memory
drops massively with vc4 present, and may drop even more depending on
how we resolve dmabuf handling for camera and video decode)

Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: clocking-wizard: Fix incorrect type of speed grade
Xavier Roumegue [Tue, 18 Oct 2016 20:56:50 +0000 (22:56 +0200)]
staging: clocking-wizard: Fix incorrect type of speed grade

The speed grade type is unsigned according to the dt-bindings.

Fix sparse issue (-Wtypesign):
CHECK   drivers/staging/clocking-wizard/clk-xlnx-clock-wizard.c
drivers/staging/clocking-wizard/clk-xlnx-clock-wizard.c:162:56: warning: incorrect type in argument 3 (different signedness)
drivers/staging/clocking-wizard/clk-xlnx-clock-wizard.c:162:56:    expected unsigned int [usertype] *out_value
drivers/staging/clocking-wizard/clk-xlnx-clock-wizard.c:162:56:    got int *<noident>

Signed-off-by: Xavier Roumegue <xroumegue@gmail.com>
Acked-by: Sören Brinkmann <soren.brinkmann@xilinx.com>
Acked-by: Moritz Fischer <moritz.fischer@ettus.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoMAINTAINERS: Add the staging vchiq driver as a bcm2835 responsibility.
Eric Anholt [Mon, 17 Oct 2016 19:44:06 +0000 (12:44 -0700)]
MAINTAINERS: Add the staging vchiq driver as a bcm2835 responsibility.

It's being merged to support firmware communication on the Raspberry
Pi, so we should probably send its patches to linux-rpi-kernel.

Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: Move assignments out of function calls.
Elise Lennion [Sun, 23 Oct 2016 00:30:44 +0000 (22:30 -0200)]
staging: lustre: Move assignments out of function calls.

Assignments inside of function calls confuse the reader and should be
avoided, so it was moved out before the call.

Found with Coccinelle, semantic patch:
@@
identifier f;
expression e1, e2;
assignment operator a;
@@

+ e1 a e2;
f(...,
- (e1 a e2)
+ e1
 ,...);

Signed-off-by: Elise Lennion <elise.lennion@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: lustre: lov: check return value of lov_sub_get()
Jinshan Xiong [Sat, 22 Oct 2016 00:34:49 +0000 (08:34 +0800)]
Staging: lustre: lov: check return value of lov_sub_get()

Check return value of lov_sub_get() in lov_io_read_ahead().

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: remove broken dead code in cfs_cpt_table_create_pattern
Arnd Bergmann [Mon, 17 Oct 2016 22:08:56 +0000 (00:08 +0200)]
staging: lustre: remove broken dead code in cfs_cpt_table_create_pattern

After a recent bugfix, we get a warning about the use of an uninitialized
variable:

drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c: In function 'cfs_cpt_table_create_pattern':
drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c:833:7: error: 'str' may be used uninitialized in this function [-Werror=maybe-uninitialized]

This part of the function used to not do anything as we would reassign
the 'str' pointer to something else right away, but now we pass an
uninitialized pointer into 'strchr', which can cause a kernel page fault
or worse.

Fixes: 239fd5d41f9b ("staging: lustre: libcfs: shortcut to create CPT from NUMA topology")
Cc: Liang Zhen <liang.zhen@intel.com>
Cc: James Simmons <jsimmons@infradead.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: restore initialization of return code
Arnd Bergmann [Mon, 17 Oct 2016 22:42:27 +0000 (00:42 +0200)]
staging: lustre: restore initialization of return code

A recent rework dropped the initialization of the initialization of the
successful return code in lov_getstripe:

drivers/staging/lustre/lustre/lov/lov_pack.c: In function 'lov_getstripe':
drivers/staging/lustre/lustre/lov/lov_pack.c:426:9: error: 'rc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
drivers/staging/lustre/lustre/lov/lov_pack.c:313:6: note: 'rc' was declared here

This adds it back.

Fixes: e10a431b3fd0 ("staging: lustre: lov: move LSM to LOV layer")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging:fbtft: Replace decimal permissions with 4 digit octal
Nadim Almas [Mon, 24 Oct 2016 16:44:37 +0000 (22:14 +0530)]
Staging:fbtft: Replace decimal permissions with 4 digit octal

ERROR: Use 4 digit octal (0777) not decimal permissions

This error was detected by checkpatch.pl

Signed-off-by: Nadim Almas <nadim.902@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: fbtft: Fix module autoload
Javier Martinez Canillas [Mon, 17 Oct 2016 19:21:21 +0000 (16:21 -0300)]
staging: fbtft: Fix module autoload

If the driver is built as a module, autoload won't work because the module
alias information is not filled. So user-space can't match the registered
device with the corresponding module.

Export the module alias information using the MODULE_DEVICE_TABLE() macro.

Before this patch:

$ modinfo drivers/staging/fbtft/flexfb.ko | grep alias
$

After this patch:

$ modinfo drivers/staging/fbtft/flexfb.ko | grep alias
alias:          platform:flexpfb

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: fsl-mc: cleanup: convert uintX_t types to uX
Ioana Ciornei [Mon, 17 Oct 2016 18:43:08 +0000 (13:43 -0500)]
staging: fsl-mc: cleanup: convert uintX_t types to uX

Replace all uses of uintX_t types with uX types in order to comply with
kernel coding style and resolve checkpatch warnings.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: fsl-mc: dprc: shorten DPRC interrupt name
Stuart Yoder [Mon, 17 Oct 2016 18:43:01 +0000 (13:43 -0500)]
staging: fsl-mc: dprc: shorten DPRC interrupt name

improve readibility of the DPRC interrupt name in sysfs by
shortening this and just using the device name.  There is only
one interrupt DPRC used, so no further differentiation is needed.

Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: fsl-mc: irq: shorten name of interrupt name
Stuart Yoder [Mon, 17 Oct 2016 18:42:53 +0000 (13:42 -0500)]
staging: fsl-mc: irq: shorten name of interrupt name

For /proc/interrupts readability, platform bus MSIs are named
"ITS-pMSI" in the GIC ITS implementation for that bus.  Follow
a similar naming convention and call fsl-mc bus MSIs
"ITS-fMSI".

Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: fsl-mc: update Kconfig dependency
Stuart Yoder [Mon, 17 Oct 2016 18:42:40 +0000 (13:42 -0500)]
staging: fsl-mc: update Kconfig dependency

The Kconfig dependency previously included ARM64, which is not
strictly correct.  Change it to ARCH_LAYERSCAPE which is the
SoC platform that includes the DPAA2 hardware.

Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: fsl-mc: clean up Kconfig description
Stuart Yoder [Mon, 17 Oct 2016 18:42:34 +0000 (13:42 -0500)]
staging: fsl-mc: clean up Kconfig description

Except for copyrights we are avoiding all references
to Freescale, which no longer exists as a brand.  Cleanup
Freescale references and simplify the Kconfig description
of the fsl-mc bus.

Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: fsl-mc: add missing includes to fsl-mc-private.h
Stuart Yoder [Mon, 17 Oct 2016 18:42:28 +0000 (13:42 -0500)]
staging: fsl-mc: add missing includes to fsl-mc-private.h

fsl-mc-private.h references several definitions that it does not explicitly
have includes for. Up until now we've gotten lucky due to include ordering
that things compile.  Add the missing includes.

Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: fsl-mc: cleanup: move dpbp and dpcon cmd headers
Stuart Yoder [Mon, 17 Oct 2016 18:42:18 +0000 (13:42 -0500)]
staging: fsl-mc: cleanup: move dpbp and dpcon cmd headers

The dpbp and dpcon cmd header files should not be in the public
include directory but should be private to the bus driver.

Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8192x: fix bogus maybe-uninitialized warning
Arnd Bergmann [Mon, 24 Oct 2016 15:38:34 +0000 (17:38 +0200)]
staging: rtl8192x: fix bogus maybe-uninitialized warning

The rtllib_rx_extract_addr() is supposed to set up the mac addresses
for four possible cases, based on two bits of input data. For
some reason, gcc decides that it's possible that none of the these
four cases apply and the addresses remain uninitialized:

drivers/staging/rtl8192e/rtllib_rx.c: In function â€˜rtllib_rx_InfraAdhoc’:
include/linux/etherdevice.h:316:61: error: â€˜*((void *)&dst+4)’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
drivers/staging/rtl8192e/rtllib_rx.c:1318:5: note: â€˜*((void *)&dst+4)’ was declared here
ded from /git/arm-soc/drivers/staging/rtl8192e/rtllib_rx.c:40:0:
include/linux/etherdevice.h:316:36: error: â€˜dst’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
drivers/staging/rtl8192e/rtllib_rx.c:1318:5: note: â€˜dst’ was declared here

This warning is clearly nonsense, but changing the last case into
'default' makes it obvious to the compiler too, which avoids the
warning and probably leads to better object code too.

As the same warning appears in other files that have the exact
same code, I'm fixing it in both rtl8192e and rtl8192u, even
though I did not observe it for the latter.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8188eu: Fix coding style errors
Carlos Maiolino [Mon, 17 Oct 2016 15:39:22 +0000 (17:39 +0200)]
staging: rtl8188eu: Fix coding style errors

Fix coding style errors reported by checkpatch.pl, specifically:

ERROR: space prohibited before that ',' (ctx:WxW)

This patch get rid of all "ERROR" messages from checkpatch.pl for this file

Signed-off-by: Carlos Maiolino <cmaiolino28@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: gs_fpgaboot: Use octal permissions '0444'
Shyam Saini [Mon, 17 Oct 2016 13:34:46 +0000 (19:04 +0530)]
Staging: gs_fpgaboot: Use octal permissions '0444'

Fixed following checkpatch warning
WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider
using octal permissions '0444'.

Signed-off-by: Shyam Saini <mayhs11saini@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: dgnc: Replace CamelCase namings with underscores
Pankaj Bharadiya [Mon, 17 Oct 2016 10:47:08 +0000 (16:17 +0530)]
staging: dgnc: Replace CamelCase namings with underscores

Replace CamelCase names with underscores to comply with the standard
kernel coding style.

Signed-off-by: Pankaj Bharadiya <pankaj.bharadiya@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: dgnc: Remove some redundant functions
Pankaj Bharadiya [Mon, 17 Oct 2016 10:47:07 +0000 (16:17 +0530)]
staging: dgnc: Remove some redundant functions

dgnc_tty_preinit() and dgnc_tty_post_uninit() functions are used to
allocate and free "dgnc_TmpWriteBuf" and this "dgnc_TmpWriteBuf" is
not really getting used. Hence remove these redundant functions.

Also remove dgnc_TmpWriteBuf variable as it is not used anymore.

Signed-off-by: Pankaj Bharadiya <pankaj.bharadiya@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: greybus: audio: remove redundant slot field
Pankaj Bharadiya [Mon, 17 Oct 2016 09:12:36 +0000 (14:42 +0530)]
staging: greybus: audio: remove redundant slot field

gb_audio_manager_module_descriptor's intf_id field maintains the
information about the interface on which module is connected hence
having an extra slot field is redundant.

Thus remove the slot field and its associated code.

Signed-off-by: Pankaj Bharadiya <pankaj.bharadiya@gmail.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Vaibhav Agarwal <vaibhav.sr@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: Greybus: Fix trailing */ in block comments
Rahul Krishnan [Fri, 21 Oct 2016 15:29:28 +0000 (20:59 +0530)]
Staging: Greybus: Fix trailing */ in block comments

This patch fixes the following checkpath.pl warning
WARNING: Block comments use a trailing */ on a separate line

Signed-off-by: Rahul Krishnan <mrahul.krishnan@gmail.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: greybus: es2: fix arpc request size
Rui Miguel Silva [Wed, 19 Oct 2016 12:44:25 +0000 (13:44 +0100)]
staging: greybus: es2: fix arpc request size

Fix size field of arpc message request by using the header size and not
the pointer size.

Signed-off-by: Rui Miguel Silva <rmfrfs@gmail.com>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: greybus: audio_manager_sysfs: Replace sscanf with kstrto* to single variable...
Elise Lennion [Fri, 14 Oct 2016 22:00:11 +0000 (19:00 -0300)]
staging: greybus: audio_manager_sysfs: Replace sscanf with kstrto* to single variable conversion.

Fix checkpatch warning:

WARNING: Prefer kstrto<type> to single variable sscanf

kstrto* is designed to convert string to numerical value and makes
it easier to understand what the code does.

Signed-off-by: Elise Lennion <elise.lennion@gmail.com>
Reviewed-by: Mark Greer <mgreer@animalcreek.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: xgifb: Remove unnecessary parentheses.
Elise Lennion [Mon, 17 Oct 2016 23:57:58 +0000 (21:57 -0200)]
staging: xgifb: Remove unnecessary parentheses.

The removed parentheses are unnecessary and don't add readability.

Found using Coccinelle semantic patch:
@@ expression e, e1, e2; @@
e &=
(
        (e1 == e2)
|
-       (e1)
+       e1
)

@@ expression e, e1, e2; @@
e |=
(
        (e1 == e2)
|
-       (e1)
+       e1
)

Signed-off-by: Elise Lennion <elise.lennion@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: vt6656: Remove unnecessary parentheses.
Elise Lennion [Tue, 18 Oct 2016 00:01:26 +0000 (22:01 -0200)]
staging: vt6656: Remove unnecessary parentheses.

The removed parentheses are unnecessary and don't add readability.

Found using Coccinelle semantic patch:
@@ expression e, e1, e2; @@
e +=
(
        (e1 == e2)
|
-       (e1)
+       e1
)

@@ expression e, e1, e2; @@
e =
(
        (e1 == e2)
|
-       (e1)
+       e1
)

Signed-off-by: Elise Lennion <elise.lennion@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: android: ion: Make a read-only structure
Mihaela Muraru [Mon, 17 Oct 2016 14:20:18 +0000 (17:20 +0300)]
Staging: android: ion: Make a read-only structure

This patch add const qualifier at the declaration of the structure.
The structure become a read-only data, this increase the security.

Found with Coccinelle:
@r disable optional_qualifier@
identifier s,i;
@@
* static struct s i ={...};

Signed-off-by: Mihaela Muraru <mihaela.muraru21@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: android: Remove unnecessary parentheses.
Elise Lennion [Tue, 18 Oct 2016 00:00:07 +0000 (22:00 -0200)]
staging: android: Remove unnecessary parentheses.

The removed parentheses are unnecessary and don't add readability.

Found using Coccinelle semantic patch:
@@ expression e, e1, e2; @@
e =
(
        (e1 == e2)
|
-       (e1)
+       e1
)

Signed-off-by: Elise Lennion <elise.lennion@gmail.com>
Acked-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: vc04_services: Add casts to remove warnings in vchiq_core.c
Michael Zoran [Wed, 19 Oct 2016 22:58:54 +0000 (15:58 -0700)]
staging: vc04_services: Add casts to remove warnings in vchiq_core.c

When compiling vchiq_core.c for 64 bit, the compiler
emits a few warnings that are not actual issues. This
change adds a few casts to remove the extra unnecessary
warnings.

Signed-off-by: Michael Zoran <mzoran@crowfest.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: vc04_services: Handle conversion from VCHIQ_SERVICE_HANDLE_T to VCHI_SERVICE...
Michael Zoran [Wed, 19 Oct 2016 22:58:48 +0000 (15:58 -0700)]
staging: vc04_services: Handle conversion from VCHIQ_SERVICE_HANDLE_T to VCHI_SERVICE_HANDLE_T

A VCHIQ_SERVICE_HANDLE_T which is an int is stuffed into a
VCHI_SERVICE_HANDLE_T which is a pointer, passed around, then
converted back to a VCHIQ_SERVICE_HANDLE_T. Since the data is
always actually a VCHIQ_SERVICE_HANDLE_T(int), never actually a
pointer, it is safe to simply cast the two back in forth.

Note that pointers are never stuffed into an int.

Signed-off-by: Michael Zoran <mzoran@crowfest.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: vc04_services: Convert pointers in shared state to offsets
Michael Zoran [Wed, 19 Oct 2016 22:58:34 +0000 (15:58 -0700)]
staging: vc04_services: Convert pointers in shared state to offsets

The arm processor core and the GPU have a shared data structure.
This structure contains pointers to base linux kernel objects such as
events.  The size of the pointer changes between 32 bit and 64 bit,
so it is necessary to convert these pointers to offsets from the
beginning of the state structure.

Luckly, the GPU does not interpret these pointers/offsets,
but this change is necessary to keep the structure the same since
the GPU code is outside the scope of the linux kernel
and can't be easily changed.

Signed-off-by: Michael Zoran <mzoran@crowfest.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: vc04_services: Change fields of page list structure to fixed length
Michael Zoran [Wed, 19 Oct 2016 22:58:27 +0000 (15:58 -0700)]
staging: vc04_services: Change fields of page list structure to fixed length

The arm processor core and the GPU have shared data structures.
One of these structures is a list of pages of data for messages.
This structure can not change since it is dependent on the GPU
firmware which is external to the kernel.  Convert the fields
of this structure to fixed length fields.

Signed-off-by: Michael Zoran <mzoran@crowfest.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: vc04_services: Convert dsb() to dsb(sy)
Michael Zoran [Wed, 19 Oct 2016 22:58:09 +0000 (15:58 -0700)]
staging: vc04_services: Convert dsb() to dsb(sy)

The dsb() macro for 32 arm compiles to dsb(sy) in the binary file.
This macro is no longer supported on arm64, so instead use dsb(sy)
which is completely binary compatible.

Signed-off-by: Michael Zoran <mzoran@crowfest.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoMerge tag 'iio-for-4.10a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23...
Greg Kroah-Hartman [Mon, 24 Oct 2016 09:34:22 +0000 (11:34 +0200)]
Merge tag 'iio-for-4.10a' of git://git./linux/kernel/git/jic23/iio into staging-next

Jonathan writes:

First round of IIO new device support, features and cleanups for the 4.10 cycle.

Fair number of outreachy related patches in here. Some of these may well
have already been picked up by Greg but git will sort that out for us.

Also some good staging cleanup work from other sources. Thanks Brian and Lars
in particular for this.

New device support
* ACCES 104-quad-8
  - New driver for this 8 channel encoder input board. Lots of new ABI with
    this one.
* AD7766
  - New driver supporting AD7766, AD7766-1, AD7766-2, AD7767, AD7767-1 and
    AD7767-2 24 bit ADCs.
* dmard 10
  - New driver for this 3 axis accelerometer.
* Honeywell ABP pressure sensors.
  - New driver covering 56 parts in this series (too many to list here!)
* HTS221
  - New driver to support this relative humidiy and temperature device.
* LMP91000
  - New driver for this potentiostat (form of chemical sensor). Nice example
    of use of the buffered consumer interfaces and the use of a consumer
    provided trigger.
* MiraMEMS DA311
  - New driver for this 3 axis accelerometer.
* MiraMEMS DA280
  - New driver for this 3 axis accelerometer. Follow up caught up with
  vendor prefixes for these.

Staging graduations
* isl29018 light sensor
  - Fixes and cleanups listed below (thanks for your hard work on this Brian!)
* sca3000
  - Fixes and cleanups listed below.  This was one of the small set of drivers
  that went into staging when IIO was first added.  Turns out it had a few
  bugs and needed to be brought into the modern era!  Not clear if I am
  the only person who actually has one of these still wired to a board.

New features (Core)
 - Add an iio_trigger_validate_own_device helper which relies on the device
   and trigger having the same parent.  Convenient to have this for some
   of the more complex trigger / device interactions. Was hand rolled in
   a few drivers already so good to bring it into the core.
 - Add an iio_read_channel_offset in kernel access helper (similar to
   the existing one for scale).
 - IIO_ATTR_{RO, WO, RW} and IIO_DEVICE_ATTR_{RO, WO, RW} macros.  These
   lead some rather contrived function naming, but there is no denying they
   do reduced boilerplate.  I'm going to resist their introduction in
   drivers 'unless' they form part of a larger set of cleanups.
 - Counter channel type and index type.

New features (Drivers)
* hdc100x
  - Triggered buffer support.
* mcp4725
  - Device tree bindings and support.
  - Voltage reference selection.
* ti-adc0832
  - Triggered buffer support.
* ti-adc161s626
  - Add regulator support allowing _scale and _offset values to be established
  and exported.

New features (Tools)
* iio_generic_buffer
  - -A option to force enable all channels rather than faulting if some are
  already enabled (like -a does).  Followup patches tidied this support up.

Cleanups (Core)
 - Use kmalloc_array in iio_scan_mask_set.
 - Take event_attrs field of iio_info structure constant
 - Staging todo list updates. Most of it was long done.
 - MAINTAINERS had a wrong directory listing.

Cleanups (Drivers)
* Missing i2c trivial devices entries.
* ad5592r
  - Fix an endian type related sparse warnings.
* ad7150
  - Constify the event attribute_group structures.
* ad7152
  - Add some blank lines to improve readability.
  - Sampling frequency control via chan-info element rather than hand rolled
  attributes.
  - add a new lock to avoid use of mlock for non state change related locking.
* ad7280
  - Constify atrribute_group structure (second patch covers the event ones)
* ad7606 (Lars is driving most of the cleanup on this with some additions from
  Eva)
  - Fix improper setting of oversampling pins.  This has been broken a very
  long time in this staging driver, so not going to push this back to stable.
  - Implement oversampling configuration via the chan_info mask element.
  - Remove an unused int_vref_mv field.
  - Remove a reundant name field from ad7606_chip_info.
  - Remove default device configuration from platform_data in favour of
  whatever the power on defaults are.
  - Remove out of band error reporting in the kernel log as not providing
  much information.
  - Fix oversampling ratio by having 1 be the value for no oversampling.
  - Avoid allocating buffer for each data capture.
  - Factor out common code between periodic and one-shot capture.
  - Move set_drvdat into common code.
  - Let the common probe function return int rather than jumping through
  an ERR_PTR.
  - Pass struct device * into common remove to simplify code.
  - Always run trigger handler only once per event (no one can remember why
  it was being possibly done twice).
  - Move over to the GPIO descriptor API to shorten and clarify code.
  - Move the buffer code into the main file as it's not optional and is
  now rather short in this driver.
  - Fix the naming of the supply regulator.
  - Rework regulator handling to handle errors including deferred probing.
  - Tidy up a ptr_err or 0 return.
* ad7746
  - Sampling frequency control via info_mask element rather than hand rolled
* ad7758
  - Sampling frequency control via info_mask element rather than hand rolled
  attributes.
* ad7816
  - Constify the event attribute_group structure.
* adt7316
  - Constify the event attribute group structures.
* ak8974
  - Cleanup some sparse warnings about endian types.
* ak8975
  - Cleanup some sparse warnings about endian types.
* bmi160
  - Spare endian warning cleanups.
* isl29018 (towards staging graduation)
  - Remove unusedvariables and defines.
  - Improve consistency of error handling.
  - Signed / unsigned comparison fixes.
  - Use the IIO_DEVICE_ATTR_{RO, RW} macros
  - Fix a race in in_illuminance_scale_available_show.
  - Cleanup exit points of _read_raw
  - Sanity check if in suspended state during a write_raw call as was already
    done for read_raw.
  - Document device tree bidnings.
  - Document infrared supression controls.
  - Add some newlines to improve readability and drop one that shouldn't be
    there.
  - Fix a poorly named functions name.
  - Fix multiline coment syntax.
  - Tidy up a pair or return statements by unifying them.
  - Rename description in Kconfig for consistency with similar drivers.
* lidar
  - cleanup power management by dropping unnecessary call.
* ltr501
  - Use the claim_direct_mode helpers. Fix a race condition along the way.
* max1027
  - Fix a dubious x | !y sparse warning.
  - Use the new iio_trigger_validate_own_device helper.
* max440000
  - Clean up some sparse warnings about endian types.
* mcp4725
  - Use the regulator framework to establish the reference voltage rather than
    getting it from platform data.
  - Tidy up a comment typo.
  - Fix a wrong PTR_ERR query (wrong regulator).
* mma7660
  - Take a mma7660_nscale static.
* mma8452
  - Use the new iio_trigger_validate_own_device helper.
  - Use claim_direct_mode helpers - fix a race condition along the way.
* mpl3115
  - Use claim_direct_mode helpers - fix a race condition along the way.
* ms65611
  - Tidy up regulator error handling and clean out a static warning in the mix.
* sca3000
  - Avoid a potential unitialized variable if a hardware read returns a value
  that isn't actually supported (mostly warning supression).
  - Fix a use before setting of the indio_dev->buffer pointer. Broken for
  a very long time so not going to rush this into stable.
  - Merge buffer file with core file.  We used to always split these.
  Sometimes it's just not worth the hassle. In this case the device's main
  feature is it's hardware fifos so unlikely anyone would want to run it
  without.
  - Drop the sca3000_register_ring_funcs function as it's a pointless wrapper
  once we have only one file.
  - Fix cleaning of flag + setting of size of scan. Without this you can't
  start the buffer twice and expect sensible (or any) results.  Again,
  broken for a long time so not heading for stable.
  - Drop the custom watershed setting ABI - for now we'll just support one
  value.
  - Move to a hybrid hard / soft buffer design (how we've been doing it
  for similar devices for a while now!)
  - Cleanup some unusued variables.
  - Use a fake channel to support core handling of freefall event registration.
  - Cleanup the register defines.
  - Fix an off by one error in axis due to IIO_NO_MOD taking up the 0 value.
  Been broken since first admission of IIO to the staging tree.
  - Add readback of the 3db low pass filter frequency and later writing
    allowing droppign of custom measurement mode attributes as they can
    be represented by the filter choices that is their main characteristic.
  - Drop non standard revision attr and replace with dev_info on probe.
  - Avoid a race in probe.
  - Various formatting fixes.
  - Kernel-docify docs that were very nearly in the write format.
* tsl2583
  - Constify attribute_group structure.
* zpa2326
  - Drop a redundant DEBUG ifdef.

Cleanups (Tools)
* iio_generic_buffer
  - Fix the ? arguement. Previously it sort of worked as you got the help
    message as a result of it not recognising the arguement.

8 years agoiio: dac: mcp4725: fix odd_ptr_err.cocci warnings
Julia Lawall [Sat, 22 Oct 2016 20:41:32 +0000 (22:41 +0200)]
iio: dac: mcp4725: fix odd_ptr_err.cocci warnings

PTR_ERR should access the value just tested by IS_ERR

Generated by: scripts/coccinelle/tests/odd_ptr_err.cocci

CC: Tomas Novotny <tomas@novotny.cz>
Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
8 years agostaging:iio:ad7606: fix ptr_ret.cocci warnings
kbuild test robot [Sat, 22 Oct 2016 19:12:42 +0000 (03:12 +0800)]
staging:iio:ad7606: fix ptr_ret.cocci warnings

drivers/staging/iio/adc/ad7606.c:357:1-3: WARNING: PTR_ERR_OR_ZERO can be used

 Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR

Generated by: scripts/coccinelle/api/ptr_ret.cocci

CC: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
8 years agoiio: proximity: pulsedlight-lidar-lite-v2: cleanup power management
Matt Ranostay [Sat, 15 Oct 2016 18:04:37 +0000 (11:04 -0700)]
iio: proximity: pulsedlight-lidar-lite-v2: cleanup power management

Remove pm_runtime_mark_last_busy() call that wasn't need in the probe
since the device should be put to sleep.

Clarification from Matt:
Basically it going to be suspended once pm_runtime_idle() is called,
and setting the last busy is useless and not needed.
Clearly this doesn't affect the device running but just makes the code
more consistent with other uses.

Signed-off-by: Matt Ranostay <matt@ranostay.consulting>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
8 years agoiio: ti-adc0832: add triggered buffer support
Akinobu Mita [Sun, 16 Oct 2016 15:59:42 +0000 (00:59 +0900)]
iio: ti-adc0832: add triggered buffer support

This adds triggered buffer support for the ti-adc0832 driver.  Tested with
ADC0831 and ADC0832 by using SYSFS trigger.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Jonathan Cameron <jic23@kernel.org>
Cc: Hartmut Knaack <knaack.h@gmx.de>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Cc: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>