Commit Graph

576715 Commits

Author SHA1 Message Date
Aaro Koskinen dfce62674c staging: octeon-usb: move interrupt transfer handling into separate function
Move bulk transfer handling into a separate function to avoid
deep indentation.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 22:38:16 -08:00
Aaro Koskinen 8ed3094c62 staging: octeon-usb: move bulk transfer handling into separate function
Move bulk transfer handling into a separate function to avoid
deep indentation.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 22:38:16 -08:00
Aaro Koskinen 81a71bad40 staging: octeon-usb: move control transfer handling into separate function
Move control transfer handling into a separate function to
avoid deep indentation.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 22:38:16 -08:00
Aaro Koskinen 8b07d2fe38 staging: octeon-usb: fold cvmx_usb_state into octeon_hcd
Fold cvmx_usb_state into octeon_hcd.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 22:38:16 -08:00
Aaro Koskinen b186eb64d4 staging: octeon-usb: rename STATUS_SUCCESS to STATUS_OK
Rename STATUS_SUCCESS to STATUS_OK.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 22:38:16 -08:00
Aaro Koskinen e6bff5a070 staging: octeon-usb: rename cvmx_usb_perform_complete to cvmx_usb_complete
Rename cvmx_usb_perform_complete to cvmx_usb_complete.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 22:38:16 -08:00
Aaro Koskinen add3ea324c staging: octeon-usb: rename cvmx_usb_complete to cvmx_usb_status
Rename cvmx_usb_complete to cvmx_usb_status.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 22:38:16 -08:00
Aaro Koskinen 284ea26aaa staging: octeon-usb: simplify if statement
Simplify if statement to avoid deep nesting.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 22:38:16 -08:00
Aaro Koskinen 25adcca6ec staging: octeon-usb: pass transfer type to find_ready_pipe
Since we always search the same list, we can just pass the transfer type.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 22:38:16 -08:00
Aaro Koskinen 38492ccbd1 staging: octeon-usb: eliminate redundant parameter from find_ready_pipe
current_frame always equals usb->frame_number.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 22:38:16 -08:00
Aaro Koskinen 68ea338017 staging: octeon-usb: align split lines to match open parenthesis
Align split lines to match open parenthesis.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 22:38:16 -08:00
Aaro Koskinen a2fcca426d staging: octeon-usb: use preferred style for NULL comparison
Use preferred coding style for NULL comparison.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 22:38:16 -08:00
Bhaktipriya Shridhar dce57aef61 staging: most: hdm-usb: Use macro DIV_ROUND_UP
The macro DIV_ROUND_UP performs the computation (((n) + (d) - 1) /(d)).
It clarifies the divisor calculations. This occurence was detected using the
coccinelle script:
@@
expression e1;
expression e2;
@@
(
- ((e1) + e2 - 1) / (e2)
+ DIV_ROUND_UP(e1,e2)
|
- ((e1) + (e2 - 1))/ (e2)
+ DIV_ROUND_UP(e1,e2)
)

The macro CEILING was dropped altogether and has been replaced with
DIV_ROUND_UP.

Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 22:35:10 -08:00
Sandhya Bankar 3e8b9fe060 Staging: most: Do not print message if kzalloc() failed.
Do not print message if kzalloc() failed.
kzalloc() has its own messages. So no need to add extra one.

Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 22:34:19 -08:00
Eva Rachel Retuya 87f35f02a9 staging: most: compress return logic into one line
Eliminate local variable 'ret' and modify return statement to contain
the value being returned directly instead of assigning it first to 'ret'
and returning this variable.

Coccinelle semantic patch used:
@@ expression e, ret; @@
-ret =
+return
	e;
