Jinshan Xiong [Wed, 30 Mar 2016 23:48:25 +0000 (19:48 -0400)]
staging/lustre: Reintroduce global env list
This reverts a patch that was merged before lustre client
was introduced into the stagign tree, so it's not in the history.
The performance dropped a lot when memory reclaim process kicked
in as ll_releasepage() was called to destroy lustre pages. It turned
out that big overhead to allocate cl_env and keys on the fly so we
have to revert this patch.
The original problem for the reverted patch would be solved in a
follow on patch instead.
Allocating a big hash table using the formula for osd
does not really work for clients. We will create new
hash table for each mount on a single client which is
a lot of memory more than expected.
This patch limits the hash table up to 8M which has
524288 entries
Signed-off-by: Li Dongyang <dongyang.li@anu.edu.au>
Reviewed-on: http://review.whamcloud.com/18048
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7689 Reviewed-by: Fan Yong <fan.yong@intel.com> Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com> Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Daeseok Youn [Tue, 29 Mar 2016 04:47:59 +0000 (13:47 +0900)]
staging: dgnc: remove parenthesis around the CONST |
remove parenthesis around the CONST | CONST.
It will be also fixed checkpatch.pl warning about
"Alignment should match open parenthesis" becasue
parenthesis were removed by this patch.
Daeseok Youn [Mon, 28 Mar 2016 04:54:15 +0000 (13:54 +0900)]
staging: dgnc: replace dgnc_offset_table with bit shift.
the dgnc_offset_table has a same value with (1 << port).
So I tried to replace dgnc_offset_table array with 1 << port.
And also there are redundant assignments(tmp and current_port)
inside while loop for checking uart port, and remove them.
staging: comedi: drivers: fix possible bug in comedi_handle_events()
This function assumes that the async subdevice has a cancel() function.
It looks like all the current comedi drivers implement a cancel() for
the async subdevices except for the dt2814 analog input usbdevice.
Fix comedi_handle_events() so it does not try to call a non-existent
cancel() function.
Add a dev_warn() to __comedi_device_postconfig_async() so that any new
driver authors will be reminded to implement the cancel().
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rob Herring [Thu, 24 Mar 2016 20:58:17 +0000 (15:58 -0500)]
android: remove timed output/gpio driver
timed_output was only used by the Android vibrator HAL which has now
learned how to use LED triggers instead[1]. Any users of it in AOSP are
on ancient kernels. Adding support for LED triggers is purely DT changes
and proper kernel config.
The channel_bytes attribute in the visor_device struct was meant to keep
track of the number of bytes in the associated channel of the device.
Not only is the variable never set nor used, but the information can
already be accessed by referencing visor_device->visorchannel->nbytes.
Signed-off-by: Alexander Curtin <alexander.curtin@unisys.com> Signed-off-by: David Kershner <david.kershner@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Alexander Curtin [Wed, 30 Mar 2016 14:41:45 +0000 (10:41 -0400)]
staging: unisys: removed 'visor_device.devnodes' field
The 'visor_device.devnodes' field was used for displaying driver version
information through the devmajorminor sysfs attribute, which has recently
been removed, rendering the field unnecessary.
Signed-off-by: Alexander Curtin <alexander.curtin@unisys.com> Signed-off-by: David Kershner <david.kershner@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Alexander Curtin [Wed, 30 Mar 2016 14:41:44 +0000 (10:41 -0400)]
staging: unisys: removed unused visor_device.type field
The visor_device.type field was included when preparing to remove
the device_info struct. However, it's not used at all, and was already
redundant by the existence of the 'visor_device.channel_type_guid'
field.
Signed-off-by: Alexander Curtin <alexander.curtin@unisys.com> Signed-off-by: David Kershner <david.kershner@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Alexander Curtin [Wed, 30 Mar 2016 14:41:42 +0000 (10:41 -0400)]
staging: unisys: removed unused switch/port info from visorbus.h
The fields 'switch_no' and 'internal_port_no' were originally added to the
visor_device struct in preparation of removing the 'device_info' struct
in the now removed 'uislib' library. After the refactoring was complete,
these attributes are not referenced anywhere, and there are no plans to
use them.
Signed-off-by: Alexander Curtin <alexander.curtin@unisys.com> Signed-off-by: David Kershner <david.kershner@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: fwserial: (coding style) removing "!= NULL" to comply with checkpatch.pl
Removing two "!= NULL" from fwserial.c as suggested by checkpatch.pl.
Note that the associated expression "port->port.console" is a 1-bit-field
that is already assumed as an implicit boolean (that is: without comparison)
Signed-off-by: Dominique van den Broeck <domdevlin@free.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bhumika Goyal [Sat, 26 Mar 2016 07:22:28 +0000 (12:52 +0530)]
Staging: rts5208: rtsx_card.c: Remove unused function
The functions double_depth, check_card_fail, check_card_ejected are not
used anywhere in the kernel. So, remove their prototype and definition.
Grepped to find occurences.
Bhumika Goyal [Sat, 26 Mar 2016 07:12:43 +0000 (12:42 +0530)]
Staging: rts5208: Remove unused functions
The functions rtsx_disable_card_int, rtsx_undo_delink,
rtsx_check_link_ready are not used anywhere in the kernel. So,remove
their definition and prototype.
Claudiu Beznea [Fri, 25 Mar 2016 20:54:48 +0000 (22:54 +0200)]
Staging: wlan-ng: no need for memcpy() since its arguments are already equal
This patch removes the memcpy() for two variables which were
previously tested with memcmp(). The result of memcmp() was
zero which means that the previously tested variables were
already equal.
The zero-length file "ni_mio_c_common.c" was inadvertantly created by
commit e563637b5fef ("staging: comedi: Use ARRAY_SIZE for sizes of
arrays"). Remove it.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bhumika Goyal [Sat, 26 Mar 2016 06:24:55 +0000 (11:54 +0530)]
Staging: rtl8723au: Remove function rtw_enqueue_{recvbuf23a/recvbuf23a_to_head}
The functions rtw_enqueue_recvbuf23a and rtw_enqueue_recvbuf23a_to_head
are never used anywhere in the kernel. So, remove their definition and
prototype.
Grepped to find occurences.
Bhumika Goyal [Sat, 26 Mar 2016 06:14:52 +0000 (11:44 +0530)]
Staging: rtl8723au: Remove unused functions
The functions rtw_get_oper_bw23a and rtw_get_oper_ch23aoffset are never
used anywhere in the kernel. So, remove their definition and prototype.
Grepped to find occurences.
Chaehyun Lim [Mon, 28 Mar 2016 04:55:58 +0000 (13:55 +0900)]
staging: wilc1000: change data type of wid argument in wilc_wlan_cfg_get_val
This patch changes data type of wid argument in wilc_wlan_cfg_get_val
from u32 to u16. It is better to change data type of wid because wid has
one of enum WID_T that is data type of u16. And, there is no need to use
u16 type casting when calling wilc_wlan_cfg_get_wid_value function.
Chaehyun Lim [Mon, 28 Mar 2016 04:55:57 +0000 (13:55 +0900)]
staging: wilc1000: change data type of wid argument in wilc_wlan_cfg_get
This patch changes data type of wid argument in wilc_wlan_cfg_get from
u32 to u16. It is better to change data type of wid because wid has one
of enum WID_T that is data type of u16. And, there is no need to use u16
type casting when calling wilc_wlan_cfg_get_wid function.
Chaehyun Lim [Mon, 28 Mar 2016 04:55:56 +0000 (13:55 +0900)]
staging: wilc1000: change data type of wid argument in wilc_wlan_cfg_set
This patch changes data type of wid argument in wilc_wlan_cfg_set from
u32 to u16. It is better to change data type of wid because wid has one of
enum WID_T that is data type of u16. And, there is no need to use u16
type casting when calling wilc_wlan_cfg_set_wid function.
James Simmons [Mon, 28 Mar 2016 00:26:28 +0000 (20:26 -0400)]
staging: lustre: libcfs: add CFS_FAULT_CHECK()
Add the macro CFS_FAULT_CHECK() which behaves like CFS_FAIL_CHECK()
except that any site may be matched by setting CFS_FAULT (0x02000000)
in cfs_fail_loc. Add cfs_fail_err for use as a return value with
CFS_FAULT_CHECK().
Signed-off-by: John L. Hammond <john.hammond@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5409
Reviewed-on: http://review.whamcloud.com/11263 Reviewed-by: Robert Read <robert.read@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jian Yu [Mon, 28 Mar 2016 00:26:27 +0000 (20:26 -0400)]
staging: lustre: libcfs: replace direct HZ access with kernel APIs
On some customers' systems, the kernel was compiled with HZ defined
to 100, instead of 1000. This improves performance for HPC applications.
However, to use these systems with Lustre, customers have to re-build
Lustre for the kernel because Lustre directly uses the defined constant
HZ.
Since kernel 2.6.21, some non-HZ dependent timing APIs become non-
inline functions, which can be used in Lustre codes to replace the
direct HZ access.
These kernel APIs include:
jiffies_to_msecs()
jiffies_to_usecs()
jiffies_to_timespec()
msecs_to_jiffies()
usecs_to_jiffies()
timespec_to_jiffies()
And here are some samples of the replacement:
HZ -> msecs_to_jiffies(MSEC_PER_SEC)
n * HZ -> msecs_to_jiffies(n * MSEC_PER_SEC)
HZ / n -> msecs_to_jiffies(MSEC_PER_SEC / n)
n / HZ -> jiffies_to_msecs(n) / MSEC_PER_SEC
n / HZ * 1000 -> jiffies_to_msecs(n)
This patch replaces the direct HZ access in the libcfs module.
Oleg Drokin [Sun, 27 Mar 2016 16:05:03 +0000 (12:05 -0400)]
staging/lustre/libcfs: Copy correct amount in libcfs_ioctl_getdata
Commit b8ff756bc351 ("staging: lustre: libcfs: merge code from
libcfs_ioctl into libcfs_ioctl_getdata") introduced a problem
copying just a single pointer worth of data from userspace
instead of whole libcfs_ioctl_hdr structure.
Adjust the copying amount.
Andreas Dilger [Sat, 26 Mar 2016 19:40:56 +0000 (15:40 -0400)]
staging: lustre: libcfs: calculate crypto performance using pages
Use alloc_page() and use cfs_crypto_hash_update_page()
to compute the hash instead of cfs_crypto_hash_digest(), since
tgt_checksum_bulk() computes the hash by page anyway.
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5279
Reviewed-on: http://review.whamcloud.com/10982 Reviewed-by: John L. Hammond <john.hammond@intel.com> Reviewed-by: James Simmons <uja.ornl@gmail.com> Reviewed-by: Alexander Boyko <alexander_boyko@xyratex.com> Reviewed-by: Bob Glossman <bob.glossman@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Andreas Dilger [Sat, 26 Mar 2016 19:40:51 +0000 (15:40 -0400)]
staging: lustre: libcfs: bug fixes for cfs_crypto_hash_final()
Change cfs_crypto_hash_final() to always clean up the hash descrptor
instead of not doing this in error cases. All of the callers were
just calling cfs_crypto_hash_final() immediately to clean up the
descriptor anyway, and the old behaviour is unlike other init/fini
functions, and prone to memory leaks and other incorrect usage. The
callers can call cfs_crypto_digest_size() to determine the hash size
in advance if needed, and avoid complexity in cfs_crypto_hash_final().
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5053
Reviewed-on: http://review.whamcloud.com/9990 Reviewed-by: Bob Glossman <bob.glossman@intel.com> Reviewed-by: James Simmons <uja.ornl@gmail.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Andreas Dilger [Sat, 26 Mar 2016 19:40:46 +0000 (15:40 -0400)]
staging: lustre: libcfs: add documentation for cfs_crypto_hash_*()
Add comment blocks for cfs_crypto_hash_*() in linux-crypto.c and
libcfs_crypto.h. Delete obsolete comment about shash handling in
cfs_crypto_hash_alloc().
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5053
Reviewed-on: http://review.whamcloud.com/9990 Reviewed-by: Bob Glossman <bob.glossman@intel.com> Reviewed-by: James Simmons <uja.ornl@gmail.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Andreas Dilger [Sat, 26 Mar 2016 19:40:45 +0000 (15:40 -0400)]
staging: lustre: libcfs: limit scope of libcfs_crypto.h
Remove <libcfs/libcfs_crypto.h> from <libcfs/libcfs.h> and only
include it into the places where it is actually needed. This
works out to be the same places as <obd_cksum.h>, so put it there.
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5053
Reviewed-on: http://review.whamcloud.com/9990 Reviewed-by: Bob Glossman <bob.glossman@intel.com> Reviewed-by: James Simmons <uja.ornl@gmail.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Claudiu Beznea [Wed, 23 Mar 2016 18:37:26 +0000 (20:37 +0200)]
Staging: wlan-ng: wiphy_free() is not called in case wiphy_register() fails
This patch covers wiphy_register() failures in wlan_create_wiphy()
from cfg80211.c by calling wiphy_free() for the correspondent
struct wiphy allocated structure.
Okash Khawaja [Thu, 10 Mar 2016 20:21:35 +0000 (20:21 +0000)]
staging: speakup: fix type mismatch warnings
Compiling speakup driver with sparse produces following warning:
drivers/staging/speakup/serialio.c:22:9: warning: incorrect type in
initializer (different base types)
drivers/staging/speakup/serialio.c:22:9: expected unsigned int
[unsigned] flags
drivers/staging/speakup/serialio.c:22:9: got restricted upf_t
staging: comedi: ni_tio: remove BUG() checks for ni_tio_get_clock_src()
This function calls some helper functions to convert the counter variant
specific clock select bits into the generic enum ni_gpct_clock_source_bits
equivelent. These helper functions currently BUG() if the clock select
bits are invalid.
It then calls ni_tio_clock_period_ps() to figure out the clock period
based on the generic clock source. This function could also BUG() if
the prescale bits are invalid.
In reality this should never happen but refactor the code to return
-EINVAL instead and remove the BUG() checks.
These functions are also called by ni_tio_set_sync_mode(). When this
function is called by ni_tio_set_clock_src() the counter select bits
have already been validated.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The (*insn_config) functions are supposed to return an errno or the number
of 'data' values used for the instruction (insn->n). Currently this function
returns an errno or 0. Fix the function to work like the core expects.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: ni_tio: remove BUG() checks for ni_tio_get_gate_src()
This function calls some helper functions to convert the counter variant
specific gate select bits into the generic enum ni_gpct_clock_source_bits
equivelent. These helper functions currently BUG() if the gate select
bits are invalid.
This should never happen but refactor the code to return -EINVAL instead
and remove the BUG() checks.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Refactor the functions that determine the clock source bits so that they
return -EINVAL if the clock source is invalid. Pass the errno back to
ni_tio_insn_config().
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>