openwrt/staging/blogic.git
9 years agostaging/lustre: Remove references to OBD_ALLOC/FREE* in comments
Oleg Drokin [Wed, 16 Sep 2015 16:26:58 +0000 (12:26 -0400)]
staging/lustre: Remove references to OBD_ALLOC/FREE* in comments

Since everything is now supposed to use regular kernel alloc and
free functions.

Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre/obdclass: replace OBD_ALLOC_GFP with kzalloc
Oleg Drokin [Wed, 16 Sep 2015 16:26:57 +0000 (12:26 -0400)]
staging/lustre/obdclass: replace OBD_ALLOC_GFP with kzalloc

Part of getting rid of custom Lustre allocation macros.

Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre/llite: Get rid of OBD_ALLOC/FREE_PTR
Oleg Drokin [Wed, 16 Sep 2015 16:26:56 +0000 (12:26 -0400)]
staging/lustre/llite: Get rid of OBD_ALLOC/FREE_PTR

The remaining users in ll_open_cleanup and obd_mod_alloc
are converted to regular kzalloc/kfree.

Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre: Remove users of OBD_ALLOC/FREE_PTR lu_object.h
Oleg Drokin [Wed, 16 Sep 2015 16:26:55 +0000 (12:26 -0400)]
staging/lustre: Remove users of OBD_ALLOC/FREE_PTR lu_object.h

These are converted to regular kzalloc/kfree calls.

Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre: Remove unused OBD_CPT_ALLOC* macros
Oleg Drokin [Wed, 16 Sep 2015 16:26:54 +0000 (12:26 -0400)]
staging/lustre: Remove unused OBD_CPT_ALLOC* macros

OBD_CPT_ALLOC and friends are no longer used, so remove them.

Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre: Remove unused OBD_VMALLOC
Oleg Drokin [Wed, 16 Sep 2015 16:26:53 +0000 (12:26 -0400)]
staging/lustre: Remove unused OBD_VMALLOC

These macros are not used anymore, so let's remove them,
also __OBD_VMALLOC_VEROBSE and OBD_CPT_VMALLOC

Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre: Remove OBD_CPT_ALLOC_LARGE
Oleg Drokin [Wed, 16 Sep 2015 16:26:52 +0000 (12:26 -0400)]
staging/lustre: Remove OBD_CPT_ALLOC_LARGE

Remove OBD_CPT_ALLOC_LARGE define and convert the only user to
libcfs_kvzalloc_cpt.

Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wilc1000: wilc_wfi_cfgoperations.h: align defines
Chaehyun Lim [Tue, 15 Sep 2015 05:06:28 +0000 (14:06 +0900)]
staging: wilc1000: wilc_wfi_cfgoperations.h: align defines

This patch fix alignment of some defines in wilc_wfi_cfgoperations.h

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wilc1000: remove if defined codes of FORCE_P2P_CLIENT
Chaehyun Lim [Tue, 15 Sep 2015 05:06:27 +0000 (14:06 +0900)]
staging: wilc1000: remove if defined codes of FORCE_P2P_CLIENT

This patch removes if defined codes of FORCE_P2P_CLIENT.
This macro is deleted because it it commented out.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wilc1000: remove FORCE_P2P_CLIENT
Chaehyun Lim [Tue, 15 Sep 2015 05:06:26 +0000 (14:06 +0900)]
staging: wilc1000: remove FORCE_P2P_CLIENT

This patch removes FORCE_P2P_CLIENT that is commented.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wilc1000: remove if defined codes of USE_SUPPLICANT_GO_INTENT
Chaehyun Lim [Tue, 15 Sep 2015 05:06:25 +0000 (14:06 +0900)]
staging: wilc1000: remove if defined codes of USE_SUPPLICANT_GO_INTENT

This patch removes if defined codes of USE_SUPPLICANT_GO_INTENT.
This macro is deleted because it is commented out.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wilc1000: remove USE_SUPPLICANT_GO_INTENT
Chaehyun Lim [Tue, 15 Sep 2015 05:06:24 +0000 (14:06 +0900)]
staging: wilc1000: remove USE_SUPPLICANT_GO_INTENT

This patch removes USE_SUPPLICANT_GO_INTENT macro that is commented.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wilc1000: fix alignment of enum
Chaehyun Lim [Tue, 15 Sep 2015 05:06:23 +0000 (14:06 +0900)]
staging: wilc1000: fix alignment of enum

This patch fix alignment of enum.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wilc1000: fix alignment of defines
Chaehyun Lim [Tue, 15 Sep 2015 05:06:22 +0000 (14:06 +0900)]
staging: wilc1000: fix alignment of defines

This patch fix alignment of defines.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wilc1000: remove unused defines
Chaehyun Lim [Tue, 15 Sep 2015 05:06:21 +0000 (14:06 +0900)]
staging: wilc1000: remove unused defines

The macros are not used anywhere in this driver, so just delete it.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wilc1000: remove bit shift macro that is custom defined
Chaehyun Lim [Tue, 15 Sep 2015 05:06:20 +0000 (14:06 +0900)]
staging: wilc1000: remove bit shift macro that is custom defined

This patch remove bit shift macro that is custom defined, then it is
replaced BIT(x) macro.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wilc1000: use BIT macro
Chaehyun Lim [Tue, 15 Sep 2015 05:06:19 +0000 (14:06 +0900)]
staging: wilc1000: use BIT macro

This patch replaces bit shift with BIT(x) macro.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wilc1000: remove useless extern declarations
Chaehyun Lim [Tue, 15 Sep 2015 05:06:18 +0000 (14:06 +0900)]
staging: wilc1000: remove useless extern declarations

