Chris Horn [Mon, 15 Feb 2016 15:25:45 +0000 (10:25 -0500)]
staging: lustre: rename variables in lnet_find_route_locked
Rename several variables in lnet_find_route_locked to make
the code easier to understand. Broken out of patch 7857.
Signed-off-by: Chris Horn <hornc@cray.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3679
Reviewed-on: http://review.whamcloud.com/7857
Reviewed-by: Cory Spitz <spitzcor@cray.com>
Reviewed-by: Isaac Huang <he.huang@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bhumika Goyal [Fri, 19 Feb 2016 13:29:20 +0000 (18:59 +0530)]
Staging: wilc1000: Remove and rename struct typedefs
This patch gets rid of struct typedefs wilc_cfg_byte_t, wilc_cfg_hword_t,
wilc_cfg_word_t and wilc_cfg_str_t as as linux kernel coding style
guidelines suggest not using typdefs for structure types.
Also drop '_t' from the names.
Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Amitoj Kaur Chawla [Wed, 17 Feb 2016 15:11:03 +0000 (20:41 +0530)]
staging: wilc1000: Return correct error codes
This change has been made with the goal that kernel functions should
return something more descriptive than -1 on failure.
The return value on an alloc_etherdev failure should be -ENOMEM,
and not -1.
This was found using Coccinelle. A simplified version of the semantic
patch used is:
//<smpl>
@@
expression *e;
identifier l1;
@@
e = alloc_etherdev(...);
if (e == NULL) {
...
return
- -1
+ -ENOMEM
;
}
//</smpl
Furthermore, introduced `ret` variable to store and return the
corresponding error code returned by register_netdev on failure.
The two call sites store the return value in a variable which only
checks that the value is non-zero, hence no change is required at
the call sites.
Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Janani Ravichandran [Tue, 16 Feb 2016 22:27:03 +0000 (17:27 -0500)]
staging: wilc1000: Rearrange statement to respect 80 char limit
Split statement across multiple lines as the line modified is over 80
chars in length.
Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Janani Ravichandran [Tue, 16 Feb 2016 22:24:52 +0000 (17:24 -0500)]
staging: wilc1000: Use kmalloc_array instead of kmalloc
Use kmalloc_array instead of kmalloc for arrays to prevent integer
overflows.
Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Janani Ravichandran [Tue, 16 Feb 2016 19:07:00 +0000 (14:07 -0500)]
staging: wilc1000: Modify tcp_process to return void rather than int
tcp_process() returns int, which is not used anywhere. So, change
function header to return void intead of int and remove all uses of
the local variable ret, which is used as a return variable in the
function.
Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Amitoj Kaur Chawla [Tue, 16 Feb 2016 13:06:00 +0000 (18:36 +0530)]
staging: wilc1000: Remove unused function
Remove wilc_wlan_global_reset function since it is not used anywhere
in this driver.
This also silences the following sparse warning:
drivers/staging/wilc1000/wilc_wlan.c:1120:6: warning: symbol
'wilc_wlan_global_reset' was not declared. Should it be static?
Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Roger H. Newell [Tue, 16 Feb 2016 12:55:42 +0000 (09:25 -0330)]
staging: wilc1000: Removed braces from single block statements
This patch corrects warnings generated by checkpatch.pl by
removing braces from single block statements.
Signed-off-by: Roger H. Newell <newell.roger@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Roger H. Newell [Tue, 16 Feb 2016 12:54:56 +0000 (09:24 -0330)]
staging: wilc1000: Whitespaces removed from function call
This patch corrects errors generated by checkpatch.pl by
removing whitespace between parameters passed to dev_err()
Signed-off-by: Roger H. Newell <newell.roger@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chaehyun Lim [Tue, 16 Feb 2016 08:39:55 +0000 (17:39 +0900)]
staging: wilc1000: handle_set_mac_address: use netdev_err
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>
Chaehyun Lim [Tue, 16 Feb 2016 08:39:54 +0000 (17:39 +0900)]
staging: wilc1000: handle_set_mac_address: rename result
This patch renames result to ret that is used to get return value from
wilc_send_config_pkt. It will be changed until all handle_*() function
has same variable name as ret.
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chaehyun Lim [Tue, 16 Feb 2016 08:39:53 +0000 (17:39 +0900)]
staging: wilc1000: handle_set_mac_address: change data type of result
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>
Chaehyun Lim [Tue, 16 Feb 2016 08:39:52 +0000 (17:39 +0900)]
staging: wilc1000: handle_set_mac_address: change return type to void
When handle_set_mac_address 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 a brace of 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>
Chaehyun Lim [Tue, 16 Feb 2016 08:39:51 +0000 (17:39 +0900)]
staging: wilc1000: handle_set_mac_address: use kmemdup
This patch replaces kmalloc followed by memcpy with kmemdup.
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chaehyun Lim [Tue, 16 Feb 2016 08:39:50 +0000 (17:39 +0900)]
staging: wilc1000: handle_set_mac_address: fix kmalloc return error code
This patch fix return error code of kmalloc as -ENOMEM instead of
-EFAULT.
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chaehyun Lim [Tue, 16 Feb 2016 08:39:49 +0000 (17:39 +0900)]
staging: wilc1000: handle_set_mac_address: remove debug message of kmalloc failure
There is no need to print debug message when kmalloc is failed. This
message is redundant. The code already show us that kmalloc is failed.
The brace of if statement is remove as well due to have a single
statement.
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Alison Schofield [Tue, 16 Feb 2016 08:30:35 +0000 (00:30 -0800)]
staging: wilc1000: host_interface: remove unused semaphores
Remove unused semaphore declarations, initializations, and unlocks.
The functions that locked these semaphores were previously removed,
so this cleans up the remains.
Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Eva Rachel Retuya [Tue, 16 Feb 2016 08:24:45 +0000 (16:24 +0800)]
staging: wilc1000: remove spaces around '->'
Delete the space around '->' as it is prohibited and breaks the code.
Checkpatch found this issue.
ERROR: spaces prohibited around that '->'
Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Eva Rachel Retuya [Tue, 16 Feb 2016 08:24:44 +0000 (16:24 +0800)]
staging: wilc1000: remove trailing whitespace
Remove unnecessary whitespaces as pointed out by checkpatch:
ERROR: trailing whitespace
Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Thierry Reding [Mon, 15 Feb 2016 13:22:23 +0000 (14:22 +0100)]
staging: fsl-mc: Avoid section mismatch
The fsl_mc_allocator_driver_exit() function is marked __exit, but is
called by the error handling code in fsl_mc_allocator_driver_init().
This results in a section mismatch, which in turn could lead to
executing random code.
Remove the __exit annotation to fix this.
Cc: J. German Rivera <German.Rivera@freescale.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Thierry Reding [Mon, 15 Feb 2016 13:22:22 +0000 (14:22 +0100)]
staging: fsl-mc: Do not allow building as a module
This driver uses functionality (MSI IRQ domain) whose symbols aren't
exported, and hence the modular build fails. While arguably there might
be reasons to make these symbols available to modules, that change would
be fairly involved and the set of exported functions should be carefully
auditioned. Fix the build failure for now by marking the driver boolean.
Cc: J. German Rivera <German.Rivera@freescale.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mike Rapoport [Mon, 15 Feb 2016 17:54:05 +0000 (19:54 +0200)]
staging: sm750fb: change definition of CRT_FB_ADDRESS fields
Use stratight-forward definition of CRT_FB_ADDRESS register fields
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>
Mike Rapoport [Mon, 15 Feb 2016 17:54:04 +0000 (19:54 +0200)]
staging: sm750fb: change definition of CRT_FB_WIDTH fields
Use stratight-forward definition of CRT_FB_WIDTH register fields
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>
Mike Rapoport [Mon, 15 Feb 2016 17:54:03 +0000 (19:54 +0200)]
staging: sm750fb: change definition of DE_WINDOW_WIDTH fields
Use stratight-forward definition of DE_WINDOW_WIDTH register fields
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>
Mike Rapoport [Mon, 15 Feb 2016 17:54:02 +0000 (19:54 +0200)]
staging: sm750fb: change definition of DE_STRETCH_FORMAT fields
Use stratight-forward definition of DE_STRETCH_FORMAT register fields
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>
Mike Rapoport [Mon, 15 Feb 2016 17:54:01 +0000 (19:54 +0200)]
staging: sm750fb: change definition of DE_PITCH fields
Use stratight-forward definition of DE_PITCH register fields
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>
Mike Rapoport [Mon, 15 Feb 2016 17:54:00 +0000 (19:54 +0200)]
staging: sm750fb: change definition of DE_CONTROL fields
Use stratight-forward definition of DE_CONTROL register fields
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>
Mike Rapoport [Mon, 15 Feb 2016 17:53:59 +0000 (19:53 +0200)]
staging: sm750fb: change definition of DE_DIMENSION fields
Use stratight-forward definition of DE_DIMENSION register fields
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>
Mike Rapoport [Mon, 15 Feb 2016 17:53:58 +0000 (19:53 +0200)]
staging: sm750fb: change definition of DE_DESTINATION fields
Use stratight-forward definition of DE_DESTINATION register fields
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>
Mike Rapoport [Mon, 15 Feb 2016 17:53:57 +0000 (19:53 +0200)]
staging: sm750fb: change definition of DE_SOURCE fields
Use stratight-forward definition of DE_SOURCE register fields
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>
Mike Rapoport [Mon, 15 Feb 2016 17:53:56 +0000 (19:53 +0200)]
staging: sm750fb: change definition of HWC_COLOR_{12, 3} fields
Use straight-forward definition of HWC_COLOR_{12,3} register fields instead
of magic numbers
Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mike Rapoport [Mon, 15 Feb 2016 17:53:55 +0000 (19:53 +0200)]
staging: sm750fb: change definition of HWC_LOCATION fields
Use BIT() macro for single-bit fields of HWC_LOCATION register and
define HWC_LOCATION_{X,Y}_MASK for masking the address bits.
Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mike Rapoport [Mon, 15 Feb 2016 17:53:54 +0000 (19:53 +0200)]
staging: sm750fb: change definition of HWC_ADDRESS fields
Use BIT() macro for single-bit fields of HWC_ADDRESS register and
define HWC_ADDRESS_ADDRESS_MASK for masking the address bits.
Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mike Rapoport [Mon, 15 Feb 2016 17:53:53 +0000 (19:53 +0200)]
staging: sm750fb: change definition of PANEL_VERTICAL_SYNC fields
Use stratight-forward definition of PANEL_VERTICAL_SYNC register fields
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>
Mike Rapoport [Mon, 15 Feb 2016 17:53:52 +0000 (19:53 +0200)]
staging: sm750fb: change definition of PANEL_VERTICAL_TOTAL fields
Use stratight-forward definition of PANEL_VERTICAL_TOTAL register fields
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>
Mike Rapoport [Mon, 15 Feb 2016 17:53:51 +0000 (19:53 +0200)]
staging: sm750fb: change definition of PANEL_HORIZONTAL_SYNC fields
Use stratight-forward definition of PANEL_HORIZONTAL_SYNC register fields
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>
Mike Rapoport [Mon, 15 Feb 2016 17:53:50 +0000 (19:53 +0200)]
staging: sm750fb: change definition of CRT_VERTICAL_SYNC fields
Use stratight-forward definition of CRT_VERTICAL_SYNC register fields
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>
Mike Rapoport [Mon, 15 Feb 2016 17:53:49 +0000 (19:53 +0200)]
staging: sm750fb: change definition of CRT_VERTICAL_TOTAL fields
Use stratight-forward definition of CRT_VERTICAL_TOTAL register fields
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>
Mike Rapoport [Mon, 15 Feb 2016 17:53:48 +0000 (19:53 +0200)]
staging: sm750fb: change definition of CRT_HORIZONTAL_SYNC fields
Use stratight-forward definition of CRT_HORIZONTAL_SYNC register fields
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>
Mike Rapoport [Mon, 15 Feb 2016 17:53:47 +0000 (19:53 +0200)]
staging: sm750fb: change definition of CRT_HORIZONTAL_TOTAL fields
Use stratight-forward definition of CRT_HORIZONTAL_TOTAL register fields
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>
Mike Rapoport [Mon, 15 Feb 2016 17:53:46 +0000 (19:53 +0200)]
staging: sm750fb: change definition of CRT_AUTO_CENTERING_BR fields
Use stratight-forward definition of CRT_AUTO_CENTERING_BR register fields
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>
Mike Rapoport [Mon, 15 Feb 2016 17:53:45 +0000 (19:53 +0200)]
staging: sm750fb: change definition of CRT_AUTO_CENTERING_TL fields
Use stratight-forward definition of CRT_AUTO_CENTERING_TL register fields
Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Amitoj Kaur Chawla [Mon, 15 Feb 2016 18:21:06 +0000 (23:51 +0530)]
staging: sm750fb: Remove inclusion of header file
version.h header inclusion is not necessary as detected by
versioncheck.
Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Eva Rachel Retuya [Mon, 15 Feb 2016 05:52:15 +0000 (13:52 +0800)]
staging: wilc1000: declare 'fops' as const
Change the declaration of the file_operations structure 'fops' into
const as suggested by checkpatch.
WARNING: struct file_operations should normally be const
Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Eva Rachel Retuya [Mon, 15 Feb 2016 05:34:17 +0000 (13:34 +0800)]
staging: wilc1000: Remove initialization of static variables
Address the following checkpatch errors:
* ERROR: do not initialise statics to false
* ERROR: do not initialise statics to 0x00
Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Shraddha Barke [Fri, 12 Feb 2016 10:41:54 +0000 (16:11 +0530)]
Platform: goldfish: goldfish_pipe.c: Add DMA support using managed version
Coherent mapping guarantees that the device and CPU are in sync.
Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Janani Ravichandran [Mon, 15 Feb 2016 05:57:38 +0000 (00:57 -0500)]
staging: xgifb: Fix comment style
Fix comments to use trailing */ on separate lines.
Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Janani Ravichandran [Mon, 15 Feb 2016 05:15:12 +0000 (00:15 -0500)]
staging: vt6655: Add missing blank line after declaration
Add missing blank line after declaration of variables. Issue found by
checkpatch.
Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Janani Ravichandran [Mon, 15 Feb 2016 05:25:23 +0000 (00:25 -0500)]
staging: vt6655: Fit function header on the same line
Improve readability by fitting all parts of the function header on the same line.
Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Amitoj Kaur Chawla [Fri, 12 Feb 2016 08:39:49 +0000 (14:09 +0530)]
staging: goldfish: goldfish_nand: Return correct error code
The return value of devm_kzalloc on failure of allocation of memory should
be -ENOMEM and not -1.
Found using Coccinelle. A simplified version of the semantic patch
used is:
//<smpl>
@@
expression *e;
@@
e = devm_kzalloc(...);
if (e == NULL) {
...
return
- -1
+ -ENOMEM
;
}
//</smpl>
The single call site does not perform any checks on the return value, hence
no change is required at the call site.
Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Amitoj Kaur Chawla [Sat, 13 Feb 2016 05:01:02 +0000 (10:31 +0530)]
staging: gdm724x: gdm_mux: Remove create_workqueue()
With concurrency managed workqueues, use of dedicated workqueues
can be replaced by using system_wq. Drop mux_rx_wq by using system_wq.
Since there is only one work item per mux_dev and different mux_devs
do not need to be ordered, increase of concurrency level by switching
to system_wq should not break anything.
cancel_work_sync() is used to ensure that work is not pending or
executing on any CPU.
Lastly, since all devices are suspended, which shutdowns the work item
before the driver can be unregistered, it is guaranteed that no work
item is pending or executing by the time exit path runs.
Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tomás Tormo [Sun, 14 Feb 2016 19:30:56 +0000 (20:30 +0100)]
Staging: nvec: Modify the nvec_write_sync method to return the error code
Modify the nvec_write_sync function to return the error code
instead of the received message.
The received message is now returned as an output parameter.
Signed-off-by: Tomás Tormo <tomas.tormo@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aaro Koskinen [Sun, 14 Feb 2016 00:47:28 +0000 (02:47 +0200)]
staging: octeon-usb: support official bindings
Support official DT bindings alongside with the deprecated ones.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aaro Koskinen [Sun, 14 Feb 2016 00:45:30 +0000 (02:45 +0200)]
staging: octeon: support fixed-link phys
Support fixed-link PHYs. This allows to remove some of the board-specific
link cvmx_helper code in the future.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Janani Ravichandran [Sun, 14 Feb 2016 03:05:01 +0000 (22:05 -0500)]
staging: speakup: Fix block comment style
Use trailing */ on a separate line when it is a block comment.
This patch fixes the last of the checkpatch warnings for the file.
Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Laura Garcia Liebana [Sun, 14 Feb 2016 17:55:23 +0000 (18:55 +0100)]
staging: netlogic: Fix parenthesis alignment
Align arguments with the open parenthesis. Checkpatch found this issue.
Signed-off-by: Laura Garcia Liebana <nevola@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Laura Garcia Liebana [Sun, 14 Feb 2016 15:26:13 +0000 (16:26 +0100)]
staging: netlogic: Remove multiple blank lines
Avoid the use of multiple blank lines. Checkpatch found this issue.
Signed-off-by: Laura Garcia Liebana <nevola@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Laura Garcia Liebana [Sun, 14 Feb 2016 13:10:11 +0000 (14:10 +0100)]
staging: netlogic: Fix multiple irq assignments in a single line
Avoid the use of multiple assignments in a single line. Checkpatch
found this issue.
Signed-off-by: Laura Garcia Liebana <nevola@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bhumika Goyal [Sat, 13 Feb 2016 11:12:32 +0000 (16:42 +0530)]
Staging: rtl819u: ieee80211: Remove function ieee80211_wep_null
Remove function ieee80211_wep_null from the file as is it blank and
remove its declaration from the header file.
Also remove its function call as it is of no use calling this function.
Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bhumika Goyal [Fri, 12 Feb 2016 10:52:19 +0000 (16:22 +0530)]
Staging: rtl8723au: Replace header files
The headers <asm/uaccess.h>,<asm/atomic.h>,<asm/atomic.h> should not be
directly included so replace them.
Warning generated by checkpatch.pl.
Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Janani Ravichandran [Sun, 14 Feb 2016 03:59:06 +0000 (22:59 -0500)]
staging: sm750fb: Fix indentation of if...else statements
This patch clears the checkpatch warning about suspect code indent for
conditional statements in the file.
Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Janani Ravichandran [Sun, 14 Feb 2016 03:48:42 +0000 (22:48 -0500)]
staging: sm750fb: Eliminate commented out code
This patch removes commented out code in the file.
Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Janani Ravichandran [Sun, 14 Feb 2016 03:23:17 +0000 (22:23 -0500)]
staging: sm750fb: Remove unneeded braces in if...else statements
Remove unnecessary braces in if...else statements where both branches have a single statement each.
Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bhumika Goyal [Sun, 14 Feb 2016 05:29:50 +0000 (10:59 +0530)]
Staging: rtl8192u: Remove useless comments
Remove the commented out places where macros PlatformAcquireSpinLock and
PlatformReleaseSpinLock are called as these macros are no longer used.
Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bhumika Goyal [Sun, 14 Feb 2016 05:29:49 +0000 (10:59 +0530)]
Staging: rtl8723au: Remove unused macros
The macros PlatformAcquireSpinLock and PlatformReleaseSpinLock are
not used anywhere so remove them. Used grep to find occurences.
Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Joseph Bisch [Sun, 14 Feb 2016 21:57:27 +0000 (16:57 -0500)]
staging: rtl8712: Remove unnecessary ret variable
Since the variable ret is set at the beginning of the function and
never changes its value, we can just return the value it was set to.
Found using coccinelle with misc/returnvar.cocci.
Signed-off-by: Joseph Bisch <joseph.bisch@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rakhi Sharma [Sat, 13 Feb 2016 05:24:20 +0000 (10:54 +0530)]
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>
Bhumika Goyal [Fri, 12 Feb 2016 15:10:29 +0000 (20:40 +0530)]
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>
Bhumika Goyal [Fri, 12 Feb 2016 15:10:28 +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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>