platform/kernel/linux-rpi.git
8 years agostaging/lustre/clio: optimize read ahead code
Jinshan Xiong [Wed, 30 Mar 2016 23:48:33 +0000 (19:48 -0400)]
staging/lustre/clio: optimize read ahead code

It used to check each page in the readahead window is covered by
a lock underneath, now cpo_page_is_under_lock() provides @max_index
to help decide the maximum ra window. @max_index can be modified by
OSC to extend the maximum lock region, to align stripe boundary at
LOV, and to make sure the readahead region at least covers read
region at LLITE layer.

After this is done, usually readahead code calls
cpo_page_is_under_lock() for each stripe.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-on: http://review.whamcloud.com/8523
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3321
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging/lustre/clio: remove stackable cl_page completely
Jinshan Xiong [Wed, 30 Mar 2016 23:48:32 +0000 (19:48 -0400)]
staging/lustre/clio: remove stackable cl_page completely

>From now on, cl_page becomes one to one mapping of vmpage.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-on: http://review.whamcloud.com/7895
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3321
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging/lustre/osc: add weight function for DLM lock
Jinshan Xiong [Wed, 30 Mar 2016 23:48:31 +0000 (19:48 -0400)]
staging/lustre/osc: add weight function for DLM lock

Use weigh_ast to decide if a lock covers any pages.
In recovery, weigh_ast will be used to decide if a DLM read lock
covers any locked pages, or it will be canceled instead being
recovered.

The problem with the original implementation is that it attached
each osc_page to an osc_lock also changed lock state to add every
pages for readahead.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-on: http://review.whamcloud.com/7894
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3321
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging/lustre/clio: add pages into writeback cache in batches
Jinshan Xiong [Wed, 30 Mar 2016 23:48:30 +0000 (19:48 -0400)]
staging/lustre/clio: add pages into writeback cache in batches

in ll_write_end(), instead of adding the page into writeback
cache directly, it will be held in a page list. After enough
pages have been collected, issue them all with cio_commit_async().

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-on: http://review.whamcloud.com/7893
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3321
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging/lustre/obdclass: Add a preallocated percpu cl_env
Jinshan Xiong [Wed, 30 Mar 2016 23:48:29 +0000 (19:48 -0400)]
staging/lustre/obdclass: Add a preallocated percpu cl_env

This change adds support for a single preallocated cl_env per CPU
which can be used in circumstances where reschedule is not possible.
Currently this interface is only used by the ll_releasepage function.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Signed-off-by: Prakash Surya <surya1@llnl.gov>
Reviewed-on: http://review.whamcloud.com/8174
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3321
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging/lustre/clio: collapse layer of cl_page
Jinshan Xiong [Wed, 30 Mar 2016 23:48:28 +0000 (19:48 -0400)]
staging/lustre/clio: collapse layer of cl_page

Move radix tree to osc layer to for performance improvement.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-on: http://review.whamcloud.com/7892
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3321
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging/lustre/osc: to drop LRU pages with cl_lru_work
Jinshan Xiong [Wed, 30 Mar 2016 23:48:27 +0000 (19:48 -0400)]
staging/lustre/osc: to drop LRU pages with cl_lru_work

This way we can drop it async.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-on: http://review.whamcloud.com/7891
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3321
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging/lustre/osc: Adjustment on osc LRU for performance
Jinshan Xiong [Wed, 30 Mar 2016 23:48:26 +0000 (19:48 -0400)]
staging/lustre/osc: Adjustment on osc LRU for performance

Add and discard pages from LRU in batch.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-on: http://review.whamcloud.com/7890
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3321
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging/lustre: Reintroduce global env list
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.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-on: http://review.whamcloud.com/7888
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3321
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging/lustre: merge lclient/*.c into llite/
John L. Hammond [Wed, 30 Mar 2016 23:48:24 +0000 (19:48 -0400)]
staging/lustre: merge lclient/*.c into llite/

Separate lclient was necessary to be shared between
different client implementations, make no sense to have
them separate in Linux kernel.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Based-on: http://review.whamcloud.com/10171
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging/lustre: Get rid of CFS_PAGE_MASK
Oleg Drokin [Wed, 30 Mar 2016 23:48:23 +0000 (19:48 -0400)]
staging/lustre: Get rid of CFS_PAGE_MASK

CFS_PAGE_MASK is the same as PAGE_MASK, so get rid of it.

We are replacing it with PAGE_MASK instead of PAGE_CACHE_MASK
because PAGE_CACHE_* stuff is apparently going away.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging/lustre/obdclass: limit lu_site hash table size
Oleg Drokin [Wed, 30 Mar 2016 23:48:22 +0000 (19:48 -0400)]
staging/lustre/obdclass: limit lu_site hash table size

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>
8 years agostaging: xgifb: fix block comments
Clifton Barnes [Tue, 29 Mar 2016 22:12:40 +0000 (18:12 -0400)]
staging: xgifb: fix block comments

fix checkpatch.pl warning about 'Block comments use a trailing */ on a
separate line' and 'Block comments use * on subsequent lines'