This patch removes useless extern declarations. This function is not
existed in the driver.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wilc1000: remove commented codes
Chaehyun Lim [Tue, 15 Sep 2015 05:06:17 +0000 (14:06 +0900)]
staging: wilc1000: remove commented codes

This patch removes commented codes.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wilc1000: use u32 instead of uint32_t
Chaehyun Lim [Tue, 15 Sep 2015 05:06:16 +0000 (14:06 +0900)]
staging: wilc1000: use u32 instead of uint32_t

This patch replaces uint32_t with u32 that is a preferred kernel type.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wilc1000: use u16 instead of uint16_t
Chaehyun Lim [Tue, 15 Sep 2015 05:06:15 +0000 (14:06 +0900)]
staging: wilc1000: use u16 instead of uint16_t

This patch replaces uint16_t with u16 that is preferred kernel type.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wilc1000: use u8 instead of uint8_t
Chaehyun Lim [Tue, 15 Sep 2015 05:06:14 +0000 (14:06 +0900)]
staging: wilc1000: use u8 instead of uint8_t

This patch replaces uint8_t with u8 that is a preferred kernel type.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wilc1000: rename WILC_WFI_priv
Chaehyun Lim [Tue, 15 Sep 2015 05:06:13 +0000 (14:06 +0900)]
staging: wilc1000: rename WILC_WFI_priv

This patch replaces WILC_WFI_priv with wilc_priv to avoid CamelCase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wilc1000: rename WILC_WFI_cfg80211_ops
Chaehyun Lim [Tue, 15 Sep 2015 05:06:12 +0000 (14:06 +0900)]
staging: wilc1000: rename WILC_WFI_cfg80211_ops

This patch replaces WILC_WFI_cfg80211_ops with wilc_cfg80211_ops to
avoid CamelCase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wilc1000: remove duplicated include
Chaehyun Lim [Tue, 15 Sep 2015 05:06:11 +0000 (14:06 +0900)]
staging: wilc1000: remove duplicated include

wilc_wfi_cfgoperations.h and linux_wlan_common.h are included as
duplicated in linux_wlan.c.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/rtl8192u: remove unused function
Nicolas Joseph [Tue, 15 Sep 2015 09:35:20 +0000 (11:35 +0200)]
staging/rtl8192u: remove unused function

Remove unused function N_DBPSOfRate. This function was only used by
function ComputeTxTime that was removed in the previous
commit 742728f97a99 ("staging: rtl8192u: remove unused function.")

Signed-off-by: Nicolas Joseph <nicolas.joseph@homecomputing.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: fix memory leak
Sudip Mukherjee [Tue, 15 Sep 2015 11:52:28 +0000 (17:22 +0530)]
staging: rtl8192e: fix memory leak

If the size of the firmware is not as expected then we are jumping to the
error path but we missed releasing the firmware.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agodrivers: staging: wilc1000: Add check for SPI availability
Chandra S Gorentla [Tue, 15 Sep 2015 12:39:51 +0000 (18:09 +0530)]
drivers: staging: wilc1000: Add check for SPI availability

NULL pointer deference is observed in the wilc1000.ko module
with bus type SPI and when SPI is not ready.

Signed-off-by: Chandra S Gorentla <csgorentla@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wilc1000: remove definition WILC_IS_ERR
Leo Kim [Tue, 15 Sep 2015 02:53:35 +0000 (11:53 +0900)]
staging: wilc1000: remove definition WILC_IS_ERR

This patch removes the definition WILC_IS_ERR which is not used anymore.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoIB/hfi1: fix copy_to/from_user() error handling
Dan Carpenter [Tue, 15 Sep 2015 10:35:25 +0000 (13:35 +0300)]
IB/hfi1: fix copy_to/from_user() error handling

copy_to/from_user() returns the number of bytes which we were not able
to copy.  It doesn't return an error code.

Also a couple places had a printk() on error and I removed that because
people can take advantage of it to fill /var/log/messages with spam.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Mike Marciniszyn <infinipath@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agohfi1: drop null test before destroy functions
Julia Lawall [Sun, 13 Sep 2015 12:15:04 +0000 (14:15 +0200)]
hfi1: drop null test before destroy functions

Remove unneeded NULL test.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@ expression x; @@
-if (x != NULL)
  \(kmem_cache_destroy\|mempool_destroy\|dma_pool_destroy\)(x);
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Cc: Mike Marciniszyn <infinipath@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rlt8192u: Remove spaces at the start of lines
Mike Dupuis [Mon, 14 Sep 2015 06:42:58 +0000 (22:42 -0800)]
Staging: rlt8192u: Remove spaces at the start of lines

This is a patch to remove spaces at the start of lines in
ieee80211_softmac_wx.c.

Signed-off-by: Mike Dupuis <mike.dupuis.0@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl8192u: do not use C99 // comments
Mike Dupuis [Mon, 14 Sep 2015 06:42:53 +0000 (22:42 -0800)]
Staging: rtl8192u: do not use C99 // comments

This is a patch to convert C99-style comments to C89-style comments in
ieee80211_softmac_wx.c.

Signed-off-by: Mike Dupuis <mike.dupuis.0@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl8192u: suspect code indent for conditional statment
Mike Dupuis [Mon, 14 Sep 2015 06:42:49 +0000 (22:42 -0800)]
Staging: rtl8192u: suspect code indent for conditional statment

This is a patch to correct an improperly indented block of code in
ieee80211_softmac_wx.c

Signed-off-by: Mike Dupuis <mike.dupuis.0@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl8192u: space required before open parentheses
Mike Dupuis [Mon, 14 Sep 2015 06:42:44 +0000 (22:42 -0800)]
Staging: rtl8192u: space required before open parentheses

This is a patch to add spaces where required before open parentheses in
ieee80211_softmac_wx.c

