linux-2.6-block.git
9 years agostaging: lustre: lmv: Use kzalloc and kfree
Julia Lawall [Fri, 1 May 2015 15:51:18 +0000 (17:51 +0200)]
staging: lustre: lmv: Use kzalloc and kfree

Replace OBD_ALLOC, OBD_ALLOC_WAIT, OBD_ALLOC_PTR, and OBD_ALLOC_PTR_WAIT by
kalloc/kcalloc, and OBD_FREE and OBD_FREE_PTR by kfree.

A simplified version of the semantic patch that makes these changes is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@ expression ptr,size; @@
- OBD_ALLOC(ptr,size)
+ ptr = kzalloc(size, GFP_NOFS)

@@ expression ptr, size; @@
- OBD_FREE(ptr, size);
+ kfree(ptr);
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: ldlm: Use kzalloc and kfree
Julia Lawall [Fri, 1 May 2015 15:51:19 +0000 (17:51 +0200)]
staging: lustre: ldlm: Use kzalloc and kfree

Replace OBD_ALLOC, OBD_ALLOC_WAIT, OBD_ALLOC_PTR, and OBD_ALLOC_PTR_WAIT by
kalloc/kcalloc, and OBD_FREE and OBD_FREE_PTR by kfree.

A simplified version of the semantic patch that makes these changes is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@ expression ptr,size; @@
- OBD_ALLOC(ptr,size)
+ ptr = kzalloc(size, GFP_NOFS)

@@ expression ptr, size; @@
- OBD_FREE(ptr, size);
+ kfree(ptr);
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: lclient: Use kzalloc and kfree
Julia Lawall [Fri, 1 May 2015 15:51:20 +0000 (17:51 +0200)]
staging: lustre: lclient: Use kzalloc and kfree

Replace OBD_ALLOC, OBD_ALLOC_WAIT, OBD_ALLOC_PTR, and OBD_ALLOC_PTR_WAIT by
kalloc/kcalloc, and OBD_FREE and OBD_FREE_PTR by kfree.

A simplified version of the semantic patch that makes these changes is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@ expression ptr,size; @@
- OBD_ALLOC(ptr,size)
+ ptr = kzalloc(size, GFP_NOFS)

@@ expression ptr, size; @@
- OBD_FREE(ptr, size);
+ kfree(ptr);
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: lustre: fld: Use kzalloc and kfree
Julia Lawall [Fri, 1 May 2015 15:51:21 +0000 (17:51 +0200)]
Staging: lustre: fld: Use kzalloc and kfree

Replace OBD_ALLOC, OBD_ALLOC_WAIT, OBD_ALLOC_PTR, and OBD_ALLOC_PTR_WAIT by
kalloc/kcalloc, and OBD_FREE and OBD_FREE_PTR by kfree.

A simplified version of the semantic patch that makes these changes is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@ expression ptr,size; @@
- OBD_ALLOC(ptr,size)
+ ptr = kzalloc(size, GFP_NOFS)

@@ expression ptr, size; @@
- OBD_FREE(ptr, size);
+ kfree(ptr);
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: fid: Use kzalloc and kfree
Julia Lawall [Fri, 1 May 2015 15:51:22 +0000 (17:51 +0200)]
staging: lustre: fid: Use kzalloc and kfree

Replace OBD_ALLOC, OBD_ALLOC_WAIT, OBD_ALLOC_PTR, and OBD_ALLOC_PTR_WAIT by
kalloc/kcalloc, and OBD_FREE and OBD_FREE_PTR by kfree.

A simplified version of the semantic patch that makes these changes is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@ expression ptr,size; @@
- OBD_ALLOC(ptr,size)
+ ptr = kzalloc(size, GFP_NOFS)

@@ expression ptr, size; @@
- OBD_FREE(ptr, size);
+ kfree(ptr);
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: llite: fix ifnullfree.cocci warnings
kbuild test robot [Thu, 30 Apr 2015 16:21:55 +0000 (00:21 +0800)]
staging: lustre: llite: fix ifnullfree.cocci warnings

drivers/staging/lustre/lustre/llite/dir.c:1440:3-8: 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

CC: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: llite: fix ifnullfree.cocci warnings
kbuild test robot [Thu, 30 Apr 2015 16:21:55 +0000 (00:21 +0800)]
staging: lustre: llite: fix ifnullfree.cocci warnings

drivers/staging/lustre/lustre/llite/llite_lib.c:989: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.
drivers/staging/lustre/lustre/llite/llite_lib.c:991: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

CC: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: fix ifnullfree.cocci warnings
kbuild test robot [Thu, 30 Apr 2015 16:27:35 +0000 (00:27 +0800)]
staging: lustre: fix ifnullfree.cocci warnings

drivers/staging/lustre/lustre/lov/lov_request.c:74:3-8: 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

CC: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: fix ifnullfree.cocci warnings
kbuild test robot [Thu, 30 Apr 2015 16:27:35 +0000 (00:27 +0800)]
staging: lustre: fix ifnullfree.cocci warnings

drivers/staging/lustre/lustre/lov/lov_obd.c:574:3-8: 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

CC: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: comedi: fix code indent coding style issues in daqboard2000.c
Gbenga Adalumo [Wed, 22 Apr 2015 07:39:48 +0000 (00:39 -0700)]
Staging: comedi: fix code indent coding style issues in daqboard2000.c

This is a patch to daqboard2000.c file that fixes  code indent errors found by the checkpatch.pl tool

Signed-off-by: Gbenga Adalumo <gbengadev@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: Remove unwanted lines of code
Gujulan Elango, Hari Prasath (H.) [Thu, 23 Apr 2015 19:14:21 +0000 (19:14 +0000)]
staging: comedi: Remove unwanted lines of code

This patch removes a few lines of code & retains the same functionality

Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: move COMEDI_SRF_... macros to "comedi_fops.c"
Ian Abbott [Tue, 21 Apr 2015 12:18:11 +0000 (13:18 +0100)]
staging: comedi: move COMEDI_SRF_... macros to "comedi_fops.c"

The `COMEDI_SRF_...` macros define flag combinations in the `runflags`
member of `struct comedi_subdevice`.  They are only used directly in
"comedi_fops.c", so move them to there.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: wrap COMEDI_SRF_FREE_SPRIV usage
Ian Abbott [Tue, 21 Apr 2015 12:18:10 +0000 (13:18 +0100)]
staging: comedi: wrap COMEDI_SRF_FREE_SPRIV usage

The `COMEDI_SRF_FREE_SPRIV` flag in the `runflags` member of `struct
comedi_subdevice` indicates that the memory pointed to by the `private`
member can be automatically freed by the comedi core on subdevice
clean-up (when the low-level comedi device is being "detached").  the
flag doesn't really belong in `runflags`, but it was somewhere
convenient to keep it without having to add a new member to the
structure.

Rather than access the `COMEDI_SRF_FREE_SPRIV` flag directly, use some
new wrapper functions:

* comedi_can_auto_free_spriv(s) - checks whether the subdevice's
  `s->private` points to memory that can be freed automatically.
* comedi_set_spriv_auto_free(s) - marks the subdevice as having a
  `s->private` that points to memory that can be freed automatically.

Export `comedi_set_spriv_auto_free()` for use by the low-level comedi
driver modules, in particular the "amplc_dio200_common" module.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: serial2002: fix Coverity "Explicit null dereference"
H Hartley Sweeten [Mon, 20 Apr 2015 18:49:06 +0000 (11:49 -0700)]
staging: comedi: serial2002: fix Coverity "Explicit null dereference"

serial2002_setup_subdevices() initializes each subdevice based on the
config read from the attached serial device. Part of this initialization
is to setup the subdevice range_table_list for the non digital subdevices.
The range_table_list is allocated only when a 'range' is passed to the
functions. Each channel of the subdevice then has it's 'range' initialized
and that range is added to the range_table_list.

The logic of this function works but causes Coverity complain about an
Explicit null dereference of the allocated 'range_table_list'. Add a check
for the 'range_table_list' to quiet the Coverity issue.

Reported-by: coverity (CID 1011632)
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: ni_nio_common: don't write non-existing caldac's
H Hartley Sweeten [Mon, 20 Apr 2015 18:49:05 +0000 (11:49 -0700)]
staging: comedi: ni_nio_common: don't write non-existing caldac's

ni_write_caldac() checks the boardinfo 'caldac' array to determine what
caldac is used for a given 'addr'. It then calculates the 'bitstring' and
number of 'bits' used to write a value to that caldac address.

After checking the caldac array, if the number of bits is 0 there is no
caldac associated with the address. If this happens we shouldn't try
writing to the non-existing caldac.

Reported-by: coverity (CID 1192116)
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: comedi_bond: fix 'b_mask' calc in bonding_dio_insn_bits()
H Hartley Sweeten [Mon, 20 Apr 2015 18:49:04 +0000 (11:49 -0700)]
staging: comedi: comedi_bond: fix 'b_mask' calc in bonding_dio_insn_bits()

