platform/kernel/linux-rpi.git
8 years agoStaging: iio: light: remove exceptional & on function name
Bhumika Goyal [Fri, 12 Feb 2016 15:10:27 +0000 (20:40 +0530)]
Staging: iio: light: remove exceptional & on function name

In this file,function names are otherwise used as pointers without &.
Found using coccinelle.
// <smpl>
@r@
identifier f;
@@

f(...) { ... }
@@
identifier r.f;
@@

- &f
+ f
// </smpl>

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rts5208: Place constants on the right side of comparisons
Janani Ravichandran [Sun, 14 Feb 2016 02:57:51 +0000 (21:57 -0500)]
staging: rts5208: Place constants on the right side of comparisons

Constants should be placed on the right hand side of comparisons. This
issue was identified by checkpatch.

Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: rdma: hfi1: Delete NULL check before vfree
Bhumika Goyal [Sun, 14 Feb 2016 15:04:28 +0000 (20:34 +0530)]
Staging: rdma: hfi1: Delete NULL check before vfree

The function vfree test whether the argument is NULL and return
immediately. SO NULL test is not needed before vfree.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: rtl8188eu: os_dep: Remove NULL test before rtw_free_netdev
Bhumika Goyal [Sun, 14 Feb 2016 15:24:03 +0000 (20:54 +0530)]
Staging: rtl8188eu: os_dep: Remove NULL test before rtw_free_netdev

The function rtw_free_netdev test whether its argument is NULL and
return immediately. So NULL test before this function is not needed.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8192u: ieee80211: Fix comment style
Janani Ravichandran [Sat, 13 Feb 2016 20:58:52 +0000 (15:58 -0500)]
staging: rtl8192u: ieee80211: Fix comment style

This patch changes some C99-style "//..." comments to C89 "/* ... */" style.

Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8192u: ieee80211: Remove msleep_interruptible_rsl Macro
Amitoj Kaur Chawla [Sat, 13 Feb 2016 07:04:14 +0000 (12:34 +0530)]
staging: rtl8192u: ieee80211: Remove msleep_interruptible_rsl Macro

Remove driver specific macro msleep_interruptible_rsl as it has been
replaced by a direct call to msleep_interruptible in the single
instance referencing it.

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Reviewed-by: Vaishali Thakkar <vaishali.thakkar@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8192u: ieee80211: ieee80211_softmac: Replace driver specific macro msleep...
Amitoj Kaur Chawla [Sat, 13 Feb 2016 07:01:33 +0000 (12:31 +0530)]
staging: rtl8192u: ieee80211: ieee80211_softmac: Replace driver specific macro msleep_interruptible_rsl

Replace driver specific msleep_interruptible_rsl macro with direct
call to msleep_interruptible.

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Reviewed-by: Vaishali Thakkar <vaishali.thakkar@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8192u: ieee80211: Remove MSECS macro
Amitoj Kaur Chawla [Sat, 13 Feb 2016 04:34:23 +0000 (10:04 +0530)]
staging: rtl8192u: ieee80211: Remove MSECS macro

Remove driver specific macro MSECS since all instances of this macro
have been replaced by direct calls to msecs_to_jiffies().

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8192u: r8192U_dm: Replace MSECS with msecs_to_jiffies
Amitoj Kaur Chawla [Sat, 13 Feb 2016 04:34:16 +0000 (10:04 +0530)]
staging: rtl8192u: r8192U_dm: Replace MSECS with msecs_to_jiffies

Replace driver specific macro MSECS with msecs_to_jiffies().

This was found using the following Coccinelle semantic patch:

//<smpl>
@@
expression e;
@@

- MSECS(e)
+ msecs_to_jiffies(e)
//</smpl>

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8192u: ieee80211: ieee80211_rx: Replace MSECS with msecs_to_jiffies
Amitoj Kaur Chawla [Sat, 13 Feb 2016 04:34:10 +0000 (10:04 +0530)]
staging: rtl8192u: ieee80211: ieee80211_rx: Replace MSECS with msecs_to_jiffies

Replace driver specific macro MSECS with msecs_to_jiffies().

This was found using the following Coccinelle semantic patch:

//<smpl>
@@
expression e;
@@

- MSECS(e)
+ msecs_to_jiffies(e)
//</smpl>

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8192u: ieee80211: ieee80211_softmac: Replace MSECS with msecs_to_jiffies
Amitoj Kaur Chawla [Sat, 13 Feb 2016 04:34:04 +0000 (10:04 +0530)]
staging: rtl8192u: ieee80211: ieee80211_softmac: Replace MSECS with msecs_to_jiffies

Replace driver specific macro MSECS with msecs_to_jiffies().

This was found using the following Coccinelle semantic patch:

//<smpl>
@@
expression e;
@@

- MSECS(e)
+ msecs_to_jiffies(e)
//</smpl>

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8192u: ieee80211: rtl819x_BAProc: Replace MSECS with msecs_to_jiffies
Amitoj Kaur Chawla [Sat, 13 Feb 2016 04:33:54 +0000 (10:03 +0530)]
staging: rtl8192u: ieee80211: rtl819x_BAProc: Replace MSECS with msecs_to_jiffies

Replace driver specific macro MSECS with msecs_to_jiffies().

This was found using the following Coccinelle semantic patch:

//<smpl>
@@
expression e;
@@

- MSECS(e)
+ msecs_to_jiffies(e)
//</smpl>

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8192u: ieee80211: rtl819x_TSProc: Replace MSECS with msecs_to_jiffies
Amitoj Kaur Chawla [Sat, 13 Feb 2016 04:33:47 +0000 (10:03 +0530)]
staging: rtl8192u: ieee80211: rtl819x_TSProc: Replace MSECS with msecs_to_jiffies

Replace driver specific macro MSECS with msecs_to_jiffies().

This was found using the following Coccinelle semantic patch:

//<smpl>
@@
expression e;
@@

- MSECS(e)
+ msecs_to_jiffies(e)
//</smpl>

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agodrivers/staging/android: don't use modular references in sync_debug.c
Paul Gortmaker [Sat, 13 Feb 2016 23:20:17 +0000 (18:20 -0500)]
drivers/staging/android: don't use modular references in sync_debug.c

In commit 8a0044846115e74552b671a7073cffeec14b9316 ("staging/android:
create a 'sync' dir for debugfs information"), modular references were
introduced to this file.  However if we look, we find:

drivers/staging/android/Makefile:obj-$(CONFIG_SYNC) += sync.o sync_debug.o

drivers/staging/android/Kconfig:config SYNC
drivers/staging/android/Kconfig:        bool "Synchronization framework"

This file isn't currently buildable as a module, and hence the code
for module_exit is just dead code.  Remove it and the module.h include.

Cc: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: wlan-ng: Remove function prototype
Bhumika Goyal [Sat, 13 Feb 2016 13:19:35 +0000 (18:49 +0530)]
Staging: wlan-ng: Remove function prototype

This patch removes the function prototype for prism2mgmt_pstr2bytearea as
it is no longer needed.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: wlan-ng: Drop wrapper function
Bhumika Goyal [Sat, 13 Feb 2016 13:19:34 +0000 (18:49 +0530)]
Staging: wlan-ng: Drop wrapper function

Drop the function prism2mgmt_pstr2bytearea and replace its function call
with the standard function memcpy that it wrapped.
The code becomes cleaner after this patch.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: wlan-ng: Remove multiple assignments
Bhumika Goyal [Sat, 13 Feb 2016 06:18:02 +0000 (11:48 +0530)]
Staging: wlan-ng: Remove multiple assignments

Remove multiple assignments by factorizing them.
Made a coccinelle script to match cases:
@@
identifier a,b;
constant c;
@@
-a=b=c;
+a=c;
+b=c;

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: media: Remove multiple assignments
Bhumika Goyal [Sat, 13 Feb 2016 06:19:35 +0000 (11:49 +0530)]
Staging: media: Remove multiple assignments

Remove multiple assignments by factorizing them.
Made a coccinelle script to match cases:
@@
identifier a,b;
constant c;
@@
-a=b=c;
+a=c;
+b=c;

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: linux_mon.c: Remove unneeded braces
Janani Ravichandran [Sun, 14 Feb 2016 19:47:13 +0000 (14:47 -0500)]
staging: wilc1000: linux_mon.c: Remove unneeded braces

Remove braces around single statement blocks in if conditions as they
are not required.

Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: Simplify code by eliminating else block
Janani Ravichandran [Sun, 14 Feb 2016 05:09:33 +0000 (00:09 -0500)]
staging: wilc1000: Simplify code by eliminating else block

Remove else block here as it is not useful after the return statement in the corresponding if block. This simplifies code. This issue was identified by checkpatch.

Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: Remove useless return statement in a void function
Janani Ravichandran [Sun, 14 Feb 2016 04:53:23 +0000 (23:53 -0500)]
staging: wilc1000: Remove useless return statement in a void function

Remove the return statement at the end of the void function as it has
no purpose.

Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: Remove useless macros
Janani Ravichandran [Sun, 14 Feb 2016 04:31:48 +0000 (23:31 -0500)]
staging: wilc1000: Remove useless macros

Remove the macros FN_IN and FN_OUT as they haven't been used anywhere.

Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: Eliminate spaces between function names and open parentheses
Janani Ravichandran [Sun, 14 Feb 2016 04:26:49 +0000 (23:26 -0500)]
staging: wilc1000: Eliminate spaces between function names and open parentheses

Remove spaces between function names and open parentheses as they are
unnecessary.

Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: Eliminate extraneous braces
Janani Ravichandran [Sun, 14 Feb 2016 04:10:29 +0000 (23:10 -0500)]
staging: wilc1000: Eliminate extraneous braces

Get rid of extraneous braces enclosing single statement blocks.

Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: Include KERN_ facility level for printk()
Janani Ravichandran [Sun, 14 Feb 2016 04:19:10 +0000 (23:19 -0500)]
staging: wilc1000: Include KERN_ facility level for printk()

This patch includes KERN_ facility level for printk(). KERN_INFO is
justified here as the messages here are informational.

Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: wilc_wfi_cfgoperations: remove cast on void pointers
Alison Schofield [Sat, 13 Feb 2016 06:54:08 +0000 (22:54 -0800)]
staging: wilc1000: wilc_wfi_cfgoperations: remove cast on void pointers

Remove cast on void pointers. C programming language guarantees
the conversion from void pointer to any other pointer type.

Coccinelle patch:
@r@
expression x;
void* e;
type T;
identifier f;
@@

(
  *((T *)e)
|
  ((T *)x)[...]
|
  ((T *)x)->f
|
- (T *)
  e
)

Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: linux_wlan: remove cast on void pointers
Alison Schofield [Sat, 13 Feb 2016 06:53:13 +0000 (22:53 -0800)]
staging: wilc1000: linux_wlan: remove cast on void pointers

Remove casts on void pointers. C programming language guarantees
the conversion from void pointer to any other pointer type.

Coccinelle patch:
@r@
expression x;
void* e;
type T;
identifier f;
@@

(
  *((T *)e)
|
  ((T *)x)[...]
|
  ((T *)x)->f
|
- (T *)
  e
)

Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: linux_mon: remove cast on void pointer
Alison Schofield [Sat, 13 Feb 2016 06:52:11 +0000 (22:52 -0800)]
staging: wilc1000: linux_mon: remove cast on void pointer

Remove cast on void pointer. C programming language guarantees
the conversion from void pointer to any other pointer type.

Coccinelle patch:
@r@
expression x;
void* e;
type T;
identifier f;
@@

(
  *((T *)e)
|
  ((T *)x)[...]
|
  ((T *)x)->f
|
- (T *)
  e
)

Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: host_interface: remove cast on void pointers
Alison Schofield [Sat, 13 Feb 2016 06:51:04 +0000 (22:51 -0800)]
staging: wilc1000: host_interface: remove cast on void pointers

Remove cast on void pointers. C programming language guarantees
the conversion from void pointer to any other pointer type.

Coccinelle patch:
@r@
expression x;
void* e;
type T;
identifier f;
@@

(
  *((T *)e)
|
  ((T *)x)[...]
|
  ((T *)x)->f
|
- (T *)
  e
)

Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: use netdev_err instead of PRINT_ER
Chaehyun Lim [Fri, 12 Feb 2016 14:04:47 +0000 (23:04 +0900)]
staging: wilc1000: use netdev_err instead of PRINT_ER

This patch uses netdev_err instead of PRINT_ER that is a custom debug
print.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: rename result in handle_set_channel
Chaehyun Lim [Fri, 12 Feb 2016 14:04:46 +0000 (23:04 +0900)]
staging: wilc1000: rename result in handle_set_channel

This patch renames result to ret that is used to get return value from
wilc_send_config_pkt.
Some handle_*() function are used as result, others are used as ret.
It will start to rename as ret in all handle_*() function to sync up
with this variable name.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: change data type of result variable to int.
Chaehyun Lim [Fri, 12 Feb 2016 14:04:45 +0000 (23:04 +0900)]
staging: wilc1000: change data type of result variable to int.

result variable gets value from wilc_send_config_pkt that has
return value of int. This patch changes data type of result variable to
int.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: change handle_set_channel's return type to void
Chaehyun Lim [Fri, 12 Feb 2016 14:04:44 +0000 (23:04 +0900)]
staging: wilc1000: change handle_set_channel's return type to void

When handle_set_channel is called in hostIFthread that is a kernel
thread, it is not checked return type of this function. This patch
changes return type to void and removes braces if statement due
to have a single statement.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: define a new local variable in wilc_scan
Chaehyun Lim [Fri, 12 Feb 2016 14:04:43 +0000 (23:04 +0900)]
staging: wilc1000: define a new local variable in wilc_scan

struct scan_info is defined as a new local variable in wilc_scan
function. It makes some assignment short as well as improve more
readability.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: rename u8security in user_conn_req
Chaehyun Lim [Fri, 12 Feb 2016 14:04:42 +0000 (23:04 +0900)]
staging: wilc1000: rename u8security in user_conn_req

This patch renames u8security to security to remove u8 prefix in struct
user_conn_req. There is no need to use prefix to show data type of this
variable.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: rename pu8ssid in struct user_conn_req
Chaehyun Lim [Fri, 12 Feb 2016 14:04:41 +0000 (23:04 +0900)]
staging: wilc1000: rename pu8ssid in struct user_conn_req

This patch renames pu8ssid to ssid to remove pu8 prefix in struct
user_conn_req. There is no need to use prefix to show data type of this
variable.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: rename pu8bssid in struct user_conn_req
Chaehyun Lim [Fri, 12 Feb 2016 14:04:40 +0000 (23:04 +0900)]
staging: wilc1000: rename pu8bssid in struct user_conn_req

This patch renames pu8bssid to bssid to remove pu8 prefix in struct
user_conn_req. There is no need to use prefix to show data type of this
variable.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: rename s8rssi in struct found_net_info
Chaehyun Lim [Fri, 12 Feb 2016 14:04:39 +0000 (23:04 +0900)]
staging: wilc1000: rename s8rssi in struct found_net_info

This patch renames s8rssi to rssi to remove s8 prefix in struct
found_net_info. There is no need to use prefix to show data type of this
variable.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: rename au8bssid in struct found_net_info
Chaehyun Lim [Fri, 12 Feb 2016 14:04:38 +0000 (23:04 +0900)]
staging: wilc1000: rename au8bssid in struct found_net_info

This patch renames au8bssid to bssid to remove au8 prefix. There is no
need to use prefix to show data type of this variable.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: rename au8bssid in struct join_bss_param
Chaehyun Lim [Fri, 12 Feb 2016 14:04:37 +0000 (23:04 +0900)]
staging: wilc1000: rename au8bssid in struct join_bss_param

This patch renames au8bssid to bssid to remove au8 prefix in struct
join_bss_param. There is no need to use prefix to show data type of this
variable.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: vt6656: move local var init into declaration
Alison Schofield [Fri, 12 Feb 2016 18:44:43 +0000 (10:44 -0800)]
staging: vt6656: move local var init into declaration

Improve readability by initializing local variables at declaration.

In one instance, vnt_start_interrupt_urb_complete(), also use that
local variable in subsequent switch.

Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: vt6656: replace GFP_ATOMIC with GFP_KERNEL for urb allocation
Alison Schofield [Fri, 12 Feb 2016 18:05:01 +0000 (10:05 -0800)]
staging: vt6656: replace GFP_ATOMIC with GFP_KERNEL for urb allocation

Replace GFP_ATOMIC with GFP_KERNEL during urb buffer allocation.
This makes vnt_alloc_bufs() consistent in setting GFP_KERNEL during
kmalloc() and usb_alloc_urb(). GFP_KERNEL is safe because we are in
process context, not in an interrupt handler, nor holding any spinlock.

Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: fbtft: Remove the use of CamelCase
Eva Rachel Retuya [Fri, 12 Feb 2016 07:39:30 +0000 (15:39 +0800)]
staging: fbtft: Remove the use of CamelCase

Rename the macro defining constant ROWxCOL into ROW_X_COL to remove
checkpatch check concerning use of CamelCase and to achieve better
readability.

CHECK: Avoid CamelCase: <ROWxCOL>

Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: fbtft: Delete blank line after '{' brace
Eva Rachel Retuya [Fri, 12 Feb 2016 07:39:29 +0000 (15:39 +0800)]
staging: fbtft: Delete blank line after '{' brace

Omit the whitespace after '{' brace as suggested by checkpatch.

CHECK: Blank lines aren't necessary after an open brace '{'

Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: fbtft: Insert blank line after function declaration
Eva Rachel Retuya [Fri, 12 Feb 2016 07:39:28 +0000 (15:39 +0800)]
staging: fbtft: Insert blank line after function declaration

Insert the required whitespace after the function declaration as
suggested by checkpatch.

CHECK: Please use a blank line after function/struct/union/enum
declarations

Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: fbtft: Fix alignment to match open parenthesis
Eva Rachel Retuya [Fri, 12 Feb 2016 07:39:27 +0000 (15:39 +0800)]
staging: fbtft: Fix alignment to match open parenthesis

Fix alignment issues by properly indenting function parameters in
accordance to the kernel coding style. Checkpatch pointed out this
issue.

CHECK: Alignment should match open parenthesis

Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: fbtft: Modify block comments based on kernel coding style
Eva Rachel Retuya [Fri, 12 Feb 2016 07:39:26 +0000 (15:39 +0800)]
staging: fbtft: Modify block comments based on kernel coding style

Add the required trailing * on subsequent lines as well as move the */
on a separate line. Checkpatch found this issue.

Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: lustre: obdclass: Declare function as static
Bhumika Goyal [Fri, 12 Feb 2016 06:23:28 +0000 (11:53 +0530)]
Staging: lustre: obdclass: Declare function as static

Declare the function cache_stats_print as static since it is used
only  in this file. Used grep to find occurences. Problem found using
sparse.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: lustre: llite: Remove NULL check before kfree
Bhumika Goyal [Fri, 12 Feb 2016 14:37:54 +0000 (20:07 +0530)]
Staging: lustre: llite: Remove NULL check before kfree

NULL check before kfree is unnecessary so remove it.
Semantic patch used:
// <smpl>
@@ expression E; @@
- if (E != NULL) { kfree(E); }
+ kfree(E);
@@ expression E; @@
- if (E != NULL) { kfree(E); E = NULL; }
+ kfree(E);
+ E = NULL;
// </smpl>

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: obdclass: Use IS_ERR_OR_NULL
Amitoj Kaur Chawla [Sat, 13 Feb 2016 15:02:48 +0000 (20:32 +0530)]
staging: lustre: obdclass: Use IS_ERR_OR_NULL

Use macro IS_ERR_OR_NULL in place of tests for NULL and IS_ERR.

The Coccinelle semantic patch used to make the change is as follows:

//<smpl>
@@
expression e;
@@

- e == NULL || IS_ERR(e)
+ IS_ERR_OR_NULL(e)
//</smpl>

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre/lnet: Fix wrong typecasting warning generated by sparse
Niranjan Dighe [Sun, 14 Feb 2016 03:21:48 +0000 (08:51 +0530)]
staging: lustre/lnet: Fix wrong typecasting warning generated by sparse

Fix the following warning generated about type casting by sparse

warning: cast removes address space of expression

The current implementation casts the structure pointers with (char *)
without __user annotation and then adds sizeof struct to it, thereby
generating the sparse warning. Fixed this by removing the unnecessary
char pointer type cast.

Signed-off-by: Niranjan Dighe <niranjan.dighe@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: fix all conditional comparison to zero in LNet layer
James Simmons [Fri, 12 Feb 2016 17:06:09 +0000 (12:06 -0500)]
staging: lustre: fix all conditional comparison to zero in LNet layer

Doing if (rc != 0) or if (rc == 0) is bad form. This patch corrects
the LNet code to behavior according to kernel coding standards.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: fix all NULL comparisons in LNet layer
James Simmons [Fri, 12 Feb 2016 17:06:08 +0000 (12:06 -0500)]
staging: lustre: fix all NULL comparisons in LNet layer

This removes every instance of checking a variable against
NULL in the LNet source code.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: balance braces properly in LNet layer
James Simmons [Fri, 12 Feb 2016 17:06:07 +0000 (12:06 -0500)]
staging: lustre: balance braces properly in LNet layer

Properly balance the braces done wrong as reported by
checkpatch.pl.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: remove space in LNet function declarations
James Simmons [Fri, 12 Feb 2016 17:06:06 +0000 (12:06 -0500)]
staging: lustre: remove space in LNet function declarations

Several function declarations have spacing in them. Lets
remove all those instances reported by checkpatch.pl.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: don't set more than one variable per line in LNet layer
James Simmons [Fri, 12 Feb 2016 17:06:05 +0000 (12:06 -0500)]
staging: lustre: don't set more than one variable per line in LNet layer

Cleanup all occurances of more than one variable being set per line as
reported by checkpatch.pl.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: add missing spaces for LNet layer reported by checkpatch.pl
James Simmons [Fri, 12 Feb 2016 17:06:04 +0000 (12:06 -0500)]
staging: lustre: add missing spaces for LNet layer reported by checkpatch.pl

Add missing spaces in the code reported by checkpatch.pl.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: remove unnecessary blank lines reported by checkpatch.pl
James Simmons [Fri, 12 Feb 2016 17:06:03 +0000 (12:06 -0500)]
staging: lustre: remove unnecessary blank lines reported by checkpatch.pl

Remove any useless blank lines reported by checkpatch.pl
for LNet layer.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: remove unnecessary parentheses around LNet function pointer
James Simmons [Fri, 12 Feb 2016 17:06:02 +0000 (12:06 -0500)]
staging: lustre: remove unnecessary parentheses around LNet function pointer

No need for the parentheses around any function pointer.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: align all code properly for LNet core
James Simmons [Fri, 12 Feb 2016 17:06:01 +0000 (12:06 -0500)]
staging: lustre: align all code properly for LNet core

In several places in the LNet core the code doesn't align
up properly. This resolves those checkpath issues.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: format properly all comment blocks for LNet core
James Simmons [Fri, 12 Feb 2016 17:06:00 +0000 (12:06 -0500)]
staging: lustre: format properly all comment blocks for LNet core

In several places in the LNet core comment blocks don't follow the
linux kernel style. This patch cleans those problems up.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: drop *_t from end of struct lnet_text_buf
James Simmons [Fri, 12 Feb 2016 17:05:59 +0000 (12:05 -0500)]
staging: lustre: drop *_t from end of struct lnet_text_buf

When lnet_text_buf data structure was transform from typedef
to struct the *_t which is typical of typedef was not drop.
This patch removes the *_t to be consistent.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoMerge tag 'iio-for-4.6b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio...
Greg Kroah-Hartman [Sun, 14 Feb 2016 19:10:38 +0000 (11:10 -0800)]
Merge tag 'iio-for-4.6b' of git://git./linux/kernel/git/jic23/iio into staging-next

Jonathan writes:

2nd round of new IIO device support, features and cleanups for the 4.6 cycle.

New Device Support
* Apex stx104 DAC
  - new driver for this PC104 board. Right now DAC support only.
* ADI ad5064
  - Add support for ad5625, ad5627, ad5645, ad5665, ad5667 DACs.
  - Add support for Linear Technology ltc2606, ltc2607, ltc2609, ltc2616,
    ltc2617, ltc2619, ltc2626, ltc2627 and ltc2629.
* ADI ad7192
  - add support for the ad7193
* Invensense mpu6050
  - substantial rework of driver to use regmap allowing SPI support extending
    the now split driver to cover the MPU6000.
* TI adc0832
  - new driver supporting ADC0831, ADC0832, ADC0834 and ADC0838 ADCs.
* TI ads1015
  - new driver, note that there is an existing hwmon driver. The long term
    intention is to probably remove the hwmon driver but for now we just have
    guards in place to ensure this driver is not built if that one is enabled.
* TI afe4403
  - new driver for this heart rate monitor / pulse oximeter front end chip.
* TI afe4404
  - new driver for this heart rate monitor / pulse oximeter front end chip.

Staging Graduations
* mxs-lradc
  - A combined general purpose and touch screen (input) device driver.
    Originally held in staging to allow reworking into and MFD but as
    that wasn't happening and isn't an absolute requirement we are moving
    it out of staging.

Driver new features
* ms5611
  - triggered buffer support
  - IIO_CHAN_INFO_SCALE to aid the triggered buffer support.

Driver cleanups / reworks / fixes
* ad5064
  - Use an enum for the register map layout to allow support of additional
    chips (precursor to the new support listed above).
  - Structural driver changes to allow support of the slightly different
    handling for the ltc parts above.
* ad5933
  - drop an exceptional & unnecessary for a function pointer.
* ad7606
  - Cleanup the repeated copies of pm ops.
  - consolidate the various channels specs via a sport of rearranging so only
    one version is needed.
* atlas ph sensor
  - add select IRQ_WORK
* hmc8543 (soon to move out of staging)
  - Comment style fixes
  - functionality of suspend and resume was swapped.
* spear-adc
  - use devm_clk_dev instead of managing the clk lifetime by hand.

Core
* Use new dmaengine_terminate_sync call to avoid a theoretical race.
* Fix docs for mlock in struct iio_dev as it is correctly taken in some
  drivers (docs used to say for core only).
* Add a helper function for calculating the scan index storage size within
  the core cutting out some cut and paste versions of the same code.

8 years agoiio: adc: Add TI ADS1015 ADC driver support
Daniel Baluta [Thu, 11 Feb 2016 13:49:54 +0000 (15:49 +0200)]
iio: adc: Add TI ADS1015 ADC driver support

The driver has sysfs readings with runtime PM support for power saving.
It also offers buffer support that can be used together with IIO software
triggers.

Datasheet can be found here:
http://www.ti.com.cn/cn/lit/ds/symlink/ads1015.pdf

Signed-off-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
8 years agoiio: Add IIO support for the DAC on the Apex Embedded Systems STX104
William Breathitt Gray [Thu, 11 Feb 2016 16:49:36 +0000 (11:49 -0500)]
iio: Add IIO support for the DAC on the Apex Embedded Systems STX104

The Apex Embedded Systems STX104 is a 16-channel 16-bit analog input and
2-channel 16-bit analog output PC/104 card. The STX104 incorporates a
large one mega-sample FIFO.

This driver provides IIO support for the 2-channel DAC on the STX104.
The base port addresses for the devices may be configured via the "base"
module parameter array.

Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
8 years agoiio: imu: inv_mpu6050: Add SPI support for MPU6000
Adriana Reus [Fri, 12 Feb 2016 11:44:45 +0000 (13:44 +0200)]
iio: imu: inv_mpu6050: Add SPI support for MPU6000

The only difference between the MPU6000 and the
MPU6050 is that the first also supports SPI.
Add SPI driver for this chip.

Signed-off-by: Adriana Reus <adriana.reus@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
8 years agoiio: imu: inv_mpu6050: Separate driver into core and i2c functionality.
Adriana Reus [Fri, 12 Feb 2016 11:44:44 +0000 (13:44 +0200)]
iio: imu: inv_mpu6050: Separate driver into core and i2c functionality.

Separate this driver into core and i2c functionality.
This is in preparation for adding spi support.

Signed-off-by: Adriana Reus <adriana.reus@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
8 years agoiio: imu: inv_mpu6050: Use regmap instead of i2c specific functions
Adriana Reus [Fri, 12 Feb 2016 11:44:43 +0000 (13:44 +0200)]
iio: imu: inv_mpu6050: Use regmap instead of i2c specific functions

Use regmap instead of i2c specific functions.
This is in preparation of splitting this driver into core and
i2c specific functionality.

Signed-off-by: Adriana Reus <adriana.reus@intel.com>
Acked-by: Crt Mori <cmo@melexis.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
8 years agoiio: imu: inv-mpu6050: Fix interrupt pin configuration
Adriana Reus [Fri, 12 Feb 2016 11:44:42 +0000 (13:44 +0200)]
iio: imu: inv-mpu6050: Fix interrupt pin configuration

The select/deselect_bypass duo writes the irq number into the interrupt
configuration register.
If there is a i2c slave device connected to the mpu (eg. a magnetometer)
then this can hinder interrupt delivery for the accelerometer and
gyroscope.
Set this register to the default configuration.

Signed-off-by: Adriana Reus <adriana.reus@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
8 years agostaging: fsl-mc: Remove unneeded parentheses
Janani Ravichandran [Thu, 11 Feb 2016 23:00:25 +0000 (18:00 -0500)]
staging: fsl-mc: Remove unneeded parentheses

Remove unneeded parentheses on the right hand side of assignment
statements.
Semantic patch:

@@
expression a, b, c;
@@

(
  a = (b == c)
|
  a =
- (
  b
- )
)

Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: media: Remove unneeded parentheses
Janani Ravichandran [Thu, 11 Feb 2016 22:52:30 +0000 (17:52 -0500)]
staging: media: Remove unneeded parentheses

Remove unneeded parentheses in assignment statements.
Semantic patch:

@@
expression a, b, c;
@@

(
  a = (b == c)
|
  a =
- (
  b
- )
)

Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: emxx_udc: Remove parentheses around the right hand side of assignment
Janani Ravichandran [Thu, 11 Feb 2016 21:03:08 +0000 (16:03 -0500)]
staging: emxx_udc: Remove parentheses around the right hand side of assignment

Remove parentheses around the right hand side of assignments as they are
not needed. Semantic patch used:

@@
expression a, b, c;
@@

(
  a = (b == c)
|
  a =
- (
  b
- )
)

Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8192e: prefer using eth_broadcast_addr()
Hari Prasath Gujulan Elango [Mon, 8 Feb 2016 04:44:13 +0000 (04:44 +0000)]
staging: rtl8192e: prefer using eth_broadcast_addr()

Prefer using the eth_broadcast_addr() instead of memset to broadcast
address 0xFF to the array.

Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8188eu: fix signal strength indication
Andrew Bradford [Fri, 12 Feb 2016 01:38:05 +0000 (20:38 -0500)]
staging: rtl8188eu: fix signal strength indication

RTL8188E can only have a maximum of 2 chains so match that in the actual
phy_rx_agc_info structure within phy_status_rpt.  This will cause the
other data received from the PHY, such as signal strength indication of
beacons, to properly align and allow extraction and use within the
signal strength record-keeping mechanisms.

Signed-off-by: Andrew Bradford <andrew@bradfordembedded.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8188eu: add release_firmware() between request_firmware and function...
Ivan Safonov [Thu, 11 Feb 2016 18:25:30 +0000 (01:25 +0700)]
staging: rtl8188eu: add release_firmware() between request_firmware and function error exit

Small memory leak fixed.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8188eu: remove pfirmware and fwsize of the hal_data_8188e structure
Ivan Safonov [Thu, 11 Feb 2016 18:24:22 +0000 (01:24 +0700)]
staging: rtl8188eu: remove pfirmware and fwsize of the hal_data_8188e structure

The pfirmware is used only in rtl88eu_download_fw function
(except the kfree(rtlhal->pfirmware) in netdev_close).

The fwsize not used after initialization at all.

The pfirmvare replaced by fw_data and fwsize removed.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8188eu: remove _rtl88e_fill_dummy
Ivan Safonov [Thu, 11 Feb 2016 18:23:15 +0000 (01:23 +0700)]
staging: rtl8188eu: remove _rtl88e_fill_dummy

The _rtl88e_fill_dummy function replaced by memset in rtl88eu_download_fw.

More appropriate names are used for pfwdata and fwsize variables
(download_data and download_size respectively).

Also u32 replaced by size_t for download_size variable.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8188eu: Remove unnecessary pointer cast
Janani Ravichandran [Tue, 9 Feb 2016 18:07:29 +0000 (13:07 -0500)]
staging: rtl8188eu: Remove unnecessary pointer cast

Remove unnecessary pointer cast. Issue found using the following Coccinelle semantic patch.

@@
type T;
T e;
identifier x;
@@

* T x = (T)e;

Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8723au: Use ARRAY_SIZE macro for sizes of arrays
Janani Ravichandran [Thu, 11 Feb 2016 23:50:40 +0000 (18:50 -0500)]
staging: rtl8723au: Use ARRAY_SIZE macro for sizes of arrays

Use ARRAY_SIZE to calculate the size of an array to make code concise.
The semantic patch used can be found here:
https://github.com/coccinelle/coccinellery/commit/9cbab452a3a2e18439e8386d6c4a68ee42c3ee2b

Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: vt6655: Add check dma_mapping_error
Haneen Mohammed [Thu, 11 Feb 2016 18:34:40 +0000 (21:34 +0300)]
Staging: vt6655: Add check dma_mapping_error

This patch checks for dma_mapping_error() after using dma_map_single.
If the dma map fails we release skb buff allocated by dev_alloc_skb() to
avoid possible causes of resource leak.

Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: vt6656: replace explicit NULL comparison with ! operator
Alison Schofield [Thu, 11 Feb 2016 07:06:45 +0000 (23:06 -0800)]
staging: vt6656: replace explicit NULL comparison with ! operator

Replace explicit NULL comparison with ! operator to simplify code.

Found with Coccinelle:
@@
expression e;
statement s0, s1;
@@

if (
(
+ !
e
- == NULL
 || ...
)
 ) s0 else s1

Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: gdm724x: Remove unneeded parentheses
Janani Ravichandran [Thu, 11 Feb 2016 22:01:01 +0000 (17:01 -0500)]
staging: gdm724x: Remove unneeded parentheses

Remove parentheses around the right hand side of assignment statements
as they are not needed.
Semantic patch:

@@
expression a, b, c;
@@

(
  a = (b == c)
|
  a =
- (
  b
- )
)
Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: gdm72xx: compress return logic into one line
Alison Schofield [Wed, 10 Feb 2016 18:34:00 +0000 (10:34 -0800)]
staging: gdm72xx: compress return logic into one line

Simplify function returns by merging assignment and return into
one command line.
Found with Coccinelle
@@
expression e, ret;
@@

-ret =
+return
e;
-return ret;

Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: speakup: compress return logic into one line
Alison Schofield [Wed, 10 Feb 2016 18:57:31 +0000 (10:57 -0800)]
staging: speakup: compress return logic into one line

Simplify function return by merging assignment and return into
one command line. Remove (now) unused local variable.

Found using Coccinelle:
@@
expression e, ret;
@@

-ret =
+return
e;
-return ret;

Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: speakup: Eliminate commented out code
Janani Ravichandran [Wed, 10 Feb 2016 00:48:25 +0000 (19:48 -0500)]
staging: speakup: Eliminate commented out code

This patch removes commented out code as it contributes to code clutter.

Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: fbtft: Remove blank line after '{' brace
Eva Rachel Retuya [Wed, 10 Feb 2016 09:56:09 +0000 (17:56 +0800)]
staging: fbtft: Remove blank line after '{' brace

Omit the whitespace after '{' brace as suggested by checkpatch.

CHECK: Blank lines aren't necessary after an open brace '{'

Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: fbtft: Add blank line after function declaration
Eva Rachel Retuya [Wed, 10 Feb 2016 09:56:08 +0000 (17:56 +0800)]
staging: fbtft: Add blank line after function declaration

Insert the required whitespace after the function declaration as
suggested by checkpatch.

CHECK: Please use a blank line after function/struct/union/enum
declarations

Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: fbtft: Indent to match open parenthesis
Eva Rachel Retuya [Wed, 10 Feb 2016 09:56:07 +0000 (17:56 +0800)]
staging: fbtft: Indent to match open parenthesis

Fix alignment issues by properly indenting function parameters in
accordance to the kernel coding style. Checkpatch pointed out this
issue.

CHECK: Alignment should match open parenthesis

Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: fbtft: Fix block comments according to kernel coding style
Eva Rachel Retuya [Wed, 10 Feb 2016 09:56:06 +0000 (17:56 +0800)]
staging: fbtft: Fix block comments according to kernel coding style

Add the required trailing * on subsequent lines as well as move the */
on a separate line. Checkpatch found this issue.

Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: sm750fb: change definition of PANEL_HORIZONTAL_TOTAL fields
Mike Rapoport [Wed, 10 Feb 2016 16:34:22 +0000 (18:34 +0200)]
staging: sm750fb: change definition of PANEL_HORIZONTAL_TOTAL fields

Use stratight-forward defintion of PANEL_HORIZONTAL_TOTAL register fields
and use open-coded implementation for register manipulations

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: sm750fb: use BIT macro for I2C_STATUS fields
Mike Rapoport [Wed, 10 Feb 2016 16:34:21 +0000 (18:34 +0200)]
staging: sm750fb: use BIT macro for I2C_STATUS fields

Replace complex definition of I2C_STATUS register fields with BIT() macro
and use open-coded implementation for register manipulation

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: sm750fb: use BIT macro for I2C_CTRL fields
Mike Rapoport [Wed, 10 Feb 2016 16:34:20 +0000 (18:34 +0200)]
staging: sm750fb: use BIT macro for I2C_CTRL fields

Replace complex definition of I2C_CTRL register fields with BIT() macro and
use open-coded implementation for register manipulation

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: sm750fb: change definition of CRT_DISPLAY_CTRL multi-bit fields
Mike Rapoport [Wed, 10 Feb 2016 16:34:19 +0000 (18:34 +0200)]
staging: sm750fb: change definition of CRT_DISPLAY_CTRL multi-bit fields

Use more straight-forward definitions for multi-bit fields of
CRT_DISPLAY_CTRL register and use open-coded implementation for register
manipulation

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: sm750fb: use BIT macro for CRT_DISPLAY_CTRL single-bit fields
Mike Rapoport [Wed, 10 Feb 2016 16:34:18 +0000 (18:34 +0200)]
staging: sm750fb: use BIT macro for CRT_DISPLAY_CTRL single-bit fields

Replace complex definition of CRT_DISPLAY_CTRL register fields with
BIT() macro and use open-coded implementation for register manipulation

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: sm750fb: use BIT macro for DMA_ABORT_INTERRUPT single-bit fields
Mike Rapoport [Wed, 10 Feb 2016 16:34:17 +0000 (18:34 +0200)]
staging: sm750fb: use BIT macro for DMA_ABORT_INTERRUPT single-bit fields

Replace complex definition of DMA_ABORT_INTERRUPT register fields with
BIT() macro and use open-coded implementation for register manipulation

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: sm750fb: change definition of PANEL_PLANE_BR fields
Mike Rapoport [Wed, 10 Feb 2016 16:34:16 +0000 (18:34 +0200)]
staging: sm750fb: change definition of PANEL_PLANE_BR fields

Use stratight-forward defintion of PANEL_PLANE_BR register fields and
use open-coded implementation for register manipulations

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: sm750fb: change definition of PANEL_PLANE_TL fields
Mike Rapoport [Wed, 10 Feb 2016 16:34:15 +0000 (18:34 +0200)]
staging: sm750fb: change definition of PANEL_PLANE_TL fields

Use stratight-forward defintion of PANEL_PLANE_TL register fields

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: sm750fb: change definition of PANEL_WINDOW_HEIGHT fields
Mike Rapoport [Wed, 10 Feb 2016 16:34:14 +0000 (18:34 +0200)]
staging: sm750fb: change definition of PANEL_WINDOW_HEIGHT fields

Use stratight-forward defintion of PANEL_WINDOW_HEIGHT register fields and
use open-coded implementation for register manipulations

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: sm750fb: change definition of PANEL_WINDOW_WIDTH fields
Mike Rapoport [Wed, 10 Feb 2016 16:34:13 +0000 (18:34 +0200)]
staging: sm750fb: change definition of PANEL_WINDOW_WIDTH fields

Use stratight-forward defintion of PANEL_WINDOW_WIDTH register fields and
use open-coded implementation for register manipulations

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: sm750fb: change definition of PANEL_FB_WIDTH fields
Mike Rapoport [Wed, 10 Feb 2016 16:34:12 +0000 (18:34 +0200)]
staging: sm750fb: change definition of PANEL_FB_WIDTH fields

Use stratight-forward defintion of PANEL_FB_WIDTH register fields and use
open-coded implementation for register manipulations

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>