-return ret;

Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 22:34:19 -08:00
Alison Schofield 91dd941996 staging: wilc1000: remove code for HOST_IF_MSG_DEL_ALL_RX_BA_SESSIONS
The function that sent this message id was previously removed.
Finish the cleanup by removing the call to the message handler,
the message handler, and the #define.

Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 22:31:42 -08:00
Chaehyun Lim 90f209daa4 staging: wilc1000: rename u16reason in disconnect_info
This patch renames u16reason to reason to remove u16 prefix. There is no
need to use prefix to show data type.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 22:30:09 -08:00
Chaehyun Lim bb76df5a44 staging: wilc1000: rename struct tstrDisconnectNotifInfo
This patch renames struct tstrDisconnectNotifInfo to disconnect_info to
avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 22:30:09 -08:00
Chaehyun Lim 134b4cf2d5 staging: wilc1000: rename u16ConnectStatus in struct connect_info
This patch renames u16ConnectStatus to status to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 22:30:09 -08:00
Chaehyun Lim 3e7477c240 staging: wilc1000: rename u16RespIEsLen in struct connect_info
This patch renames u16RespIEsLen to resp_ies_len to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 22:30:09 -08:00
Chaehyun Lim 61e1326ff6 staging: wilc1000: rename pu8RespIEs in struct connect_info
This patch renames pu8RespIEs to resp_ies to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 22:30:09 -08:00
Chaehyun Lim 4607f9ccbb staging: wilc1000: rename ReqIEsLen in struct connec_info
This patch renames ReqIEsLen to req_ies_len to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 22:30:09 -08:00
Chaehyun Lim 4ff4857076 staging: wilc1000: rename pu8ReqIEs in struct connect_info
This patch renames pu8ReqIEs to req_ies to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 22:30:09 -08:00
Chaehyun Lim d4a24e082b staging: wilc1000: rename au8bssid in struct connect_info
This patch renames au8bssid to bssid to remove au8 prefix in struct
connect_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-25 22:30:09 -08:00
Chaehyun Lim 3b0437e18a staging: wilc1000: rename struct tstrConnectInfo
This patch renames struct tstrConnectInfo to connect_info to avoid
camelcase and removes typedef.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 22:30:09 -08:00
Bhaktipriya Shridhar 0c9e21d397 staging: wilc1000: Remove useless return variables
This patch removes unnecessary return variables and compresses the
return logic.
The coccinelle script that finds and fixes this issue is:

@@ type T; identifier i,f; constant C; @@
- T i;
...when != i
when strict
( return -C;
|
- i =
+ return
f(...);
- return i;
)

Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 22:29:41 -08:00
Tony Cho 4b1e380bdb staging: wilc1000: wilc_wlan.c: remove multiple blank line
This patch removes the multiple blank line reported by checkpatch.pl.

Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 22:29:41 -08:00
Tony Cho 06f3e89332 staging: wilc1000: wilc_wlan.c: remove unnecessary blank lines
This patch removes unnecessary blank lines found by checkpatch.pl.

Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 22:29:41 -08:00
Leo Kim 79f7dfa549 staging: wilc1000: Revert "staging: wilc1000: remove spaces around '->'"
This reverts commit 6c2ab2398b ("staging: wilc1000: remove spaces around '->'").
It had applied from a incorrectly commit a1b56a4c50
("staging: wilc1000: wilc_wfi_cfgoperations.c: removes unnecessary log messages").

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 22:29:05 -08:00
Leo Kim eed9e5439f staging: wilc1000: removes unnecessary retry 3 times
This patch removes unnecessary retry 3 times and related variable.
Actually the retry 3 times sentence, don't retry at all.
Repeats conditions are that until read a chip-id and written a register.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 22:29:05 -08:00
Chaehyun Lim cdc6cd28ed staging: wilc1000: handle_cfg_param: remove unnecessary whitespace
This patch removes unnecessary whitespace before a quoted newline found
by checkpatch
WARNING: unnecessary whitespace before a quoted newline

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 22:28:33 -08:00
Chaehyun Lim 940d43d93d staging: wilc1000: handle_cfg_param: fix line over 80 characters
This patch fixes line over 80 characters found by checkpatch
WARNING: line over 80 characters

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 22:28:33 -08:00
Chaehyun Lim ae9106aa28 staging: wilc1000: handle_cfg_param: fix logical continuations
This patch fixes logical continuations found by checkpatch
CHECK: Logical continuations should be on the previous line

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 22:28:33 -08:00
Chaehyun Lim 44a4db1d35 staging: wilc1000: handle_cfg_param: rename wid_cnt
wid_cnt variable is used as indicating array index of struct wid_list.
This patch renames wid_cnt to i that makes more readability.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 22:28:33 -08:00
Chaehyun Lim 2746ca0866 staging: wilc1000: handle_cfg_param: change data type of wid_cnt
This patch changes data type of wid_cnt from u8 to int.
This variable uses array index of struct wid_list so that it is better
to use int type.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 22:28:33 -08:00
Chaehyun Lim a5f0fb5cab staging: wilc1000: handle_cfg_param: remove wrapper struct cfg_param_attr
This struct just wrap struct cfg_param_val. There is no other member
except struct cfg_param_val.
This patch remove struct cfg_param_attr, then struct cfg_param_val is
renamed to struct cfg_param_attr.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 22:28:33 -08:00
Chaehyun Lim 3027eafdf8 staging: wilc1000: handle_set_mac_address: fix missing blank line after declaration
commit 31cc9885e7 ("staging: wilc1000: handle_set_mac_address: use kmemdup")
introduces a new checkpatch warning, so this patch fixes it.

