openwrt/staging/blogic.git
8 years agostaging: lustre: lnet: make sure lnet data not greater than LIBCFS_IOC_DATA_MAX
Liang Zhen [Tue, 22 Mar 2016 23:03:58 +0000 (19:03 -0400)]
staging: lustre: lnet: make sure lnet data not greater than LIBCFS_IOC_DATA_MAX

Fail to compile if largest LNet user land data structures passed
to kernel are larger than LIBCFS_IOC_DATA_MAX

Signed-off-by: Liang Zhen <liang.zhen@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5435
Reviewed-on: http://review.whamcloud.com/11313
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: libcfs: test if userland data is to small
Liang Zhen [Tue, 22 Mar 2016 23:03:57 +0000 (19:03 -0400)]
staging: lustre: libcfs: test if userland data is to small

Ensure that user land data is at least the smallest size.

Signed-off-by: Liang Zhen <liang.zhen@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5435
Reviewed-on: http://review.whamcloud.com/11313
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: libcfs: update error messages in linux-module.c
Liang Zhen [Tue, 22 Mar 2016 23:03:56 +0000 (19:03 -0400)]
staging: lustre: libcfs: update error messages in linux-module.c

The error message are for libcfs layer not LNet.

Signed-off-by: Liang Zhen <liang.zhen@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5435
Reviewed-on: http://review.whamcloud.com/11313
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: libcfs: invert test condition for libcfs_ioctl
Liang Zhen [Tue, 22 Mar 2016 23:03:55 +0000 (19:03 -0400)]
staging: lustre: libcfs: invert test condition for libcfs_ioctl

Invert the test of error returned by the handle_ioctl pointer.
This reduces the code by one indentation level.

Signed-off-by: Liang Zhen <liang.zhen@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5435
Reviewed-on: http://review.whamcloud.com/11313
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: libcfs: test if data is NULL
Liang Zhen [Tue, 22 Mar 2016 23:03:54 +0000 (19:03 -0400)]
staging: lustre: libcfs: test if data is NULL

Make sure data is not NULL otherwise we get an oops
when using the IOC_LIBCFS_MARK_DEBUG ioctl.

Signed-off-by: Liang Zhen <liang.zhen@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5435
Reviewed-on: http://review.whamcloud.com/11313
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: libcfs: move comment in libcfs_ioctl
Liang Zhen [Tue, 22 Mar 2016 23:03:53 +0000 (19:03 -0400)]
staging: lustre: libcfs: move comment in libcfs_ioctl

Move the comment about libcfs_ioctl_data_adjust to the
section where libcfs_ioctl_data_adjust is actually called.

Signed-off-by: Liang Zhen <liang.zhen@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5435
Reviewed-on: http://review.whamcloud.com/11313
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: libcfs: add debugging info for libcfs_ioctl
Liang Zhen [Tue, 22 Mar 2016 23:03:52 +0000 (19:03 -0400)]
staging: lustre: libcfs: add debugging info for libcfs_ioctl

Added some lustre debugging to track down potential future
bugs.

Signed-off-by: Liang Zhen <liang.zhen@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5435
Reviewed-on: http://review.whamcloud.com/11313
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: libcfs: merge libcfs_ioctl_handle into libcfs_ioctl
Liang Zhen [Tue, 22 Mar 2016 23:03:51 +0000 (19:03 -0400)]
staging: lustre: libcfs: merge libcfs_ioctl_handle into libcfs_ioctl

This is apart of the cleanup of libcfs_ioctl* code. In this
part we turn libcfs_ioctl_handle into libcfs_ioctl since
libcfs_ioctl is now a skeleton function.

Signed-off-by: Liang Zhen <liang.zhen@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5435
Reviewed-on: http://review.whamcloud.com/11313
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: libcfs: merge code from libcfs_ioctl into libcfs_ioctl_getdata
Liang Zhen [Tue, 22 Mar 2016 23:03:50 +0000 (19:03 -0400)]
staging: lustre: libcfs: merge code from libcfs_ioctl into libcfs_ioctl_getdata

This is apart of the cleanup of libcfs_ioctl* code. In this
part some of the code in libcfs_ioctl is migrated into
libcfs_ioctl_getdata_len() which is renamed libcfs_ioctl_getdata()

Signed-off-by: Liang Zhen <liang.zhen@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5435
Reviewed-on: http://review.whamcloud.com/11313
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: libcfs: use break in switch options for libcfs_ioctl_handle
Liang Zhen [Tue, 22 Mar 2016 23:03:49 +0000 (19:03 -0400)]
staging: lustre: libcfs: use break in switch options for libcfs_ioctl_handle

Instead of just returning for each switch condition use a break.

Signed-off-by: Liang Zhen <liang.zhen@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5435
Reviewed-on: http://review.whamcloud.com/11313
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: libcfs: replace LNET_MAX_IOCTL_BUF_LEN with something bigger
Liang Zhen [Tue, 22 Mar 2016 23:03:48 +0000 (19:03 -0400)]
staging: lustre: libcfs: replace LNET_MAX_IOCTL_BUF_LEN with something bigger

The size of LNET_MAX_IOCTL_BUF_LEN restricts the size of
libcfs ioctl to the maximum needs of the LNet layer. Since
libcfs also handles things like debugging we might need
to let user land pass more data to or from the kernel than
what is possible

Signed-off-by: Liang Zhen <liang.zhen@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5435
Reviewed-on: http://review.whamcloud.com/11313
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: lnet: revert commit 4671a0266
James Simmons [Thu, 24 Mar 2016 15:24:02 +0000 (11:24 -0400)]
staging: lustre: lnet: revert commit 4671a0266