Signed-off-by: Mike Dupuis <mike.dupuis.0@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: wilc1000: Use NULL instead of zero
Ronit Halder [Mon, 14 Sep 2015 05:33:34 +0000 (11:03 +0530)]
Staging: wilc1000: Use NULL instead of zero

This patch fixes the warning generated by sparse
"Using plain integer as NULL pointer" by using NULL
instead of zero.

Signed-off-by: Ronit halder <ronit.crj@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wilc1000: off by one in get_handler_from_id()
Dan Carpenter [Tue, 15 Sep 2015 06:54:33 +0000 (09:54 +0300)]
staging: wilc1000: off by one in get_handler_from_id()

The > should be >= here or we read beyond the end of the array.

Fixes: d42ab0838d04 ('staging: wilc1000: use id value as argument')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: ft1000: code style cleanup
Lucas Georges [Mon, 14 Sep 2015 14:52:35 +0000 (16:52 +0200)]
staging: ft1000: code style cleanup

There was a stray '*' in a comment block.

Signed-off-by: Lucas Georges <lucas.georges@outlook.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: lustre: lustre: lov: lov_dev.c: Added missing blank line
Sakshi Vaid [Mon, 14 Sep 2015 15:29:24 +0000 (20:59 +0530)]
Staging: lustre: lustre: lov: lov_dev.c: Added missing blank line

line 158: WARNING: Missing a blank line after declarations
line 183: WARNING: Missing a blank line after declarations

Added a missing blank line after declartions.

Signed-off-by: Sakshi Vaid <sakshivaid95@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre/ptlrpc: make ptlrpcd threads cpt-aware
Olaf Weber [Mon, 14 Sep 2015 22:41:35 +0000 (18:41 -0400)]
staging/lustre/ptlrpc: make ptlrpcd threads cpt-aware

On NUMA systems, the placement of worker threads relative to the
memory they use greatly affects performance. The CPT mechanism can be
used to constrain a number of Lustre thread types, and this change
makes it possible to configure the placement of ptlrpcd threads in a
similar manner.

To simplify the code changes, the global structures used to manage
ptlrpcd threads are changed to one per CPT. In particular this means
there will be one ptlrpcd recovery thread per CPT.

To prevent ptlrpcd threads from wandering all over the system, all
ptlrpcd thread are bound to a CPT. Note that some CPT configuration
is always created, but the defaults are not likely to be correct for
a NUMA system. After discussing the options with Liang Zhen we
decided that we would not bind ptlrpcd threads to specific CPUs,
and rather trust the kernel scheduler to migrate ptlrpcd threads.

With all ptlrpcd threads bound to a CPT, but not to specific CPUs,
the load policy mechanism can be radically simplified:

- PDL_POLICY_LOCAL and PDL_POLICY_ROUND are currently identical.
- PDL_POLICY_ROUND, if fully implemented, would cost us the locality
  we are trying to achieve, so most or all calls using this policy
  would have to be changed to PDL_POLICY_LOCAL.
- PDL_POLICY_PREFERRED is not used, and cannot be implemented without
  binding ptlrpcd threads to individual CPUs.
- PDL_POLICY_SAME is rarely used, and cannot be implemented without
  binding ptlrpcd threads to individual CPUs.

The partner mechanism is also updated, because now all ptlrpcd
threads are "bound" threads. The only difference between the various
bind policies, PDB_POLICY_NONE, PDB_POLICY_FULL, PDB_POLICY_PAIR, and
PDB_POLICY_NEIGHBOR, is the number of partner threads. The bind
policy is replaced with a tunable that directly specifies the size of
the groups of ptlrpcd partner threads.

Ensure that the ptlrpc_request_set for a ptlrpcd thread is created on
the same CPT that the thread will work on. When threads are bound to
specific nodes and/or CPUs in a NUMA system, it pays to ensure that
the datastructures used by these threads are also on the same node.

Visible changes:

* ptlrpcd thread names include the CPT number, for example
  "ptlrpcd_02_07". In this case the "07" is relative to the CPT, and
  not a CPU number.

Tunables added:

* ptlrpcd_cpts (string): A CPT string describing the CPU partitions
  that ptlrpcd threads should run on. Used to make ptlrpcd threads
  run on a subset of all CPTs.

* ptlrpcd_per_cpt_max (int): The maximum number of ptlrpcd threads
  to run in a CPT.

* ptlrpcd_partner_group_size (int): The desired number of threads
  in each ptlrpcd partner thread group. Default is 2, corresponding
  to the old PDB_POLICY_PAIR. A negative value makes all ptlrpcd
  threads in a CPT partners of each other.

Tunables obsoleted:

* max_ptlrpcds: The new ptlrcpd_per_cpt_max can be used to obtain the
  same effect.

* ptlrpcd_bind_policy: The new ptlrpcd_partner_group_size can be used
  to obtain the same effect.

Internal interface changes:

* pdb_policy_t and related code have been removed. Groups of partner
  ptlrpcd threads are still created, and all threads in a partner
  group are bound on the same CPT. The ptlrpcd threads bound to a
  CPT are typically divided into several partner groups. The partner
  groups on a CPT all have an equal number of ptlrpcd threads.

* pdl_policy_t and related code have been removed. Since ptlrpcd
  threads are not bound to a specific CPU, all the code that avoids
  scheduling on the current CPU (or attempts to do so) has been
  removed as non-functional. A simplified form of PDL_POLICY_LOCAL
  is kept as the only load policy.

* LIOD_BIND and related code have been removed. All ptlrpcd threads
  are now bound to a CPT, and no additional binding policy is
  implemented.

* ptlrpc_prep_set(): Changed to allocate a ptlrpc_request_set
  on the current CPT.