Signed-off-by: Clifton Barnes <clifton.a.barnes@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: dgnc: fix Logical continuations.
Daeseok Youn [Tue, 29 Mar 2016 04:48:57 +0000 (13:48 +0900)]
staging: dgnc: fix Logical continuations.

fix checkpatch.pl warning about
'Logical continuations should be on the previous line'

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: dgnc: fix 'line over 80 characters'
Daeseok Youn [Tue, 29 Mar 2016 04:48:31 +0000 (13:48 +0900)]
staging: dgnc: fix 'line over 80 characters'

fix checkpatch.pl warning about 'line over 80 characters'.
I just moved all line comment to above if statement.

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: dgnc: remove parenthesis around the CONST |
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.

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: dgnc: replace dgnc_offset_table with bit shift.
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.

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: comedi: amplc_pci224: Prefer using the BIT macro
H Hartley Sweeten [Wed, 30 Mar 2016 19:00:29 +0000 (12:00 -0700)]
staging: comedi: amplc_pci224: Prefer using the BIT macro

Fix the checkpatch.pl issues by using the BIT macro and defining some
macros for the multi-bit fields.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: comedi: amplc_pci263: define the register map
H Hartley Sweeten [Wed, 30 Mar 2016 18:45:19 +0000 (11:45 -0700)]
staging: comedi: amplc_pci263: define the register map

For completeness, define the registers used by this driver and remove
the magic numbers.

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>
8 years agostaging: comedi: amplc_pci263: tidy up digital output subdevice init
H Hartley Sweeten [Wed, 30 Mar 2016 18:45:18 +0000 (11:45 -0700)]
staging: comedi: amplc_pci263: tidy up digital output subdevice init

For aesthetics, add some whitespace to the digital output subdevice
initialization.

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>
8 years agostaging: comedi: amplc_pci263: fix block comments
H Hartley Sweeten [Wed, 30 Mar 2016 18:45:17 +0000 (11:45 -0700)]
staging: comedi: amplc_pci263: fix block comments

Fix the checkpatch.pl issues:
WARNING: Block comments use * on subsequent lines

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>
8 years agostaging: comedi: drivers: fix possible bug in comedi_handle_events()
H Hartley Sweeten [Wed, 30 Mar 2016 17:47:25 +0000 (10:47 -0700)]
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>
8 years agostaging: comedi: drivers: tidy up insn_rw_emulate_bits()
H Hartley Sweeten [Wed, 30 Mar 2016 17:47:24 +0000 (10:47 -0700)]
staging: comedi: drivers: tidy up insn_rw_emulate_bits()

Tidy up this function and fix the checkpatch.pl issues:
WARNING: Prefer 'unsigned int' to bare use of 'unsigned'

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>
8 years agostaging: comedi: c6xdigio: Prefer using the BIT macro
H Hartley Sweeten [Wed, 30 Mar 2016 19:34:53 +0000 (12:34 -0700)]
staging: comedi: c6xdigio: Prefer using the BIT macro

Fix the checkpatch.pl issues.

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>
8 years agostaging: comedi: amplc_pci230: Prefer kernel type 'u64' over 'uint64_t'
H Hartley Sweeten [Wed, 30 Mar 2016 19:19:22 +0000 (12:19 -0700)]
staging: comedi: amplc_pci230: Prefer kernel type 'u64' over 'uint64_t'

Fix the checkpatch.pl issues.

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>
8 years agostaging: comedi: amplc_pci230: Prefer using the BIT macro
H Hartley Sweeten [Wed, 30 Mar 2016 19:19:21 +0000 (12:19 -0700)]
staging: comedi: amplc_pci230: Prefer using the BIT macro