Commit 4671a0266 change the parameter of the second parameter of
cfs_precpt_alloc() from a sizeof type to sizeof type *pointer.
This was incorrect in this case and it caused a crash when the LNet
layer was brought up in my testing. The reason is cfs_precpt_alloc()
creates an array of items where the arrays size is equal to the
number of CPTs that exist. Changing to type *pointer only had
cfs_precpt_alloc() create an array of pointers instead of an array
of actual data structures. This patch reverse this change and adds
comments to explain what cfs_precpt_alloc() is actually doing to
avoid potential issues like this again.

Changelog:

v1) Simple revert of the original patch

v2) Added in comments to explain why cfs_precpt_alloc() has the
    arguments it uses.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Cc: Sandhya Bankar <bankarsandhya512@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: media: omap1: Replace request_irq with devm_request_irq
Amitoj Kaur Chawla [Tue, 22 Mar 2016 16:53:02 +0000 (22:23 +0530)]
staging: media: omap1: Replace request_irq with devm_request_irq

Replace request_irq with devm_request_irq to get the interrupt
for device which is automatically freed on exit. Remove
corresponding free_irq from probe and remove functions of a
platform device.

Also, remove an unnecessary label.

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: media: omap1: Switch to devm_ioremap_resource
Amitoj Kaur Chawla [Tue, 22 Mar 2016 16:52:56 +0000 (22:22 +0530)]
staging: media: omap1: Switch to devm_ioremap_resource

Replace calls to request_mem_region and ioremap with a direct
call to devm_ioremap_resource instead and modify error
handling.
Move the call to platform_get_resource adjacent to the call to
devm_ioremap_resource to make the connection between them more
clear.

Also remove unnecessary labels, variable initialisations and
release_mem_region iounmap from probe and remove functions.

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: media: omap1: Replace kzalloc with devm_kzalloc
Amitoj Kaur Chawla [Tue, 22 Mar 2016 16:52:48 +0000 (22:22 +0530)]
staging: media: omap1: Replace kzalloc with devm_kzalloc

Replace kzalloc with devm_kzalloc and consequently remove kfrees in
probe and remove functions of a platform device.

As a result of this change, remove unnecessary out of memory message
and an unnecessary label.

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: media: omap1: Replace clk_get with devm_clk_get
Amitoj Kaur Chawla [Tue, 22 Mar 2016 16:52:41 +0000 (22:22 +0530)]
staging: media: omap1: Replace clk_get with devm_clk_get

devm_clk_get allocated resources get released when a driver detaches.
Replace clk_get with devm_clk_get and remove corresponding data
releasing function clk_put from probe and remove functions of a
platform device. Also remove an unnecessary label.

This change was made with the help of the following Coccinelle
semantic patch:
@platform@
identifier p, probefn, removefn;
@@
struct platform_driver p = {
  .probe = probefn,
  .remove = removefn,
};

@prb@
identifier platform.probefn, pdev;
expression e;
@@
probefn(struct platform_device *pdev, ...) {
  ...
  e =
- clk_get
+ devm_clk_get
  (...);
   ...
?- clk_put(...);
  ...
}
@remove depends on prb@
identifier platform.removefn;
@@
removefn(...) {
...
?- clk_put(...);
...
}

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8188eu: os_dep: ioctl_linux: Clean up tests if NULL returned on failure
Bhaktipriya Shridhar [Tue, 22 Mar 2016 14:49:49 +0000 (20:19 +0530)]
staging: rtl8188eu: os_dep: ioctl_linux: Clean up tests if NULL returned on failure

Some functions like kmalloc/kzalloc return NULL on failure.
When NULL represents failure, !x is commonly used.

This was done using Coccinelle:

@@
expression *e;
identifier l1;
@@

e = \(kmalloc\|kzalloc\|kcalloc\|devm_kzalloc\)(...);
...
- e == NULL
+ !e

Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8188eu: os_dep: usb_intf: Clean up tests if NULL returned on failure
Bhaktipriya Shridhar [Tue, 22 Mar 2016 14:55:55 +0000 (20:25 +0530)]
staging: rtl8188eu: os_dep: usb_intf: Clean up tests if NULL returned on failure

Some functions like kmalloc/kzalloc return NULL on failure.
When NULL represents failure, !x is commonly used.

This was done using Coccinelle:

@@
expression *e;
identifier l1;
@@

e = \(kmalloc\|kzalloc\|kcalloc\|devm_kzalloc\)(...);
...
- e == NULL
+ !e

Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8188eu: core: rtw_mlme: Clean up tests if NULL returned on failure
Bhaktipriya Shridhar [Tue, 22 Mar 2016 14:56:33 +0000 (20:26 +0530)]
staging: rtl8188eu: core: rtw_mlme: Clean up tests if NULL returned on failure

Some functions like kmalloc/kzalloc return NULL on failure.
When NULL represents failure, !x is commonly used.

This was done using Coccinelle:

@@
expression *e;
identifier l1;
@@

e = \(kmalloc\|kzalloc\|kcalloc\|devm_kzalloc\)(...);
...
- e == NULL
+ !e

Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8188eu: rtw_mlme_ext: Clean up tests if NULL returned on failure
Bhaktipriya Shridhar [Tue, 22 Mar 2016 14:57:39 +0000 (20:27 +0530)]
staging: rtl8188eu: rtw_mlme_ext: Clean up tests if NULL returned on failure