* ptlrpcd(): If an error is encountered before entering the main loop
  store the error in pc_error before exiting.

* ptlrpcd_start(): Check pc_error to verify that the ptlrpcd thread
  has successfully entered its main loop.

* ptlrpcd_init(): Initialize the struct ptlrpcd_ctl for all threads
  for a CPT before starting any of them. This closes a race during
  startup where a partner thread could reference a non-initialized
  struct ptlrpcd_ctl.

Signed-off-by: Olaf Weber <olaf@sgi.com>
Reviewed-on: http://review.whamcloud.com/13972
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6325
Reviewed-by: Grégoire Pichon <gregoire.pichon@bull.net>
Reviewed-by: Stephen Champion <schamp@sgi.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre/libcfs: remove unused cfs_timer_done
James Simmons [Mon, 14 Sep 2015 22:41:34 +0000 (18:41 -0400)]
staging/lustre/libcfs: remove unused cfs_timer_done

Remove the cfs_timer_done function in the libcfs
kernel module since it is not used anywhere.

Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Signed-off-by: frank zago <fzago@cray.com>
Reviewed-on: http://review.whamcloud.com/13917
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre/o2iblnd: leak cmid in kiblnd_dev_need_failover
Liang Zhen [Mon, 14 Sep 2015 22:41:33 +0000 (18:41 -0400)]
staging/lustre/o2iblnd: leak cmid in kiblnd_dev_need_failover

cmid created by kiblnd_dev_need_failover should always be destroyed,
however it is not the case in current implementation and we will leak
cmid when this function detected a device failover.

Signed-off-by: Liang Zhen <liang.zhen@intel.com>
Reviewed-on: http://review.whamcloud.com/14603
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6480
Reviewed-by: Isaac Huang <he.huang@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre/osc: use global osc_rq_pool to reduce memory usage
Li Xi [Mon, 14 Sep 2015 22:41:32 +0000 (18:41 -0400)]
staging/lustre/osc: use global osc_rq_pool to reduce memory usage

The per-osc request pools consume a lot of memory if there are
hundreds of OSCs on one client. This will be a critical problem
if the client doesn't have sufficient memory for both OSCs and
applications.

This patch replaces per-osc request pools with a global pool
osc_rq_pool. The total memory usage is 5MB by default. And it
can be set by a module parameter of OSC:
"options osc osc_reqpool_mem_max=POOL_SIZE". The unit of POOL_SIZE
is MB. If cl_max_rpcs_in_flight is the same for all OSCs, the
memory usage of the OSC pool can be calculated as:
Min(POOL_SIZE * 1M,
    (cl_max_rpcs_in_flight + 2) * OSC number * OST_MAXREQSIZE)

Also, this patch changes the allocation logic of OSC write requests.
The allocation from osc_rq_pool will only be tried after normal
allocation failed.

Signed-off-by: Wu Libin <lwu@ddn.com>
Signed-off-by: Wang Shilong <wshilong@ddn.com>
Signed-off-by: Li Xi <lixi@ddn.com>
Reviewed-on: http://review.whamcloud.com/15422
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6770
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre: Remove unused MAY_ constants
Ben Evans [Mon, 14 Sep 2015 22:41:31 +0000 (18:41 -0400)]
staging/lustre: Remove unused MAY_ constants

Remove unused MAY_ constants from lustre_idl.h

Signed-off-by: Ben Evans <bevans@cray.com>
Reviewed-on: http://review.whamcloud.com/15398
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6450
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre/obdclass: Eliminate hash bucket scans in lu_cache_shrink
Ann Koehler [Mon, 14 Sep 2015 22:41:30 +0000 (18:41 -0400)]
staging/lustre/obdclass: Eliminate hash bucket scans in lu_cache_shrink

The lu_cache_shrink slab shrinker is too slow, accounting for > 90% of
the time spent in shrink_slab when allocating huge pages. Most of its
time is spent iterating over the buckets in each site's object hash
table to compute the number of freeable objects. This iteration is
eliminated by adding an lru length count to the lu_site struct. A
percpu counter is used to maintain the lru length, so that the
lu_site does not need to be locked when an object is accessed through
the hash table. A counter is updated whenever an object is added to
or deleted from any of the hash table buckets. The number of freeable
objects is the sum of the counter values across all cpus.

Signed-off-by: Ann Koehler <amk@cray.com>
Reviewed-on: http://review.whamcloud.com/14066
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6365
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre/llite: ASSERTION( atomic_read(&d->ld_ref) == 0 ) failed
Andrew Perepechko [Mon, 14 Sep 2015 22:41:29 +0000 (18:41 -0400)]
staging/lustre/llite: ASSERTION( atomic_read(&d->ld_ref) == 0 ) failed

ll_iget_for_nfs() can call unbalanced iput() causing memory
leaks. This patch removes this iput() call.

Also, avoid unhashing disconnected dentries in
d_lustre_invalidate(), which is another source of memory
leaks.

One of the symptoms of the leak is the following crash pattern:
LustreError: 14812:0:(lu_object.c:1251:lu_device_fini())
 ASSERTION( atomic_read(&d->ld_ref) == 0 ) failed: Refcount is 1
LustreError: 14812:0:(lu_object.c:1251:lu_device_fini()) LBUG
Pid: 14812, comm: umount