Fix the checkpatch.pl issues by using the BIT macro and defining some
macros for the multi-bit fields.

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>
8 years agostaging: comedi: amplc_dio200_common: document spinlock definition
H Hartley Sweeten [Wed, 30 Mar 2016 18:09:49 +0000 (11:09 -0700)]
staging: comedi: amplc_dio200_common: document spinlock definition

Fix the checkpatch.pl issue:
CHECK: spinlock_t definition without comment

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>
8 years agostaging: comedi: amplc_dio200_common: Prefer 'unsigned int' to bare use of 'unsigned'
H Hartley Sweeten [Wed, 30 Mar 2016 18:09:48 +0000 (11:09 -0700)]
staging: comedi: amplc_dio200_common: Prefer 'unsigned int' to bare use of 'unsigned'

Fix the checkpatch.pl issues.

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>
8 years agostaging: comedi: amplc_pc263: fix block comments
H Hartley Sweeten [Wed, 30 Mar 2016 18:36:55 +0000 (11:36 -0700)]
staging: comedi: amplc_pc263: fix block comments

Fix the checkpatch.pl issues:
WARNING: Block comments use * on subsequent lines

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>
8 years agostaging: comedi: amplc_pc263: define the register map
H Hartley Sweeten [Wed, 30 Mar 2016 18:36:58 +0000 (11:36 -0700)]
staging: comedi: amplc_pc263: define the register map

For completeness, define the registers used by this driver and remove
the magic numbers.

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>
8 years agostaging: comedi: amplc_pc263: tidy up comedi_driver definition
H Hartley Sweeten [Wed, 30 Mar 2016 18:36:56 +0000 (11:36 -0700)]
staging: comedi: amplc_pc263: tidy up comedi_driver definition

For aesthetics, add some whitespace to the comedi_driver definition.

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>
8 years agostaging: comedi: amplc_pc263: tidy up digital output subdevice init
H Hartley Sweeten [Wed, 30 Mar 2016 18:36:57 +0000 (11:36 -0700)]
staging: comedi: amplc_pc263: tidy up digital output subdevice init

For aesthetics, add some whitespace to the digital output subdevice
initialization.

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>
8 years agoStaging: android: change memory allocation style in ion.c
Ben Marsh [Mon, 28 Mar 2016 17:26:19 +0000 (19:26 +0200)]
Staging: android: change memory allocation style in ion.c

Chnages memory allocation style in order to silence a checkpatch.pl
warning.

Signed-off-by: Ben Marsh <bmarsh94@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoandroid: remove timed output/gpio driver
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.

[1] https://android.googlesource.com/platform%2Fhardware%2Flibhardware/+/61701df363310a5cbd95e3e1638baa9526e42c9b

Cc: John Stultz <john.stultz@linaro.org>
Cc: "Arve Hjønnevåg" <arve@android.com>
Cc: Riley Andrews <riandrews@android.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Acked-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: remove wmb() in visordriver_remove_device
David Kershner [Thu, 31 Mar 2016 00:38:49 +0000 (20:38 -0400)]
staging: unisys: remove wmb() in visordriver_remove_device

Don't need to have a wmb() in visordriver_remove_device. Also removed
an unnecessary check for drv being null.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: removed unused channel_bytes attribute
Alexander Curtin [Wed, 30 Mar 2016 14:41:46 +0000 (10:41 -0400)]
staging: unisys: removed unused channel_bytes attribute

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>
8 years agostaging: unisys: removed 'visor_device.devnodes' field
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>
8 years agostaging: unisys: removed unused visor_device.type field
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>
8 years agostaging: unisys: include: removed unused 'visor_device.description'
Alexander Curtin [Wed, 30 Mar 2016 14:41:43 +0000 (10:41 -0400)]
staging: unisys: include: removed unused 'visor_device.description'

The 'description' variable in visor_device was added in preparation for
removing the 'device_info' struct when the uislib files were removed.

That attribute is never accessed nor set, and the 'name' attribute
provides enough information to correctly identify the driver, it is not
needed.

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>
8 years agostaging: unisys: removed unused switch/port info from visorbus.h
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>
8 years agoStaging: wlan-ng: removed "next" member of wlandevice_t since it is not used anywhere...
Claudiu Beznea [Sat, 26 Mar 2016 08:54:13 +0000 (10:54 +0200)]
Staging: wlan-ng: removed "next" member of wlandevice_t since it is not used anywhere in code.