Some functions like kzalloc return NULL on failure.
When NULL represents failure, !x is commonly used.

This was done using Coccinelle:

@@
expression *e;
identifier l1;
@@

e = \(kmalloc\|kzalloc\|kcalloc\|devm_kzalloc\)(...);
...
- e == NULL
+ !e

Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8188eu: rtw_cmd: Clean up tests if NULL returned on failure
Bhaktipriya Shridhar [Tue, 22 Mar 2016 14:58:28 +0000 (20:28 +0530)]
staging: rtl8188eu: rtw_cmd: Clean up tests if NULL returned on failure

Some functions like kmalloc/kzalloc return NULL on failure.
When NULL represents failure, !x is commonly used.

This was done using Coccinelle:

@@
expression *e;
identifier l1;
@@

e = \(kmalloc\|kzalloc\|kcalloc\|devm_kzalloc\)(...);
...
- e == NULL
+ !e

Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8712: mlme_linux: Clean up tests if NULL returned on failure
Bhaktipriya Shridhar [Tue, 22 Mar 2016 14:59:13 +0000 (20:29 +0530)]
staging: rtl8712: mlme_linux: Clean up tests if NULL returned on failure

Some functions like kzalloc return NULL on failure.
When NULL represents failure, !x is commonly used.

This was done using Coccinelle:

@@
expression *e;
identifier l1;
@@

e = \(kmalloc\|kzalloc\|kcalloc\|devm_kzalloc\)(...);
...
- e == NULL
+ !e

Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: vt6656: Fixed multiple logical comparisions warnings
Parth Sane [Tue, 22 Mar 2016 12:55:37 +0000 (18:25 +0530)]
staging: vt6656: Fixed multiple logical comparisions warnings

Using comparison to false and true is error prone. Fixed multiple warnings as
per checkpatch guidelines.

Signed-off-by: Parth Sane <laerdevstudios@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: Remove camel case in variable names.
Anchal Jain [Tue, 22 Mar 2016 12:31:42 +0000 (18:01 +0530)]
staging: wilc1000: Remove camel case in variable names.

Remove a problem detect by checkpatch.pl
CHECK: Avoid CamelCase: <srcAdd>

Signed-off-by: Anchal Jain <anchalj109@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: dgnc: fix camelcase of SerialDriver and PrintDriver
Daeseok Youn [Tue, 22 Mar 2016 09:20:46 +0000 (18:20 +0900)]
staging: dgnc: fix camelcase of SerialDriver and PrintDriver

fix the checkpatch.pl warning about CamelCase.

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: iio: accel: adis16240: Improve readability
Svetlana Orlik [Tue, 22 Mar 2016 15:10:32 +0000 (18:10 +0300)]
staging: iio: accel: adis16240: Improve readability

Lines with #define interlaced with comment lines making a mess.

Separate groups of #define-comment with blank lines.
Separate section title comments with blank lines.

Signed-off-by: Svetlana Orlik <sveta.orlik.code@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: iio: accel: adis16220: Improve readability
Svetlana Orlik [Tue, 22 Mar 2016 15:09:53 +0000 (18:09 +0300)]
staging: iio: accel: adis16220: Improve readability

Lines with #define interlaced with comment lines making a mess.

Separate groups of #define-comment with blank lines.
Separate section title comments with blank lines.

Signed-off-by: Svetlana Orlik <sveta.orlik.code@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: iio: accel: adis16209: Improve readability
Svetlana Orlik [Tue, 22 Mar 2016 15:09:21 +0000 (18:09 +0300)]
staging: iio: accel: adis16209: Improve readability

Lines with #define interlaced with comment lines making a mess.

Separate groups of #define-comment with blank lines.
Separate section title comments with blank lines.

Signed-off-by: Svetlana Orlik <sveta.orlik.code@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: iio: accel: adis16201: Fix 'line over 80 characters' warning
Svetlana Orlik [Tue, 22 Mar 2016 15:08:38 +0000 (18:08 +0300)]
staging: iio: accel: adis16201: Fix 'line over 80 characters' warning

Many of the comments in the same lines with #define
caused checkpatch warning 'line over 80 characters'.

Move all such comments to line before #define.
This style is already used in some other .h files in accel:

Add blank lines after #define to improve readability.

Signed-off-by: Svetlana Orlik <sveta.orlik.code@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: iio: accel: adis16203: Fix 'line over 80 characters' warning
Svetlana Orlik [Tue, 22 Mar 2016 15:08:03 +0000 (18:08 +0300)]
staging: iio: accel: adis16203: Fix 'line over 80 characters' warning

Many of the comments in the same lines with #define
caused checkpatch warning 'line over 80 characters'.

Move all such comments to line before #define.
This style is already used in some other .h files in accel:

Add blank lines after #define to improve readability.

Signed-off-by: Svetlana Orlik <sveta.orlik.code@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: iio: accel: adis16204: Fix 'line over 80 characters' warning
Svetlana Orlik [Tue, 22 Mar 2016 15:07:22 +0000 (18:07 +0300)]
staging: iio: accel: adis16204: Fix 'line over 80 characters' warning

Many of the comments in the same lines with #define
caused checkpatch warning 'line over 80 characters'.

Move all such comments to line before #define.
This style is already used in some other .h files in accel:

Add blank lines after #define to improve readability.

Signed-off-by: Svetlana Orlik <sveta.orlik.code@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: iio: accel: adis16240: Replace 'unsigned' with 'unsigned int'
Svetlana Orlik [Tue, 22 Mar 2016 08:43:08 +0000 (11:43 +0300)]
staging: iio: accel: adis16240: Replace 'unsigned' with 'unsigned int'