Call Trace:
 [<ffffffffa11bc895>] libcfs_debug_dumpstack+0x55/0x80 [libcfs]
 [<ffffffffa11bce97>] lbug_with_loc+0x47/0xb0 [libcfs]
 [<ffffffffa1458a48>] lu_device_fini+0xb8/0xc0 [obdclass]
 [<ffffffffa08e9ab2>] lovsub_device_free+0x52/0x220 [lov]
 [<ffffffffa145c64e>] lu_stack_fini+0x7e/0xc0 [obdclass]
 [<ffffffffa146356e>] cl_stack_fini+0xe/0x10 [obdclass]
 [<ffffffffa08bc1a8>] lov_device_fini+0x58/0x120 [lov]
 [<ffffffffa145c619>] lu_stack_fini+0x49/0xc0 [obdclass]
 [<ffffffffa146356e>] cl_stack_fini+0xe/0x10 [obdclass]
 [<ffffffffa0e1279d>] cl_sb_fini+0x6d/0x190 [lustre]
 [<ffffffffa0dd34bc>] ll_put_super+0x1bc/0x11e0 [lustre]
 [<ffffffff811cd0f2>] ? fsnotify_clear_marks_by_inode+0x32/0xf0
 [<ffffffff811a59df>] ? destroy_inode+0x2f/0x60
 [<ffffffff811a5eac>] ? dispose_list+0xfc/0x120
 [<ffffffff811a62a6>] ? invalidate_inodes+0xf6/0x190
 [<ffffffff8118b35b>] generic_shutdown_super+0x5b/0xe0
 [<ffffffff8118b446>] kill_anon_super+0x16/0x60
 [<ffffffffa144e7ba>] lustre_kill_super+0x4a/0x60 [obdclass]
 [<ffffffff8118bbe7>] deactivate_super+0x57/0x80
 [<ffffffff811aabef>] mntput_no_expire+0xbf/0x110
 [<ffffffff811ab73b>] sys_umount+0x7b/0x3a0
 [<ffffffff8100b072>] system_call_fastpath+0x16/0x1b

Signed-off-by: Andrew Perepechko <andrew.perepechko@seagate.com>
Reviewed-on: http://review.whamcloud.com/15480
Xyratex-bug-id: MRP-2414
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6794
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre/o2iblnd: wrong uses of kib_tx_t::tx_nfrags
Isaac Huang [Mon, 14 Sep 2015 22:41:28 +0000 (18:41 -0400)]
staging/lustre/o2iblnd: wrong uses of kib_tx_t::tx_nfrags

The kib_tx_t::tx_nfrags field is the # entries in
the kib_tx_t::tx_frags array, rather than # DMA
mapped entries. So kiblnd_send/kiblnd_recv should
use kib_rdma_desc_t::rd_nfrags instead.

Signed-off-by: Isaac Huang <he.huang@intel.com>
Reviewed-on: http://review.whamcloud.com/12857
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5956
Reviewed-by: Liang Zhen <liang.zhen@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre/lnet: fix deadloop in ksocknal_push
Liang Zhen [Mon, 14 Sep 2015 22:41:27 +0000 (18:41 -0400)]
staging/lustre/lnet: fix deadloop in ksocknal_push

ksocknal_push() should break the loop if it can't find matching peer

Signed-off-by: Liang Zhen <liang.zhen@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4423
Reviewed-on: http://review.whamcloud.com/10128
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: Isaac Huang <he.huang@intel.com>
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre/libcfs: minor fix in cfs_hash_for_each_relax()
Niu Yawei [Mon, 14 Sep 2015 22:41:26 +0000 (18:41 -0400)]
staging/lustre/libcfs: minor fix in cfs_hash_for_each_relax()

cfs_hash_for_each_relax() should break iteration when callback
returns non-zero value.

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-on: http://review.whamcloud.com/14927
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6636
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Liang Zhen <liang.zhen@intel.com>
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre/osc: LBUG in osc_lru_reclaim
Hiroya Nozaki [Mon, 14 Sep 2015 22:41:25 +0000 (18:41 -0400)]
staging/lustre/osc: LBUG in osc_lru_reclaim

LASSERT touches cl_client_cache->ccc_lru without any protection.
So this patch the LASSERT moves to the section protected by
cl_client_cache->ccc_lru_lock

Signed-off-by: Hiroya Nozaki <nozaki.hiroya@jp.fujitsu.com>
Reviewed-on: http://review.whamcloud.com/14901
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6624
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre/o2iblnd: connection refcount fix for kiblnd_post_rx
Liang Zhen [Mon, 14 Sep 2015 22:41:24 +0000 (18:41 -0400)]
staging/lustre/o2iblnd: connection refcount fix for kiblnd_post_rx

kiblnd_post_rx() can't refer to rx::rx_conn anymore after
ib_post_recv() because this rx can be polled out by another thread
which may drop this rx and destroy rx::rx_conn.

This patch fixes this issue by taking an extra refcount on connection
before calling ib_post_recv().

Signed-off-by: Liang Zhen <liang.zhen@intel.com>
Reviewed-on: http://review.whamcloud.com/12852
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5678
Reviewed-by: Isaac Huang <he.huang@intel.com>
Reviewed-by: Amir Shehata <amir.shehata@intel.com>
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre/llite: deny non-root user for changelog operations
Niu Yawei [Mon, 14 Sep 2015 22:41:23 +0000 (18:41 -0400)]
staging/lustre/llite: deny non-root user for changelog operations

To avoid potential security problems, non-privileged users should
have no permission to run 'lfs changelog' & 'lfs changelog_clear'.

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-on: http://review.whamcloud.com/14280
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6415
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre/lmv: fix potential null pointer dereference
Oleg Drokin [Mon, 14 Sep 2015 22:41:22 +0000 (18:41 -0400)]
staging/lustre/lmv: fix potential null pointer dereference

In lmv_disconnect_mdc do procfs removal only if we actually know the name.

Reviewed-on: http://review.whamcloud.com/14605
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6517
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre/ptlrpc: remove LUSTRE_MSG_MAGIC_V1 support
Andreas Dilger [Mon, 14 Sep 2015 22:41:21 +0000 (18:41 -0400)]
staging/lustre/ptlrpc: remove LUSTRE_MSG_MAGIC_V1 support