This patch removes "next" member of wlandevice_t since it
is not used anywhere in the wlan-ng code.

Signed-off-by: Claudiu Beznea <claudiu.beznea@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: sm750fb: initialize max_d to maximum D value of 6
Colin Ian King [Tue, 29 Mar 2016 16:53:23 +0000 (17:53 +0100)]
staging: sm750fb: initialize max_d to maximum D value of 6

max_d is not initialized and should be set to the largest D
value of 6.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: fwserial: (coding style) removing "!= NULL" to comply with checkpatch.pl
Dominique van den Broeck [Tue, 29 Mar 2016 17:14:21 +0000 (19:14 +0200)]
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>
8 years agostaging: fwserial: (coding style) Turning every "unsigned" into "unsigned int"
Dominique van den Broeck [Tue, 29 Mar 2016 17:14:20 +0000 (19:14 +0200)]
staging: fwserial: (coding style) Turning every "unsigned" into "unsigned int"

Coding-style-only modifications to remove every warning saying:
WARNING: Prefer 'unsigned int' to bare use of 'unsigned'

Compiled against revision "next-20160327".

(checkpatch.pl was updated to treat "UNSPECIFIED_INT" warnings
 as of commit a1ce18e4f941d20 )

Signed-off-by: Dominique van den Broeck <domdevlin@free.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: comedi: comedi_fops.c: fix lines over 80 characters
Ian Abbott [Tue, 29 Mar 2016 09:49:04 +0000 (10:49 +0100)]
staging: comedi: comedi_fops.c: fix lines over 80 characters

Fix checkpatch.pl warnings about lines over 80 characters in
"comedi_fops.c".

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: comedi: Fix 'unsigned' warning style
Aniket Sharma [Sun, 27 Mar 2016 17:52:19 +0000 (10:52 -0700)]
Staging: comedi: Fix 'unsigned' warning style

This patch fixes the checkpatch.pl warning:

WARNING: Prefer 'unsigned int' to bare use of 'unsigned'
+       unsigned runflags;

WARNING: Prefer 'unsigned int' to bare use of 'unsigned'
+struct comedi_device *comedi_dev_get_from_minor(unsigned minor);

Signed-off-by: Aniket Sharma <badbuddha91@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: rts5208: rtsx_card.c: Remove unused function
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.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: rts5208: Remove unused functions
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.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: gs_fpgaboot: remove blank line in io.c
Ben Marsh [Fri, 25 Mar 2016 21:44:48 +0000 (22:44 +0100)]
Staging: gs_fpgaboot: remove blank line in io.c

Removes a blank line in order to silence a checkpatch.pl warning.

Signed-off-by: Ben Marsh <bmarsh94@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: wlan-ng: convert usb_prism_tbl[] array into a const array
Claudiu Beznea [Fri, 25 Mar 2016 21:28:54 +0000 (23:28 +0200)]
Staging: wlan-ng: convert usb_prism_tbl[] array into a const array

This patch convert usb_prism_tbl[] into a const array
since it is not modified anywhere in prism2usb.c file.

Signed-off-by: Claudiu Beznea <claudiu.beznea@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: wlan-ng: no need for memcpy() since its arguments are already equal
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.

Signed-off-by: Claudiu Beznea <claudiu.beznea@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: comedi: drivers: remove bogus ni_mio_c_common.c
Ian Abbott [Wed, 23 Mar 2016 10:55:21 +0000 (10:55 +0000)]
staging: comedi: drivers: remove bogus ni_mio_c_common.c

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>
8 years agoStaging: rtl8723au: Remove function rtw_enqueue_{recvbuf23a/recvbuf23a_to_head}
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.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Reviewed-by: Julian Calaby <julian.calaby@gmail.com>
Acked-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: rtl8723au: Remove unused functions
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.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Reviewed-by: Julian Calaby <julian.calaby@gmail.com>
Acked-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: xgifb: fix bare use of 'unsigned'
Clifton Barnes [Sun, 27 Mar 2016 19:13:03 +0000 (15:13 -0400)]
staging: xgifb: fix bare use of 'unsigned'

fix checkpatch.pl warning about 'Prefer 'unsigned int' to bare use of
'unsigned''

Signed-off-by: Clifton Barnes <clifton.a.barnes@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: xgifb: fix code indent
Clifton Barnes [Sun, 27 Mar 2016 19:13:01 +0000 (15:13 -0400)]
staging: xgifb: fix code indent