Replace 'unsigned' with 'unsigned int' to avoid checkpatch warning.

Signed-off-by: Svetlana Orlik <sveta.orlik.code@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: iio: ad9832: Replace 'unsigned' with 'unsigned int'
Svetlana Orlik [Tue, 22 Mar 2016 04:51:36 +0000 (07:51 +0300)]
Staging: iio: ad9832: Replace 'unsigned' with 'unsigned int'

Replace 'unsigned' with 'unsigned int' to avoid checkpatch.pl warning.

Signed-off-by: Svetlana Orlik <sveta.orlik.code@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: comedi: amplc_pci230: Convert macro GAT_CONFIG to static inline function
Bhaktipriya Shridhar [Tue, 22 Mar 2016 04:58:51 +0000 (10:28 +0530)]
staging: comedi: amplc_pci230: Convert macro GAT_CONFIG to static inline function

Convert macro GAT_CONFIG to static inline function as static inline
functions are preferred over macros. This change is possible since the
arguments at all call sites have the same type.

This was done using Coccinelle:

@r@
expression e;
@@
- #define GAT_CONFIG(chan, src) e
+ static inline unsigned int pci230_gat_config(unsigned int chan,
+                                              unsigned int src)
+{
+       return ((chan & 3) << 3) | (src & 7);
+}

@r1@
expression dev,reg,chan,src;
@@
-GAT_CONFIG(chan, src)
+pci230_gat_config(chan, src)

Also, the comment describing the macro has been removed manually.

Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: use mutex instead of struct semaphore hif_sema_deinit
Chaehyun Lim [Mon, 21 Mar 2016 23:39:24 +0000 (08:39 +0900)]
staging: wilc1000: use mutex instead of struct semaphore hif_sema_deinit

This patch replaces struct semaphore hif_sema_deinit with struct mutex
hif_deinit_lock. It is better to use mutex because mutex gives better
performance than semaphore.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: vt6655: fix style violations for lines over 80 characters
Kathryn Hampton [Wed, 16 Mar 2016 01:16:24 +0000 (18:16 -0700)]
staging: vt6655: fix style violations for lines over 80 characters

This patch addresses line length errors reported by checkpatch.pl that
could be fixed with simple line breaks.

Signed-off-by: Kathryn Hampton <kh353dev@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: speakup: Clear hi font bit from attributes
Samuel Thibault [Tue, 15 Mar 2016 20:34:59 +0000 (21:34 +0100)]
Staging: speakup: Clear hi font bit from attributes

Previously, speakup would see the hi-font bit in attributes.
Since this bit has nothing to do with attributes, we need to clear it.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: vt6655: defined byVT3253InitTab_RFMD[] and byVT3253B0_RFMD[] as const arrays.
Claudiu Beznea [Mon, 14 Mar 2016 19:55:20 +0000 (21:55 +0200)]
Staging: vt6655: defined byVT3253InitTab_RFMD[] and byVT3253B0_RFMD[] as const arrays.

This patch changes byVT3253InitTab_RFMD[] and byVT3253B0_RFMD[]
arrays in const arrays since these are not changed anywhere in the
code.

Signed-off-by: Claudiu Beznea <claudiu.beznea@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: comedi: comedi_fops: Replace 'unsigned' with 'unsigned int'
Leslie Klein [Mon, 21 Mar 2016 13:18:35 +0000 (09:18 -0400)]
Staging: comedi: comedi_fops: Replace 'unsigned' with 'unsigned int'

Fix checkpatch warning:
Prefer 'unsigned int' to bare use of 'unsigned'
in file comedi_fops.c

Signed-off-by: Leslie Klein <lesliebklein@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: comedi: comedi_buf: Replace 'unsigned' with 'unsigned int'
Leslie Klein [Mon, 21 Mar 2016 00:26:12 +0000 (20:26 -0400)]
Staging: comedi: comedi_buf: Replace 'unsigned' with 'unsigned int'

Fix checkpatch warning:
Prefer 'unsigned int' to bare use of 'unsigned'
in file comedi_buf.c

Signed-off-by: Leslie Klein <lesliebklein@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: comedi: dt282x: tidy up register bit defines
H Hartley Sweeten [Thu, 17 Mar 2016 17:10:40 +0000 (10:10 -0700)]
staging: comedi: dt282x: tidy up register bit defines

Arnd Bergmann pointed out that gcc-6 warns about passing negative signed
integer into swab16() due to the macro expansion of 'outw'.

It appears that the register map constants are causing the warnings.
Actually, it might just be the (1 << 15) ones...

Convert all the constants as suggested by checkpatch.pl:
CHECK: Prefer using the BIT macro

The BIT() macro will make all the constants explicitly 'unsigned', which
helps to avoid the warning.

Fix the, unsused, DT2821_CHANCSR_PRESLA() macro. The "Present List
Address" (PRESLA) bits in the CHANCSR register are read only. This
define was meant to extract the bits from the read value.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reported-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Tested-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: wlan-ng: Use x instead of x != NULL.
Sandhya Bankar [Mon, 21 Mar 2016 15:16:15 +0000 (20:46 +0530)]
Staging: wlan-ng: Use x instead of x != NULL.