Remove the remains of LUSTRE_MSG_MAGIC_V1 support from ptlrpc.
It has not been supported since 1.8 and is not functional since 2.0.

In lustre_msg_check_version(), return an error for unsupported RPC
versions so that the server will reject such RPCs early.  Otherwise
the server only prints an error message and continue on.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-on: http://review.whamcloud.com/14007
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6349
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre/llite: strengthen checks for hsm flags and archive id
Bruno Faccini [Mon, 14 Sep 2015 22:41:20 +0000 (18:41 -0400)]
staging/lustre/llite: strengthen checks for hsm flags and archive id

Prior to this patch undefined flags bits and out of range
archive id can be set.

Signed-off-by: Bruno Faccini <bruno.faccini@intel.com>
Reviewed-on: http://review.whamcloud.com/13337
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5757
Reviewed-by: frank zago <fzago@cray.com>
Reviewed-by: Henri Doreau <henri.doreau@cea.fr>
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre/llite: cleanup open handle for client open failure
Fan Yong [Mon, 14 Sep 2015 22:41:19 +0000 (18:41 -0400)]
staging/lustre/llite: cleanup open handle for client open failure

For open case, the client side open handling thread may hit error
after the MDT grant the open. Under such case, the client should
send close RPC to the MDT as cleanup; otherwise, the open handle
on the MDT will be leaked there until the client umount or evicted.

If the LFSCK marks LU_OBJECT_HEARD_BANSHEE on the MDT-object that is
opened by others for repairing some inconsistency, such as repairing
multiple-referenced OST-object, because the leaked open handle still
references the MDT-object, then it will block the subsequent threads
that want to locate such object via FID.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Reviewed-on: http://review.whamcloud.com/13709
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6301
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre/obdclass: reorganize busy object accounting
Frank Zago [Mon, 14 Sep 2015 22:41:18 +0000 (18:41 -0400)]
staging/lustre/obdclass: reorganize busy object accounting

Due to some accounting bug, lsb_busy of a hash bucket can become
larger than the total number of objects in said bucket. A busy object
can be counted more than once. When that happens, a negative value is
returned by the shrinker callback.

Instead of trying (and failing) to count the busy objects, count the
objects than are not busy, i.e. the objects that are present on the
lsb_lru list. The number of busy objects is then the difference
between the number of objects in the hash and the objects on the
lsb_lru list.

Signed-off-by: frank zago <fzago@cray.com>
Reviewed-on: http://review.whamcloud.com/12468
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5722
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre/lnet: Reenable lnet router debugfs
Oleg Drokin [Mon, 14 Sep 2015 22:41:17 +0000 (18:41 -0400)]
staging/lustre/lnet: Reenable lnet router debugfs

It looks like router proc files were defined out, so I missed them
during debugfs conversion.
Reenable the code and move all the variables to debugfs.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/rtl8188eu : Remove duplicated BIT() definitions
Anish Bhatt [Mon, 14 Sep 2015 05:00:44 +0000 (22:00 -0700)]
staging/rtl8188eu : Remove duplicated BIT() definitions

The BIT() macro is already defined in bitops.h, remove duplicate
definitions. Users of BIT() macro are expecting unsigned int/u32, so
add typecasts where this creates a build warning.

Signed-off-by: Anish Bhatt <anish@chelsio.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm750fb: ddk750_*i2c: shorten lines to under 80 characters
Mike Rapoport [Sat, 12 Sep 2015 08:07:49 +0000 (11:07 +0300)]
staging: sm750fb: ddk750_*i2c: shorten lines to under 80 characters

Fix some checkpatch warnings about long lines

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm750fb: ddk750_*i2c: remove multiple blank lines
Mike Rapoport [Sat, 12 Sep 2015 08:07:48 +0000 (11:07 +0300)]
staging: sm750fb: ddk750_*i2c: remove multiple blank lines

Fix the checkpatch warning about multiple blank lines

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm750fb: ddk750_swi2c: further reduce CamelCase
Mike Rapoport [Sat, 12 Sep 2015 08:07:47 +0000 (11:07 +0300)]
staging: sm750fb: ddk750_swi2c: further reduce CamelCase

Rename remaining CamelCase variables

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm750fb: ddk750_swi2c: rename CamelCase static variables
Mike Rapoport [Sat, 12 Sep 2015 08:07:46 +0000 (11:07 +0300)]
staging: sm750fb: ddk750_swi2c: rename CamelCase static variables

Rename static variables defining I2C GPIO pins and their control registers from
CamelCase.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm750fb: ddk750_hwi2c: reduce amount of CamelCase
Mike Rapoport [Sat, 12 Sep 2015 08:07:45 +0000 (11:07 +0300)]
staging: sm750fb: ddk750_hwi2c: reduce amount of CamelCase

Rename camel case variables deviceAddress, pBuffer and totalBytes to
addr, buf and total_bytes respectively in sm750_hw_i2c_{read,write}_data
functions.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm750fb: hw_i2c_{read,write}: rename CamelCase variables
Mike Rapoport [Sat, 12 Sep 2015 08:07:44 +0000 (11:07 +0300)]
staging: sm750fb: hw_i2c_{read,write}: rename CamelCase variables

Rename longCamelCase variables deviceAddress and registerIndex to
shorter addr and reg

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm750fb: ddk750_hw_i2c: rename busSpeedMode
Mike Rapoport [Sat, 12 Sep 2015 08:07:43 +0000 (11:07 +0300)]
staging: sm750fb: ddk750_hw_i2c: rename busSpeedMode