fix checkpatch.pl warning about 'suspect code indent for conditional
statements'

Signed-off-by: Clifton Barnes <clifton.a.barnes@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: xgifb: fix 'line over 80 characters'
Clifton Barnes [Sun, 27 Mar 2016 19:13:00 +0000 (15:13 -0400)]
staging: xgifb: fix 'line over 80 characters'

fix checkpatch.pl warning about 'line over 80 characters'

Signed-off-by: Clifton Barnes <clifton.a.barnes@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: skein: Convert local rotl_64 to kernel's rol64
Joe Perches [Mon, 28 Mar 2016 23:51:17 +0000 (16:51 -0700)]
staging: skein: Convert local rotl_64 to kernel's rol64

Remove the local inline and use the generic kernel rol64 instead.

Miscellanea:

o Added a newline between a multiple line macro for consistency
  with the other multiple line macros

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: use mutex instead of struct semaphore hSemScanReq
Chaehyun Lim [Mon, 28 Mar 2016 04:56:00 +0000 (13:56 +0900)]
staging: wilc1000: use mutex instead of struct semaphore hSemScanReq

This patch replaces struct semaphore hSemScanReq with struct mutex
scan_req_lock. It is better to use mutex than semaphore.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: remove unused struct semaphore SemHandleUpdateStats
Chaehyun Lim [Mon, 28 Mar 2016 04:55:59 +0000 (13:55 +0900)]
staging: wilc1000: remove unused struct semaphore SemHandleUpdateStats

struct semaphore SemHandleUpdateStats is defined but never used in this
driver, so just remove it.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: change data type of wid argument in wilc_wlan_cfg_get_val
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.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: change data type of wid argument in wilc_wlan_cfg_get
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.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: change data type of wid argument in wilc_wlan_cfg_set
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.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: libcfs: remove cfs_workitem_t typedefs
James Simmons [Mon, 28 Mar 2016 00:26:29 +0000 (20:26 -0400)]
staging: lustre: libcfs: remove cfs_workitem_t typedefs

Convert cfs_workitem_t to proper structure.

Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245
Reviewed-on: http://review.whamcloud.com/17202
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: libcfs: add CFS_FAULT_CHECK()
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>
8 years agostaging: lustre: libcfs: replace direct HZ access with kernel APIs
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.

Signed-off-by: Jian Yu <jian.yu@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5443
Reviewed-on: http://review.whamcloud.com/11993
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@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>
8 years agostaging: lustre: libcfs: add lock-class for cfs_percpt_lock
Liang Zhen [Mon, 28 Mar 2016 00:26:26 +0000 (20:26 -0400)]
staging: lustre: libcfs: add lock-class for cfs_percpt_lock

initialise lock-class for each sublock of cfs_percpt_lock
to eliminate false alarm ""possible recursive locking detected"

Signed-off-by: Liang Zhen <liang.zhen@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6432
Reviewed-on: http://review.whamcloud.com/14368
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: libcfs: move all cpt handling to libcfs_cpu.h
James Simmons [Mon, 28 Mar 2016 00:26:25 +0000 (20:26 -0400)]
staging: lustre: libcfs: move all cpt handling to libcfs_cpu.h

Move the CPT handling declartions out of libcfs_private.h to
libcfs_cpu.h where it belongs.

Signed-off-by: frank zago <fzago@cray.com>
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245
Reviewed-on: http://review.whamcloud.com/15913
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: libcfs: remove cfs_percpt_[current|index]
James Simmons [Mon, 28 Mar 2016 00:26:24 +0000 (20:26 -0400)]
staging: lustre: libcfs: remove cfs_percpt_[current|index]

The functions cfs_percpt_current() and cfs_percpt_index()
are not used anywhere. Remove it.

Signed-off-by: frank zago <fzago@cray.com>
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245
Reviewed-on: http://review.whamcloud.com/15913
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: libcfs: remove atomic cpt allocations
James Simmons [Mon, 28 Mar 2016 00:26:23 +0000 (20:26 -0400)]
staging: lustre: libcfs: remove atomic cpt allocations

libcfs contains functions to perform atomic memory
operations. These functions have never been used
so remove them.