Use x instead of x != NULL.This issue is detected by checkpatch.pl script.

Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: wlan-ng: defined oui_rfc1042[] and oui_8021h[] arrays as const arrays
Claudiu Beznea [Mon, 14 Mar 2016 20:45:13 +0000 (22:45 +0200)]
Staging: wlan-ng: defined oui_rfc1042[] and oui_8021h[] arrays as const arrays

This patch defines oui_rfc1042[] and oui_8021h[] arrays from
p80211conv.c as const arrays since these are not changed
anywhere in code.

Signed-off-by: Claudiu Beznea <claudiu.beznea@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: rtl8188eu: rtw_efuse: Use sizeof type *pointer instead of sizeof type.
Sandhya Bankar [Mon, 21 Mar 2016 14:19:51 +0000 (19:49 +0530)]
Staging: rtl8188eu: rtw_efuse: Use sizeof type *pointer instead of sizeof type.

Use sizeof type *pointer instead of sizeof type.

Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8712: Fixed FSF address warning in ieee80211.c
Parth Sane [Mon, 21 Mar 2016 23:41:04 +0000 (05:11 +0530)]
staging: rtl8712: Fixed FSF address warning in ieee80211.c

Fixed checkpatch warning after removing FSF address block as per guidelines.

Signed-off-by: Parth Sane <laerdevstudios@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8712: Fixed FSF address warning in hal_init.c
Parth Sane [Mon, 21 Mar 2016 23:41:03 +0000 (05:11 +0530)]
staging: rtl8712: Fixed FSF address warning in hal_init.c

Fixed checkpatch warning after removing FSF address block as per guidelines.

Signed-off-by: Parth Sane <laerdevstudios@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8712: Fixed FSF address warning in ethernet.h
Parth Sane [Mon, 21 Mar 2016 23:41:02 +0000 (05:11 +0530)]
staging: rtl8712: Fixed FSF address warning in ethernet.h

Fixed checkpatch warning after removing FSF address block as per guidelines.

Signed-off-by: Parth Sane <laerdevstudios@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8712: Fixed FSF address warning in drv_types.h
Parth Sane [Mon, 21 Mar 2016 23:41:01 +0000 (05:11 +0530)]
staging: rtl8712: Fixed FSF address warning in drv_types.h

Fixed checkpatch warning after removing FSF address block as per guidelines.

Signed-off-by: Parth Sane <laerdevstudios@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8712: Fixed FSF address warning in basic_types.h
Parth Sane [Mon, 21 Mar 2016 23:41:00 +0000 (05:11 +0530)]
staging: rtl8712: Fixed FSF address warning in basic_types.h

Fixed checkpatch warning after removing FSF address paragraph as per guidelines.

Signed-off-by: Parth Sane <laerdevstudios@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8712: rtl871x_ioctl_linux: Clean up tests if NULL returned on failure
Bhaktipriya Shridhar [Sun, 20 Mar 2016 20:40:21 +0000 (02:10 +0530)]
staging: rtl8712: rtl871x_ioctl_linux: Clean up tests if NULL returned on failure

Some functions like kmalloc/kzalloc return NULL on failure.
When NULL represents failure, !x is commonly used.

This was done using Coccinelle:

@@
expression *e;
identifier l1;
@@

e = \(kmalloc\|kzalloc\|kcalloc\|devm_kzalloc\)(...);
...
- e == NULL
+ !e

Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8712: rtl871x_cmd: Clean up tests if NULL returned on failure
Bhaktipriya Shridhar [Sun, 20 Mar 2016 20:39:49 +0000 (02:09 +0530)]
staging: rtl8712: rtl871x_cmd: Clean up tests if NULL returned on failure

Some functions like kmalloc/kzalloc return NULL on failure.
When NULL represents failure, !x is commonly used.

This was done using Coccinelle:

@@
expression *e;
identifier l1;
@@

e = \(kmalloc\|kzalloc\|kcalloc\|devm_kzalloc\)(...);
...
- e == NULL
+ !e

Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8712: rtl871x_mlme: Clean up tests if NULL returned on failure
Bhaktipriya Shridhar [Sun, 20 Mar 2016 20:39:17 +0000 (02:09 +0530)]
staging: rtl8712: rtl871x_mlme: Clean up tests if NULL returned on failure

Some functions like kmalloc/kzalloc return NULL on failure.
When NULL represents failure, !x is commonly used.

This was done using Coccinelle:

@@
expression *e;
identifier l1;
@@

e = \(kmalloc\|kzalloc\|kcalloc\|devm_kzalloc\)(...);
...
- e == NULL
+ !e

Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8712: usb_ops_linux: Clean up tests if NULL returned on failure
Bhaktipriya Shridhar [Sun, 20 Mar 2016 20:38:36 +0000 (02:08 +0530)]
staging: rtl8712: usb_ops_linux: Clean up tests if NULL returned on failure

Some functions like kmalloc/kzalloc return NULL on failure.
When NULL represents failure, !x is commonly used.

This was done using Coccinelle:

@@
expression *e;
identifier l1;
@@

e = \(kmalloc\|kzalloc\|kcalloc\|devm_kzalloc\)(...);
...
- e == NULL
+ !e

Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8712: os_intfs: Change form of NULL comparisons
Bhaktipriya Shridhar [Sun, 20 Mar 2016 19:53:17 +0000 (01:23 +0530)]
staging: rtl8712: os_intfs: Change form of NULL comparisons

Change null comparisons of the form x == NULL to !x.
This was done using Coccinelle.
@@ expression e;
@@
- e == NULL
+ !e

Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8712: rtl871x_ioctl_set: Remove unused macro
Bhaktipriya Shridhar [Fri, 18 Mar 2016 17:56:18 +0000 (23:26 +0530)]
staging: rtl8712: rtl871x_ioctl_set: Remove unused macro