rename CamelCase parameter in sm750_hw_i2c_init()

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm750fb: ddk750_swi2c: rename CamelCase static functions
Mike Rapoport [Sat, 12 Sep 2015 08:07:42 +0000 (11:07 +0300)]
staging: sm750fb: ddk750_swi2c: rename CamelCase static functions

Fix the checkpatch warning about CamelCase.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm750fb: ddk750_swi2c: staticize swI2C{SCL,SDA}
Mike Rapoport [Sat, 12 Sep 2015 08:07:41 +0000 (11:07 +0300)]
staging: sm750fb: ddk750_swi2c: staticize swI2C{SCL,SDA}

swI2C{SCL,SDA} are not used outside ddk750_swi2c, make them static

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm750fb: rename swI2CWriteReg to sm750_sw_i2c_write_reg
Mike Rapoport [Sat, 12 Sep 2015 08:07:40 +0000 (11:07 +0300)]
staging: sm750fb: rename swI2CWriteReg to sm750_sw_i2c_write_reg

Fix the checkpatch warning about CamelCase.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm750fb: rename swI2CReadReg to sm750_sw_i2c_read_reg
Mike Rapoport [Sat, 12 Sep 2015 08:07:39 +0000 (11:07 +0300)]
staging: sm750fb: rename swI2CReadReg to sm750_sw_i2c_read_reg

Fix the checkpatch warning about CamelCase.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm750fb: rename swI2CInit to sm750_sw_i2c_init
Mike Rapoport [Sat, 12 Sep 2015 08:07:38 +0000 (11:07 +0300)]
staging: sm750fb: rename swI2CInit to sm750_sw_i2c_init

Fix the checkpatch warning about CamelCase.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm750fb: ddk750_hwi2c: rename CamelCase static functions
Mike Rapoport [Sat, 12 Sep 2015 08:07:37 +0000 (11:07 +0300)]
staging: sm750fb: ddk750_hwi2c: rename CamelCase static functions

Fix the checkpatch warning about CamelCase.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm750fb: rename hwI2CWriteReg to sm750_hw_i2c_write_reg
Mike Rapoport [Sat, 12 Sep 2015 08:07:36 +0000 (11:07 +0300)]
staging: sm750fb: rename hwI2CWriteReg to sm750_hw_i2c_write_reg

Fix the checkpatch warning about CamelCase

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm750fb: rename hwI2CReadReg to sm750_hw_i2c_read_reg
Mike Rapoport [Sat, 12 Sep 2015 08:07:35 +0000 (11:07 +0300)]
staging: sm750fb: rename hwI2CReadReg to sm750_hw_i2c_read_reg

Fix the checkpatch warning about CamelCase

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm750fb: rename hwI2CClose to sm750_hw_i2c_close
Mike Rapoport [Sat, 12 Sep 2015 08:07:34 +0000 (11:07 +0300)]
staging: sm750fb: rename hwI2CClose to sm750_hw_i2c_close

Fix the checkpatch warning about CamelCase

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm750fb: rename hwI2CInit to sm750_hw_i2c_init
Mike Rapoport [Sat, 12 Sep 2015 08:07:33 +0000 (11:07 +0300)]
staging: sm750fb: rename hwI2CInit to sm750_hw_i2c_init

Fix the checkpatch warning about CamelCase

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6655: Move code in device_get_pci_info
Malcolm Priestley [Sat, 12 Sep 2015 18:10:38 +0000 (19:10 +0100)]
staging: vt6655: Move code in device_get_pci_info

Function always returns true and now only a few lines move
to vt6655_probe.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6655: device_get_pci_info pcid already assigned.
Malcolm Priestley [Sat, 12 Sep 2015 18:10:37 +0000 (19:10 +0100)]
staging: vt6655: device_get_pci_info pcid already assigned.

pcid has already been assigned earlier in vt6655_probe.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6655: device_get_pci_info remove call to set master.
Malcolm Priestley [Sat, 12 Sep 2015 18:10:36 +0000 (19:10 +0100)]
staging: vt6655: device_get_pci_info remove call to set 

a call to PCI_COMMAND is used to set master.

However, a call to pci_set_master earlier in function which
does the same thing.

So remove the calls and variable b.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6655: device_get_pci_info remove variable cis_addr.
Malcolm Priestley [Sat, 12 Sep 2015 18:10:35 +0000 (19:10 +0100)]
staging: vt6655: device_get_pci_info remove variable cis_addr.

cis_addr is never used remove its call to pci_resource_start.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6655: device_get_pci_info remove unused pci_read_config_*
Malcolm Priestley [Sat, 12 Sep 2015 18:10:34 +0000 (19:10 +0100)]
staging: vt6655: device_get_pci_info remove unused pci_read_config_*

These values are read from pci but never used.

Removing variables byRevId, SubSystemID, SubVendorID and pci_cmd.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6655: remove and move vt6655_init_info
Malcolm Priestley [Sat, 12 Sep 2015 18:10:33 +0000 (19:10 +0100)]
staging: vt6655: remove and move vt6655_init_info

move code to vt6655_probe.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6655: vt6655_init_info remove memset.
Malcolm Priestley [Sat, 12 Sep 2015 18:10:32 +0000 (19:10 +0100)]
staging: vt6655: vt6655_init_info remove memset.

vnt_private is allocated with kzalloc so is already zero.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6655: remove unused multicast_limit.
Malcolm Priestley [Sat, 12 Sep 2015 18:10:31 +0000 (19:10 +0100)]
staging: vt6655: remove unused multicast_limit.

multicast_limit is assigned a vale that is never used.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6655: Remove typedef struct __chip_info_tbl
Malcolm Priestley [Sat, 12 Sep 2015 18:10:30 +0000 (19:10 +0100)]
staging: vt6655: Remove typedef struct __chip_info_tbl

