Commit graph

574965 commits

Author SHA1 Message Date
Rakhi Sharma
f7099ad7bd staging: rtl8712: Fixed a comparision coding style warning.
WARNING: Comparisons should place the constant on the right side of the test
Fixed this warning by placing the constant on right side.

Signed-off-by: Rakhi Sharma <rakhish1994@gmail.com>-
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-14 16:49:09 -08:00
Bhumika Goyal
343af6379e Staging: iio: magnetometer: 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>
2016-02-14 16:44:06 -08:00
Bhumika Goyal
df27103469 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>
2016-02-14 16:44:06 -08:00
Bhumika Goyal
6d9b10c866 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>
2016-02-14 16:44:06 -08:00
Janani Ravichandran
3b15cfbbee 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>
2016-02-14 16:44:06 -08:00
Bhumika Goyal
a4d7d05b2d 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>
2016-02-14 16:44:06 -08:00
Bhumika Goyal
a4e320b721 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>
2016-02-14 16:44:06 -08:00
Janani Ravichandran
04bdfd20e0 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>
2016-02-14 16:38:11 -08:00
Amitoj Kaur Chawla
e4d31fbad2 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>
2016-02-14 16:38:11 -08:00
Amitoj Kaur Chawla
3a341db3db 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>
2016-02-14 16:38:11 -08:00
Amitoj Kaur Chawla
4ebeaf5133 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>
2016-02-14 16:38:11 -08:00
Amitoj Kaur Chawla
e6be66fff7 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>
2016-02-14 16:38:11 -08:00
Amitoj Kaur Chawla
b1d9660903 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>
2016-02-14 16:38:11 -08:00
Amitoj Kaur Chawla
4763a75289 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>
2016-02-14 16:38:11 -08:00
Amitoj Kaur Chawla
69bf7ecea2 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>
2016-02-14 16:38:11 -08:00
Amitoj Kaur Chawla
f3b8a53c6d 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>
2016-02-14 16:38:11 -08:00
Paul Gortmaker
9c583af90a drivers/staging/android: don't use modular references in sync_debug.c
In commit 8a00448461 ("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>
2016-02-14 16:35:00 -08:00
Bhumika Goyal
4a3b3f47ed 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>
2016-02-14 16:34:08 -08:00
Bhumika Goyal
2cfc7ba561 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>
2016-02-14 16:34:08 -08:00
Bhumika Goyal
0c42bc25ed 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>
2016-02-14 16:34:08 -08:00
Bhumika Goyal
12f2a7b900 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>
2016-02-14 16:34:08 -08:00
Janani Ravichandran
c611d48e65 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>
2016-02-14 16:31:50 -08:00
Janani Ravichandran
24c6c29d85 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>
2016-02-14 16:31:44 -08:00
Janani Ravichandran
04b2172a6a 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>
2016-02-14 16:31:44 -08:00
Janani Ravichandran
6f5b8d2ace 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>
2016-02-14 16:31:44 -08:00
Janani Ravichandran
17a0c29935 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>
2016-02-14 16:31:44 -08:00
Janani Ravichandran
01fe818cc3 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>
2016-02-14 16:31:44 -08:00
Janani Ravichandran
f7b7f87de7 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>
2016-02-14 16:31:44 -08:00
Alison Schofield
4375cad941 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>
2016-02-14 16:31:44 -08:00
Alison Schofield
d5c89442d4 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>
2016-02-14 16:31:44 -08:00
Alison Schofield
6bcc1e1e70 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>
2016-02-14 16:31:44 -08:00
Alison Schofield
59b97b365e 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>
2016-02-14 16:31:44 -08:00
Chaehyun Lim
ecdd5c745e 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>
2016-02-14 16:25:38 -08:00
Chaehyun Lim
5349f6daa3 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>
2016-02-14 16:25:38 -08:00
Chaehyun Lim
987ab5eb5f 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>
2016-02-14 16:25:38 -08:00
Chaehyun Lim
c43f5f9dc4 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>
2016-02-14 16:25:38 -08:00
Chaehyun Lim
b41dfdb18e 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>
2016-02-14 16:25:38 -08:00
Chaehyun Lim
a0942c5799 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>
2016-02-14 16:25:38 -08:00
Chaehyun Lim
72216411b0 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>
2016-02-14 16:25:38 -08:00
Chaehyun Lim
788f6fc081 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>
2016-02-14 16:25:38 -08:00
Chaehyun Lim
5cfbbf1401 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>
2016-02-14 16:25:38 -08:00
Chaehyun Lim
69dc533ecc 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>
2016-02-14 16:25:38 -08:00
Chaehyun Lim
f176429307 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>
2016-02-14 16:25:38 -08:00
Alison Schofield
b9183fdd41 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>
2016-02-14 16:25:38 -08:00
Alison Schofield
3e0f86b337 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>
2016-02-14 16:25:38 -08:00
Eva Rachel Retuya
61abd03a3d 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>
2016-02-14 16:22:49 -08:00
Eva Rachel Retuya
ead3c5ce50 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>
2016-02-14 16:22:49 -08:00
Eva Rachel Retuya
b4ac6b2885 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>
2016-02-14 16:22:49 -08:00
Eva Rachel Retuya
f07e89ce1e 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>
2016-02-14 16:22:49 -08:00
Eva Rachel Retuya
3a334ea510 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>
2016-02-14 16:22:49 -08:00