Removed Unused macro IS_MAC_ADDRESS_BROADCAST.
Grep'd to find occurences.

Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: rtl8723au: Remove unnecessary return statement.
Sandhya Bankar [Sat, 19 Mar 2016 05:17:47 +0000 (10:47 +0530)]
Staging: rtl8723au: Remove unnecessary return statement.

Remove unnecessary return statement.

Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: rtl8723au: rtl8723a_rf6052: Remove unnecessary semicolon.
Sandhya Bankar [Fri, 18 Mar 2016 03:56:02 +0000 (09:26 +0530)]
Staging: rtl8723au: rtl8723a_rf6052: Remove unnecessary semicolon.

Remove unnecessary semicolon.

Coccinelle sementic patch as follows:
@r_case@
position p;
@@
switch (...)
{
case ...: ...;@p
}

@r_default@
position p;
@@
switch (...)
{
default: ...;@p
}

@r1@
statement S;
position p1;
position p != {r_case.p, r_default.p};
identifier label;
@@
(
label:;
|
S@p1;@p
)

Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8723au: Fix line longer than 80 columns.
Edward Lipinsky [Sat, 12 Mar 2016 19:45:44 +0000 (11:45 -0800)]
staging: rtl8723au: Fix line longer than 80 columns.

This patch fixes the checkpatch.pl warning:

WARNING: line over 80 characters

Signed-off-by: Edward Lipinsky <ellipinsky@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8192u: fix typo in debug message
Nik Nyby [Sun, 20 Mar 2016 19:46:35 +0000 (15:46 -0400)]
staging: rtl8192u: fix typo in debug message

This fixes a mis-spelled word in a few debug statements.

Signed-off-by: Nik Nyby <nikolas@gnu.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: rtl8192u: Remove unnecessary semicolon.
Sandhya Bankar [Fri, 18 Mar 2016 03:45:45 +0000 (09:15 +0530)]
Staging: rtl8192u: Remove unnecessary semicolon.

Remove unnecessary semicolon.This issue is found by coccinelle script.

Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: rtl8192u: remove extra blank lines.
Ben Marsh [Mon, 14 Mar 2016 16:40:20 +0000 (17:40 +0100)]
Staging: rtl8192u: remove extra blank lines.

This patch removes blank lines in r8192U_wx.c that were flagged by
checkpatch.pl

Signed-off-by: Ben Marsh <bmarsh94@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: netlogic: Remove & from function name.
Sandhya Bankar [Sat, 19 Mar 2016 06:14:05 +0000 (11:44 +0530)]
Staging: netlogic: Remove & from function name.

Remove & from function name,when function name passed as an argument to another function.
Function name is used as pointer without &.

Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: iio: use kernel preferred block commenting style
Alison Schofield [Mon, 21 Mar 2016 22:39:53 +0000 (15:39 -0700)]
staging: iio: use kernel preferred block commenting style

Use * on subsequent lines and trailing */ on a separate
line in block comments.

Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: lustre: o2iblnd: Use sizeof type *pointer instead of sizeof type.
Sandhya Bankar [Mon, 21 Mar 2016 14:22:44 +0000 (19:52 +0530)]
Staging: lustre: o2iblnd: Use sizeof type *pointer instead of sizeof type.

Use sizeof type *pointer instead of sizeof type.

Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: lustre: rpc: Use sizeof type *pointer instead of sizeof type.
Sandhya Bankar [Mon, 21 Mar 2016 14:21:12 +0000 (19:51 +0530)]
Staging: lustre: rpc: Use sizeof type *pointer instead of sizeof type.

Use sizeof type *pointer instead of sizeof type.

Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: lustre: socklnd: Remove return statement from void function.
Sandhya Bankar [Mon, 21 Mar 2016 13:46:48 +0000 (19:16 +0530)]
Staging: lustre: socklnd: Remove return statement from void function.

Remove return statement from void function.

Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: lustre: socklnd_lib: Remove return statement from void function.
Sandhya Bankar [Mon, 21 Mar 2016 13:45:24 +0000 (19:15 +0530)]
Staging: lustre: socklnd_lib: Remove return statement from void function.

Remove return statement from void function.

Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: lustre: lib-move: Remove unnecessary space after cast.
Sandhya Bankar [Mon, 21 Mar 2016 12:36:03 +0000 (18:06 +0530)]
Staging: lustre: lib-move: Remove unnecessary space after cast.

Remove unnecessary space after cast.

Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: i4l: pcbit: drv: Remove unnecessary semicolon.
Sandhya Bankar [Fri, 18 Mar 2016 03:15:08 +0000 (08:45 +0530)]
Staging: i4l: pcbit: drv: Remove unnecessary semicolon.

Remove unnecessary semicolon.This issue is detected by coccinelle script.

Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: i4l: pcbit: capi: Add parentheses to complex macro.
Sandhya Bankar [Sun, 20 Mar 2016 11:22:35 +0000 (16:52 +0530)]
Staging: i4l: pcbit: capi: Add parentheses to complex macro.

Add parentheses to complex macro.

Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: i4l: pcbit: drv: Do not initialise statics to 0.
Sandhya Bankar [Sun, 20 Mar 2016 11:20:49 +0000 (16:50 +0530)]
Staging: i4l: pcbit: drv: Do not initialise statics to 0.