Only two values that are assigned from this table.

DEVICE_FLAGS_TX_ALIGN and the value of io_size which is used
as the size of ioremap which is 256.

Remove all variables, DEVICE_FLAGS_TX_ALIGN check, apply io_size value
and chip_info_table.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6655: remove get_chip_name and info message.
Malcolm Priestley [Sat, 12 Sep 2015 18:10:29 +0000 (19:10 +0100)]
staging: vt6655: remove get_chip_name and info message.

This prints "VIA Networking Solomon-A/B/G Wireless LAN Adapter"
which has already printed once in vt6655_probe.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6655: vt6655_probe remove PCI debug info
Malcolm Priestley [Sat, 12 Sep 2015 18:10:28 +0000 (19:10 +0100)]
staging: vt6655: vt6655_probe remove PCI debug info

Remove unnecessary debug PCI info that can be obtained
by lspci.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl8192u: Remove unnecessary printk
Shraddha Barke [Sun, 13 Sep 2015 03:46:10 +0000 (09:16 +0530)]
Staging: rtl8192u: Remove unnecessary printk

This patch removes the commented printk inside else block as
it is not needed.

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: dgnc: Fixed line over 80 characters long
Anjali Menon [Sun, 13 Sep 2015 10:52:00 +0000 (16:22 +0530)]
staging: dgnc: Fixed line over 80 characters long

This is a patch that fixes line over 80 characters coding style
warning detected by checkpatch.pl.

WARNING: line over 80 characters

Signed-off-by: Anjali Menon <cse.anjalimenon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8712: usb_ops_linux: fixed a comparison coding style issue
Samuel Dominguez Lorenzo [Sun, 13 Sep 2015 15:18:33 +0000 (16:18 +0100)]
staging: rtl8712: usb_ops_linux: fixed a comparison coding style issue

Fixed a coding style issue where a comparison had the constant on the
left side of the test instead of being on the right side of it.

Signed-off-by: Samuel Dominguez Lorenzo <yysamueldominguez@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: drop null test before destroy functions
Julia Lawall [Sun, 13 Sep 2015 12:15:06 +0000 (14:15 +0200)]
staging: lustre: drop null test before destroy functions

Remove unneeded NULL test.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression x;
@@

-if (x != NULL)
  \(kmem_cache_destroy\|mempool_destroy\|dma_pool_destroy\)(x);

@@
expression x;
@@

-if (x != NULL) {
  \(kmem_cache_destroy\|mempool_destroy\|dma_pool_destroy\)(x);
  x = NULL;
-}
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: fix TRAILING_STATEMENTS checkpatch errors
Mike Rapoport [Sat, 12 Sep 2015 16:20:03 +0000 (19:20 +0300)]
staging: lustre: fix TRAILING_STATEMENTS checkpatch errors

Move trailing statements to be on the next line to fix the
TRAILING_STATEMENTS checkpatch error.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: fix switch-case identation errors
Mike Rapoport [Sat, 12 Sep 2015 16:20:02 +0000 (19:20 +0300)]
staging: lustre: fix switch-case identation errors

Re-indent switch-case statements to fix SWITCH_CASE_INDENT_LEVEL errors
reported by checkpatch.pl

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: ft1000: use usleep_range()
Shraddha Barke [Sun, 13 Sep 2015 17:16:06 +0000 (22:46 +0530)]
Staging: ft1000: use usleep_range()

This patch fixes checkpatch.pl warning
WARNING : msleep < 20ms can sleep for up to 20ms; see
Documentation/timers/timers-howto.txt

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: ft1000: ft1000-usb: Use USB API functions rather than constants
Shraddha Barke [Sat, 12 Sep 2015 09:34:35 +0000 (15:04 +0530)]
Staging: ft1000: ft1000-usb: Use USB API functions rather than constants

Introduce the use of the function usb_endpoint_is_bulk_in().

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wilc1000: rename WILC_WFI_mgmt_tx
Chaehyun Lim [Mon, 14 Sep 2015 03:24:28 +0000 (12:24 +0900)]
staging: wilc1000: rename WILC_WFI_mgmt_tx

This patch replaces WILC_WFI_mgmt_tx with mgmt_tx to avoid CamelCase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wilc1000: rename WILC_WFI_mgmt_tx_cancel_wait
Chaehyun Lim [Mon, 14 Sep 2015 03:24:27 +0000 (12:24 +0900)]
staging: wilc1000: rename WILC_WFI_mgmt_tx_cancel_wait

This patch replaces WILC_WFI_mgmt_tx_cancel_wait with
mgmt_tx_cancel_wait to avoid CamelCase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wilc1000: rename WILC_WFI_cancel_remain_on_channel
Chaehyun Lim [Mon, 14 Sep 2015 03:24:26 +0000 (12:24 +0900)]
staging: wilc1000: rename WILC_WFI_cancel_remain_on_channel

This patch replaces WILC_WFI_cancel_remain_on_channel with
cancel_remain_on_channel to avoid CamelCase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wilc1000: rename WILC_WFI_remain_on_channel
Chaehyun Lim [Mon, 14 Sep 2015 03:24:25 +0000 (12:24 +0900)]
staging: wilc1000: rename WILC_WFI_remain_on_channel

This patch replaces WILC_WFI_remain_on_channel with remain_on_channel
to avoid CamelCase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wilc1000: rename WILC_WFI_flush_pmksa
Chaehyun Lim [Mon, 14 Sep 2015 03:24:24 +0000 (12:24 +0900)]
staging: wilc1000: rename WILC_WFI_flush_pmksa

This patch replaces WILC_WFI_flush_pmksa with flush_pmksa to avoid
CamelCase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>