Commit graph

45249 commits

Author SHA1 Message Date
Sean Young
b66db53f8d [media] lirc_serial: port to rc-core
Tested with a homebrew serial ir. Remove last remmants of the nslu2
which could not be enabled, and fix checkpatch warnings.

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-22 05:43:47 -02:00
Shiva Kerdel
08711b876d Staging: rtl8712: rtl871x_*: Removed unnecessary else statements after a break or return
The indent code blocks of the else statements were unnecessary
and are better written without them.

Signed-off-by: Shiva Kerdel <shiva@exdev.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-21 11:25:41 +01:00
Vijai Kumar K
09b080f73a staging: rtl8712: Fix coding style warnings on Block comments
Fixed checkpatch.pl warnings related to Block comments in
staging/rtl8712/*.c files.

Signed-off-by: Vijai Kumar K <vijaikumar.kanagarajan@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-21 11:15:18 +01:00
Jian Yu
8d130c3b0f staging/lustre: Use proper number of bytes in copy_from_user
This patch removes the usage of MAX_STRING_SIZE from
copy_from_user() and just copies enough bytes to cover
count passed in.

Signed-off-by: Jian Yu <jian.yu@intel.com>
Reviewed-on: http://review.whamcloud.com/23462
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8774
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-21 11:13:14 +01:00
Vijai Kumar K
354872712e staging: vt6656: Fix coding style warnings on Block comments
Fix checkpatch.pl warnings related to Block comments in
staging/vt6656/rf.c file.

Signed-off-by: Vijai Kumar K <vijaikumar.kanagarajan@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-21 11:13:14 +01:00
Vijai Kumar K
35754e5002 staging: vt6655: Fixed coding style warnings on Block comments
Fixed checkpatch.pl warnings related to Block comments in
staging/vt6655/*.c files.

Signed-off-by: Vijai Kumar K <vijaikumar.kanagarajan@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-21 11:13:14 +01:00
Vijai Kumar K
0575b18118 staging: dgnc: dgnc_tty: Remove blank lines
Fixes checkpatch warning: waitqueue_active without comment

Signed-off-by: Vijai Kumar K <vijaikumar.kanagarajan@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-21 11:10:56 +01:00
Walt Feasel
9310e56703 staging: skein: threefish_block.c Remove blank lines
Make suggested checkpatch modification for

CHECK: Please don't use multiple blank lines

Acked-by: Jason Cooper <jason@lakedaemon.net
Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-21 11:10:56 +01:00
Walt Feasel
4f9f692785 staging: dgnc: digi.h Spelling correction
Make spelling correction for 'regular'

Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-21 11:10:56 +01:00
Walt Feasel
5ef56a3ad5 staging: dgnc: digi.h Comment style modifications
Make modifications to comment style

Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-21 11:10:56 +01:00
Walt Feasel
16465dcd0a staging: dgnc: dgnc_tty.c Spelling corrections
Make spelling corrections for 'transitions' and 'satisfy'

Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-21 11:10:56 +01:00
Walt Feasel
7127fa28a5 staging: dgnc: dgnc_tty.c comment style modifications
Make modifications to comment style

Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-21 11:10:56 +01:00
Walt Feasel
7bd43874cc staging: dgnc: dgnc_tty.c Align on parenthesis
Make suggested checkpatch modification for
CHECK: Alignment should match open parenthesis

Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-21 11:10:56 +01:00
Walt Feasel
acca0c1fb0 staging: dgnc: dgnc_tty.c Space preferred around
Make suggested checkpatch modification for
CHECK: spaces preferred around that '|'

Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-21 11:10:55 +01:00
Sergio Paracuellos
0699669b49 staging: slicoss: fix different address space warnings
Remove incorrect __iomem annotation.

This patch fix the following sparse warnings in slicoss driver:
warning: incorrect type in assignment (different address spaces)

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-21 11:10:55 +01:00
Walt Feasel
020f95cb51 staging: speakup: synth.c Align parenthesis
Make suggested checkpatch modification for
CHECK: Alignment should match open parenthesis

Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-21 11:05:30 +01:00
Walt Feasel
d2ad9a8255 staging: speakup: synth.c Comment modifications
Make modifications to comment style

Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-21 11:05:30 +01:00
Walt Feasel
eaf40ad456 staging: speakup: synth.c Logical continuation
Make suggested checkpatch modification for
CHECK: Logical continuations should be on the
previous line

Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-21 11:05:30 +01:00
Walt Feasel
99f01137b7 staging: speakup: synth.c Blank line before }
Make suggested checkpatch modification for
CHECK: Blank lines aren't necessary before a close brace '}'

Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-21 11:05:30 +01:00
Walt Feasel
c67095cec5 staging: speakup: synth.c Spaces around operators
Make suggested checkpatch modification for
CHECK: spaces preferred around that '|,+,-,/'

Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-21 11:05:30 +01:00
Walt Feasel
dd451964f3 staging: speakup: thread.c align on parenthesis
Make suggested checkpatch modification for
CHECK: Alignment should match open parenthesis

Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-21 11:05:29 +01:00
Walt Feasel
b42fe0bc14 staging: speakup: thread.c Comment modifications
Make comment style modifications

Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-21 11:05:29 +01:00
Walt Feasel
44c8e49b35 staging: speakup: TODO Correct email
Make email correction for kirk@reisers.ca

Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
Acked-by: Chris Brannon <chris@the-brannons.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-21 11:05:29 +01:00
Walt Feasel
9eca657fff staging: speakup: varhandlers.c Align parenthesis
Make suggested checkpatch modification for
CHECK: Alignment should match open parenthesis

Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-21 11:05:29 +01:00
Walt Feasel
26ce8a4fce staging: speakup: varhandlers.c Comment style modifications
Make modifications to comment style

Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-21 11:05:29 +01:00
Walt Feasel
d3010a4c2d staging: dgnc: dgnc_sysfs.c Delete blank line
Make modification to remove extra blank line

Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-19 14:25:11 +01:00
Walt Feasel
a4eac955ef staging: dgnc: dgnc_sysfs.c Comment style modifications
Make modifications to comment style

Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-19 14:25:11 +01:00
Walt Feasel
ee1c0de213 staging: dgnc: dgnc_neo.h Spelling correction
Make spelling correction for 'control'

Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-19 14:25:11 +01:00
Walt Feasel
7b46b400ae staging: dgnc: dgnc_neo.h Comment style modifications
Make modifications for comment style

Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-19 14:25:11 +01:00
Walt Feasel
4e5f26be37 staging: dgnc: dgnc_neo.c Comment style modifications
Make modifications for comment style

Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-19 14:25:11 +01:00
Walt Feasel
29e9b7bf0d staging: dgnc: dgnc_mgmt.c Comment style modifications
Make modifications for comment style

Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-19 14:25:11 +01:00
Sergio Paracuellos
608859b6b8 staging: slicoss: avoid CamelCases slicoss.c
Replace CamelCases to comply with the standard kernel coding style.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-19 14:24:23 +01:00
Sergio Paracuellos
1081bb83a1 staging: slicoss: avoid CamelCases in slichw.h
Replace CamelCases to comply with the standard kernel coding style.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-19 14:24:23 +01:00
Sergio Paracuellos
a81691d1cc staging: slicoss: braces should be used on all arms of this statement
Add braces in if statement to comply with the standard
kernel coding style.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-19 14:24:23 +01:00
Sergio Paracuellos
95263c9556 staging: slicoss: logical continuations should be on the previous line
Move logical or operator to previous line to comply with
the standard kernel coding style.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-19 14:24:23 +01:00
Sergio Paracuellos
0b402c8e0d staging: slicoss: fix parenthesis alignment in slicoss.c
This patch fix open parenthesis alignment matching in slicoss.c
file to comply with the standard kernel coding style.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-19 14:24:23 +01:00
Sergio Paracuellos
b277b90b9e staging: slicoss: avoid CamelCases in slic.h
Replace CamelCases to comply with the standard kernel coding style.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-19 14:23:09 +01:00
Rahul Krishnan
db1a4194c8 staging: Greybus: Remove unnecessary braces for single statement block
This patch fixes the following checkpath.pl warning
WARNING: braces {} are not necessary for single statement blocks

Signed-off-by: Rahul Krishnan <mrahul.krishnan@gmail.com>
Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-19 14:23:09 +01:00
Walt Feasel
46d567e65b staging: dgnc: dgnc_driver.h Spelling correction
Make spelling correction for 'statements'

Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-19 14:21:59 +01:00
Walt Feasel
57fa74f39c staging: dgnc: dgnc_driver.h Align columns
Make modifications to align columns

Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-19 14:21:59 +01:00
Walt Feasel
7cc7ded614 staging: dgnc: dgnc_driver.h Comment style modifications
Make modifications to comment style

Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-19 14:21:59 +01:00
Walt Feasel
778d24d501 staging: dgnc: dgnc_driver.c Blank line before }
Make suggested checkpatch modification for
CHECK: Blank lines aren't necessary before
a close brace '}'

Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-19 14:21:59 +01:00
Walt Feasel
011ec1f7ee staging: dgnc: dgnc_driver.c Remove blank lines
Make suggested checkpatch modification for
CHECK: Please don't use multiple blank lines

Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-19 14:21:59 +01:00
Walt Feasel
b075b4646a staging: dgnc: dgnc_driver.c Comment style modifications
Make modifications to comment styles

Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-19 14:21:59 +01:00
Walt Feasel
747d64f0d2 staging: dgnc: dgnc_cls.c Comment style modifications
Make modifications to comment style format

Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-19 14:21:58 +01:00
Walt Feasel
1858df2928 staging: dgnc: dgnc_cls.h Spelling correction
Make spelling correction for 'control'

Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-19 14:21:58 +01:00
Walt Feasel
1fede02031 staging: vme: vme_user.c Spelling corrections
Make spelling corrections for 'correctly' and
'unregister'

Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
Acked-by: Martyn Welch <martyn at welchs.e.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-19 14:21:58 +01:00
Shiva Kerdel
536e973cd7 Staging: wlan-ng: prism2mgmt: Fixed operators spacing style issues
Fixed spaces around operators to fix their coding style issues.

Signed-off-by: Shiva Kerdel <shiva@exdev.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-19 14:21:58 +01:00
Walt Feasel
ff7b8d8c99 staging: xgifb: XGI_main.h Align data columns
Make modifications to data column alignment

Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-19 14:17:51 +01:00
Walt Feasel
2a3d10798b staging: xgifb: vb_util.h Space after cast
Make suggested checkpatch modification for
CHECK: No space is necessary after a cast

Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-19 14:17:51 +01:00
Walt Feasel
df5d4312fd staging: xgifb: vb_setmode.c Align match parenthesis
Make suggested checkpatch modification for
CHECK: Alignment should match open parenthesis

Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-19 14:17:51 +01:00
Walt Feasel
cf99b3573d staging: xgifb: vb_setmode.c Logical continuation
Make suggested checkpatch modification for
CHECK: Logical continuations should be on the
previous line

Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-19 14:17:51 +01:00
Walt Feasel
f2b839d478 staging: xgifb: vb_setmode.c Space after cast
Make suggested checkpatch modification for
CHECK: No space is necessary after a cast

Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-19 14:17:51 +01:00
Walt Feasel
c193e792ed staging: xgifb: vb_setmode.c Braces single statement blocks
Make suggested checkpatch modificationfor
WARNING: braces {} are not necessary for single
statement blocks

Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-19 14:17:51 +01:00
Walt Feasel
ad1698aab1 staging: xgifb: vb_setmode.c Space around operator
Make suggested checkpatch modificationfor
CHECK: spaces preferred around that '+'

Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-19 14:17:51 +01:00
Walt Feasel
45e44f8d04 staging: xgifb: vb_setmode.c Comment style modifications
Make comment style modifications.

Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-19 14:17:51 +01:00
Walt Feasel
d8ea0a162a staging: xgifb: vb_setmode.c Comment Spelling correction
Make spelling correction for 'vertical'.

Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-19 14:17:51 +01:00
James Simmons
ee32a4984c staging: lustre: libcfs: use uXX instead of __uXX types in headers
The types __[u|s]XX is only used for UAPI headers and userspace.
Only keep these types for the libcfs headers that are UAPI
headers. The rest convert to the standard uXX types.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-19 14:13:45 +01:00
James Simmons
07945bb976 staging: lustre: libcfs: remove zero comparisons in headers
Remove the zero comparisions in the libcfs headers.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-19 14:13:45 +01:00
James Simmons
27b83b3f5b staging: lustre: libcfs: remove NULL comparisons in headers
Remove the NULL comparisions in the libcfs headers.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-19 14:13:45 +01:00
James Simmons
e230dd8bb2 staging: lustre: libcfs: remove whitespace in libcfs_fail.h
One last white space is still left in libcfs_fail.h. Lets
remove it.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-19 14:13:45 +01:00
James Simmons
ebd7531325 staging: lustre: libcfs: use bit macro in libcfs headers
Use the BIT macros instead of (1 << ***) in libcfs
headers.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-19 14:13:45 +01:00
James Simmons
61f3dc4c92 staging: lustre: libcfs: correct spelling in libcfs_cpu.h
Spell the word destroy correctly.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-19 14:13:45 +01:00
James Simmons
6cd80ce971 staging: lustre: libcfs: remove blank line in header
The header libcfs_fail.h has a extra blank line that
is not needed.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-19 14:13:45 +01:00
James Simmons
0b987e3e36 staging: lustre: libcfs: name parameters for function prototypes
Give the parameters names for the function
prototypes in the libcfs headers.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-19 14:13:44 +01:00
James Simmons
4c6d33f975 staging: lustre: libcfs: remove header's bare unsigned use
Fixup the libcfs headers to use the proper unsigned int
instead of raw unsigned.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-19 14:13:44 +01:00
James Simmons
a59e5747d6 staging: lustre: libcfs: fixup all header block comments
Properly format the incorrect comments sections
that were reported by checkpatch.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-19 14:13:44 +01:00
Mikhail Pershin
ab16bdd834 staging: lustre: llog: fix wrong offset in llog_process_thread()
- llh_cat_idx may become bigger than llog bitmap size in
  llog_cat_set_first_idx() function
- it is wrong to use previous cur_offset as new buffer offset,
  new offset should be calculated from value returned by
  llog_next_block().
- optimize llog_skip_over() to find llog entry offset by index
  for llog with fixed-size records.

Signed-off-by: Mikhail Pershin <mike.pershin@intel.com>
Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6714
Reviewed-on: http://review.whamcloud.com/15316
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6163
Reviewed-on: http://review.whamcloud.com/18819
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-19 14:12:10 +01:00
Jonathan Corbet
917fef6f7e Linux 4.9-rc4
-----BEGIN PGP SIGNATURE-----
 
 iQEcBAABAgAGBQJYHmoCAAoJEHm+PkMAQRiG7RMIAI2i7Y5hpL5yCxK5AFaL4u/G
 KxXfp1B1UanUTgjOmd7zGqtDYcFX9t7GTTUFixQ7/9Opr4PD9qbnatoDGSc3xjbT
 msDgA1B78F1/Q3kHWfeGq32MihQ4mj5NwUCo+igUcUvvWG7mHgzErj/Nh5RoobQX
 p/izdpTbrw3GX6xXB8olbG7XWHaVye/+TT3q6+gmgm8I/QEujcLeGoycE0zlhPN8
 FG/JX76At/+ZM2Py7Oxo3k+oKL9CHrtOQYDp/wN0uslV5eYvvkZz0/M1HMOGZt+c
 gZU5jzM17K7C4Nzo06WAuBU9wUBGc25m+cPicLlOmljnzfU+f50SKaDjZq3p7QI=
 =2KUF
 -----END PGP SIGNATURE-----

Merge tag 'v4.9-rc4' into sound

Bring in -rc4 patches so I can successfully merge the sound doc changes.
2016-11-18 16:13:41 -07:00
Jean-Baptiste Abbadie
8be135d052 [media] Staging: media: radio-bcm2048: Remove FSF address from GPL notice
Removes the superfluous statement about writing to the FSF in the GPL
notice

Signed-off-by: Jean-Baptiste Abbadie <jb@abbadie.fr>
Acked-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-18 13:40:01 -02:00
Jean-Baptiste Abbadie
3194e858c5 [media] Staging: media: radio-bcm2048: Fix indentation
Align multiple lines statement with parentheses

Signed-off-by: Jean-Baptiste Abbadie <jb@abbadie.fr>
Acked-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-18 13:39:42 -02:00
Jean-Baptiste Abbadie
24dc974d1c [media] Staging: media: radio-bcm2048: Fix symbolic permissions
This replaces the S_* style permissions by numbers for the __ATTR macros

Signed-off-by: Jean-Baptiste Abbadie <jb@abbadie.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-18 13:39:14 -02:00
James Simmons
8d78f0f2ba staging: lustre: lnet: cleanup some of the > 80 line issues
Cleanup some of the checkpatch over 80 character lines
reported.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-18 08:47:33 +01:00
James Simmons
4c93630fa5 staging: lustre: lnet: use BIT macro in LNet selftest
Some of the defines for lnet selftest can use the BIT
macros.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-18 08:47:32 +01:00
James Simmons
a7e1894c6d staging: lustre: libcfs: remove use of __u* types
The __[u|s]* types are for UAPI headers or user
space. They shouldn't be used in core kernel code.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-18 08:47:32 +01:00
James Simmons
4dd7020d51 staging: lustre: libcfs: use pr_* instead of printk
Checkpatch recommended that we use pr_*() instead
of printk directly.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-18 08:47:32 +01:00
James Simmons
7749489228 staging: lustre: libcfs: Make char * array envp static constant
The envp char array can be made static constant.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-18 08:47:32 +01:00
James Simmons
5d73c772e6 staging: lustre: libcfs: fix misspelling of descriptor
Fix typo for correct spelling.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-18 08:47:32 +01:00
James Simmons
715475ae42 staging: lustre: libcfs: white space cleanup
Remove white space present for variable declarations
or initialization. Cleanup structs was strange
alignments due to white spacing.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-18 08:47:32 +01:00
James Simmons
6fc68ea5f3 staging: lustre: libcfs: remove == 0 testing
Testing == 0 is not kernel style so remove this
type of testing from libcfs.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-18 08:47:32 +01:00
James Simmons
d95531fc06 staging: lustre: libcfs: remove != 0 testing
Testing != 0 is not kernel style so remove this
type of testing from libcfs.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-18 08:47:32 +01:00
James Simmons
c54f79916c staging: lustre: lnet: replace uninitialized_var
Checkpatch for some reason doesn't like the way
libcfs_str2net_internal. Lets just replace it with
nf being set to NULL instead

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-18 08:47:32 +01:00
James Simmons
eb280ab789 staging: lustre: lnet: fill in real lnet_md_t
While checkpatch reported an alignment issue
its just ugly to fill in a data structure being
passed to a function. Instead fill in a lnet_md_t
on the stack and pass that to LNetMDBind.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-18 08:47:32 +01:00
James Simmons
515c175097 staging: lustre: lnet: missing blank line after declaration
Add in missing blank line in lnet_copy_iov2iter() after
variable declarations.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-18 08:47:32 +01:00
James Simmons
68e625340c staging: lustre: lnet: remove unused lib_me_dump
Remove unused lib_me_dump.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-18 08:47:32 +01:00
James Simmons
3d277bf5fc staging: lustre: lnet: fix misspelled word destroy
Fix misspelling of destroy in LNet core.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-18 08:47:31 +01:00
James Simmons
20d63a7adf staging: lustre: libcfs: fix aligment issue
Make alignment match open parenthesis for
parameters to wait_event_interruptible_exclusive()
call.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-18 08:47:31 +01:00
James Simmons
dace630546 staging: lustre: libcfs: remove explicit test of NULL variable
Remove != NULL which is not needed to test key existence.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-18 08:47:31 +01:00
James Simmons
e5ba965732 staging: lustre: libcfs: use static const char const * for a suffixes array
Change the static const array libcfs_debug_subsystems
to use static const char const * as pointed out by
checkpatch.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-18 08:47:31 +01:00
James Simmons
8dddd2681a staging: lustre: lnet: resolve trailing */ errors
This patch resolves the checkpatch error:

Block comments use a trailing */ on a separate line

for the LNet/libcfs layer

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-18 08:47:31 +01:00
James Simmons
a2d288c6b9 staging: lustre: lnet: don't use bare unsigned
Turn all bare unsigned to unsigned int that were
detected by checkpatch in the LNet/libcfs layer.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-18 08:47:31 +01:00
Walt Feasel
1a252b139e staging: xgifb: XGI_main_26.c Align match parenthesis
Make suggested checkpatch modification for
CHECK: Alignment should match open parenthesis

Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-17 16:34:17 +01:00
Walt Feasel
edea29b809 staging: xgifb: XGI_main_26.c Blank line before }
Make suggested checkpatch modification for
CHECK: Blank lines aren't necessary before a close brace '}'

Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-17 16:34:17 +01:00
Walt Feasel
e990c69d57 staging: xgifb: XGI_main_26.c Blank line after {
Make suggested checkpatch modification for
CHECK: Blank lines aren't necessary after an open brace '{'

Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-17 16:34:17 +01:00
Walt Feasel
d20243cce8 staging: xgifb: XGI_main_26.c Space around operator
Make suggested checkpatch modification for
CHECK: spaces preferred around that '-,&'

Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-17 16:34:17 +01:00
Walt Feasel
28d98f8c1c staging: xgifb: XGI_main_26.c Logical continuation
Make suggested checkpatch modification for
CHECK: Logical continuations should be on the previous line

Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-17 16:34:17 +01:00
Walt Feasel
569e5c9d3d staging: xgifb: XGI_main_26.c No space after cast
Make suggested checkpatch modification for
CHECK: No space is necessary after a cast

Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-17 16:34:17 +01:00
Walt Feasel
d992148395 staging: xgifb: XGI_main_26.c Comment style modifications
Make comment style modifications.

Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-17 16:34:17 +01:00
Yamanappagouda Patil
20a035e2d8 Staging: rtl8712: Fixed 'tabstop' coding style warnings.
Fixed checkpatch warning "Statements should start on a tabstop" in
rtl8712 module.

Signed-off-by: Yamanappagouda Patil <goudapatilk@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-17 16:32:33 +01:00
Walt Feasel
bb1243a6fb staging: xgifb: vb_init.c Comment style
Make various comment style modifications.

Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-17 16:32:33 +01:00
Walt Feasel
945e17cef5 staging: xgifb: vb_init.c Align on parenthesis
Make suggested checkpatch modification for:
CHECK: Alignment should match open parenthesis.

Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-17 16:32:32 +01:00
Walt Feasel
49a906a943 staging: xgifb: vb_init.c Logical continuation
Make suggested checkpatch modification for:
CHECK: Logical continuations should be on the previous line.

Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-17 16:32:32 +01:00
Niu Yawei
a3078477d5 staging/lustre/ptlrpc: update imp_known_replied_xid on resend-replay
The imp_known_replied_xid should be updated when try to resend
an already replied replay request, because the xid of this replay
request could be less than current imp_known_replied_xid.

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-on: http://review.whamcloud.com/22776
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8645
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-17 16:32:32 +01:00
Niu Yawei
80dd4c42cc staging/lustre/ptlrpc: track unreplied requests
The request xid was used to make sure the ost object timestamps
being updated by the out of order setattr/punch/write requests
properly. However, this mechanism is broken by the multiple rcvd
slot feature, where we deferred the xid assignment from request
packing to request sending.

This patch moved back the xid assignment to request packing, and
the manner of finding lowest unreplied xid is changed from scan
sending & delay list to scan a unreplied requests list.

This patch also skipped packing the known replied XID in connect
and disconnect request, so that we can make sure the known replied
XID is increased only on both server & client side.

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-on: http://review.whamcloud.com/16759
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5951
Reviewed-by: Gregoire Pichon <gregoire.pichon@bull.net>
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>
2016-11-17 16:32:32 +01:00
Greg Kroah-Hartman
f5f4c80e9a staging: vc04_services: add HAS_DMA dependancy
We need DMA for this, otherwise the build breaks, so fix this up.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Cc: Stephen Warren <swarren@wwwdotorg.org>
Cc: Lee Jones <lee@kernel.org>
Cc: Eric Anholt <eric@anholt.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-17 09:39:59 +01:00
Mauro Carvalho Chehab
36f94a5cf0 Linux 4.9-rc5
-----BEGIN PGP SIGNATURE-----
 
 iQEcBAABAgAGBQJYKLHHAAoJEHm+PkMAQRiGOqoH/iTmywTeevTpx4jbEb8u3LAR
 Bi1ACuBjJKJgYemRPdnH9e1/6nHRkw8EhwUIb2Jv4pyRb+pV2ssxy5sRinY8k9qw
 9pRf+DS9158c5Mc5lZTc3wnRMs49+zowgGpzUjw2HIFoq3E3H0bYpsCl144e4Y8z
 0R6jDKL/YXa9tzVVDTjHG9aG/l0Anc2VzFnWSalNhX5W2PSKc2QtticR3+kTVnA3
 oP4q5UCymdwrZ33XLVldmHqE3n9m8wKGn+gBUMCoJwt5DVRSjqXeT+IkmLdESHEH
 2GyFBE120coYLxTN8CAB4Wa/Woyr0VG6OJvX+Lq3zbnehjteAGOXHzBwYrIOsGc=
 =EwHz
 -----END PGP SIGNATURE-----

Merge tag 'v4.9-rc5' into patchwork

Linux 4.9-rc5

* tag 'v4.9-rc5': (1102 commits)
  Linux 4.9-rc5
  gp8psk: Fix DVB frontend attach
  gp8psk: fix gp8psk_usb_in_op() logic
  dvb-usb: move data_mutex to struct dvb_usb_device
  iio: maxim_thermocouple: detect invalid storage size in read()
  aoe: fix crash in page count manipulation
  lightnvm: invalid offset calculation for lba_shift
  Kbuild: enable -Wmaybe-uninitialized warnings by default
  pcmcia: fix return value of soc_pcmcia_regulator_set
  infiniband: shut up a maybe-uninitialized warning
  crypto: aesni: shut up -Wmaybe-uninitialized warning
  rc: print correct variable for z8f0811
  dib0700: fix nec repeat handling
  s390: pci: don't print uninitialized data for debugging
  nios2: fix timer initcall return value
  x86: apm: avoid uninitialized data
  NFSv4.1: work around -Wmaybe-uninitialized warning
  Kbuild: enable -Wmaybe-uninitialized warning for "make W=1"
  lib/stackdepot: export save/fetch stack for drivers
  mm: kmemleak: scan .data.ro_after_init
  ...
2016-11-16 16:42:27 -02:00
Hans Verkuil
764040c49c [media] s5p-cec/st-cec: update TODOs
Update the TODOs explaining why these two drivers remain in
staging. The reason is that these drivers rely on userspace to
set the physical address, but that should come from the HDMI
output driver. This in turn needs the upcoming HDMI notifier
framework.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-16 15:47:58 -02:00
Hans Verkuil
aee4c782df [media] pulse8-cec: move out of staging
Now that the CEC framework has been moved out of staging and into the
mainline kernel we can do the same for the pulse8-cec driver.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-16 15:47:12 -02:00
Hans Verkuil
0dbacebede [media] cec: move the CEC framework out of staging and to media
The last open issues have been addressed, so it is time to move
this out of staging and into the mainline and to move the public
cec headers to include/uapi/linux.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-16 15:40:20 -02:00
Hans Verkuil
a69a168a1b [media] cec: add proper support for CDC-Only CEC devices
CDC-Only CEC devices are CEC devices that can only handle CDC messages,
all other messages are ignored.

Add a flag to signal that this is a CDC-Only device and act accordingly.

Also add helper functions to identify if a CEC device is configured as a
CDC-Only device, a second TV, a switch or a processor, since these variations
cannot be determined by the logical address alone.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-16 15:36:03 -02:00
Hans Verkuil
f5580d8d6f [media] cec: accept two replies for CEC_MSG_INITIATE_ARC
The CEC_MSG_INITIATE_ARC message is special since it is the ONLY
CEC message that accepts two possible valid replies:

CEC_MSG_REPORT_ARC_INITIATED and CEC_MSG_REPORT_ARC_TERMINATED.

So if the transmitted message is CEC_MSG_INITIATE_ARC and the remote
side replied with CEC_MSG_REPORT_ARC_INITIATED or CEC_MSG_REPORT_ARC_TERMINATED,
then a msg->reply value of CEC_MSG_REPORT_ARC_INITIATED or
CEC_MSG_REPORT_ARC_TERMINATED will match either reply.

I thought about either adding a second reply2 field, but that's ugly
for all other messages that have only one reply, and what if in the
future a new message is added that can have three replies?

Another option would be to add a cec_msg flag, but really, the combination
of CEC_MSG_REPORT_ARC_INITIATED and a reply value of one of the two
possible replies already functions as a flag.

Another advantage of this approach is that it is safe to re-use a
cec_msg struct. No need to zero a flags field or a reply2 field.

So since this really is an exception in the CEC specification, I
decided to implement it as an exception as well.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-16 15:34:55 -02:00
Hans Verkuil
3074fe4a7d [media] cec: filter invalid messages
As per the CEC specification:

- CEC messages with a too-small payload should be ignored.
- Broadcast messages that are only allowed as directed messages
  should be ignored.
- Directed messages that are only allowed as broadcast messages
  should be ignored.

Implement this in the core CEC framework.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-16 15:33:44 -02:00
Hans Verkuil
adc0c62278 [media] cec: add CEC_MSG_FL_REPLY_TO_FOLLOWERS
Give the caller more control over how replies to a transmit are
handled. By default the reply will only go to the filehandle that
called CEC_TRANSMIT. If this new flag is set, then the reply will
also go to all followers.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-16 15:32:56 -02:00
Hans Verkuil
f4062625ed [media] cec: add flag to cec_log_addrs to enable RC passthrough
By default the CEC_MSG_USER_CONTROL_PRESSED/RELEASED messages
are passed on to the follower(s) only. If the new
CEC_LOG_ADDRS_FL_ALLOW_RC_PASSTHRU flag is set in the
flags field of struct cec_log_addrs then these messages are also
passed on to the remote control input subsystem and they will appear
as keystrokes.

This used to be the default behavior, but now you have to explicitly
enable it. This is done to force the caller to think about possible
security issues (e.g. if these messages are used to enter passwords).

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-16 15:32:07 -02:00
Arnd Bergmann
6fde3789a2 staging: vc04_services: clarify firmware dependency
The raspberrypi-firmware driver may be built as a loadable module,
which causes a link-time failure if the vc04_services driver is
built-in during compile-testing:

drivers/staging/vc04_services/vchiq.o: In function `vchiq_probe':
vchiq_connected.c:(.text.vchiq_probe+0x2c): undefined reference to `rpi_firmware_get'
drivers/staging/vc04_services/vchiq.o: In function `vchiq_platform_init':
vchiq_connected.c:(.text.vchiq_platform_init+0x1f0): undefined reference to `rpi_firmware_property'

This extends the dependency list to ensure the firmware is either
reachable, or completely disabled in case of compile-testing.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-16 18:30:46 +01:00
Arnd Bergmann
b826d73b30 staging: vc04_services: remove duplicate mutex_lock_interruptible
The driver tries to redefine mutex_lock_interruptible as an open-coded
mutex_lock_killable, but that definition clashes with the normal
mutex_lock_interruptible definition when CONFIG_DEBUG_LOCK_ALLOC
is set:

staging/vc04_services/interface/vchiq_arm/vchiq_killable.h:67:0: error: "mutex_lock_interruptible" redefined [-Werror]
 #define mutex_lock_interruptible mutex_lock_interruptible_killable
include/linux/mutex.h:161:0: note: this is the location of the previous definition

This simply removes the private implementation and uses the
normal mutex_lock_killable directly.

We could do the same for the down_interruptible_killable here, but
it's better to just remove the semaphores entirely from the driver,
which also takes care of that.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-16 18:30:46 +01:00
Arnd Bergmann
735bb39ca3 staging: wilc1000: simplify vif[i]->ndev accesses
With gcc-7, I got a new warning for this driver:

wilc1000/linux_wlan.c: In function 'wilc_netdev_cleanup':
wilc1000/linux_wlan.c:1224:15: error: 'vif[1]' may be used uninitialized in this function [-Werror=maybe-uninitialized]
wilc1000/linux_wlan.c:1224:15: error: 'vif[0]' may be used uninitialized in this function [-Werror=maybe-uninitialized]

A closer look at the function reveals that it's more complex than
it needs to be, given that based on how the device is created
we always get

	netdev_priv(vif->ndev) == vif

Based on this assumption, I found a few other places in the same file
that can be simplified. That code appears to be a relic from times
when the assumption above was not valid.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-16 18:30:22 +01:00
Hans Verkuil
acd4973563 [media] pulse8-cec: set all_device_types when restoring config
When the persistent state is restored, the all_device_types field
was never filled in. Fix this.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-16 15:29:37 -02:00
Maninder Singh
64bab1a20c [media] staging: st-cec: add parentheses around complex macros
This patch fixes the following checkpatch.pl error:
ERROR: Macros with complex values should be enclosed in parentheses

Signed-off-by: Maninder Singh <maninder.s2@samsung.com>
Acked-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-16 15:23:10 -02:00
Greg Kroah-Hartman
2c52b1efd6 Third set of IIO new device support, features and cleanup for the 4.10 cycle.
Includes Peter Rosin's interesting drivers for a comparator. First complex
 use we have had with an analog front end made from discrete components.
 
 Brian Masney's work on moving the tsl2583 driver out of staging also
 feature extensively!
 
 New Drivers
 * DAC based on a digital potentiometer
   - New driver for the use of a dpot as a DAC. Includes bindings and Axentia
   entry in vendor prefixes.
 * Envelope detector baed on DAC and a comparator including device tree
   bindings.
 
 Staging Graduation
 * tsl2583.
 
 Core new features
 - Core provision for _available attributes.   This one had been stalled for
   a long time until Peter picked it up and ran with it!
 - In kernel interface helpers to retrieve available info from channels.
 
 Driver new features
 * mcp4531
   - Add range of available raw values (used for the dpot dac driver).
 
 Driver cleanups and fixes for issues introduced
 * ad7766
   - Testing the wrong variable following devm_regulator_bulk_get introduced
   with the driver earlier in this cycle.
 * ad9832
   - Fix a wrong ordering in the probe introduced in the previous set of
     patches.  A use before allocation bug.
 * cros_ec_sensors
   - Testing for an error in a u8 will never work.
 * mpu3050
   - Remove duplicate initializer for the module owner.
   - Add missing i2c dependency.
   - Inform the i2c mux core how it is used - step one in implifying device
   tree bindings.
 * st-sensors
   - Get rid of large number of uninformative defines in favour of putting the
   constants where they are relevant. It is clear what they are from where
   they are used.
 * tsl2583
   - Fix unused function warning when CONFIG_PM disabled and remove the
   ifdefs in favour of __maybe_unused.
   - Refactor taos_chip_on  to only read relevant registers.
   - Make sure calibscale and integration time are being set.
   - Verify chip is in ready to be used before calibration.
   - Remove some repeated checks for chip status (it's protected by a mutex
   so can't change until it's released)
   - Change current state storage from a tristate enum to a boolean seeing as
   only two values are actually used now.
   - Drop a redundant write to the control regiser in taos_probe (it's a noop)
   - Drop the FSF mailing address.
   - Clean up logging to not use hard coded function names (use __func__
   instead).
   - Cleanup up variable and function name prefixes.
   - Alignment of #define fixes.
   - Fix comparison between signed and unsigned integer warnings.
   - Add some newlines in favour of readability.
   - Combine the two sysfs ABI docs that somehow ended up in different places.
   - Fix multiline comment syntax.
   - Move a code block to inside an else statement as it makes more sense there.
   - Change tsl2583_als_calibrate to return 0 rather than a value nothing
   reads.
   - Drop some pointless brackets
   - Don't assume 32bit unsigned int.
   - Change to a per device instance lux table.
   - Add missing tsl2583 to the list of supported devices in the intro comments.
   - Improve commment on clearing of interrupts.
   - Drop some uninformative comments.
   - Drop a memset call that doesn't do anything useful any more.
   - Don't initialize some return variables that are always set.
   - Add Brian Masney as a module author after all these changes.
 -----BEGIN PGP SIGNATURE-----
 
 iQIuBAABCAAYBQJYKMYhERxqaWMyM0BrZXJuZWwub3JnAAoJEFSFNJnE9BaIiNMP
 /00ZTTfPR/I5VtriTchGTgXN6lDTnypFk9Z4niynK3EIdF6Mw5XphQjtUzg7sJl4
 U7yH89lzt0PxAJHylW5x0YOwrr6fyau+rNA2Kj26psaQpf5Yva0UDRexsomTZaad
 P005cf0yc4fuG/7KvjeONeLeaRXf9Qfs20r8htECLFhIGSE0qsGtfzUMn6tdbyn/
 r/hxHR7oE2YThuFytX2sNJEJVmCDz+tTOz7kJv5L0e6Cg6cvMFizYUsoFYcZYGOQ
 DNicdRfW5FOidBMCqXzYLDBn+oY+a35g90hFV3CvYsfEm+X6BzTgr3FI3PHmtXHT
 RRAmRdgxg2z/rqp475f5EamRtZxEg0uktbqcs9bH8Bx7IDe8KtoNKLdPdxIT3T1D
 ZYb0RkpPmfnBq3bDGh7DJVWl+Ht9Fj0jaKRNyWgiyopA9c6zN4MKRA+HNSxKRvD7
 Qizw0QIPbtEGkw6WbQrrOSSwzNY/dq51vrT0eBmMaGpjmdDpRKrK53/k7uwk3/Wv
 hjGWD5kdLRCAHL+EQKFssN/RgLS5PRhXsJQFeIYbH8VJFlEZ28j09gXJnjcpDucK
 CXv37q8CX6wJ2NB+i+skOvKpxArgv+Mr4oE9LNYZie65EUyN28/Ii1n9vYmTPTlG
 KXGKPynaR0sfrl+ir6+FCtuFXJnYC5WUqJH/yMRjA2z8
 =mPkb
 -----END PGP SIGNATURE-----

Merge tag 'iio-for-4.10c' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next

Jonathan writes:

Third set of IIO new device support, features and cleanup for the 4.10 cycle.

Includes Peter Rosin's interesting drivers for a comparator. First complex
use we have had with an analog front end made from discrete components.

Brian Masney's work on moving the tsl2583 driver out of staging also
feature extensively!

New Drivers
* DAC based on a digital potentiometer
  - New driver for the use of a dpot as a DAC. Includes bindings and Axentia
  entry in vendor prefixes.
* Envelope detector baed on DAC and a comparator including device tree
  bindings.

Staging Graduation
* tsl2583.

Core new features
- Core provision for _available attributes.   This one had been stalled for
  a long time until Peter picked it up and ran with it!
- In kernel interface helpers to retrieve available info from channels.

Driver new features
* mcp4531
  - Add range of available raw values (used for the dpot dac driver).

Driver cleanups and fixes for issues introduced
* ad7766
  - Testing the wrong variable following devm_regulator_bulk_get introduced
  with the driver earlier in this cycle.
* ad9832
  - Fix a wrong ordering in the probe introduced in the previous set of
    patches.  A use before allocation bug.
* cros_ec_sensors
  - Testing for an error in a u8 will never work.
* mpu3050
  - Remove duplicate initializer for the module owner.
  - Add missing i2c dependency.
  - Inform the i2c mux core how it is used - step one in implifying device
  tree bindings.
* st-sensors
  - Get rid of large number of uninformative defines in favour of putting the
  constants where they are relevant. It is clear what they are from where
  they are used.
* tsl2583
  - Fix unused function warning when CONFIG_PM disabled and remove the
  ifdefs in favour of __maybe_unused.
  - Refactor taos_chip_on  to only read relevant registers.
  - Make sure calibscale and integration time are being set.
  - Verify chip is in ready to be used before calibration.
  - Remove some repeated checks for chip status (it's protected by a mutex
  so can't change until it's released)
  - Change current state storage from a tristate enum to a boolean seeing as
  only two values are actually used now.
  - Drop a redundant write to the control regiser in taos_probe (it's a noop)
  - Drop the FSF mailing address.
  - Clean up logging to not use hard coded function names (use __func__
  instead).
  - Cleanup up variable and function name prefixes.
  - Alignment of #define fixes.
  - Fix comparison between signed and unsigned integer warnings.
  - Add some newlines in favour of readability.
  - Combine the two sysfs ABI docs that somehow ended up in different places.
  - Fix multiline comment syntax.
  - Move a code block to inside an else statement as it makes more sense there.
  - Change tsl2583_als_calibrate to return 0 rather than a value nothing
  reads.
  - Drop some pointless brackets
  - Don't assume 32bit unsigned int.
  - Change to a per device instance lux table.
  - Add missing tsl2583 to the list of supported devices in the intro comments.
  - Improve commment on clearing of interrupts.
  - Drop some uninformative comments.
  - Drop a memset call that doesn't do anything useful any more.
  - Don't initialize some return variables that are always set.
  - Add Brian Masney as a module author after all these changes.
2016-11-16 17:20:40 +01:00
Wei Yongjun
4a3229834d [media] s5p-cec: remove unused including <linux/version.h>
Remove including <linux/version.h> that don't need it.

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-16 13:27:39 -02:00
Javier Martinez Canillas
2411434a2b [media] st-cec: Fix module autoload
If the driver is built as a module, autoload won't work because the module
alias information is not filled. So user-space can't match the registered
device with the corresponding module.

Export the module alias information using the MODULE_DEVICE_TABLE() macro.

Before this patch:

$ modinfo drivers/staging/media//st-cec/stih-cec.ko | grep alias
$

After this patch:

$ modinfo drivers/staging/media//st-cec/stih-cec.ko | grep alias
alias:          of:N*T*Cst,stih-cecC*
alias:          of:N*T*Cst,stih-cec

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Acked-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-16 13:21:05 -02:00
Javier Martinez Canillas
0dc5fb0a0b [media] s5p-cec: Fix module autoload
If the driver is built as a module, autoload won't work because the module
alias information is not filled. So user-space can't match the registered
device with the corresponding module.

Export the module alias information using the MODULE_DEVICE_TABLE() macro.

Before this patch:

$ modinfo drivers/staging/media/s5p-cec/s5p-cec.ko | grep alias
$

After this patch:

$ modinfo drivers/staging/media/s5p-cec/s5p-cec.ko | grep alias
alias:          of:N*T*Csamsung,s5p-cecC*
alias:          of:N*T*Csamsung,s5p-cec

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-16 13:20:36 -02:00
Arnd Bergmann
eadf081146 [media] s5p-cec: mark PM functions as __maybe_unused again
A bugfix removed the two callers of s5p_cec_runtime_suspend
and s5p_cec_runtime_resume, leading to the return of a harmless
warning that I had previously fixed in commit aee8937089
("[media] s5p_cec: mark suspend/resume as __maybe_unused"):

staging/media/s5p-cec/s5p_cec.c:234:12: error: ‘s5p_cec_runtime_suspend’ defined but not used [-Werror=unused-function]
staging/media/s5p-cec/s5p_cec.c:242:12: error: ‘s5p_cec_runtime_resume’ defined but not used [-Werror=unused-function]

This adds the __maybe_unused annotations to the function that
were not removed and that are now unused when CONFIG_PM
is disabled.

Fixes: 57b978ada0 ("[media] s5p-cec: fix system and runtime PM integration")

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-16 13:04:47 -02:00
Punit Vara
81710951fb Staging: ks7010: Use preffered kernel types
Replace uint8_t, uint16_t and uint32_t with preferred kernel types
u8, u16 and u32 respectively suggested by checkpatch.pl

Signed-off-by: Punit Vara <punitvara@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-16 08:23:23 +01:00
Walt Feasel
ef50db6357 staging: xgifb: vb_table.h Preferred space around
Make suggested modification from checkpatch in reference
to: CHECK: spaces preferred around that '+'

Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-16 08:23:23 +01:00
Walt Feasel
9703cad45f staging: xgifb: vb_table.h Blank line after declarations
Make suggested modification from checkpatch in reference
to: CHECK: Please use a blank line after
function/struct/union/enum declarations

Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-16 08:23:23 +01:00
David S. Miller
bb598c1b8c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Several cases of bug fixes in 'net' overlapping other changes in
'net-next-.

Signed-off-by: David S. Miller <davem@davemloft.net>
2016-11-15 10:54:36 -05:00
Ian Abbott
e3007002f1 staging: comedi: ni_mio_common: remove variable 'dl' in ni_ai_insn_read()
In `ni_ai_insn_read()`, local variable `dl` is declared as `unsigned
long`, but `unsigned int` will do.  Get rid of it and use local variable
`d` instead.  (That used to be `unsigned short`, but has been `unsigned
int` since kernel version 3.18.)

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-15 11:04:21 +01:00
Ian Abbott
857a661020 staging: comedi: ni_mio_common: fix E series ni_ai_insn_read() data
Commit 0557344e21 ("staging: comedi: ni_mio_common: fix local var for
32-bit read") changed the type of local variable `d` from `unsigned
short` to `unsigned int` to fix a bug introduced in
commit 9c340ac934 ("staging: comedi: ni_stc.h: add read/write
callbacks to struct ni_private") when reading AI data for NI PCI-6110
and PCI-6111 cards.  Unfortunately, other parts of the function rely on
the variable being `unsigned short` when an offset value in local
variable `signbits` is added to `d` before writing the value to the
`data` array:

			d += signbits;
		  	data[n] = d;

The `signbits` variable will be non-zero in bipolar mode, and is used to
convert the hardware's 2's complement, 16-bit numbers to Comedi's
straight binary sample format (with 0 representing the most negative
voltage).  This breaks because `d` is now 32 bits wide instead of 16
bits wide, so after the addition of `signbits`, `data[n]` ends up being
set to values above 65536 for negative voltages.  This affects all
supported "E series" cards except PCI-6143 (and PXI-6143). Fix it by
ANDing the value written to the `data[n]` with the mask 0xffff.

Fixes: 0557344e21 ("staging: comedi: ni_mio_common: fix local var for 32-bit read")
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Cc: <stable@vger.kernel.org>
----
Needs backporting to stable kernels 3.18 onwards.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-15 11:04:21 +01:00
Ian Abbott
655c4d442d staging: comedi: ni_mio_common: fix M Series ni_ai_insn_read() data mask
For NI M Series cards, the Comedi `insn_read` handler for the AI
subdevice is broken due to ANDing the value read from the AI FIFO data
register with an incorrect mask.  The incorrect mask clears all but the
most significant bit of the sample data.  It should preserve all the
sample data bits.  Correct it.

Fixes: 817144ae7f ("staging: comedi: ni_mio_common: remove unnecessary use of 'board->adbits'")
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Cc: <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-15 11:04:21 +01:00
Yamanappagouda Patil
29f2224647 staging: rtl8192e: Added new line after declaration
Fixed checkpatch.pl "Missing a blank line after declarations" warnings.

Signed-off-by: Yamanappagouda Patil <goudapatilk@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-15 11:01:54 +01:00
Yamanappagouda Patil
839396f555 staging: rtl8192e: Fixed coding style wornings on Block comments.
Fixed checkpatch.pl warnings related to Block comments in
staging/rtl8192e/*.c files.

Signed-off-by: Yamanappagouda Patil <goudapatilk@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-15 11:01:54 +01:00
Shiva Kerdel
cbafdc9816 Staging: fsl-mc: include: mc: Kernel type 'int' preferred over 's16'
After following a discussion about the used integer types Dan Carpenter
pointed out that 'int' types should be used over the current change to
's16'. The reason for this is to have an upper bound instead of overflowing
the 's16' so we could still remove devices.

Signed-off-by: Shiva Kerdel <shiva@exdev.nl>
Suggested-by: Stuart Yoder <stuart.yoder@nxp.com>
Suggested-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-15 11:01:54 +01:00
Gregoire Pichon
7cb15d0448 staging: lustre: mdc: manage number of modify RPCs in flight
This patch is the main client part of a new feature that supports
multiple modify metadata RPCs in parallel. Its goal is to improve
metadata operations performance of a single client, while maintening
the consistency of MDT reply reconstruction and MDT recovery
mechanisms.

It allows to manage the number of modify RPCs in flight within
the client obd structure and to assign a virtual index (the tag) to
each modify RPC to help server side cleaning of reply data.

The mdc component uses this feature to send multiple modify RPCs
in parallel.

Signed-off-by: Gregoire Pichon <gregoire.pichon@bull.net>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5319
Reviewed-on: http://review.whamcloud.com/14374
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-15 11:01:17 +01:00
Henri Doreau
0ffaa9c8eb staging: lustre: hsm: Use file lease to implement migration
Implement non-blocking migration based on exclusive open instead of
group lock. Implemented exclusive close operation to atomically put
a lease, swap two layouts and close a file. This allows race-free
migrations.

Make the caller responsible for retrying on failure (EBUSY, EAGAIN)
in non-blocking mode.

In blocking mode, allow applications to trigger layout swaps using a
grouplock they already own, to prevent race conditions between the
actual data copy and the layout swap. Updated lfs accordingly. File
leases are also taken in blocking mode, so that lfs migrate can issue
a warning if an application attempts to open a file that is being
migrated and gets blocked.

Timestamps (atime/mtime) are set from userland, after the layout swap
is performed, to prevent conflicts with the grouplock.

lli_trunc_sem is taken/released in the vvp_io layer, under the DLM
lock. This re-ordering fixes the original issue between truncate and
migrate.

Signed-off-by: Henri Doreau <henri.doreau@cea.fr>
Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4840
Reviewed-on: http://review.whamcloud.com/10013
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: frank zago <fzago@cray.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-14 16:16:57 +01:00
Liang Zhen
b73d803b65 staging: lustre: lnet: add offset for selftest brw
In current lnet selftest, both client and server side bulk have
no offset and we can only test page aligned IO, this patch changed
this:

- user can set brw offset by lst add_test ... brw off=OFFSET ...
- offset is only effective on client side so far
- to simply implementation, offset needs to be eight bytes aligned

Signed-off-by: Liang Zhen <liang.zhen@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5718
Reviewed-on: http://review.whamcloud.com/12496
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-14 16:16:57 +01:00
wang di
482b27d897 staging: lustre: lmv: lock necessary part of lmv_add_target
Release lmv_init_mutex once the new target is added
into lmv_tgt_desc, so lmv_obd_connect will not be
serialized.

New target should be allowed to added to fld client
lists, so FLD can always choose new added target to
do the FLD lookup request, and also remove some noise
error messages in this process.

Signed-off-by: wang di <di.wang@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6713
Reviewed-on: http://review.whamcloud.com/15269
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-14 16:16:57 +01:00
Liang Zhen
8bcaef9266 staging: lustre: ptlrpc: mbits is sent within ptlrpc_body
ptlrpc is using rq_xid as matchbits of bulk data, which means it
has to change rq_xid for bulk resend to avoid several bulk data
landing into the same buffer from different resends.

This patch uses one of reserved __u64 of ptlrpc_body to transfer
mbits to peer, matchbits is now separated from xid. With this change,
ptlrpc can keep rq_xid unchanged on resend, it only updates matchbits
for bulk data.

This protocol change is only applied if both sides of connection have
OBD_CONNECT_BULK_MBITS, otherwise, ptlrpc still uses old approach and
update xid while resending bulk.

Signed-off-by: Liang Zhen <liang.zhen@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3534
Reviewed-on: http://review.whamcloud.com/15421
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-14 16:15:21 +01:00
John L. Hammond
dff37ca97a staging: lustre: obd: rename obd_unpackmd() to md_unpackmd()
obd_unpackmd() is only implemented by LMV so move it from OBD
operations to OBD MD operations and update the prototype to reflex
the actual usage. Remove the unused function obd_free_memmd().

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5814
Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-on: http://review.whamcloud.com/13737
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-14 16:15:21 +01:00
Jinshan Xiong
6a9b2c9276 staging: lustre: clio: get rid of cl_req
Implement cl_req_attr_set with a cl_object operation.
Get rid of cl_req and related function and data structures.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6943
Reviewed-on: http://review.whamcloud.com/15833
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-14 16:15:21 +01:00
Aditya Pandit
bb371b952a staging: lustre: llite: tar restore fails for HSM released files.
If you create a file, archive and release it, it keeps only a
link and all information in xattr. If you tar the file
with --xattr you will store the same striping information and link
information in the tar. If you delete the file, the file and archive
state does not make sense. Now if you restore the file using tar
with xattr having the RELEASED flag turned on, then it is not correct
because this is a new file. Hence ignoring the HSM xattr and masking
out the "RELEASED" flag for the files, which are not archived.

Signed-off-by: Aditya Pandit <panditadityashreesh@yahoo.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6214
Reviewed-on: http://review.whamcloud.com/16060
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: frank zago <fzago@cray.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-14 16:13:58 +01:00
wang di
b1839e0e6c staging: lustre: lmv: revalidate the dentry for striped dir
If there are bad stripe during striped dir revalidation,
most likely due the race between close(unlink) and
getattr, then let's revalidate the dentry, instead of
return error, like normal directory.

Signed-off-by: wang di <di.wang@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6831
Reviewed-on: http://review.whamcloud.com/15720
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7078
Reviewed-on: http://review.whamcloud.com/16382
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-14 16:13:58 +01:00
Andreas Dilger
6736cd0b4b staging: lustre: obdclass: remove structure holes to reduce memory
Fix the alignment of fields in commonly-used structures to reduce
memory usage on the client and server.  Structures fixed:

ptlrpc_reply_state: reduced by 8 bytes
obd_device:         reduced by 16 bytes
niobuf_local:       reduced by 8 bytes

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3281
Reviewed-on: http://review.whamcloud.com/16692
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-14 16:13:58 +01:00
Henri Doreau
f6763b6898 staging: lustre: obd: Remove dead code in precleanup
There used to be several pre-cleanup phases, but
only OBD_CLEANUP_EXPORTS is actually used.  Thus
remove the whole notion of precleanup phases.

Signed-off-by: Henri Doreau <henri.doreau@cea.fr>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7034
Reviewed-on: http://review.whamcloud.com/16061
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: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-14 16:13:58 +01:00
Ben Evans
43eb3b3344 staging: lustre: ptlrpc: Move IT_* definitions to lustre_idl.h
Put IT_* definitions into an enum, as they're sent over the wire,
adjust calls, print statements, etc. to use the new enum.

Signed-off-by: Ben Evans <bevans@cray.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6746
Reviewed-on: http://review.whamcloud.com/16228
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-14 16:13:58 +01:00
Andreas Dilger
25782b539d staging: lustre: misc: clean up DFID related error messages
Improve the error messages related to DFID output and parsing
for usage in userspace.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-1606
Reviewed-on: http://review.whamcloud.com/6156
Reviewed-by: Frank Zago <fzago@cray.com>
Reviewed-by: Ben Evans <bevans@cray.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-14 16:13:58 +01:00
Oleg Drokin
b6c6539b7b staging: lustre: osc: Remove remains of osc_ast_guard
osc_ast_guard has been removed by the clio simplification.
Remove the last lock class definition.

Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7148
Reviewed-on: http://review.whamcloud.com/16392
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-14 16:13:57 +01:00
Andreas Dilger
c90cfdba41 staging: lustre: idl: clean up file attribute flags
Remove unused file attribute flag LUSTRE_BFLAG_UNCOMMITTED_WRITES
that was used internally on the client at one point.

Add flags from the kernel which may be useful in the near future.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5017
Reviewed-on: http://review.whamcloud.com/10274
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: wangdi <di.wang@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-14 16:13:57 +01:00
wang di
5ce86eaccf staging: lustre: llite: lookup master inode by ilookup5_nowait
Do not lookup master inode by ilookup5, instead it should
use ilookup5_nowait, otherwise it will cause dead lock,

1. Client1 send chmod req to the MDT0, then on MDT0, it
   enqueues master and all of its slaves lock, (mdt_attr_set()
   ->mdt_lock_slaves()), after gets master and stripe0 lock,
   it will send the enqueue request(for stripe1) to MDT1, then
   MDT1 finds the lock has been granted to client2. Then MDT1
   sends blocking ast to client2.

2. At the same time, client2 tries to unlink the striped
   dir (rm -rf striped_dir), and during lookup, it will hold
   the master inode of the striped directory, whose inode state
   is NEW, then tries to revalidate all of its slaves,
   (ll_prep_inode()->ll_iget()->ll_read_inode2()->
   ll_update_inode().). And it will be blocked on the server
   side because of 1.

3. Then the client get the blocking_ast request, cancel the
   lock, but being blocked by ilookup5 in ll_md_blocking_ast(),
   because the inode state is still NEW.

Signed-off-by: wang di <di.wang@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5344
Reviewed-on: http://review.whamcloud.com/16066
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-14 16:13:57 +01:00
Alexander Boyko
8d2dab899a staging: lustre: ptlrpc: race at req processing
Fix: 5c689e689b ("staging/lustre/ptlrpc: race at req processing")
decreased the race window, but does not remove it. Disable rq_resend
right after MSG_REPLAY flag set. Import lock protects two threads
from race between set/clear MSG_REPLAY and rq_resend flags.

Signed-off-by: Alexander Boyko <alexander_boyko@xyratex.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5554
Xyratex-bug-id: MRP-1888
Reviewed-on: http://review.whamcloud.com/10735
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-14 16:02:55 +01:00
Henri Doreau
95a9cd321c staging: lustre: nrs: serialize executions of nrs_policy_stop
Do not release nrs_lock in nrs_policy_stop0 to prevent op_policy_stop()
from being executed concurrently.

Signed-off-by: Henri Doreau <henri.doreau@cea.fr>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7096
Reviewed-on: http://review.whamcloud.com/16214
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-14 16:02:55 +01:00
Jinshan Xiong
d7f651ad64 staging: lustre: osc: osc_extent should hold refcount to osc_object
To avoid a race that osc_extent and osc_object destroy happens on the
same time, which causes kernel crash.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7164
Reviewed-on: http://review.whamcloud.com/16433
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Patrick Farrell <paf@cray.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-14 16:02:55 +01:00
wang di
a80ba5fe75 staging: lustre: llite: clear dir stripe md in ll_iget
If ll_iget fails during inode initialization, especially
during striped directory lookup after creation failed,
then it should clear stripe MD before make_bad_inode(),
because make_bad_inode() will reset the i_mode, which
can cause ll_clear_inode() skip freeing those stripe MD.

Signed-off-by: wang di <di.wang@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7230
Reviewed-on: http://review.whamcloud.com/16677
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-14 16:02:55 +01:00
wang di
54576e132e staging: lustre: mgc: IR log failure should not stop mount
If clients or other targets can not get IR config lock
or lock, the mount should continue, instead of failing.
Because timeout mechanism will handle the recovery anyway.

Signed-off-by: wang di <di.wang@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6906
Reviewed-on: http://review.whamcloud.com/15728
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-14 16:02:55 +01:00
John L. Hammond
f383a3cbaa staging: lustre: ldlm: improve lock timeout messages
In ldlm_expired_completion_wait() remove the useless LCONSOLE_WARN()
message and upgrade the LDLM_DEBUG() statement to LDLM_ERROR().

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7296
Reviewed-on: http://review.whamcloud.com/16824
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-14 16:02:55 +01:00
Hongchao Zhang
62522cc48c staging: lustre: ptlrpc: reset imp_replay_cursor
At client side, the replay cursor using to speed up the lookup
of committed open requests in its obd_import should be resetted
for normal connection (not reconnection) during recovery.

Signed-off-by: Hongchao Zhang <hongchao.zhang@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6802
Reviewed-on: http://review.whamcloud.com/17351
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-14 16:02:55 +01:00
Hiroya Nozaki
ca42800ced staging: lustre: llite: ll_write_begin/end not passing on errors
Because of a implementation of generic_perform_write(), write(2)
may return 0 with no errno even if EDQUOT or ENOSPC actually
happened in it. This patch fixes the issue with setting a proper
errno to ci_result.

Signed-off-by: Hiroya Nozaki <nozaki.hiroya@jp.fujitsu.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6732
Reviewed-on: http://review.whamcloud.com/15302
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-14 16:02:55 +01:00
Andreas Dilger
6bf18cd3b3 staging: lustre: mdc: remove console spew from mdc_ioc_fid2path
In some cases with a very long pathname, such as with sanity.sh
test_154c, mdc_ioc_fid2path() would spew long debug messages to
the log, because libcfs_debug_vmsg2() refuses to log messages over
one page in size.

Truncate the debug message to only log the last 512 characters
of the pathname, which is sufficient for most debugging, saves a
bit of space in the debug log, and will prevent the debug logging
from printing to the console in the first place.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-1095
Reviewed-on: http://review.whamcloud.com/17078
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-14 16:02:55 +01:00
John L. Hammond
7da42db835 staging: lustre: hsm: prevent migration of HSM archived files
The reference copytool cannot handle migration of HSM archive
files. In the MDT migration path check for HSM attributes and fail if
they are present. In the LMV layer allow creation of volatile files
with any MDT index. Add a test to sanity-hsm to ensure that attempting
to migrate an HSM archive file is handled safely.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6866
Reviewed-on: http://review.whamcloud.com/17511
Reviewed-by: wangdi <di.wang@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-14 16:02:55 +01:00
Andrew Wellington
542c45acfe staging: lustre: llite: support SELinux context labelling
SELinux contexts are applied by the kernel if mount options are
not binary. As we don't use any binary mount options in Lustre,
remove the binary mount option flag.

Signed-off-by: Andrew Wellington <andrew.wellington@anu.edu.au>
Signed-off-by: John L. Hammond <john.hammond@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6950
Reviewed-on: http://review.whamcloud.com/15840
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Sebastien Buisson <sebastien.buisson@bull.net>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-14 16:02:55 +01:00
Jinshan Xiong
1fb26939dc staging: lustre: osc: Do not merge extents with partial pages
After range lock is introduced to Lustre, it's possible for
multiple threads to submit osc_extents with partial pages, and
finally I/O engine may try to merge these extents, which will
end up with assert in osc_build_rpc().

In this patch, osc_extent::oe_no_merge is introduced, and this flag
is set if osc_extent submitted via osc_io_submit() includes partial
pages. This flag is used by I/O engine to stop merging this kind
of extents.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6666
Reviewed-on: http://review.whamcloud.com/15468
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Patrick Farrell <paf@cray.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-14 16:02:55 +01:00
Lai Siyao
e8b237227b staging: lustre: statahead: lock leaks if statahead file recreated
During statahead file may be recreated, though this is rare case,
current code will leak the lock, this patch will release lock in
this case.

Signed-off-by: Lai Siyao <lai.siyao@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7232
Reviewed-on: http://review.whamcloud.com/16841
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-14 16:02:54 +01:00
Gregoire Pichon
c7298013ce staging: lustre: osc: fix max_dirty_mb tunable setting limit
The OSC tunable max_dirty_mb must be set to a value strictly lower
than 2048, as it is assumed by OSS in ofd_grant_alloc() routine.

Signed-off-by: Gregoire Pichon <gregoire.pichon@bull.net>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7218
Reviewed-on: http://review.whamcloud.com/16652
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-14 16:02:54 +01:00
Arnd Bergmann
b8cb86fd95 staging: lustre: ldlm: pl_recalc time handling is wrong
James Simmons reports:
> The ldlm_pool field pl_recalc_time is set to the current
> monotonic clock value but the interval period is calculated
> with the wall clock. This means the interval period will
> always be far larger than the pl_recalc_period, which is
> just a small interval time period. The correct thing to
> do is to use monotomic clock current value instead of the
> wall clocks value when calculating recalc_interval_sec.

This broke when I converted the 32-bit get_seconds() into
ktime_get_{real_,}seconds() inconsistently. Either
one of those two would have worked, but mixing them
does not.

Staying with the original intention of the patch, this
changes the ktime_get_seconds() calls into ktime_get_real_seconds(),
using real time instead of mononic time.

Cc: stable@vger.kernel.org # v4.4+
Fixes: 8f83409cf2 ("staging/lustre: use 64-bit time for pl_recalc")
Reported-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-14 15:56:18 +01:00
Dan Carpenter
46468f03c1 staging/lustre/osc: indent an if statement
We accidentally removed a tab here.  Let's add it back, and some curly
braces as well since this is a muti-line indent.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-14 15:55:05 +01:00
Bobi Jam
f761d016b6 staging: lustre: lov: init LOV stripe type beforehand
When lu_object_alloc() reaches to LOV object init, we need initialize
its stripe type beforehand, so that if something wrong in the conf
buffer, the object chain need to be traversed to free what has been
allocated, with LOV object type be set as LLT_EMPTY, and when the LOV
part is reached, it won't panic without knowing what stripe type it
is.

This patch also improves debug messages in lsm_unpackmd_common(), and
does not return error if the LOV device is still processing config
log while trying to verify a layout buffer.

Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6744
Reviewed-on: http://review.whamcloud.com/15362
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-14 15:54:02 +01:00
John L. Hammond
cf9da27049 staging: lustre: lov: avoid infinite loop in lsm_alloc_plain()
In lsm_alloc_plain() use a signed loop index to avoid an infinite loop
in the error path.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6872
Reviewed-on: http://review.whamcloud.com/15644
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-14 15:54:02 +01:00
Shiva Kerdel
e273d54380 Staging: fsl-mc: include: mc: Kernel type 's32' preferred over 'int32_t'
Follow the kernel type preferrences of using 's32' over 'int32_t'.

Signed-off-by: Shiva Kerdel <shiva@exdev.nl>
Acked-by: Stuart Yoder <stuart.yoder@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-14 15:51:15 +01:00
Shiva Kerdel
04d5b9f79c Staging: fsl-mc: include: mc: Kernel type 's16' preferred over 'int16_t'
Follow the kernel type preferrences of using 's16' over 'int16_t'.

Signed-off-by: Shiva Kerdel <shiva@exdev.nl>
Acked-by: Stuart Yoder <stuart.yoder@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-14 15:51:15 +01:00
Punit Vara
835068d882 Staging: ks7010: Prefer using the BIT macro
Replace all occurences of (1<<x) by BIT(x) in the file
ks7010_sdio.h to get rid of checkpatch.pl "CHECK" output "Prefer
using BIT macro".

Signed-off-by: Punit Vara <punitvara@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-14 15:48:57 +01:00
Daeseok Youn
ece26a694e staging: dgnc: re-arrange functions for removing forward declarations
Re-arrange the functions for removing forward declarations in dgnc_driver.c

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-14 15:47:42 +01:00
Greg Kroah-Hartman
41849215b0 Revert "Staging: vme: Use BIT macro for bit field definitions."
This reverts commit d4ef13130e.

It's wrong :(

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Anton Leshchenko <antonl1911@gmail.com>
Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org
2016-11-14 15:44:57 +01:00
Sergio Paracuellos
d349883fb7 staging: wlan-ng: use GENMASK macro in different defines of hfa384x.h
This patch replace actual mask stuff using BIT macros with
or operators to make use of GENMASK macro which simplifies
code clearity and readibility.

It applies for defines included in hfa384x.h header file.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-14 15:43:20 +01:00
Sergio Paracuellos
408fec3ff8 staging: wlan-ng: use GENMASK macro in different defines of p80211hdr.h
This patch replace actual mask stuff using BIT macros with
or operators to make use of GENMASK macro which simplifies
code clearity and readibility.

It applies for defines included in p80211hdr.h header file.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-14 15:43:20 +01:00
Sergio Paracuellos
e49651b836 staging: wlan-ng: use GENMASK macro in define of p80211netdev.h
This patch replace actual mask stuff using BIT macros with
or operators to make use of GENMASK macro which simplifies
code clearity and readibility.

It applies for defines included in p80211netdev.h header file.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-14 15:43:19 +01:00
Sergio Paracuellos
27e8d46094 staging: wlan-ng: use GENMASK macro in two bitwise operations in prism2sta.c
This patch replace actual mask stuff using BIT macros with
or operators to make use of GENMASK macro which simplifies
code clearity and readibility.

It applies for two bitwise operations included in prism2sta.c source file.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-14 15:43:19 +01:00
kbuild test robot
caac19b97d staging: vc04_services: fix ifnullfree.cocci warnings
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_util.c:65:2-7: WARNING: NULL check before freeing functions like kfree, debugfs_remove, debugfs_remove_recursive or usb_free_urb is not needed. Maybe consider reorganizing relevant code to avoid passing NULL values.

 NULL check before some freeing functions is not needed.

 Based on checkpatch warning
 "kfree(NULL) is safe this check is probably not required"
 and kfreeaddr.cocci by Julia Lawall.

Generated by: scripts/coccinelle/free/ifnullfree.cocci

Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-14 15:38:42 +01:00
kbuild test robot
5209f93b19 staging: vc04_services: fix array_size.cocci warnings
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:193:39-40: WARNING: Use ARRAY_SIZE

 Use ARRAY_SIZE instead of dividing sizeof array with sizeof an element

Semantic patch information:
 This makes an effort to find cases where ARRAY_SIZE can be used such as
 where there is a division of sizeof the array by the sizeof its first
 element or by any indexed element or the element type. It replaces the
 division of the two sizeofs by ARRAY_SIZE.

Generated by: scripts/coccinelle/misc/array_size.cocci

Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-14 15:38:41 +01:00
kbuild test robot
30d84860c9 staging: vc04_services: fix returnvar.cocci warnings
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1788:16-22: Unneeded variable: "status". Return "VCHIQ_SUCCESS" on line 1824

 Remove unneeded variable used to store return value.

Generated by: scripts/coccinelle/misc/returnvar.cocci

Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-14 15:38:41 +01:00
kbuild test robot
53a6e71fdf staging: vc04_services: fix setup_timer.cocci warnings
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1817:2-12: Use setup_timer function for function on line 1818.

 Use setup_timer function instead of initializing timer with the function
 and data fields
Generated by: scripts/coccinelle/api/setup_timer.cocci

Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-14 15:38:41 +01:00
Greg Kroah-Hartman
ce0347c2b0 Merge 4.9-rc5 into staging-next
We want the staging/iio fixes in here as well to resolve issues and
merge problems.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-14 08:53:56 +01:00
Linus Torvalds
85b9df7aa5 Staging/IIO fixes for 4.9-rc5
Here are a few small staging and iio driver fixes for reported issues.
 The last one was cherry-picked from my -next branch to resolve a build
 warning that Arnd fixed, in his quest to be able to turn
 -Wmaybe-uninitialized back on again.  That patch, and all of the others,
 have been in linux-next for a while with no reported issues.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 
 iFYEABECABYFAlgoPA4PHGdyZWdAa3JvYWguY29tAAoJEDFH1A3bLfspzgIAn0/6
 6/P+FYstL3zexr0+xGqcHU/XAJ4p8HJjH9CX8SBHWaMa+KCyPQs6wQ==
 =L1Nv
 -----END PGP SIGNATURE-----

Merge tag 'staging-4.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging

Pull staging/IIO fixes from Grek KH:
 "Here are a few small staging and iio driver fixes for reported issues.

  The last one was cherry-picked from my -next branch to resolve a build
  warning that Arnd fixed, in his quest to be able to turn
  -Wmaybe-uninitialized back on again. That patch, and all of the
  others, have been in linux-next for a while with no reported issues"

* tag 'staging-4.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
  iio: maxim_thermocouple: detect invalid storage size in read()
  staging: nvec: remove managed resource from PS2 driver
  Revert "staging: nvec: ps2: change serio type to passthrough"
  drivers: staging: nvec: remove bogus reset command for PS/2 interface
  staging: greybus: arche-platform: fix device reference leak
  staging: comedi: ni_tio: fix buggy ni_tio_clock_period_ps() return value
  staging: sm750fb: Fix bugs introduced by early commits
  iio: hid-sensors: Increase the precision of scale to fix wrong reading interpretation.
  iio: orientation: hid-sensor-rotation: Add PM function (fix non working driver)
  iio: st_sensors: fix scale configuration for h3lis331dl
  staging: iio: ad5933: avoid uninitialized variable in error case
2016-11-13 10:13:33 -08:00
Brian Masney
f44d5c8ac3 staging: iio: tsl2583: move out of staging
Move tsl2580, tsl2581, tsl2583 driver out of staging into mainline.

Signed-off-by: Brian Masney <masneyb@onstation.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-11-13 13:07:33 +00:00
Brian Masney
c45a226fca staging: iio: tsl2583: add copyright and MODULE_AUTHOR
Add Brian Masney's copyright to the header and to the MODULE_AUTHOR
for all of the staging cleanups that has been done to this driver.

The original MODULE_AUTHOR() did not have a space between his name and
email address. This patch also adds the missing space.

Signed-off-by: Brian Masney <masneyb@onstation.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-11-13 13:07:33 +00:00
Brian Masney
0859fdd319 staging: iio: tsl2583: remove unnecessary variable initialization
The ret variable in tsl2583_suspend() and tsl2583_resume() was
initialized to 0. This is not necessary so this patch removes the
initialization.

Signed-off-by: Brian Masney <masneyb@onstation.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-11-13 13:07:32 +00:00
Brian Masney
b912c6564c staging: iio: tsl2583: remove unnecessary memset call
The entries in the lux table (als_device_lux) can be updated via sysfs
through the function in_illuminance_lux_table_store(). The last row in
the table must be terminated with values that are zero. The sysfs code
already ensures that the last row is all zeros. The call to memset to
clear out the table is not needed so this patch removes the unnecessary
call.

Signed-off-by: Brian Masney <masneyb@onstation.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-11-13 13:07:31 +00:00
Brian Masney
fafc5631d6 staging: iio: tsl2583: remove comment for tsl2583_probe()
The comment for tsl2583_probe() does not provide any useful value.
This patch removes the comment.

Signed-off-by: Brian Masney <masneyb@onstation.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-11-13 13:07:31 +00:00
Brian Masney
2fb2848ff0 staging: iio: tsl2583: clarified comment about clearing interrupts
The comment that describes the code that clears the interrupt bit was
vague and didn't provide much value. This patch adds more detail about
why that bit needs to be cleared.

Signed-off-by: Brian Masney <masneyb@onstation.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-11-13 13:07:30 +00:00
Brian Masney
aadc4c904d staging: iio: tsl2583: add tsl2583 to list of supported devices in the header
The header only listed the tsl2580 and tsl2581 devices as supported by
this driver. This patch adds the tsl2583 since it is also supported by
this driver.

Signed-off-by: Brian Masney <masneyb@onstation.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-11-13 13:07:29 +00:00
Brian Masney
0b6b361e16 staging: iio: tsl2583: move from a global to a per device lux table
The driver contains a global lux table that can be updated via sysfs.
Change this to a per device lux table so that multiple devices can be
hooked up to the same system with different lux tables.

There are 10 entries, plus 1 for the termination segment, set aside for
the entries in the lux table. When updating the lux table via sysfs,
only 9 entries, plus the terminator, could be added. This changes
the code to allow for the 10 entries, plus the terminator.

Signed-off-by: Brian Masney <masneyb@onstation.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-11-13 13:07:29 +00:00
Brian Masney
8386dd50a7 staging: iio: tsl2583: don't assume an unsigned int is 32 bits
in_illuminance_lux_table_store assumes that an unsigned int is 32 bits.
Replace this with sizeof(value[1]).

Signed-off-by: Brian Masney <masneyb@onstation.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-11-13 13:07:28 +00:00
Brian Masney
1ad513604f staging: iio: tsl2583: remove unnecessary parentheses
in_illuminance_lux_table_store() contains some unnecessary parentheses.
This patch removes them since they provide no value.

Signed-off-by: Brian Masney <masneyb@onstation.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-11-13 13:07:27 +00:00
Brian Masney
a8898dced8 staging: iio: tsl2583: change tsl2583_als_calibrate() to return 0 on success
tsl2583_als_calibrate() returns the newly computed gain_trim if the
calibration was successful. This function is only called by
in_illuminance_calibrate_store() and the return value inside that
sysfs attribute is only checked to see if an error was returned.
This patch changes tsl2583_als_calibrate() to return 0 on success.

Signed-off-by: Brian Masney <masneyb@onstation.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-11-13 13:07:27 +00:00
Brian Masney
ed9125566b staging: iio: tsl2583: moved code block inside else statement
The check for ch1lux > ch0lux inside tsl2583_get_lux is only valid if
the ratio is not equal to zero. Move the code block inside the else
statement. This does away with the need to initialize the variables to
zero.

Signed-off-by: Brian Masney <masneyb@onstation.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-11-13 13:07:26 +00:00
Brian Masney
043c1da794 staging: iio: tsl2583: updated code comment to match what the code does
If channel 0 does not have any data, then the code sets the lux to zero.
The corresponding comment says that the last value is returned. This
updates the comment to correctly reflect what the code does. It also
clarifies the comment about why 0 is returned.

Signed-off-by: Brian Masney <masneyb@onstation.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-11-13 13:07:25 +00:00
Brian Masney
2a1e3f074c staging: iio: tsl2583: fix multiline comment syntax
The definition of the tsl2583_device_lux struct has a series of single
line comments. There are two other cases where the multiline comments
did not have an initial blank line. Change these comments to use the
proper multiline syntax.

Signed-off-by: Brian Masney <masneyb@onstation.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-11-13 13:07:25 +00:00
Brian Masney
a3549966ee staging: iio: tsl2583: combine sysfs documentation
There are two separate files describing the tsl2583 sysfs attributes.
Combine the two files into one. Updated the name of the sysfs attributes
to match the current ABI.

Signed-off-by: Brian Masney <masneyb@onstation.org>
Suggested-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-11-13 13:07:24 +00:00
Brian Masney
184f916fa7 staging: iio: tsl2583: change newlines to improve readability
Add and remove newlines to improve code readability in preparation for
moving the driver out of staging.

Signed-off-by: Brian Masney <masneyb@onstation.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-11-13 13:07:24 +00:00
Brian Masney
6d94de6aaf staging: iio: tsl2583: fix comparison between signed and unsigned integers
Fixed warning found by make W=2:

warning: comparison between signed and unsigned integer expressions
[-Wsign-compare]

Signed-off-by: Brian Masney <masneyb@onstation.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-11-13 13:07:23 +00:00