Signed-off-by: frank zago <fzago@cray.com>
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245
Reviewed-on: http://review.whamcloud.com/15913
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: libcfs: remove cfs_signal_pending wrapper
James Simmons [Mon, 28 Mar 2016 00:26:22 +0000 (20:26 -0400)]
staging: lustre: libcfs: remove cfs_signal_pending wrapper

Use signal_pending() directly instead of a one line function
wrapper.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245
Reviewed-on: http://review.whamcloud.com/13874
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: libcfs: remove function declarations in libcfs.h
James Simmons [Mon, 28 Mar 2016 00:26:21 +0000 (20:26 -0400)]
staging: lustre: libcfs: remove function declarations in libcfs.h

A few function declarations are in libcfs.h that are not needed.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245
Reviewed-on: http://review.whamcloud.com/13874
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging/lustre/libcfs: Copy correct amount in libcfs_ioctl_getdata
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.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Acked-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: libcfs: calculate crypto performance using pages
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>
8 years agostaging: lustre: libcfs: improve reporting error for crypto performance
Andreas Dilger [Sat, 26 Mar 2016 19:40:55 +0000 (15:40 -0400)]
staging: lustre: libcfs: improve reporting error for crypto performance

Set cfs_crypto_hash_speeds[X] result to the actual error instead
of -1. Make the error message more clear and informative.

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>
8 years agostaging: lustre: libcfs: print crypto performance result only on success
Andreas Dilger [Sat, 26 Mar 2016 19:40:54 +0000 (15:40 -0400)]
staging: lustre: libcfs: print crypto performance result only on success

Only print info about the crypto performance when no error
is encounter.

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>
8 years agostaging: lustre: libcfs: allocate memory in cfs_crypto_performance_test()
Andreas Dilger [Sat, 26 Mar 2016 19:40:53 +0000 (15:40 -0400)]
staging: lustre: libcfs: allocate memory in cfs_crypto_performance_test()

Move memory allocation from cfs_crypto_test_hashes() into the
function cfs_crypto_performance_test().

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>
8 years agostaging: lustre: libcfs: return proper error code for cfs_crypto_hash_speed()
Andreas Dilger [Sat, 26 Mar 2016 19:40:52 +0000 (15:40 -0400)]
staging: lustre: libcfs: return proper error code for cfs_crypto_hash_speed()

Return a real error code, -ENOENT, instead of a -1.

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>
8 years agostaging: lustre: libcfs: bug fixes for cfs_crypto_hash_final()
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>
8 years agostaging: lustre: libcfs: start using enum cfs_crypto_hash_alg
Andreas Dilger [Sat, 26 Mar 2016 19:40:50 +0000 (15:40 -0400)]
staging: lustre: libcfs: start using enum cfs_crypto_hash_alg

Fix the cfs_crypto_hash_* functions to take enum cfs_crypto_hash_alg
as the algorithm type, instead of an unsigned char.

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>
8 years agostaging: lustre: libcfs: small alignment change for cfs_crypto_hash_*()
Andreas Dilger [Sat, 26 Mar 2016 19:40:49 +0000 (15:40 -0400)]
staging: lustre: libcfs: small alignment change for cfs_crypto_hash_*()

Change the aligment of some of the functions.

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>
8 years agostaging: lustre: libcfs: add new definitions for cfs_crypto api
Andreas Dilger [Sat, 26 Mar 2016 19:40:48 +0000 (15:40 -0400)]
staging: lustre: libcfs: add new definitions for cfs_crypto api

Add CFS_HASH_ALG_UNKOWN for unknown hash names instead of
using "0xFF" directly. Define the max digestsize the cfs
crypto api can handle.

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>
8 years agostaging: lustre: libcfs: rename some variables for crypto handling
Andreas Dilger [Sat, 26 Mar 2016 19:40:47 +0000 (15:40 -0400)]
staging: lustre: libcfs: rename some variables for crypto handling

For the crypto algorthim type use the same name hash_alg everywhere.

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>
8 years agostaging: lustre: libcfs: add documentation for cfs_crypto_hash_*()
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>
8 years agostaging: lustre: libcfs: limit scope of libcfs_crypto.h
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>
8 years agostaging: dgnc: fix Logical continuations should be on the
Daeseok Youn [Fri, 25 Mar 2016 02:44:34 +0000 (11:44 +0900)]
staging: dgnc: fix Logical continuations should be on the

fix checkpatch.pl warning about 'Logical continuations
should be on the previous line' in dgnc_neo.c file.