WARNING: Missing a blank line after declarations
FILE: drivers/staging/wilc1000/host_interface.c:430:

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 22:28:33 -08:00
Bhumika Goyal b93656182e Staging: lustre: lov: Use list_for_each_entry instead of list_for_each
Use list_for_each_entry instead of list_for_each and list_entry as it
simplifies the code. Done using coccinelle:

@@
type T,T2;
identifier I1,I2;
expression e1,e2;
iterator name list_for_each_entry;
iterator name list_for_each;
@@

- T *I1;
...
- list_for_each(I1,e1)
+ list_for_each_entry(I2,e1,e2)
{
...when!=T *I1;
- I2=list_entry(I1,T2,e2);
...
}
...when!=I2;

@@
type T,T2,T3;
identifier I1,I2,I3;
expression e1,e2;
@@

- T *I1;
+ T3 *I3;
...
- list_for_each(I1,e1)
+ list_for_each_entry(I3,e1,e2)
{
...when!=T *I1;
- T3 *I3=list_entry(I1,T2,e2);
...
}
...when!=I3;

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 22:21:20 -08:00
Anchal Jain 1bf28ba7d6 staging: lustre: lustre: Remove unnecessary pair of braces {}
For single statment of if not required
a braces {}.

Signed-off-by: Anchal Jain <anchalj109@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 22:18:37 -08:00
Amitoj Kaur Chawla 6104248620 staging: lustre: libcfs: Remove comparison with zero
Replace comparison with zero with ! operator.

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 22:18:11 -08:00
Amitoj Kaur Chawla 4d163b4938 staging: lustre: libcfs: Remove unnecessary braces
Removed unncessary braces from the if-else block to remove the
following checkpatch.pl warning:
WARNING: braces {} are not necessary for any arm of this statement

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 22:18:11 -08:00
Amitoj Kaur Chawla 4d2a71d02b staging: lustre: libcfs: Use swap() in cfs_hash_bd_order()
Use swap() function instead of using a temporary variable for swapping
two variables.

The Coccinelle semantic patch used to make this change is as follows:
//<smpl>
@@
type T;
T a,b,c;
@@
- a = b;
- b = c;
- c = a;
+ swap(b, c);
//<smpl>

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 22:18:11 -08:00
Dmitry Eremin cb77659272 staging/lustre: proper support of NFS anonymous dentries
NFS can ask to encode dentries that are not connected to the root.
The fix check for parent is NULL and encode a file handle accordingly.

Reviewed-on: http://review.whamcloud.com/8347
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4231
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Acked-by: Jeff Layton <jlayton@poochiereds.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 22:12:26 -08:00
Amitoj Kaur Chawla 020ecc6f32 staging: lustre: llite: Remove IS_ERR tests
ll_iget() has been modified to always return NULL in case of error and
not a ERR_PTR.

Consequently, remove unnecessary IS_ERR tests as now ll_iget()
function can never return a ERR_PTR.

Additionally, reinitialising root and inode to NULL has been removed
since they have already been tested for the same.

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 22:11:01 -08:00
Oleg Drokin b1752e864f staging/lustre: Remove unused members of struct ll_sb_info
ll_orphan_dentry_list and ll_conn_chain are not used
and could be removed.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 22:08:59 -08:00
Oleg Drokin dc78bf9bb7 staging/lustre: Remove commented out obd functions
obd_register_page_removal_cb, obd_unregister_page_removal_cb
obd_register_lock_cancel_cb, obd_unregister_lock_cancel_cb

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 22:08:59 -08:00
Oleg Drokin 72a87fca41 staging/lustre: Remove stray space before newline in messages
There were some messages in Lustre that ended with a space followed by
a newline which is pointless, so remove the extra spaces.
Found with checkpatch.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 22:08:59 -08:00
Oleg Drokin defa220fad staging/lustre: Fix indentation mistakes
none look like bugs or bugs-inducing, mostly just
off by a couple of spaces all around.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 22:08:59 -08:00
Oleg Drokin dadfcdab43 staging/lustre/ptlrpc: Adjust comments to better conform to coding style
This patch fixes "Block comments use a trailing */ on a separate line"
warnings from checkpatch

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 22:08:59 -08:00
Oleg Drokin 30aa9c5262 staging/lustre/osc: Adjust comments to better conform to coding style
This patch fixes "Block comments use a trailing */ on a separate line"
warnings from checkpatch

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 22:08:59 -08:00