Do not initialise statics to 0.

Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: i4l: pcbit: edss1: Use !x instead of x == NULL.
Sandhya Bankar [Sun, 20 Mar 2016 11:19:02 +0000 (16:49 +0530)]
Staging: i4l: pcbit: edss1: Use !x instead of x == NULL.

Use !x instead of x == NULL.

Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: i4l: pcbit: layer2: Add parentheses to complex macro.
Sandhya Bankar [Sun, 20 Mar 2016 11:17:28 +0000 (16:47 +0530)]
Staging: i4l: pcbit: layer2: Add parentheses to complex macro.

Add  parentheses to complex macro.

Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: fbtft: fb_agm1264k-fl: No space is necessary after cast.
Sandhya Bankar [Fri, 18 Mar 2016 09:32:41 +0000 (15:02 +0530)]
Staging: fbtft: fb_agm1264k-fl: No space is necessary after cast.

No space is necessary after cast.This problem is found  by checkpatch.pl script.

Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: fbtft: fbtft-io: No space is necessary after cast.
Sandhya Bankar [Fri, 18 Mar 2016 09:29:34 +0000 (14:59 +0530)]
Staging: fbtft: fbtft-io: No space is necessary after cast.

No space is necessary after cast.This patch is found by checkpatch.pl script.

Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: fbtft: fbtft_device: No space is necessary after cast.
Sandhya Bankar [Fri, 18 Mar 2016 09:26:31 +0000 (14:56 +0530)]
Staging: fbtft: fbtft_device: No space is necessary after cast.

No space is necessary after cast.

Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: media: omap4iss: Match alignment with open parenthesis.
Heena Sirwani [Mon, 14 Mar 2016 11:53:00 +0000 (17:23 +0530)]
staging: media: omap4iss: Match alignment with open parenthesis.

The following patch fixes the following checkpatch.pl warning:

CHECK: Alignment should match open parenthesis

Signed-off-by: Heena Sirwani <heenasirwani@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: emxx_udc: emxx_udc: Add space around operator.
Sandhya Bankar [Fri, 18 Mar 2016 08:26:00 +0000 (13:56 +0530)]
Staging: emxx_udc: emxx_udc: Add space around operator.

Add space around operator.This patch is found by checkpatch.pl script.

Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: emxx_udc: Add space around '-'
Dilek Uzulmez [Sun, 13 Mar 2016 21:58:08 +0000 (23:58 +0200)]
Staging: emxx_udc: Add space around '-'

Add space around operator '-'. Problem found using checkpatch.pl
CHECK: spaces preferred around that '-' (ctx:VxV)

Signed-off-by: Dilek Uzulmez <dilekuzulmez@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: gs_fpgaboot: Replace 'int32_t' with 'int'.
Sandhya Bankar [Sun, 13 Mar 2016 11:11:23 +0000 (16:41 +0530)]
Staging: gs_fpgaboot: Replace 'int32_t' with 'int'.

Replace 'int32_t' with 'int'.

Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: gs_fpgaboot: Add space around '+'.
Sandhya Bankar [Sun, 13 Mar 2016 10:22:15 +0000 (15:52 +0530)]
Staging: gs_fpgaboot: Add space around '+'.

Add space around '+'.

Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: gs_fpgaboot: Remove unnecessary blank lines.
Sandhya Bankar [Sun, 13 Mar 2016 10:20:03 +0000 (15:50 +0530)]
Staging: gs_fpgaboot: Remove unnecessary blank lines.

Remove unnecessary blank lines.

Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: gs_fpgaboot: Fix alignment to match open parenthesis.
Sandhya Bankar [Sun, 13 Mar 2016 10:18:15 +0000 (15:48 +0530)]
Staging: gs_fpgaboot: Fix alignment to match open parenthesis.

Fix alignment to match open parenthesis.

Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: rts5208: Add space around '+'
Dilek Uzulmez [Sun, 13 Mar 2016 21:31:08 +0000 (23:31 +0200)]
Staging: rts5208: Add space around '+'

Add space around operator '+'. Problem found using checkpatch.pl
CHECK: spaces preferred around that '+' (ctx:VxV)

Signed-off-by: Dilek Uzulmez <dilekuzulmez@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: skein: threefish_block: Use ror64
Joe Perches [Fri, 18 Mar 2016 20:32:12 +0000 (13:32 -0700)]
staging: skein: threefish_block: Use ror64

Use the inline instead of direct code to improve readability
and shorten the code a little.

Done with perl:

$ perl -p -i -e 's/\((\w+) \>\> (\d+)\) \| \(\1 \<\< \(64 \- \2\)\)/ror64(\1, \2)/g' drivers/staging/skein/threefish_block.c

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: dgnc: Add whitespace around OR'd flags ("|")
Sam Horlbeck Olsen [Mon, 14 Mar 2016 07:09:58 +0000 (02:09 -0500)]
staging: dgnc: Add whitespace around OR'd flags ("|")

This patch fixes the checkpatch.pl message:

CHECK: spaces preferred around that '|' (ctx:VxV)
+ writeb((UART_FCR_ENABLE_FIFO|UART_FCR_CLEAR_RCVR|UART_FCR_CLEAR_XMIT),
                                    ^                   ^

As per the guidelines for coding style in the kernel, I have updated the
digi international driver to include spaces around the OR'd flags; not only
is this formatting issue caught by `checkpatch.pl`, in the next `if` block
the correct formatting is used, leading to both incorrect and inconsistent
code formatting.

This patch puts the line in question at 82 characters---while this is over
the recommended limit, there are no clear locations to break the line and it
barely breaks the cutoff.

Signed-off-by: Sam Horlbeck Olsen <sam.horlsen@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: rtl8188eu: usb_halinit: Use !x instead of x == NULL.
Sandhya Bankar [Sat, 19 Mar 2016 10:50:25 +0000 (16:20 +0530)]
Staging: rtl8188eu: usb_halinit: Use !x instead of x == NULL.

Use !x instead of x == NULL.

Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: rtl8188eu: rtl8188e_rxdesc: Use !x instead of x == NULL.
Sandhya Bankar [Sat, 19 Mar 2016 10:48:47 +0000 (16:18 +0530)]
Staging: rtl8188eu: rtl8188e_rxdesc: Use !x instead of x == NULL.

Use !x instead of x == NULL.

Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: rtl8188eu: hal_intf: Use x instead of x != NULL.
Sandhya Bankar [Sat, 19 Mar 2016 10:46:38 +0000 (16:16 +0530)]
Staging: rtl8188eu: hal_intf: Use x instead of x != NULL.

Use x instead of x != NULL.

Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: rtl8188eu: Hal8188ERateAdaptive: Use x instead of x != NULL.
Sandhya Bankar [Sat, 19 Mar 2016 10:44:30 +0000 (16:14 +0530)]
Staging: rtl8188eu: Hal8188ERateAdaptive: Use x instead of x != NULL.

Use x instead of x != NULL.

Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8188eu: remove return at end of void function call
Nicholas Sim [Fri, 18 Mar 2016 12:11:07 +0000 (12:11 +0000)]
staging: rtl8188eu: remove return at end of void function call

Remove unnecessary return statement from last line of void function call

Signed-off-by: Nicholas Sim <nicholassimws@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8188eu: Remove license paragraph with mailing address
Kyle Kuffermann [Sun, 13 Mar 2016 14:16:27 +0000 (10:16 -0400)]
staging: rtl8188eu: Remove license paragraph with mailing address

This fixes the issue reported by checkpatch.pl:

"Do not include the paragraph about writing to the Free Software
Foundation's mailing address from the sample GPL notice. The FSF
has changed addresses in the past, and may do so again.  Linux
already includes a copy of the GPL."

in all files for the rtl8188eu driver.

Signed-off-by: Kyle Kuffermann <kyle.kuffermann@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: rtl8188eu: removes an unnecessary cast on a void pointer.
Ben Marsh [Sat, 12 Mar 2016 09:33:00 +0000 (10:33 +0100)]
Staging: rtl8188eu: removes an unnecessary cast on a void pointer.

Patch to rtl8188e_rxdesc.c to remove an unnecessary cast on a void
pointer.

Signed-off-by: Ben Marsh <bmarsg94@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8712: rtl8712_cmd.c: fixed comparison to null
Juliana Rodrigues [Sun, 13 Mar 2016 18:30:57 +0000 (15:30 -0300)]
staging: rtl8712: rtl8712_cmd.c: fixed comparison to null

This patch fixes multiple "comparison to NULL"
checkpatch.pl issues:

CHECK: Comparison to NULL could be written "!pcmd"
+               if (pcmd == NULL)

Signed-off-by: Juliana Rodrigues <juliana.orod@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8712: hal_init.c: fix comment block code style
Juliana Rodrigues [Sun, 13 Mar 2016 18:07:30 +0000 (15:07 -0300)]
staging: rtl8712: hal_init.c: fix comment block code style

This patch fixes several warnings caused by
malformed comments on hal_init.c and found by
checkpatch.pl.

Signed-off-by: Juliana Rodrigues <juliana.orod@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: Replaced comparison to NULL statements
Roger H. Newell [Sat, 19 Mar 2016 15:20:52 +0000 (12:50 -0230)]
staging: wilc1000: Replaced comparison to NULL statements

This patch corrects checks generated by checkpatch.pl by
replacing comparison to null statements with equivalent
statements in the form "x" or "!x"

Signed-off-by: Roger H. Newell <newell.roger@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: Removed braces from single block statements
Roger H. Newell [Sat, 19 Mar 2016 15:19:21 +0000 (12:49 -0230)]
staging: wilc1000: Removed braces from single block statements

This patch corrects warnings generated by checkpatch.pl by
removing braces from single block statements.

Signed-ff-by: Roger H. Newell <newell.roger@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: replace sem_test_key_block with a completion
Alison Schofield [Mon, 14 Mar 2016 17:35:41 +0000 (10:35 -0700)]
staging: wilc1000: replace sem_test_key_block with a completion

    Semaphore sem_test_key_block is used to signal completion of its
    host interface message. Since the thread locking this semaphore will
    have to wait, completions are the preferred mechanism and will offer
    a performance improvement.

Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Tested-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: replace sem_test_disconn_block with a completion
Alison Schofield [Mon, 14 Mar 2016 17:35:05 +0000 (10:35 -0700)]
staging: wilc1000: replace sem_test_disconn_block with a completion

Semaphore sem_test_disconn_block is used to signal completion of its
host interface message. Since the thread locking this semaphore will
have to wait, completions are the preferred mechanism and will offer
a performance improvement.

Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Tested-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: replace semaphore sem_get_rssi with a completion
Alison Schofield [Mon, 14 Mar 2016 17:34:39 +0000 (10:34 -0700)]
staging: wilc1000: replace semaphore sem_get_rssi with a completion

Semaphore sem_get_rssi is used to signal completion of its host
interface message. Since the thread locking this semaphore will have
to wait, completions are the preferred mechanism and will offer a
performance improvement.

Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Tested-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>