'b_chans' may be a valud up to 32. 'b_mask' is an unsigned int and a left shift of
more than 31 bits has undefined behavior. Fix the calc so it works correctly with
a 'b_chans' of 32..

Reported-by: coverity (CID 1192244)
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: comedi: daqboard2000.c fixed trailing whitespace
Andrei Maresu [Thu, 9 Apr 2015 20:29:31 +0000 (23:29 +0300)]
Staging: comedi: daqboard2000.c fixed trailing whitespace

Fixed a coding style issue.

Signed-off-by: Andrei Maresu <andreimaresu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: panel: remove duplicate code
Sudip Mukherjee [Tue, 7 Apr 2015 08:25:01 +0000 (13:55 +0530)]
staging: panel: remove duplicate code

both the misc_deregister(), parport_release() and
parport_unregister_device() is there in the module_exit function also.
detach is called from parport_unregister_driver() and by the time
detach executes misc_deregister(), parport_release() and
parport_unregister_device() has already executed marking
keypad_initialized and lcd.initialized  as false. so this part of the
code will never execute.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: octeon-ethernet: update boilerplate comments
Aaro Koskinen [Sat, 4 Apr 2015 19:51:21 +0000 (22:51 +0300)]
staging: octeon-ethernet: update boilerplate comments

Update boilerplate comments to be more terse by removing
redundant information.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: octeon-ethernet: eliminate OCTEON_ETHERNET_VERSION
Aaro Koskinen [Sat, 4 Apr 2015 19:51:20 +0000 (22:51 +0300)]
staging: octeon-ethernet: eliminate OCTEON_ETHERNET_VERSION

This driver has drifted away from out-of-tree versions years ago
and the version string does not provide any useful information.
Instead provide the kernel version string to ethtool, so that we get
useful version information e.g. for bug reports.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: octeon-ethernet: eliminate DONT_WRITEBACK
Aaro Koskinen [Sat, 4 Apr 2015 19:51:19 +0000 (22:51 +0300)]
staging: octeon-ethernet: eliminate DONT_WRITEBACK

This feature is not used so eliminate it.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: octeon-ethernet: eliminate USE_RED define
Aaro Koskinen [Sat, 4 Apr 2015 19:51:18 +0000 (22:51 +0300)]
staging: octeon-ethernet: eliminate USE_RED define

We have RED always enabled, so eliminate the #define.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: octeon-ethernet: eliminate USE_SKBUFFS_IN_HW define
Aaro Koskinen [Sat, 4 Apr 2015 19:51:17 +0000 (22:51 +0300)]
staging: octeon-ethernet: eliminate USE_SKBUFFS_IN_HW define

We always try to use skbuffs for packet buffers, so eliminate
a redundant define.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: octeon-ethernet: eliminate USE_HW_TCPUDP_CHECKSUM define
Aaro Koskinen [Sat, 4 Apr 2015 19:51:16 +0000 (22:51 +0300)]
staging: octeon-ethernet: eliminate USE_HW_TCPUDP_CHECKSUM define

HW checksum is always enabled, so delete a redundant define.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: octeon-ethernet: eliminate USE_10MBPS_PREAMBLE_WORKAROUND define
Aaro Koskinen [Sat, 4 Apr 2015 19:51:15 +0000 (22:51 +0300)]
staging: octeon-ethernet: eliminate USE_10MBPS_PREAMBLE_WORKAROUND define

We have the workaround always enabled, so eliminate a redundant #define.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: octeon-ethernet: delete references to CONFIG_CAVIUM_RESERVE32
Aaro Koskinen [Sat, 4 Apr 2015 19:51:14 +0000 (22:51 +0300)]
staging: octeon-ethernet: delete references to CONFIG_CAVIUM_RESERVE32

Delete references to CONFIG_CAVIUM_RESERVE32. Kernel does not have such
option and the driver does not use it for anything.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: octeon-ethernet: spi: refactor spx block interrupt handling
Aaro Koskinen [Sat, 4 Apr 2015 19:51:13 +0000 (22:51 +0300)]
staging: octeon-ethernet: spi: refactor spx block interrupt handling

Code for spx1 and spx0 block are identical, move it into a function.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: octeon-ethernet: spi: move stx interrupt dumps into a function
Aaro Koskinen [Sat, 4 Apr 2015 19:51:12 +0000 (22:51 +0300)]
staging: octeon-ethernet: spi: move stx interrupt dumps into a function

Move interrupt printouts into a common function to avoid copy paste.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: octeon-ethernet: spi: move spx interrupt dumps into a function
Aaro Koskinen [Sat, 4 Apr 2015 19:51:11 +0000 (22:51 +0300)]
staging: octeon-ethernet: spi: move spx interrupt dumps into a function

Move interrupt printouts into a common function to avoid copy paste.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: octeon-ethernet: rgmii: use function to configure hw preamble
Aaro Koskinen [Sat, 4 Apr 2015 19:51:10 +0000 (22:51 +0300)]
staging: octeon-ethernet: rgmii: use function to configure hw preamble

Use a function to enable/disable HW preamble checking to avoid copy paste.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: octeon-ethernet: rgmii: refactor gmx block interrupt handling
Aaro Koskinen [Sat, 4 Apr 2015 19:51:09 +0000 (22:51 +0300)]
staging: octeon-ethernet: rgmii: refactor gmx block interrupt handling

Code for gmx0 and gmx1 block is identical, move it into a function.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: octeon-ethernet: sgmii/xaui: make link poll generic
Aaro Koskinen [Sat, 4 Apr 2015 19:51:08 +0000 (22:51 +0300)]
staging: octeon-ethernet: sgmii/xaui: make link poll generic

Make link poll generic to avoid copy paste.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: octeon-ethernet: consolidate carrier notifications
Aaro Koskinen [Sat, 4 Apr 2015 19:51:07 +0000 (22:51 +0300)]
staging: octeon-ethernet: consolidate carrier notifications

Always use cvm_oct_note_carrier() to avoid copy-pasted code.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: octeon-ethernet: add queue information to carrier note
Aaro Koskinen [Sat, 4 Apr 2015 19:51:06 +0000 (22:51 +0300)]
staging: octeon-ethernet: add queue information to carrier note

Add queue information to carrier note.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: octeon-ethernet: delete sgmii and xaui specific uninit functions
Aaro Koskinen [Sat, 4 Apr 2015 19:51:05 +0000 (22:51 +0300)]
staging: octeon-ethernet: delete sgmii and xaui specific uninit functions

Delete redundant wrappers.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: octeon-ethernet: move ndo_stop to common init
Aaro Koskinen [Sat, 4 Apr 2015 19:51:04 +0000 (22:51 +0300)]
staging: octeon-ethernet: move ndo_stop to common init

All init functions call ndo_stop if it's defined, so move it
to common function.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: octeon-ethernet: consolidate ndo_stop functions
Aaro Koskinen [Sat, 4 Apr 2015 19:51:03 +0000 (22:51 +0300)]
staging: octeon-ethernet: consolidate ndo_stop functions

All ndo_stop functions are identical. Get rid of duplicated code.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: octeon-ethernet: consolidate ndo_open functions
Aaro Koskinen [Sat, 4 Apr 2015 19:51:02 +0000 (22:51 +0300)]
staging: octeon-ethernet: consolidate ndo_open functions

ndo_open for rgmii, sgmii and xaui are almost identical. Put the common
code in a single function.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6655: device_intr check for vif on while loop
Malcolm Priestley [Mon, 6 Apr 2015 20:19:48 +0000 (21:19 +0100)]
staging: vt6655: device_intr check for vif on while loop

vif should never be or go null while in loop.

Fixes race condition where interrupts are late and when
interface is not present.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoiio: example code is buggy
Alan [Wed, 8 Apr 2015 19:24:43 +0000 (20:24 +0100)]
iio: example code is buggy

Shock horror, example template code that has never been used in reality is
in fact a hazard. This fixes the obvious bug, probably these kind of
"examples" should be deleted so real (working) examples are followed.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: emxx_udc: Remove dead code
Gujulan Elango, Hari Prasath (H.) [Thu, 23 Apr 2015 19:30:53 +0000 (19:30 +0000)]
staging: emxx_udc: Remove dead code

This patch removes few lines of commented code.

Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: emxx_udc : remove stray semicolon
Gujulan Elango, Hari Prasath (H.) [Thu, 23 Apr 2015 19:29:51 +0000 (19:29 +0000)]
staging: emxx_udc : remove stray semicolon

This patch removes a stray semicolon around closing brace of an if code
block.

Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: emxx_udc: test returned value
Julia Lawall [Sat, 4 Apr 2015 14:59:30 +0000 (16:59 +0200)]
staging: emxx_udc: test returned value