I think the 'force' need to check first, because if the 'force' is true,
it doesn't need to call another function call.

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: dgnc: fix 'line over 80 characters'
Daeseok Youn [Fri, 25 Mar 2016 02:44:06 +0000 (11:44 +0900)]
staging: dgnc: fix 'line over 80 characters'

fix checkpatch.pl warning about 'line over 80 characters'
in dgnc_neo.c

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: dgnc: remove unused variable in dgnc_board
Daeseok Youn [Thu, 24 Mar 2016 06:11:08 +0000 (15:11 +0900)]
staging: dgnc: remove unused variable in dgnc_board

TtyRefCnt was not used anywhere in dgnc.

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: dgnc: fix CamelCase in dgnc_drvier.h and
Daeseok Youn [Thu, 24 Mar 2016 06:10:43 +0000 (15:10 +0900)]
staging: dgnc: fix CamelCase in dgnc_drvier.h and

fix checkpatch.pl warning about CamelCase

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: xgifb: remove extra braces from if stmt (single branch)
Nicholas Sim [Wed, 23 Mar 2016 23:02:59 +0000 (23:02 +0000)]
staging: xgifb: remove extra braces from if stmt (single branch)

Remove braces from one branch of if statement where both branches only
have a single line of code, as suggested in Documentation/CodingStyle

Signed-off-by: Nicholas Sim <nicholassimws@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: xgifb: ensure braces on all arms of if stmt
Nicholas Sim [Wed, 23 Mar 2016 23:02:24 +0000 (23:02 +0000)]
staging: xgifb: ensure braces on all arms of if stmt

Added braces on else arm of if statement where if arm already has braces
as suggested for clarity in Documentation/CodingStyle

Signed-off-by: Nicholas Sim <nicholassimws@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8188eu: remove return at end of void function call
Nicholas Sim [Wed, 23 Mar 2016 22:35:39 +0000 (22:35 +0000)]
staging: rtl8188eu: remove return at end of void function call

Remove unnecessary return statements from last lines of void function call
(several)

Signed-off-by: Nicholas Sim <nicholassimws@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: vt6656: Fixed multiple logical comparisions warnings in main_usb.c
Parth Sane [Wed, 23 Mar 2016 19:38:29 +0000 (01:08 +0530)]
staging: vt6656: Fixed multiple logical comparisions warnings in main_usb.c

Using comparison to false and true is error prone. Fixed multiple warnings as
per checkpatch guidelines.

Signed-off-by: Parth Sane <laerdevstudios@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: wlan-ng: wiphy_free() is not called in case wiphy_register() fails
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.

Signed-off-by: Claudiu Beznea <claudiu.beznea@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: dgnc: fix CamelCase in dgnc_driver.c
Daeseok Youn [Wed, 23 Mar 2016 11:54:36 +0000 (20:54 +0900)]
staging: dgnc: fix CamelCase in dgnc_driver.c

fix checkpatch.pl warning about CamelCase.

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: iio: Fix sparse endian warning
Ksenija Stanojevic [Wed, 23 Mar 2016 11:06:34 +0000 (12:06 +0100)]
Staging: iio: Fix sparse endian warning

Fix following sparse warning:
warning: cast to restricted __be16

Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: most: Remove __cplusplus check in header files
PrasannaKumar Muralidharan [Wed, 23 Mar 2016 07:28:28 +0000 (12:58 +0530)]
Staging: most: Remove __cplusplus check in header files

Remove unnecessary __cplusplus check in header files as it is not
required.

Signed-off-by: PrasannaKumar Muralidharan <prasannatsmkumar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: speakup: fix type mismatch warnings
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

This patch fixes it.

Signed-off-by: Okash Khawaja <okash.khawaja@gmail.com>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: comedi: ni_tio: remove BUG() checks for ni_tio_get_clock_src()
H Hartley Sweeten [Wed, 23 Mar 2016 22:37:04 +0000 (15:37 -0700)]
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>
8 years agostaging: comedi: ni_tio: remove BUG() in ni_tio_set_gate_src()
H Hartley Sweeten [Wed, 23 Mar 2016 22:37:03 +0000 (15:37 -0700)]
staging: comedi: ni_tio: remove BUG() in ni_tio_set_gate_src()

This BUG() can never happen. The previous ni_tio_has_gate2_registers()
check will have already caused the function to return -EINVAL.

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>