Put NULL test on the result of the previous call instead on one of its
arguments.  A simplified version of the semantic match that finds this
problem is as follows (http://coccinelle.lip6.fr/):

// <smpl>
r@
expression *e1;
expression *e2;
identifier f;
statement S1,S2;
@@

e1 = f(...,e2,...);
(
if (e1 == NULL || ...) S1 else S2
|
*if (e2 == NULL || ...) S1 else S2
)
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: fbtft: fix header guard typo
Nicolas Iooss [Fri, 17 Apr 2015 09:41:43 +0000 (17:41 +0800)]
Staging: fbtft: fix header guard typo

drivers/staging/fbtft/internal.h header guard tests for
__LINUX_FBTFT__INTERNAL_H but then defines __LINUX_FBTFT_INTERNAL_H
(only 1 underscore) and uses the same name for the #endif comment.
Use the same name everywhere.

Signed-off-by: Nicolas Iooss <nicolas.iooss_linux@m4x.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: fbtft: Disable DMA support if DMA is not available
Geert Uytterhoeven [Fri, 24 Apr 2015 07:44:15 +0000 (09:44 +0200)]
staging: fbtft: Disable DMA support if DMA is not available

If NO_DMA=y:

    drivers/built-in.o: In function `fbtft_framebuffer_alloc':
    (.text+0xb53cae): undefined reference to `dmam_alloc_coherent'

As DMA support is already optional, make it depend on HAS_DMA.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: fbtft: Add a blank line after declarations
Charlie Wong Super [Sat, 4 Apr 2015 12:54:56 +0000 (20:54 +0800)]
staging: fbtft: Add a blank line after declarations

scripts/checkpatch.pl WARNING: Missing a blank line after declarations

Signed-off-by: Charlie Wong Super <1213charlie@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: fbtft: Replace spaces to tab
Charlie Wong Super [Sat, 4 Apr 2015 11:30:28 +0000 (19:30 +0800)]
staging: fbtft: Replace spaces to tab

Spaces at the start of the line, replace the leading space to tabs

Signed-off-by: Charlie Wong Super <1213charlie@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: remove uislib module from staging tree
Benjamin Romer [Tue, 14 Apr 2015 01:16:51 +0000 (21:16 -0400)]
staging: unisys: remove uislib module from staging tree

This module is being removed completely, because it contained wrapper functions
and utility functions that were used in virtpci and virthba. Since these two
drivers are being rewritten to not use these wrappers and utilities, uislib
needs to go.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Reviewed-by: Don Zickus <dzickus@redhat.com>
Reviewed-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: remove virtpci driver from staging tree
Benjamin Romer [Tue, 14 Apr 2015 01:16:50 +0000 (21:16 -0400)]
staging: unisys: remove virtpci driver from staging tree

The virtpci driver is being rewritten, so remove the driver from the staging
tree.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Reviewed-by: Don Zickus <dzickus@redhat.com>
Reviewed-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: remove virthba driver for rewrite
Benjamin Romer [Tue, 14 Apr 2015 01:16:49 +0000 (21:16 -0400)]
staging: unisys: remove virthba driver for rewrite

The virthba driver is being rewritten and will be renamed to visorhba, so delete
the old driver from the source tree.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Reviewed-by: Don Zickus <dzickus@redhat.com>
Reviewed-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: visorchipset: Get rid of ulong usage
Jes Sorensen [Mon, 13 Apr 2015 14:28:44 +0000 (10:28 -0400)]
staging: unisys: visorchipset: Get rid of ulong usage

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Tested-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: visorchipset: Remove unused get_channel_info notifier
Jes Sorensen [Mon, 13 Apr 2015 14:28:43 +0000 (10:28 -0400)]
staging: unisys: visorchipset: Remove unused get_channel_info notifier

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Tested-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: visorchipset: Use correct type for dev_no
Jes Sorensen [Mon, 13 Apr 2015 14:28:42 +0000 (10:28 -0400)]
staging: unisys: visorchipset: Use correct type for dev_no

visorchipset_bus_info.dev_no is only assigned the value of
controlvm_message_packet.create_bus.dev_count, which is a u32. No
point promoting it to a u64.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Tested-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: visorchipset: Do not use confuse size of long with size of u32
Jes Sorensen [Mon, 13 Apr 2015 14:28:41 +0000 (10:28 -0400)]
staging: unisys: visorchipset: Do not use confuse size of long with size of u32

struct visorcipset_device_info defines bus_no and dev_no as u32, while
the deprecated ulong type is 64 bits. Hence avoid promoting the values
to 64 bit just to truncate them again later.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Tested-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: visorchipset: Get rid of ugly BOOL/TRUE/FALSE usage
Jes Sorensen [Mon, 13 Apr 2015 14:28:40 +0000 (10:28 -0400)]
staging: unisys: visorchipset: Get rid of ugly BOOL/TRUE/FALSE usage

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Tested-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: visorchipset: Avoid struct typedef abuse
Jes Sorensen [Mon, 13 Apr 2015 14:28:39 +0000 (10:28 -0400)]
staging: unisys: visorchipset: Avoid struct typedef abuse

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Tested-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: visorchipset: Remove unused NONULLSTR()
Jes Sorensen [Mon, 13 Apr 2015 14:28:38 +0000 (10:28 -0400)]
staging: unisys: visorchipset: Remove unused NONULLSTR()

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Tested-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: fix kdump support
Benjamin Romer [Mon, 6 Apr 2015 14:27:40 +0000 (10:27 -0400)]
staging: unisys: fix kdump support

The s-Par drivers used to be out-of-tree, so they needed a parameter to
let them know we were going into a dump. This patch removes that code
and uses the built-in kernel function instead.

Reviewed-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging : unisys: Fix brace coding style issue
Andreas Theodosiou [Sat, 4 Apr 2015 23:09:30 +0000 (02:09 +0300)]
staging : unisys: Fix brace coding style issue

This is a patch to visorchannel/visorchannel_funcs.c that fixes a couple
of brace warnings found by checkpatch.pl.

Signed-off-by: Andreas Theodosiou <andreasabu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: Make struct mdc_kuc_fops static
Dzmitry Sledneu [Sat, 18 Apr 2015 13:20:43 +0000 (15:20 +0200)]
staging: lustre: Make struct mdc_kuc_fops static

This patch fixes the following Sparse warning:
"symbol 'mdc_kuc_fops' was not declared. Should it be static?".

Signed-off-by: Dzmitry Sledneu <dzmitry.sledneu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: drop uses of some OBD alloc and free functions
Julia Lawall [Sun, 12 Apr 2015 21:34:20 +0000 (23:34 +0200)]
staging: lustre: drop uses of some OBD alloc and free functions

Replace OBD_ALLOC, OBD_ALLOC_WAIT, OBD_ALLOC_PTR, and OBD_ALLOC_PTR_WAIT by
kzalloc or calloc, as appropriate.

Replace OBD_FREE and OBD_FREE_PTR by kfree.

A simplified version of the semantic patch that makes these changes in the
OBD_ALLOC/FREE case is as follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
expression ptr,e1,e2;
@@
- OBD_ALLOC(ptr,sizeof e1 * e2)
+ ptr = kcalloc(e2, sizeof e1, GFP_NOFS)

@@
expression ptr,size;
@@
- OBD_ALLOC(ptr,size)
+ ptr = kzalloc(size, GFP_NOFS)

@@
expression ptr, size;
@@
- OBD_FREE(ptr, size);
+ kfree(ptr);
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: llite: drop uses of OBD free functions
Julia Lawall [Sun, 12 Apr 2015 20:55:02 +0000 (22:55 +0200)]
staging: lustre: llite: drop uses of OBD free functions

Replace OBD_FREE and OBD_FREE_PTR by kfree.

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

// <smpl>
@@
expression ptr, size;
@@

- OBD_FREE(ptr, size);
+ kfree(ptr);

@@
expression ptr;
@@

- OBD_FREE_PTR(ptr);
+ kfree(ptr);
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: llite: remove obsolete conditional code
Andreas Dilger [Wed, 8 Apr 2015 23:24:02 +0000 (17:24 -0600)]
staging: lustre: llite: remove obsolete conditional code

Remove conditional flock/aops code that was only for out-of-tree
vendor kernels but is not relevant for in-kernel code.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoi2o: fix simple_return.cocci warnings
kbuild test robot [Thu, 30 Apr 2015 13:03:04 +0000 (21:03 +0800)]
i2o: fix simple_return.cocci warnings

drivers/staging/i2o/iop.c:777:1-3: WARNING: end returns can be simpified

 Simplify a trivial if-return sequence.  Possibly combine with a
 preceding function call.
Generated by: scripts/coccinelle/misc/simple_return.cocci

CC: Alan Cox <alan@linux.intel.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: i2o: Remove unwanted semicolon
Gujulan Elango, Hari Prasath (H.) [Thu, 23 Apr 2015 13:43:01 +0000 (13:43 +0000)]
staging: i2o: Remove unwanted semicolon

This patch removes unwanted semicolon around close braces of code blocks

Signed-off-by: Hari Prasath <hgujulan@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: iop.c: move assignment out of if () block
Greg Kroah-Hartman [Wed, 29 Apr 2015 14:21:59 +0000 (16:21 +0200)]
Staging: iop.c: move assignment out of if () block

We should not be doing assignments within an if () block
so fix up the code to not do this.

change was created using Coccinelle.

CC: Supriya Karanth <iskaranth@gmail.com>
CC: Somya Anand <somyaanand214@gmail.com>
CC: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: octeon-usb: fix unaligned isochronous transfers
Johan Hovold [Thu, 23 Apr 2015 14:06:52 +0000 (16:06 +0200)]
staging: octeon-usb: fix unaligned isochronous transfers

Make sure to copy the whole transfer buffer when releasing the temporary
buffer used for unaligned isochronous transfers as the data is not
necessarily contiguous in that case.

Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoLinux 4.1-rc1 v4.1-rc1
Linus Torvalds [Mon, 27 Apr 2015 00:59:10 +0000 (17:59 -0700)]
Linux 4.1-rc1

9 years agox86_64, asm: Work around AMD SYSRET SS descriptor attribute issue
Andy Lutomirski [Sun, 26 Apr 2015 23:47:59 +0000 (16:47 -0700)]
x86_64, asm: Work around AMD SYSRET SS descriptor attribute issue

AMD CPUs don't reinitialize the SS descriptor on SYSRET, so SYSRET with
SS == 0 results in an invalid usermode state in which SS is apparently
equal to __USER_DS but causes #SS if used.

Work around the issue by setting SS to __KERNEL_DS __switch_to, thus
ensuring that SYSRET never happens with SS set to NULL.

This was exposed by a recent vDSO cleanup.

Fixes: e7d6eefaaa44 x86/vdso32/syscall.S: Do not load __USER32_DS to %ss
Signed-off-by: Andy Lutomirski <luto@kernel.org>
Cc: Peter Anvin <hpa@zytor.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Denys Vlasenko <vda.linux@googlemail.com>
Cc: Brian Gerst <brgerst@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
9 years agoMerge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Linus Torvalds [Mon, 27 Apr 2015 00:55:26 +0000 (17:55 -0700)]
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux

Pull intel drm fixes from Dave Airlie.

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
  drm/i915: vlv: fix save/restore of GFX_MAX_REQ_COUNT reg
  drm/i915: Workaround to avoid lite restore with HEAD==TAIL
  drm/i915: cope with large i2c transfers

9 years agoMerge git://git.infradead.org/intel-iommu
Linus Torvalds [Mon, 27 Apr 2015 00:47:46 +0000 (17:47 -0700)]
Merge git://git.infradead.org/intel-iommu

Pull intel iommu updates from David Woodhouse:
 "This lays a little of the groundwork for upcoming Shared Virtual
  Memory support â€” fixing some bogus #defines for capability bits and
  adding the new ones, and starting to use the new wider page tables
  where we can, in anticipation of actually filling in the new fields
  therein.

  It also allows graphics devices to be assigned to VM guests again.
  This got broken in 3.17 by disallowing assignment of RMRR-afflicted
  devices.  Like USB, we do understand why there's an RMRR for graphics
  devices â€” and unlike USB, it's actually sane.  So we can make an
  exception for graphics devices, just as we do USB controllers.

  Finally, tone down the warning about the X2APIC_OPT_OUT bit, due to
  persistent requests.  X2APIC_OPT_OUT was added to the spec as a nasty
  hack to allow broken BIOSes to forbid us from using X2APIC when they
  do stupid and invasive things and would break if we did.

  Someone noticed that since Windows doesn't have full IOMMU support for
  DMA protection, setting the X2APIC_OPT_OUT bit made Windows avoid
  initialising the IOMMU on the graphics unit altogether.

  This means that it would be available for use in "driver mode", where
  the IOMMU registers are made available through a BAR of the graphics
  device and the graphics driver can do SVM all for itself.

  So they started setting the X2APIC_OPT_OUT bit on *all* platforms with
  SVM capabilities.  And even the platforms which *might*, if the
  planets had been aligned correctly, possibly have had SVM capability
  but which in practice actually don't"

* git://git.infradead.org/intel-iommu:
  iommu/vt-d: support extended root and context entries
  iommu/vt-d: Add new extended capabilities from v2.3 VT-d specification
  iommu/vt-d: Allow RMRR on graphics devices too
  iommu/vt-d: Print x2apic opt out info instead of printing a warning
  iommu/vt-d: kill bogus ecap_niotlb_iunits()

9 years agoMerge branch 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa...
Linus Torvalds [Mon, 27 Apr 2015 00:44:09 +0000 (17:44 -0700)]
Merge branch 'i2c/for-next' of git://git./linux/kernel/git/wsa/linux

Pull i2c fixes from Wolfram Sang:
 "This has a mixture of merge window cleanups and bugfixes"

* 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
  i2c: st: add include for pinctrl
  i2c: mux: use proper dev when removing "channel-X" symlinks
  i2c: digicolor: remove duplicate include
  i2c: Mark adapter devices with pm_runtime_no_callbacks
  i2c: pca-platform: fix broken email address
  i2c: mxs: fix broken email address
  i2c: rk3x: report number of messages transmitted

9 years agoMerge branch 'for-linus-4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/mason...
Linus Torvalds [Mon, 27 Apr 2015 00:40:30 +0000 (17:40 -0700)]
Merge branch 'for-linus-4.1' of git://git./linux/kernel/git/mason/linux-btrfs

Pull btrfs fixes from Chris Mason:
 "Filipe hit two problems in my block group cache patches.  We finalized
  the fixes last week and ran through more tests"

* 'for-linus-4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
  Btrfs: prevent list corruption during free space cache processing
  Btrfs: fix inode cache writeout

9 years agoMerge tag 'drm-intel-next-fixes-2015-04-25' of git://anongit.freedesktop.org/drm...
Dave Airlie [Mon, 27 Apr 2015 00:35:15 +0000 (10:35 +1000)]
Merge tag 'drm-intel-next-fixes-2015-04-25' of git://anongit.freedesktop.org/drm-intel into drm-fixes

three fixes for i915.

* tag 'drm-intel-next-fixes-2015-04-25' of git://anongit.freedesktop.org/drm-intel:
  drm/i915: vlv: fix save/restore of GFX_MAX_REQ_COUNT reg
  drm/i915: Workaround to avoid lite restore with HEAD==TAIL
  drm/i915: cope with large i2c transfers

9 years agoMerge tag 'nfs-for-4.1-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
Linus Torvalds [Mon, 27 Apr 2015 00:33:59 +0000 (17:33 -0700)]
Merge tag 'nfs-for-4.1-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs

Pull NFS client updates from Trond Myklebust:
 "Another set of mainly bugfixes and a couple of cleanups.  No new
  functionality in this round.

  Highlights include:

  Stable patches:
   - Fix a regression in /proc/self/mountstats
   - Fix the pNFS flexfiles O_DIRECT support
   - Fix high load average due to callback thread sleeping

  Bugfixes:
   - Various patches to fix the pNFS layoutcommit support
   - Do not cache pNFS deviceids unless server notifications are enabled
   - Fix a SUNRPC transport reconnection regression
   - make debugfs file creation failure non-fatal in SUNRPC
   - Another fix for circular directory warnings on NFSv4 "junctioned"
     mountpoints
   - Fix locking around NFSv4.2 fallocate() support
   - Truncating NFSv4 file opens should also sync O_DIRECT writes
   - Prevent infinite loop in rpcrdma_ep_create()

  Features:
   - Various improvements to the RDMA transport code's handling of
     memory registration
   - Various code cleanups"

* tag 'nfs-for-4.1-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: (55 commits)
  fs/nfs: fix new compiler warning about boolean in switch
  nfs: Remove unneeded casts in nfs
  NFS: Don't attempt to decode missing directory entries
  Revert "nfs: replace nfs_add_stats with nfs_inc_stats when add one"
  NFS: Rename idmap.c to nfs4idmap.c
  NFS: Move nfs_idmap.h into fs/nfs/
  NFS: Remove CONFIG_NFS_V4 checks from nfs_idmap.h
  NFS: Add a stub for GETDEVICELIST
  nfs: remove WARN_ON_ONCE from nfs_direct_good_bytes
  nfs: fix DIO good bytes calculation
  nfs: Fetch MOUNTED_ON_FILEID when updating an inode
  sunrpc: make debugfs file creation failure non-fatal
  nfs: fix high load average due to callback thread sleeping
  NFS: Reduce time spent holding the i_mutex during fallocate()
  NFS: Don't zap caches on fallocate()
  xprtrdma: Make rpcrdma_{un}map_one() into inline functions
  xprtrdma: Handle non-SEND completions via a callout
  xprtrdma: Add "open" memreg op
  xprtrdma: Add "destroy MRs" memreg op
  xprtrdma: Add "reset MRs" memreg op
  ...

9 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Linus Torvalds [Sun, 26 Apr 2015 22:48:49 +0000 (15:48 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/viro/vfs

Pull fourth vfs update from Al Viro:
 "d_inode() annotations from David Howells (sat in for-next since before
  the beginning of merge window) + four assorted fixes"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  RCU pathwalk breakage when running into a symlink overmounting something
  fix I_DIO_WAKEUP definition
  direct-io: only inc/dec inode->i_dio_count for file systems
  fs/9p: fix readdir()
  VFS: assorted d_backing_inode() annotations
  VFS: fs/inode.c helpers: d_inode() annotations
  VFS: fs/cachefiles: d_backing_inode() annotations
  VFS: fs library helpers: d_inode() annotations
  VFS: assorted weird filesystems: d_inode() annotations
  VFS: normal filesystems (and lustre): d_inode() annotations
  VFS: security/: d_inode() annotations
  VFS: security/: d_backing_inode() annotations
  VFS: net/: d_inode() annotations
  VFS: net/unix: d_backing_inode() annotations
  VFS: kernel/: d_inode() annotations
  VFS: audit: d_backing_inode() annotations
  VFS: Fix up some ->d_inode accesses in the chelsio driver
  VFS: Cachefiles should perform fs modifications on the top layer only
  VFS: AF_UNIX sockets should call mknod on the top layer only

9 years agoMerge tag 'pm+acpi-4.1-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael...
Linus Torvalds [Sun, 26 Apr 2015 20:56:35 +0000 (13:56 -0700)]
Merge tag 'pm+acpi-4.1-rc1-2' of git://git./linux/kernel/git/rafael/linux-pm

Pull more power management and ACPI updates from Rafael Wysocki:
 "These are fixes mostly (intel_pstate, ACPI core, ACPI EC driver,
  cpupower tool), a new CPU ID for the Intel RAPL driver and one
  intel_pstate driver improvement that didn't make it to my previous
  pull requests due to timing.

  Specifics:

   - Fix a build warning in the intel_pstate driver showing up in
     non-SMP builds (Borislav Petkov)

   - Change one of the intel_pstate's P-state selection parameters for
     Baytrail and Cherrytrail CPUs to significantly improve performance
     at the cost of a small increase in energy consumption (Kristen
     Carlson Accardi)

   - Fix a NULL pointer dereference in the ACPI EC driver due to an
     unsafe list walk in the query handler removal routine (Chris
     Bainbridge)

   - Get rid of a false-positive lockdep warning in the ACPI container
     hot-remove code (Rafael J Wysocki)

   - Prevent the ACPI device enumeration code from creating device
     objects of a wrong type in some cases (Rafael J Wysocki)

   - Add Skylake processors support to the Intel RAPL power capping
     driver (Brian Bian)

   - Drop the stale MAINTAINERS entry for the ACPI dock driver that is
     regarded as part of the ACPI core and maintained along with it now
     (Chao Yu)

   - Fix cpupower tool breakage caused by a library API change in libpci
     3.3.0 (Lucas Stach)"

* tag 'pm+acpi-4.1-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  ACPI / scan: Add a scan handler for PRP0001
  ACPI / scan: Annotate physical_node_lock in acpi_scan_is_offline()
  ACPI / EC: fix NULL pointer dereference in acpi_ec_remove_query_handler()
  MAINTAINERS: remove maintainship entry of docking station driver
  powercap / RAPL: Add support for Intel Skylake processors
  cpufreq: intel_pstate: Fix an annoying !CONFIG_SMP warning
  intel_pstate: Change the setpoint for Atom params
  cpupower: fix breakage from libpci API change

9 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Linus Torvalds [Sun, 26 Apr 2015 20:51:05 +0000 (13:51 -0700)]
Merge git://git./linux/kernel/git/herbert/crypto-2.6

Pull crypto fixes from Herbert Xu:
 "This push fixes a build problem with img-hash under non-standard
  configurations and a serious regression with sha512_ssse3 which can
  lead to boot failures"

* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
  crypto: img-hash - CRYPTO_DEV_IMGTEC_HASH should depend on HAS_DMA
  crypto: x86/sha512_ssse3 - fixup for asm function prototype change

9 years agoMerge tag 'platform-drivers-x86-v4.1-1' of git://git.infradead.org/users/dvhart/linux...
Linus Torvalds [Sun, 26 Apr 2015 20:44:46 +0000 (13:44 -0700)]
Merge tag 'platform-drivers-x86-v4.1-1' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86

Pull x86 platform driver updates from Darren Hart:
 "This series includes significant updates to the toshiba_acpi driver
  and the reintroduction of the dell-laptop keyboard backlight additions
  I had to revert previously.  Also included are various fixes for
  typos, warnings, correctness, and minor bugs.

  Specifics:

  dell-laptop:
     - add support for keyboard backlight.

  toshiba_acpi:
     - adaptive keyboard, hotkey, USB sleep and charge, and backlight
       updates.  Update sysfs documentation.

  toshiba_bluetooth:
     - fix enabling/disabling loop on recent devices

  apple-gmux:
     - lock iGP IO to protect from vgaarb changes

  other:
     - Fix typos, clear gcc warnings, clarify pr_* messages, correct
       return types, update MAINTAINERS"

* tag 'platform-drivers-x86-v4.1-1' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86: (25 commits)
  toshiba_acpi: Do not register vendor backlight when acpi_video bl is available
  MAINTAINERS: Add me on list of Dell laptop drivers
  platform: x86: dell-laptop: Add support for keyboard backlight
  Documentation/ABI: Update sysfs-driver-toshiba_acpi entry
  toshiba_acpi: Fix pr_* messages from USB Sleep Functions
  toshiba_acpi: Update and fix USB Sleep and Charge modes
  wmi: Use bool function return values of true/false not 1/0
  toshiba_bluetooth: Fix enabling/disabling loop on recent devices
  toshiba_bluetooth: Clean up *_add function and disable BT device at removal
  toshiba_bluetooth: Add three new functions to the driver
  toshiba_acpi: Fix the enabling of the Special Functions
  toshiba_acpi: Use the Hotkey Event Type function for keymap choosing
  toshiba_acpi: Add Hotkey Event Type function and definitions
  x86/wmi: delete unused wmi_data_lock mutex causing gcc warning
  apple-gmux: lock iGP IO to protect from vgaarb changes
  MAINTAINERS: Add missing Toshiba devices and add myself as maintainer
  toshiba_acpi: Update events in toshiba_acpi_notify
  intel-oaktrail: Fix trivial typo in comment
  thinkpad_acpi: off by one in adaptive_keyboard_hotkey_notify_hotkey()
  thinkpad_acpi: signedness bugs getting current_mode
  ...

9 years agoMerge tag 'chrome-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/olof...
Linus Torvalds [Sun, 26 Apr 2015 20:36:02 +0000 (13:36 -0700)]
Merge tag 'chrome-for-linus' of git://git./linux/kernel/git/olof/chrome-platform

Pull chrome platform updates from Olof Johansson:
 "Here's a set of updates to the Chrome OS platform drivers for this
  merge window.

  Main new things this cycle is:

   - Driver changes to expose the lightbar to users.  With this, you can
     make your own blinkenlights on Chromebook Pixels.

   - Changes in the way that the atmel_mxt trackpads are probed.  The
     laptop driver is trying to be smart and not instantiate the devices
     that don't answer to probe.  For the trackpad that can come up in
     two modes (bootloader or regular), this gets complicated since the
     driver already knows how to handle the two modes including the
     actual addresses used.  So now the laptop driver needs to know more
     too, instantiating the regular address even if the bootloader one
     is the probe that passed.

   - mfd driver improvements by Javier Martines Canillas, and a few
     bugfixes from him, kbuild and myself"

* tag 'chrome-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/olof/chrome-platform:
  platform/chrome: chromeos_laptop - instantiate Atmel at primary address
  platform/chrome: cros_ec_lpc - Depend on X86 || COMPILE_TEST
  platform/chrome: cros_ec_lpc - Include linux/io.h header file
  platform/chrome: fix platform_no_drv_owner.cocci warnings
  platform/chrome: cros_ec_lightbar - fix duplicate const warning
  platform/chrome: cros_ec_dev - fix Unknown escape '%' warning
  platform/chrome: Expose Chrome OS Lightbar to users
  platform/chrome: Create sysfs attributes for the ChromeOS EC
  mfd: cros_ec: Instantiate ChromeOS EC character device
  platform/chrome: Add Chrome OS EC userspace device interface
  platform/chrome: Add cros_ec_lpc driver for x86 devices
  mfd: cros_ec: Add char dev and virtual dev pointers
  mfd: cros_ec: Use fixed size arrays to transfer data with the EC

9 years agoMerge tag 'cris-for-4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/jesper...
Linus Torvalds [Sun, 26 Apr 2015 20:31:05 +0000 (13:31 -0700)]
Merge tag 'cris-for-4.1' of git://git./linux/kernel/git/jesper/cris

Pull arch/cris updates from Jesper Nilsson:
 "Some much needed love for the CRIS-port.

  There's a bunch of changes this time, giving the CRISv32 port a bit of
  modern makeover with device-tree, irq domain and gpiolib support, and
  more switchover to generic frameworks.

  Some small fixes and removal of the theoretical SMP support brings up
  the rear"

* tag 'cris-for-4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/jesper/cris:
  cris: fix integer overflow in ELF_ET_DYN_BASE
  CRISv32: use GENERIC_SCHED_CLOCK
  CRISv32: use MMIO clocksource
  CRISv32: use generic clockevents
  CRIS: use generic headers via Kbuild
  CRIS: use generic cmpxchg.h
  CRIS: use generic atomic.h
  CRIS: use generic atomic bitops
  CRISv10: remove redundant macros from system.h
  CRIS: remove SMP code
  CRISv32: don't enable irqs in INIT_THREAD
  CRISv32: handle multiple signals
  CRISv32: prevent bogus restarts on sigreturn
  CRISv32: don't attempt syscall restart on irq exit
  Add binding documentation for CRIS
  CRIS: add Axis 88 board device tree
  CRISv32: add device tree support
  CRISv32: add irq domains support
  CRIS: enable GPIOLIB

9 years agoMerge tag 'powerpc-4.1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mpe/linux
Linus Torvalds [Sun, 26 Apr 2015 20:23:15 +0000 (13:23 -0700)]
Merge tag 'powerpc-4.1-2' of git://git./linux/kernel/git/mpe/linux

Pull powerpc fixes from Michael Ellerman:

 - fix for mm_dec_nr_pmds() from Scott.

 - fixes for oopses seen with KVM + THP from Aneesh.

 - build fixes from Aneesh & Shreyas.

* tag 'powerpc-4.1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mpe/linux:
  powerpc/mm: Fix build error with CONFIG_PPC_TRANSACTIONAL_MEM disabled
  powerpc/kvm: Fix ppc64_defconfig + PPC_POWERNV=n build error
  powerpc/mm/thp: Return pte address if we find trans_splitting.
  powerpc/mm/thp: Make page table walk safe against thp split/collapse
  KVM: PPC: Remove page table walk helpers
  KVM: PPC: Use READ_ONCE when dereferencing pte_t pointer
  powerpc/hugetlb: Call mm_dec_nr_pmds() in hugetlb_free_pmd_range()

9 years agoMerge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm
Linus Torvalds [Sun, 26 Apr 2015 20:06:22 +0000 (13:06 -0700)]
Merge tag 'for-linus' of git://git./virt/kvm/kvm

Pull second batch of KVM changes from Paolo Bonzini:
 "This mostly includes the PPC changes for 4.1, which this time cover
  Book3S HV only (debugging aids, minor performance improvements and
  some cleanups).  But there are also bug fixes and small cleanups for
  ARM, x86 and s390.

  The task_migration_notifier revert and real fix is still pending
  review, but I'll send it as soon as possible after -rc1"

* tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (29 commits)
  KVM: arm/arm64: check IRQ number on userland injection
  KVM: arm: irqfd: fix value returned by kvm_irq_map_gsi
  KVM: VMX: Preserve host CR4.MCE value while in guest mode.
  KVM: PPC: Book3S HV: Use msgsnd for signalling threads on POWER8
  KVM: PPC: Book3S HV: Translate kvmhv_commence_exit to C
  KVM: PPC: Book3S HV: Streamline guest entry and exit
  KVM: PPC: Book3S HV: Use bitmap of active threads rather than count
  KVM: PPC: Book3S HV: Use decrementer to wake napping threads
  KVM: PPC: Book3S HV: Don't wake thread with no vcpu on guest IPI
  KVM: PPC: Book3S HV: Get rid of vcore nap_count and n_woken
  KVM: PPC: Book3S HV: Move vcore preemption point up into kvmppc_run_vcpu
  KVM: PPC: Book3S HV: Minor cleanups
  KVM: PPC: Book3S HV: Simplify handling of VCPUs that need a VPA update
  KVM: PPC: Book3S HV: Accumulate timing information for real-mode code
  KVM: PPC: Book3S HV: Create debugfs file for each guest's HPT
  KVM: PPC: Book3S HV: Add ICP real mode counters
  KVM: PPC: Book3S HV: Move virtual mode ICP functions to real-mode
  KVM: PPC: Book3S HV: Convert ICS mutex lock to spin lock
  KVM: PPC: Book3S HV: Add guest->host real mode completion counters
  KVM: PPC: Book3S HV: Add helpers for lock/unlock hpte
  ...

9 years agov4l: xilinx: fix for include file movement
Stephen Rothwell [Mon, 13 Apr 2015 02:48:27 +0000 (12:48 +1000)]
v4l: xilinx: fix for include file movement

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
9 years agoplatform/chrome: chromeos_laptop - instantiate Atmel at primary address
Dmitry Torokhov [Tue, 14 Apr 2015 20:50:09 +0000 (13:50 -0700)]
platform/chrome: chromeos_laptop - instantiate Atmel at primary address

The new Atmel MXT driver expects i2c client's address contain the
primary (main address) of the chip, and calculates the expected
bootloader address form the primary address. Unfortunately chrome_laptop
does probe the devices and if touchpad (or touchscreen, or both) comes
up in bootloader mode the i2c device gets instantiated with the
bootloader address which confuses the driver.

To work around this issue let's probe the primary address first. If the
device is not detected at the primary address we'll probe alternative
addresses as "dummy" devices. If any of them are found, destroy the
dummy client and instantiate client with proper name at primary address
still.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
9 years agoRCU pathwalk breakage when running into a symlink overmounting something
Al Viro [Fri, 24 Apr 2015 19:47:07 +0000 (15:47 -0400)]
RCU pathwalk breakage when running into a symlink overmounting something

Calling unlazy_walk() in walk_component() and do_last() when we find
a symlink that needs to be followed doesn't acquire a reference to vfsmount.
That's fine when the symlink is on the same vfsmount as the parent directory
(which is almost always the case), but it's not always true - one _can_
manage to bind a symlink on top of something.  And in such cases we end up
with excessive mntput().

Cc: stable@vger.kernel.org # since 2.6.39
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
9 years agofix I_DIO_WAKEUP definition
Eric Sandeen [Thu, 16 Apr 2015 20:04:56 +0000 (15:04 -0500)]
fix I_DIO_WAKEUP definition

I_DIO_WAKEUP is never directly used, but fix it up anyway.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
9 years agodirect-io: only inc/dec inode->i_dio_count for file systems
Jens Axboe [Wed, 15 Apr 2015 23:05:48 +0000 (17:05 -0600)]
direct-io: only inc/dec inode->i_dio_count for file systems

do_blockdev_direct_IO() increments and decrements the inode
->i_dio_count for each IO operation. It does this to protect against
truncate of a file. Block devices don't need this sort of protection.

For a capable multiqueue setup, this atomic int is the only shared
state between applications accessing the device for O_DIRECT, and it
presents a scaling wall for that. In my testing, as much as 30% of
system time is spent incrementing and decrementing this value. A mixed
read/write workload improved from ~2.5M IOPS to ~9.6M IOPS, with
better latencies too. Before:

clat percentiles (usec):
 |  1.00th=[   33],  5.00th=[   34], 10.00th=[   34], 20.00th=[   34],
 | 30.00th=[   34], 40.00th=[   34], 50.00th=[   35], 60.00th=[   35],
 | 70.00th=[   35], 80.00th=[   35], 90.00th=[   37], 95.00th=[   80],
 | 99.00th=[   98], 99.50th=[  151], 99.90th=[  155], 99.95th=[  155],
 | 99.99th=[  165]

After:

clat percentiles (usec):
 |  1.00th=[   95],  5.00th=[  108], 10.00th=[  129], 20.00th=[  149],
 | 30.00th=[  155], 40.00th=[  161], 50.00th=[  167], 60.00th=[  171],
 | 70.00th=[  177], 80.00th=[  185], 90.00th=[  201], 95.00th=[  270],
 | 99.00th=[  390], 99.50th=[  398], 99.90th=[  418], 99.95th=[  422],
 | 99.99th=[  438]

In other setups, Robert Elliott reported seeing good performance
improvements:

https://lkml.org/lkml/2015/4/3/557

The more applications accessing the device, the worse it gets.

Add a new direct-io flags, DIO_SKIP_DIO_COUNT, which tells
do_blockdev_direct_IO() that it need not worry about incrementing
or decrementing the inode i_dio_count for this caller.

Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Theodore Ts'o <tytso@mit.edu>
Cc: Elliott, Robert (Server Storage) <elliott@hp.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jens Axboe <axboe@fb.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
9 years agofs/9p: fix readdir()
Johannes Berg [Wed, 22 Apr 2015 09:55:14 +0000 (11:55 +0200)]
fs/9p: fix readdir()

Al Viro's IOV changes broke 9p readdir() because the new code
didn't abort the read when it returned nothing. The original
code checked if the combined error/length was <= 0 but in the
new code that accidentally got changed to just an error check.

Add back the return from the function when nothing is read.

Cc: Al Viro <viro@zeniv.linux.org.uk>
Fixes: e1200fe68f20 ("9p: switch p9_client_read() to passing struct iov_iter *")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
9 years agoBtrfs: prevent list corruption during free space cache processing
Chris Mason [Fri, 24 Apr 2015 18:00:00 +0000 (11:00 -0700)]
Btrfs: prevent list corruption during free space cache processing

__btrfs_write_out_cache is holding the ctl->tree_lock while it prepares
a list of bitmaps to record in the free space cache.  It was dropping
the lock while it worked on other components, which made a window for
free_bitmap() to free the bitmap struct without removing it from the
list.

This changes things to hold the lock the whole time, and also makes sure
we hold the lock during enospc cleanup.

Reported-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Chris Mason <clm@fb.com>
9 years agotoshiba_acpi: Do not register vendor backlight when acpi_video bl is available
Hans de Goede [Tue, 21 Apr 2015 10:01:32 +0000 (12:01 +0200)]
toshiba_acpi: Do not register vendor backlight when acpi_video bl is available

commit a39f46df33c6 ("toshiba_acpi: Fix regression caused by backlight extra
check code") causes the backlight to no longer work on the Toshiba Z30,
reverting that commit fixes this but restores the original issue fixed
by that commit.

Looking at the toshiba_acpi backlight code for a fix for this I noticed that
the toshiba code is the only code under platform/x86 which unconditionally
registers a vendor acpi backlight interface, without checking for acpi_video
backlight support first.

This commit adds the necessary checks bringing toshiba_acpi in line with the
other drivers, and fixing the Z30 regression without needing to revert the
commit causing it.

Chances are that there will be some Toshiba models which have a non working
acpi-video implementation while the toshiba vendor backlight interface does
work, this commit adds an empty dmi_id table where such systems can be added,
this is identical to how other drivers handle such systems.

BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1206036
BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=86521
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-and-tested-by: Azael Avalos <coproscefalo@gmail.com>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
9 years agoMerge tag 'sound-fix-4.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai...
Linus Torvalds [Fri, 24 Apr 2015 17:31:32 +0000 (10:31 -0700)]
Merge tag 'sound-fix-4.1-rc1' of git://git./linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "Here are a few fixes that have been pending since the previous pull
  request: a regression fix for HD-audio multiple SPDIF / HDMI devices,
  several ALC256 codec fixes, a couple of i915 HDMI audio fixes, and
  various small fixes.

  Nothing exciting, just boring, but things good to have"

* tag 'sound-fix-4.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: hda - fix headset mic detection problem for one more machine
  ALSA: hda/realtek - Fix Headphone Mic doesn't recording for ALC256
  ALSA: hda - fix "num_steps = 0" error on ALC256
  ALSA: usb-audio: Fix audio output on Roland SC-D70 sound module
  ALSA: hda - add AZX_DCAPS_I915_POWERWELL to Baytrail
  ALSA: hda - only sync BCLK to the display clock for Haswell & Broadwell
  ALSA: hda - Mute headphone pin on suspend on XPS13 9333
  sound/oss: fix deadlock in sequencer_ioctl(SNDCTL_SEQ_OUTOFBAND)
  ALSA: asound.h - use SNDRV_CTL_ELEM_ID_NAME_MAXLEN
  ALSA: hda - potential (but unlikely) uninitialized variable
  ALSA: hda - Fix regression for slave SPDIF setups
  ALSA: intel8x0: Check pci_iomap() success for DEVICE_ALI
  ALSA: hda - simplify azx_has_pm_runtime

9 years agoMerge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target...
Linus Torvalds [Fri, 24 Apr 2015 17:22:09 +0000 (10:22 -0700)]
Merge branch 'for-next' of git://git./linux/kernel/git/nab/target-pending

Pull SCSI target updates from Nicholas Bellinger:
 "Lots of activity in target land the last months.

  The highlights include:

   - Convert fabric drivers tree-wide to target_register_template() (hch
     + bart)

   - iser-target hardening fixes + v1.0 improvements (sagi)

   - Convert iscsi_thread_set usage to kthread.h + kill
     iscsi_target_tq.c (sagi + nab)

   - Add support for T10-PI WRITE_STRIP + READ_INSERT operation (mkp +
     sagi + nab)

   - DIF fixes for CONFIG_DEBUG_SG=y + UNMAP file emulation (akinobu +
     sagi + mkp)

   - Extended TCMU ABI v2 for future BIDI + DIF support (andy + ilias)

   - Fix COMPARE_AND_WRITE handling for NO_ALLLOC drivers (hch + nab)

  Thanks to everyone who contributed this round with new features,
  bug-reports, fixes, cleanups and improvements.

  Looking forward, it's currently shaping up to be a busy v4.2 as well"

* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: (69 commits)
  target: Put TCMU under a new config option
  target: Version 2 of TCMU ABI
  target: fix tcm_mod_builder.py
  target/file: Fix UNMAP with DIF protection support
  target/file: Fix SG table for prot_buf initialization
  target/file: Fix BUG() when CONFIG_DEBUG_SG=y and DIF protection enabled
  target: Make core_tmr_abort_task() skip TMFs
  target/sbc: Update sbc_dif_generate pr_debug output
  target/sbc: Make internal DIF emulation honor ->prot_checks
  target/sbc: Return INVALID_CDB_FIELD if DIF + sess_prot_type disabled
  target: Ensure sess_prot_type is saved across session restart
  target/rd: Don't pass incomplete scatterlist entries to sbc_dif_verify_*
  target: Remove the unused flag SCF_ACK_KREF
  target: Fix two sparse warnings
  target: Fix COMPARE_AND_WRITE with SG_TO_MEM_NOALLOC handling
  target: simplify the target template registration API
  target: simplify target_xcopy_init_pt_lun
  target: remove the unused SCF_CMD_XCOPY_PASSTHROUGH flag
  target/rd: reduce code duplication in rd_execute_rw()
  tcm_loop: fixup tpgt string to integer conversion
  ...

9 years agoMerge tag 'pwm/for-4.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry...
Linus Torvalds [Fri, 24 Apr 2015 17:11:24 +0000 (10:11 -0700)]
Merge tag 'pwm/for-4.1-rc1' of git://git./linux/kernel/git/thierry.reding/linux-pwm

Pull pwm changes from Thierry Reding:
 "Not much has been happening in PWM land lately, so this contains
  mostly minor fixes that didn't seem urgent enough for a late
  pull-request last cycle"

* tag 'pwm/for-4.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm:
  pwm: Remove __init initializer for pwm_add_table()
  pwm: samsung: Fix output race on disabling
  pwm: mxs: Fix period divider computation
  pwm: atmel-hlcdc: Add errata handling for sama5d4
  pwm: pca9685: Constify struct regmap_config
  pwm: imx-pwm: add explicit compatible strings and required clock properties

9 years agoMerge tag 'dma-buf-for-4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/sumits...
Linus Torvalds [Fri, 24 Apr 2015 17:05:39 +0000 (10:05 -0700)]
Merge tag 'dma-buf-for-4.1' of git://git./linux/kernel/git/sumits/dma-buf

Pull dma-buf updates from Sumit Semwal:
 "Minor cleanup only; this could've gone in for the 4.0 merge window,
  but for a copy-paste stupidity from me.

  It has been in the for-next since then, and no issues reported.

   - cleanup of dma_buf_export()

   - correction of copy-paste stupidity while doing the cleanup"

* tag 'dma-buf-for-4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/sumits/dma-buf:
  staging: android: ion: fix wrong init of dma_buf_export_info
  dma-buf: cleanup dma_buf_export() to make it easily extensible

9 years agoMerge branch 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma
Linus Torvalds [Fri, 24 Apr 2015 16:49:37 +0000 (09:49 -0700)]
Merge branch 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma

Pull slave-dmaengine updates from Vinod Koul:

 - new drivers for:
        - Ingenic JZ4780 controller
        - APM X-Gene controller
        - Freescale RaidEngine device
        - Renesas USB Controller

  - remove device_alloc_chan_resources dummy handlers

  - sh driver cleanups for peri peri and related emmc and asoc patches
    as well

  - fixes and enhancements spread over the drivers

* 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma: (59 commits)
  dmaengine: dw: don't prompt for DW_DMAC_CORE
  dmaengine: shdmac: avoid unused variable warnings
  dmaengine: fix platform_no_drv_owner.cocci warnings
  dmaengine: pch_dma: fix memory leak on failure path in pch_dma_probe()
  dmaengine: at_xdmac: unlock spin lock before return
  dmaengine: xgene: devm_ioremap() returns NULL on error
  dmaengine: xgene: buffer overflow in xgene_dma_init_channels()
  dmaengine: usb-dmac: Fix dereferencing freed memory 'desc'
  dmaengine: sa11x0: report slave capabilities to upper layers
  dmaengine: vdma: Fix compilation warnings
  dmaengine: fsl_raid: statify fsl_re_chan_probe
  dmaengine: Driver support for FSL RaidEngine device.
  dmaengine: xgene_dma_init_ring_mngr() can be static
  Documentation: dma: Add documentation for the APM X-Gene SoC DMA device DTS binding
  arm64: dts: Add APM X-Gene SoC DMA device and DMA clock DTS nodes
  dmaengine: Add support for APM X-Gene SoC DMA engine driver
  dmaengine: usb-dmac: Add Renesas USB DMA Controller (USB-DMAC) driver
  dmaengine: renesas,usb-dmac: Add device tree bindings documentation
  dmaengine: edma: fixed wrongly initialized data parameter to the edma callback
  dmaengine: ste_dma40: fix implicit conversion
  ...

9 years agoMerge tag 'md/4.1' of git://neil.brown.name/md
Linus Torvalds [Fri, 24 Apr 2015 16:28:01 +0000 (09:28 -0700)]
Merge tag 'md/4.1' of git://neil.brown.name/md

Pull md updates from Neil Brown:
 "More updates that usual this time.  A few have performance impacts
  which hould mostly be positive, but RAID5 (in particular) can be very
  work-load ensitive...  We'll have to wait and see.

  Highlights:

   - "experimental" code for managing md/raid1 across a cluster using
     DLM.  Code is not ready for general use and triggers a WARNING if
     used.  However it is looking good and mostly done and having in
     mainline will help co-ordinate development.

   - RAID5/6 can now batch multiple (4K wide) stripe_heads so as to
     handle a full (chunk wide) stripe as a single unit.

   - RAID6 can now perform read-modify-write cycles which should help
     performance on larger arrays: 6 or more devices.

   - RAID5/6 stripe cache now grows and shrinks dynamically.  The value
     set is used as a minimum.

   - Resync is now allowed to go a little faster than the 'mininum' when
     there is competing IO.  How much faster depends on the speed of the
     devices, so the effective minimum should scale with device speed to
     some extent"

* tag 'md/4.1' of git://neil.brown.name/md: (58 commits)
  md/raid5: don't do chunk aligned read on degraded array.
  md/raid5: allow the stripe_cache to grow and shrink.
  md/raid5: change ->inactive_blocked to a bit-flag.
  md/raid5: move max_nr_stripes management into grow_one_stripe and drop_one_stripe
  md/raid5: pass gfp_t arg to grow_one_stripe()
  md/raid5: introduce configuration option rmw_level
  md/raid5: activate raid6 rmw feature
  md/raid6 algorithms: xor_syndrome() for SSE2
  md/raid6 algorithms: xor_syndrome() for generic int
  md/raid6 algorithms: improve test program
  md/raid6 algorithms: delta syndrome functions
  raid5: handle expansion/resync case with stripe batching
  raid5: handle io error of batch list
  RAID5: batch adjacent full stripe write
  raid5: track overwrite disk count
  raid5: add a new flag to track if a stripe can be batched
  raid5: use flex_array for scribble data
  md raid0: access mddev->queue (request queue member) conditionally because it is not set when accessed from dm-raid
  md: allow resync to go faster when there is competing IO.
  md: remove 'go_faster' option from ->sync_request()
  ...

9 years agoMerge tag 'devicetree-for-4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/robh...
Linus Torvalds [Fri, 24 Apr 2015 15:46:18 +0000 (08:46 -0700)]
Merge tag 'devicetree-for-4.1' of git://git./linux/kernel/git/robh/linux

Pull second batch of devicetree updates from Rob Herring:
 "As Grant mentioned in the first devicetree pull request, here is the
  2nd batch of DT changes for 4.1.  The main remaining item here is the
  endianness bindings and related 8250 driver support.

   - DT endianness specification bindings

   - big-endian 8250 serial support

   - DT overlay unittest updates

   - various DT doc updates

   - compile fixes for OF_IRQ=n"

* tag 'devicetree-for-4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
  frv: add io{read,write}{16,32}be functions
  mn10300: add io{read,write}{16,32}be functions
  Documentation: DT bindings: add doc for Altera's SoCFPGA platform
  of: base: improve of_get_next_child() kernel-doc
  Doc: dt: arch_timer: discourage clock-frequency use
  of: unittest: overlay: Keep track of created overlays
  of/fdt: fix allocation size for device node path
  serial: of_serial: Support big-endian register accesses
  serial: 8250: Add support for big-endian MMIO accesses
  of: Document {little,big,native}-endian bindings
  of/fdt: Add endianness helper function for early init code
  of: Add helper function to check MMIO register endianness
  of/fdt: Remove "reg" data prints from early_init_dt_scan_memory
  of: add vendor prefix for Artesyn
  of: Add dummy of_irq_to_resource_table() for IRQ_OF=n
  of: OF_IRQ should depend on IRQ_DOMAIN

9 years agoMerge tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64...
Linus Torvalds [Fri, 24 Apr 2015 15:23:45 +0000 (08:23 -0700)]
Merge tag 'arm64-upstream' of git://git./linux/kernel/git/arm64/linux

Pull initial ACPI support for arm64 from Will Deacon:
 "This series introduces preliminary ACPI 5.1 support to the arm64
  kernel using the "hardware reduced" profile.  We don't support any
  peripherals yet, so it's fairly limited in scope:

   - MEMORY init (UEFI)

   - ACPI discovery (RSDP via UEFI)

   - CPU init (FADT)

   - GIC init (MADT)

   - SMP boot (MADT + PSCI)

   - ACPI Kconfig options (dependent on EXPERT)

  ACPI for arm64 has been in development for a while now and hardware
  has been available that can boot with either FDT or ACPI tables.  This
  has been made possible by both changes to the ACPI spec to cater for
  ARM-based machines (known as "hardware-reduced" in ACPI parlance) but
  also a Linaro-driven effort to get this supported on top of the Linux
  kernel.  This pull request is the result of that work.

  These changes allow us to initialise the CPUs, interrupt controller,
  and timers via ACPI tables, with memory information and cmdline coming
  from EFI.  We don't support a hybrid ACPI/FDT scheme.  Of course,
  there is still plenty of work to do (a serial console would be nice!)
  but I expect that to happen on a per-driver basis after this core
  series has been merged.

  Anyway, the diff stat here is fairly horrible, but splitting this up
  and merging it via all the different subsystems would have been
  extremely painful.  Instead, we've got all the relevant Acks in place
  and I've not seen anything other than trivial (Kconfig) conflicts in
  -next (for completeness, I've included my resolution below).  Nearly
  half of the insertions fall under Documentation/.

  So, we'll see how this goes.  Right now, it all depends on EXPERT and
  I fully expect people to use FDT by default for the immediate future"

* tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: (31 commits)
  ARM64 / ACPI: make acpi_map_gic_cpu_interface() as void function
  ARM64 / ACPI: Ignore the return error value of acpi_map_gic_cpu_interface()
  ARM64 / ACPI: fix usage of acpi_map_gic_cpu_interface
  ARM64: kernel: acpi: honour acpi=force command line parameter
  ARM64: kernel: acpi: refactor ACPI tables init and checks
  ARM64: kernel: psci: let ACPI probe PSCI version
  ARM64: kernel: psci: factor out probe function
  ACPI: move arm64 GSI IRQ model to generic GSI IRQ layer
  ARM64 / ACPI: Don't unflatten device tree if acpi=force is passed
  ARM64 / ACPI: additions of ACPI documentation for arm64
  Documentation: ACPI for ARM64
  ARM64 / ACPI: Enable ARM64 in Kconfig
  XEN / ACPI: Make XEN ACPI depend on X86
  ARM64 / ACPI: Select ACPI_REDUCED_HARDWARE_ONLY if ACPI is enabled on ARM64
  clocksource / arch_timer: Parse GTDT to initialize arch timer
  irqchip: Add GICv2 specific ACPI boot support
  ARM64 / ACPI: Introduce ACPI_IRQ_MODEL_GIC and register device's gsi
  ACPI / processor: Make it possible to get CPU hardware ID via GICC
  ACPI / processor: Introduce phys_cpuid_t for CPU hardware ID
  ARM64 / ACPI: Parse MADT for SMP initialization
  ...

9 years agoMerge branch 'for-linus' of git://ftp.arm.linux.org.uk/~rmk/linux-arm
Linus Torvalds [Fri, 24 Apr 2015 15:10:53 +0000 (08:10 -0700)]
Merge branch 'for-linus' of git://ftp.arm.linux.org.uk/~rmk/linux-arm

Pull ARM fixes from Russell King:
 "A few fixes for the recently merged development updates:

   - the update to convert a code branch in the procinfo structure
     forgot to update the nommu code.

   - VDSO only supported for V7 CPUs and later.

   - VDSO build creates files which should be ignored by git but are not.

   - ensure that make arch/arm/vdso/ doesn't build if it isn't enabled"

* 'for-linus' of git://ftp.arm.linux.org.uk/~rmk/linux-arm:
  ARM: 8344/1: VDSO: honor CONFIG_VDSO in Makefile
  ARM: 8343/1: VDSO: add build artifacts to .gitignore
  ARM: Fix nommu booting
  ARM: 8342/1: VDSO: depend on CPU_V7