openwrt/staging/blogic.git
11 years agostaging: usbip: removed unnecessary for loop
Kurt Kanzenbach [Thu, 4 Apr 2013 14:03:10 +0000 (16:03 +0200)]
staging: usbip: removed unnecessary for loop

This for loop is not needed, since STUB_BUSID_OTHER is defined as 0.
In Addition added a comment if STUB_BUSID_OTHER changes sometime.

Signed-off-by: Kurt Kanzenbach <ly80toro@cip.cs.fau.de>
Signed-off-by: Stefan Reif <ke42caxa@cip.cs.fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: usbip: removed unnecessary if-else-statements
Kurt Kanzenbach [Thu, 4 Apr 2013 14:03:09 +0000 (16:03 +0200)]
staging: usbip: removed unnecessary if-else-statements

In each if-else case "return" is called. This is why
these if-else-statements are useless. Removing them
improves understanding and readability.

Signed-off-by: Kurt Kanzenbach <ly80toro@cip.cs.fau.de>
Signed-off-by: Stefan Reif <ke42caxa@cip.cs.fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: usbip: simplified errorhandling
Kurt Kanzenbach [Thu, 4 Apr 2013 14:03:08 +0000 (16:03 +0200)]
staging: usbip: simplified errorhandling

In each errorcase spin_unlock_irq is called and -EINVAL is returned.
To simplify that I created a label called "err" doing that.
On Success count will be returned.

Signed-off-by: Kurt Kanzenbach <ly80toro@cip.cs.fau.de>
Signed-off-by: Stefan Reif <ke42caxa@cip.cs.fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: usbip: simple indent fix
Stefan Reif [Thu, 4 Apr 2013 14:03:07 +0000 (16:03 +0200)]
staging: usbip: simple indent fix

Fix an indent.

Signed-off-by: Stefan Reif <ke42caxa@cip.cs.fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: usbip: remove unnused, broken macro
Stefan Reif [Thu, 4 Apr 2013 14:03:06 +0000 (16:03 +0200)]
staging: usbip: remove unnused, broken macro

Remove broken preprocessor macro "hardware". It is unused and it
references an element (pdev in vhci_hcd) that does not exist.

Signed-off-by: Stefan Reif <ke42caxa@cip.cs.fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: usbip: removed enumeration of comments
Kurt Kanzenbach [Thu, 4 Apr 2013 14:03:05 +0000 (16:03 +0200)]
staging: usbip: removed enumeration of comments

Enumerations for one comment makes no sense.
This is why this should be removed.

Signed-off-by: Kurt Kanzenbach <ly80toro@cip.cs.fau.de>
Signed-off-by: Stefan Reif <ke42caxa@cip.cs.fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: usbip: reformat function pickup_urb_and_free_priv
Stefan Reif [Thu, 4 Apr 2013 14:03:04 +0000 (16:03 +0200)]
staging: usbip: reformat function pickup_urb_and_free_priv

re-indent funtion "pickup_urb_and_free_priv" to improve readability.

Signed-off-by: Stefan Reif <ke42caxa@cip.cs.fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: usbip: reformat function stub_recv_cmd_unlink()
Kurt Kanzenbach [Thu, 4 Apr 2013 14:03:03 +0000 (16:03 +0200)]
staging: usbip: reformat function stub_recv_cmd_unlink()

Reformat function stub_recv_cmd_unlink() to improve readability.

Signed-off-by: Kurt Kanzenbach <ly80toro@cip.cs.fau.de>
Signed-off-by: Stefan Reif <ke42caxa@cip.cs.fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: usbip: userspace: libsrc: replace numbers by ascii
Stefan Reif [Thu, 4 Apr 2013 14:03:02 +0000 (16:03 +0200)]
staging: usbip: userspace: libsrc: replace numbers by ascii

replace numbers in code by ascii text constants as suggested
by Dan Carpenter:
http://driverdev.linuxdriverproject.org/pipermail/devel/2013-February/035907.html

Signed-off-by: Stefan Reif <ke42caxa@cip.cs.fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: slicoss: information leak in ETHTOOL_GSET
Dan Carpenter [Thu, 4 Apr 2013 06:29:42 +0000 (09:29 +0300)]
staging: slicoss: information leak in ETHTOOL_GSET

There are some fields in "edata" which have not been cleared.  One
example is edata.cmd.  It leaks uninitialized stack information to the
user.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: csr: info leak in unifi_cfg_get_info()
Dan Carpenter [Thu, 4 Apr 2013 06:31:24 +0000 (09:31 +0300)]
staging: csr: info leak in unifi_cfg_get_info()

"cfg_ap_config" has a number of fields which are not cleared before we
copy them to the user.  I've added a memset() at the beginning to set
everything to zero.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: range: introduce some simple mA ranges
H Hartley Sweeten [Wed, 3 Apr 2013 20:40:13 +0000 (13:40 -0700)]
staging: comedi: range: introduce some simple mA ranges

The simple mA ranges 0 to 20, 4 to 20, and 0 to 32 are fairly common.
Introduce them in the comedi core and use them in the drivers.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: usbduxsigma: use comedi provided range_unipolar2_5
H Hartley Sweeten [Wed, 3 Apr 2013 20:39:54 +0000 (13:39 -0700)]
staging: comedi: usbduxsigma: use comedi provided range_unipolar2_5

Remove the private range, range_usbdux_ao_range, in this driver and use
the comedi provided range_unipolar2_5 instead.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: ni_mio_common: use comedi provided range_bipolar5
H Hartley Sweeten [Wed, 3 Apr 2013 20:39:34 +0000 (13:39 -0700)]
staging: comedi: ni_mio_common: use comedi provided range_bipolar5

Remove the private range, range_ni_S_ai_6143, in this driver and use
the comedi provided range_bipolar5 instead.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: ni_pcimio: use comedi provided range_bipolar10
H Hartley Sweeten [Wed, 3 Apr 2013 20:39:14 +0000 (13:39 -0700)]
staging: comedi: ni_pcimio: use comedi provided range_bipolar10

Remove the private range, range_ni_M_622x_ao, in this driver and use
the comedi provided range_bipolar10 instead.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: dt9812: use comedi provided range_unipolar2_5
H Hartley Sweeten [Wed, 3 Apr 2013 20:38:54 +0000 (13:38 -0700)]
staging: comedi: dt9812: use comedi provided range_unipolar2_5

Remove the private ranges, dt9812_2pt5_a{in,out}_range, in this
driver and use the comedi provided range_unipolar2_5 instead.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: range: introduce range_unipolar2_5
H Hartley Sweeten [Wed, 3 Apr 2013 20:38:26 +0000 (13:38 -0700)]
staging: comedi: range: introduce range_unipolar2_5

Introduce a simple unipolar 0 to 2.5 range, range_unipolar2_5, for
use by the comedi drivers.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: dt9812: use comedi provided range_bipolar10
H Hartley Sweeten [Wed, 3 Apr 2013 20:37:46 +0000 (13:37 -0700)]
staging: comedi: dt9812: use comedi provided range_bipolar10

Remove the private ranges, dt9812_10_a{in,out}_range, in this driver
and use the comedi provided range_bipolar10 instead.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: das800: use comedi provided range_bipolar5
H Hartley Sweeten [Wed, 3 Apr 2013 20:37:21 +0000 (13:37 -0700)]
staging: comedi: das800: use comedi provided range_bipolar5

Remove the private range, range_das800_ai, in this driver and use
the comedi provided range_bipolar5 instead.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: das1800: use comedi provided range_bipolar10
H Hartley Sweeten [Wed, 3 Apr 2013 20:36:48 +0000 (13:36 -0700)]
staging: comedi: das1800: use comedi provided range_bipolar10

Remove the private range, range_ao_1, in this driver and use the
comedi provided range_bipolar10 instead.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: cb_pcidas64: use comedi provided range_bipolar10
H Hartley Sweeten [Wed, 3 Apr 2013 20:36:26 +0000 (13:36 -0700)]
staging: comedi: cb_pcidas64: use comedi provided range_bipolar10

Remove the private range, ao_ranges_60xx, in this driver and use
the comedi provided range_bipolar10 instead.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: rtd520: rename thisboard variable
H Hartley Sweeten [Wed, 3 Apr 2013 18:41:09 +0000 (11:41 -0700)]
staging: comedi: rtd520: rename thisboard variable

For aesthetic reasons. rename the local variable 'thisboard' to 'board'
throughout the driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: rtd520: rename CamelCase chanBipolar
H Hartley Sweeten [Wed, 3 Apr 2013 18:40:51 +0000 (11:40 -0700)]
staging: comedi: rtd520: rename CamelCase chanBipolar

Rename the CamelCase private data variable chanBipolar to chan_is_bipolar.
Remove the unnecessary comment about it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: rtd520: rename CamelCase in rtdConvertChanGain()
H Hartley Sweeten [Wed, 3 Apr 2013 18:40:32 +0000 (11:40 -0700)]
staging: comedi: rtd520: rename CamelCase in rtdConvertChanGain()

Rename the CamelCase function rtdConvertChanGain() as well as the
CamelCase parameters to the function.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: rtd520: rename CamelCase rtdBoard
H Hartley Sweeten [Wed, 3 Apr 2013 18:40:13 +0000 (11:40 -0700)]
staging: comedi: rtd520: rename CamelCase rtdBoard

Rename the CamelCase struct rtdBoard to rtd_boardinfo. Also, rename the
range10Start and rangeUniStart variables in the struct to range_bip10
and range_uni10.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: rtd520: rename CamelCase aiCount
H Hartley Sweeten [Wed, 3 Apr 2013 18:39:55 +0000 (11:39 -0700)]
staging: comedi: rtd520: rename CamelCase aiCount

Rename this private data variable to ai_count.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: rtd520: rename CamelCase in rtd_interrupt()
H Hartley Sweeten [Wed, 3 Apr 2013 18:39:35 +0000 (11:39 -0700)]
staging: comedi: rtd520: rename CamelCase in rtd_interrupt()

Rename the CamelCase local variable fifoStatus to fifo_status.

Also rename the goto lables abortTransfer and transferDone to
xfer_abort and xfer_done.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: rtd520: rename CamelCase fifoLen
H Hartley Sweeten [Wed, 3 Apr 2013 18:39:14 +0000 (11:39 -0700)]
staging: comedi: rtd520: rename CamelCase fifoLen

Rename this private data variable to fifosz.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: rtd520: rename CamelCase transCount
H Hartley Sweeten [Wed, 3 Apr 2013 18:38:55 +0000 (11:38 -0700)]
staging: comedi: rtd520: rename CamelCase transCount

Rename this private data variable to xfer_count.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: rtd520: rename CamelCase aoValue
H Hartley Sweeten [Wed, 3 Apr 2013 18:38:37 +0000 (11:38 -0700)]
staging: comedi: rtd520: rename CamelCase aoValue

Rename this private data variable to ao_readback and remove the
unnecessary comments.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: rtd520: rename CamelCase rtdPrivate
H Hartley Sweeten [Wed, 3 Apr 2013 18:38:16 +0000 (11:38 -0700)]
staging: comedi: rtd520: rename CamelCase rtdPrivate

Rename the private data struct to rtd_private.

Also, remove the unnecessary comment about it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: rtd520: cleanup rtd_dio_insn_config()
H Hartley Sweeten [Wed, 3 Apr 2013 18:37:46 +0000 (11:37 -0700)]
staging: comedi: rtd520: cleanup rtd_dio_insn_config()

Add a local variable to make this function a bit cleaner and
remove the unnecessary comments.

The comedi core expects this function to return the number of
data parameters used. Change the return from '1' to 'insn->n'
to make this more apparent.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: zcache: clean TODO list
Wanpeng Li [Wed, 3 Apr 2013 10:16:23 +0000 (18:16 +0800)]
staging: zcache: clean TODO list

Cleanup TODO list since support zero-filled pages more efficiently has
already done by this patchset.

Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: zcache: introduce zero-filled page stat count
Wanpeng Li [Wed, 3 Apr 2013 10:16:22 +0000 (18:16 +0800)]
staging: zcache: introduce zero-filled page stat count

Introduce zero-filled page statistics to monitor the number of
zero-filled pages.

Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: zcache: fix static variables defined in debug.h but used in mutiple C files
Wanpeng Li [Wed, 3 Apr 2013 10:16:21 +0000 (18:16 +0800)]
staging: zcache: fix static variables defined in debug.h but used in mutiple C files

After commit 95bdaee214 ("zcache: Move debugfs code out of zcache-main.c file")
be merged, most of knods in zcache debugfs just export zero since these variables
are defined in debug.h but are in use in multiple C files zcache-main.c and debug.c,
in this case variables can't be treated as shared variables.

Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: imx-drm: Make IPU KMS parse display-timings
Marek Vasut [Wed, 3 Apr 2013 15:36:28 +0000 (12:36 -0300)]
staging: imx-drm: Make IPU KMS parse display-timings

This patch adds support for parsing of the DT display-timings prop
to IPU KMS driver.

Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: zcache: fix zcache writeback in debugfs
Wanpeng Li [Tue, 2 Apr 2013 02:46:17 +0000 (10:46 +0800)]
staging: zcache: fix zcache writeback in debugfs

commit 9c0ad59ef ("zcache/debug: Use an array to initialize/use debugfs attributes")
use an array to initialize/use debugfs attributes, .name = #x, .val = &zcache_##x.
For zcache writeback, this commit set .name = zcache_outstanding_writeback_pages and
.name = zcache_writtenback_pages seperately, however, corresponding .val =
&zcache_zcache_outstanding_writeback_pages and .val = &zcache_zcache_writtenback_pages,
which are not correct.

Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: zcache: fix pers_pageframes|_max aren't exported in debugfs
Wanpeng Li [Tue, 2 Apr 2013 02:46:16 +0000 (10:46 +0800)]
staging: zcache: fix pers_pageframes|_max aren't exported in debugfs

Before commit 9c0ad59ef ("zcache/debug: Use an array to initialize/use
debugfs attributes"), pers_pageframes|_max are exported in debugfs, but
this commit forgot use array export pers_pageframes|_max. This patch add
pers_pageframes|_max back.

Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: zcache: handle zcache_[eph|pers]_zpages for zero-filled page
Wanpeng Li [Tue, 2 Apr 2013 02:46:15 +0000 (10:46 +0800)]
staging: zcache: handle zcache_[eph|pers]_zpages for zero-filled page

Increment/decrement zcache_[eph|pers]_zpages for zero-filled pages,
the main point of the counters for zpages and pageframes is to be
able to calculate density == zpages/pageframes. A zero-filled page
becomes a zpage that "compresses" to zero bytes and, as a result,
requires zero pageframes for storage. So the zpages counter should
be increased but the pageframes counter should not.

[Dan Magenheimer <dan.magenheimer@oracle.com>: patch description]
Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: zcache: zero-filled pages awareness
Wanpeng Li [Tue, 2 Apr 2013 02:46:14 +0000 (10:46 +0800)]
staging: zcache: zero-filled pages awareness

Compression of zero-filled pages can unneccessarily cause internal
fragmentation, and thus waste memory. This special case can be
optimized.

This patch captures zero-filled pages, and marks their corresponding
zcache backing page entry as zero-filled. Whenever such zero-filled
page is retrieved, we fill the page frame with zero.

Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: zcache: introduce zero-filled pages handler
Wanpeng Li [Tue, 2 Apr 2013 02:46:13 +0000 (10:46 +0800)]
staging: zcache: introduce zero-filled pages handler

Introduce zero-filled pages handler to capture and handle zero pages.

Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agodrivers: staging: zcache: fix compile warning
Bob Liu [Tue, 2 Apr 2013 02:47:43 +0000 (10:47 +0800)]
drivers: staging: zcache: fix compile warning

Fix below compile warning:
staging/zcache/zcache-main.c: In function ‘zcache_autocreate_pool’:
staging/zcache/zcache-main.c:1393:13: warning: ‘cli’ may be used uninitialized
in this function [-Wuninitialized]

Signed-off-by: Bob Liu <bob.liu@oracle.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agodrivers: staging: zcache: fix compile error
Bob Liu [Tue, 2 Apr 2013 02:47:42 +0000 (10:47 +0800)]
drivers: staging: zcache: fix compile error

Because 'ramster_debugfs_init' is not defined if !CONFIG_DEBUG_FS, there is
compile error:

$ make drivers/staging/zcache/
staging/zcache/ramster/ramster.c: In function ‘ramster_init’:
staging/zcache/ramster/ramster.c:981:2: error: implicit declaration of
function ‘ramster_debugfs_init’ [-Werror=implicit-function-declaration]

This patch fix it and reduce some #ifdef CONFIG_DEBUG_FS in .c files the same
way.

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Bob Liu <bob.liu@oracle.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoMerge tag 'iio-for-3.10c' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23...
Greg Kroah-Hartman [Tue, 2 Apr 2013 19:37:02 +0000 (12:37 -0700)]
Merge tag 'iio-for-3.10c' of git://git./linux/kernel/git/jic23/iio into staging-next

Jonathan writes:
Third round of IIO cleanups, graduations and new stuff for the 3.10 cycle.

A small set including 3 things.
1) A short cleanup series for the ak8975.
2) Graduation of ak8975 out of staging.
3) Some additional bits for the at91 adc driver to cover low resolution
   modes, sleep and a little bit of missing documentation.

11 years agoiio: at91_adc: fix missing Sample and Hold time
Jean-Christophe PLAGNIOL-VILLARD [Fri, 29 Mar 2013 14:54:00 +0000 (14:54 +0000)]
iio: at91_adc: fix missing Sample and Hold time

On the at91_adc a minimal Sample and Hold Time is necessary for the ADC to
guarantee the best converted final value between two channels selection.
This time has to be programmed through the bitfield SHTIM in the
Mode Register ADC_MR.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio: at91_adc: add sleep mode support
Jean-Christophe PLAGNIOL-VILLARD [Fri, 29 Mar 2013 14:54:00 +0000 (14:54 +0000)]
iio: at91_adc: add sleep mode support

The sleep mode will allow to put the adc in sleep between conversion.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio: at91_adc: add low and high res support
Ludovic Desroches [Fri, 29 Mar 2013 14:54:00 +0000 (14:54 +0000)]
iio: at91_adc: add low and high res support

at91 adc offers the choice between two resolutions: low and high.
The low and high resolution values depends on adc IP version, as many IP
properties have been exposed through device tree, these settings have also
been added to the dt bindings.

Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio:magnetometer:ak8975 move driver out of staging
Jonathan Cameron [Sun, 24 Mar 2013 16:58:00 +0000 (16:58 +0000)]
iio:magnetometer:ak8975 move driver out of staging

Issues raised in last series to propose this have now been resolved
so there should be no reason this driver cannot graduate from staging.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Laxman Dewangan <ldewangan@nvidia.com>
11 years agostaging:iio:magnetometer:ak8975 use standard i2c_smbus read functions.
Jonathan Cameron [Sun, 24 Mar 2013 16:58:00 +0000 (16:58 +0000)]
staging:iio:magnetometer:ak8975 use standard i2c_smbus read functions.

Now the mysterious NOSTART flag is gone from the read, we can use the
i2c_smbus_read_byte/word/i2c_block_data functions instead of the
local reimplementation of these standard functions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Laxman Dewangan <ldewangan@nvidia.com>
11 years agostaging:iio:magnetometer:ak8975 drop I2C_M_NOSTART flag in read_data
Jonathan Cameron [Sun, 24 Mar 2013 16:58:00 +0000 (16:58 +0000)]
staging:iio:magnetometer:ak8975 drop I2C_M_NOSTART flag in read_data

This flag makes no sense whatsoever where it is.
Documentation/i2c/i2c-protocol states:

  If you set the I2C_M_NOSTART variable for the first partial message,
  we do not generate Addr, but we do generate the startbit S. This will
  probably confuse all other clients on your bus, so don't try this.

This is exactly what is going on here.  Likelihood given that the
driver never checked for this protocol mangling being available is that
it wasn't present on the test boards and hence this flag was simply
ignored.  No indication of why it would be necessary has been found in
the datasheets.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Laxman Dewangan <ldewangan@nvidia.com>
11 years agostaging:iio:magnetometer:ak8975 drop unused eoc_irq
Jonathan Cameron [Sun, 24 Mar 2013 16:58:00 +0000 (16:58 +0000)]
staging:iio:magnetometer:ak8975 drop unused eoc_irq

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Laxman Dewangan <ldewangan@nvidia.com>
11 years agostaging: ti-soc-thermal: Add get_trend support
J Keerthy [Mon, 1 Apr 2013 16:04:46 +0000 (12:04 -0400)]
staging: ti-soc-thermal: Add get_trend support

Patch adds get_trend functionality for OMAP Bandgap thermal devices.

Signed-off-by: J Keerthy <j-keerthy@ti.com>
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: ti-soc-thermal:Introduce ti_bandgap_get_trend function for OMAP5
J Keerthy [Mon, 1 Apr 2013 16:04:45 +0000 (12:04 -0400)]
staging: ti-soc-thermal:Introduce ti_bandgap_get_trend function for OMAP5

The patch adds ti_bandgap_get_trend function. This is specific
to OMAP5 for now it computes the trend from the temp values stored
in the hardware history buffer.

Formula: (T1 - T2) / P.

Where:
                T1: Last read valid temperature.
                T2: Last but one read valid temperature.
                P:  Update Interval.

Signed-off-by: J Keerthy <j-keerthy@ti.com>
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: ti-soc-thermal: Enable HISTORY_BUFFER Feature for OMAP5
J Keerthy [Mon, 1 Apr 2013 16:04:44 +0000 (12:04 -0400)]
staging: ti-soc-thermal: Enable HISTORY_BUFFER Feature for OMAP5

This patch enables the HISTORY_BUFFER eature for OMAP5.

Signed-off-by: J Keerthy <j-keerthy@ti.com>
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: ti-soc-thermal: Introduce HAS_HISTORY_BUFFER feature for bandgap
J Keerthy [Mon, 1 Apr 2013 16:04:43 +0000 (12:04 -0400)]
staging: ti-soc-thermal: Introduce HAS_HISTORY_BUFFER feature for bandgap

The patch introduces HISTORY_BUFFER feature. This is present in OMAP5 bandgap
and it is a hardware history buffer of previously read temperatures.

Signed-off-by: J Keerthy <j-keerthy@ti.com>
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: ti-soc-thermal: Modify update_interval r/w functions to incorporate the...
J Keerthy [Mon, 1 Apr 2013 16:04:42 +0000 (12:04 -0400)]
staging: ti-soc-thermal: Modify update_interval r/w functions to incorporate the OMAP5 feature of COUNTER_DELAY.

Update ti_bandgap_write_update_interval and ti_bandgap_read_update_interval
functions to incorporate the OMAP5 feature of COUNTER_DELAY. The way we
program the delay between two successive temperature conversions
is different for OMAP5 as when compared with OMAP4. Incorporating
the changes required to program the delay for OMAP5.

Signed-off-by: J Keerthy <j-keerthy@ti.com>
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: ti-soc-thermal: Enable COUNTER_DELAY feature for OMAP5
J Keerthy [Mon, 1 Apr 2013 16:04:41 +0000 (12:04 -0400)]
staging: ti-soc-thermal: Enable COUNTER_DELAY feature for OMAP5

Enable COUNTER_DELAY feature for OMAP5.

Signed-off-by: J Keerthy <j-keerthy@ti.com>
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: ti-soc-thermal: Introduce HAS_COUNTER_DELAY feature for bandgap
J Keerthy [Mon, 1 Apr 2013 16:04:40 +0000 (12:04 -0400)]
staging: ti-soc-thermal: Introduce HAS_COUNTER_DELAY feature for bandgap

Introduce HAS_COUNTER_DELAY feature for bandgap.

Signed-off-by: J Keerthy <j-keerthy@ti.com>
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: ti-soc-thermal: Initialise counter_delay field for OMAP5 sensors
J Keerthy [Mon, 1 Apr 2013 16:04:39 +0000 (12:04 -0400)]
staging: ti-soc-thermal: Initialise counter_delay field for OMAP5 sensors

Initialize all 3 temperature sensors of OMAP5 bandgap with the counter delay
mask.

Signed-off-by: J Keerthy <j-keerthy@ti.com>
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: ti-soc-thermal: Add counter_delay_mask field to temp_sensor_registers struct
J Keerthy [Mon, 1 Apr 2013 16:04:38 +0000 (12:04 -0400)]
staging: ti-soc-thermal: Add counter_delay_mask field to temp_sensor_registers struct

Add counter_delay_mask field to temp_sensor_registers structure.

Signed-off-by: J Keerthy <j-keerthy@ti.com>
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: ti-soc-thermal: report alert events on OMAP5 devices
Eduardo Valentin [Mon, 1 Apr 2013 16:04:37 +0000 (12:04 -0400)]
staging: ti-soc-thermal: report alert events on OMAP5 devices

OMAP5430 devices have the capability to generate
alert temperature. Thus, whenever a T_ALERT IRQ is served,
the ti-bandgap will call .report_temperature to notify the
thermal framework about thermal zone update request.

This patch allows OMAP5430 devices to notify
the thermal framework about T_ALERT events.

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: ti-soc-thermal: report alert events on OMAP4 devices
Eduardo Valentin [Mon, 1 Apr 2013 16:04:36 +0000 (12:04 -0400)]
staging: ti-soc-thermal: report alert events on OMAP4 devices

OMAP4460 and OMAP4470 devices have the capability to generate
alert temperature. Thus, whenever a T_ALERT IRQ is served,
the ti-bandgap will call .report_temperature to notify the
thermal framework about thermal zone update request.

This patch allows OMAP4460 and OMAP4470 devices to notify
the thermal framework about T_ALERT events.

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: ti-soc-thermal: expose ti_thermal_report_temperature
Eduardo Valentin [Mon, 1 Apr 2013 16:04:35 +0000 (12:04 -0400)]
staging: ti-soc-thermal: expose ti_thermal_report_temperature

Whenever a sensor has an alert to be reported to the thermal framework,
it can use the report ti_thermal_report_temperature helper. This patch
expose this function so that bandgap data config declarations could use it.

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: ti-soc-thermal: remove kernel-doc warnings reported with -v
Nishanth Menon [Mon, 1 Apr 2013 16:04:34 +0000 (12:04 -0400)]
staging: ti-soc-thermal: remove kernel-doc warnings reported with -v

Fix all kernel-doc warnings by add documentation about returns.

Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: ti-soc-thermal: return error in case power switch is not supported
Eduardo Valentin [Mon, 1 Apr 2013 16:04:33 +0000 (12:04 -0400)]
staging: ti-soc-thermal: return error in case power switch is not supported

Improve ti_bandgap_power by returning an error code in case
the device does not support controlling its power state.

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: rts5139: device_reset() can be static
Shawn Guo [Mon, 1 Apr 2013 12:01:13 +0000 (20:01 +0800)]
staging: rts5139: device_reset() can be static

Function device_reset() is only used in rts51x_scsi.c, so make it be
static.  Otherwise, it will have a name collision with the new added
reset API.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging:csr: Fix typos in comment and printk
Masanari Iida [Sun, 31 Mar 2013 11:59:15 +0000 (20:59 +0900)]
staging:csr: Fix typos in comment and printk

Correct spelling typo in comments and printks.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoMerge 3.9-rc5 into staging-next
Greg Kroah-Hartman [Mon, 1 Apr 2013 18:46:45 +0000 (11:46 -0700)]
Merge 3.9-rc5 into staging-next

This pulls in all of the good fixes we need here.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoLinux 3.9-rc5
Linus Torvalds [Sun, 31 Mar 2013 22:12:43 +0000 (15:12 -0700)]
Linux 3.9-rc5

11 years agoMerge branch 'fixes' of git://git.infradead.org/users/vkoul/slave-dma
Linus Torvalds [Sun, 31 Mar 2013 18:41:47 +0000 (11:41 -0700)]
Merge branch 'fixes' of git://git.infradead.org/users/vkoul/slave-dma

Pull slave-dmaengine fixes from Vinod Koul:
 "Two fixes for slave-dmaengine.

  The first one is for making slave_id value correct for dw_dmac and
  the other one fixes the endieness in DT parsing"

* 'fixes' of git://git.infradead.org/users/vkoul/slave-dma:
  dw_dmac: adjust slave_id accordingly to request line base
  dmaengine: dw_dma: fix endianess for DT xlate function

11 years agoMerge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab...
Linus Torvalds [Sun, 31 Mar 2013 18:40:33 +0000 (11:40 -0700)]
Merge branch 'v4l_for_linus' of git://git./linux/kernel/git/mchehab/linux-media

Pull media fixes from Mauro Carvalho Chehab:
 "For a some fixes for Kernel 3.9:
   - subsystem build fix when VIDEO_DEV=y, VIDEO_V4L2=m and I2C=m
   - compilation fix for arm multiarch preventing IR_RX51 to be selected
   - regression fix at bttv crop logic
   - s5p-mfc/m5mols/exynos: a few fixes for cameras on exynos hardware"

* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
  [media] [REGRESSION] bt8xx: Fix too large height in cropcap
  [media] fix compilation with both V4L2 and I2C as 'm'
  [media] m5mols: Fix bug in stream on handler
  [media] s5p-fimc: Do not attempt to disable not enabled media pipeline
  [media] s5p-mfc: Fix encoder control 15 issue
  [media] s5p-mfc: Fix frame skip bug
  [media] s5p-fimc: send valid m2m ctx to fimc_m2m_job_finish
  [media] exynos-gsc: send valid m2m ctx to gsc_m2m_job_finish
  [media] fimc-lite: Fix the variable type to avoid possible crash
  [media] fimc-lite: Initialize 'step' field in fimc_lite_ctrl structure
  [media] ir: IR_RX51 only works on OMAP2

11 years agoMerge tag 'for-linus-20130331' of git://git.kernel.dk/linux-block
Linus Torvalds [Sun, 31 Mar 2013 18:38:59 +0000 (11:38 -0700)]
Merge tag 'for-linus-20130331' of git://git.kernel.dk/linux-block

Pull block fixes from Jens Axboe:
 "Alright, this time from 10K up in the air.

  Collection of fixes that have been queued up since the merge window
  opened, hence postponed until later in the cycle.  The pull request
  contains:

   - A bunch of fixes for the xen blk front/back driver.

   - A round of fixes for the new IBM RamSan driver, fixing various
     nasty issues.

   - Fixes for multiple drives from Wei Yongjun, bad handling of return
     values and wrong pointer math.

   - A fix for loop properly killing partitions when being detached."

* tag 'for-linus-20130331' of git://git.kernel.dk/linux-block: (25 commits)
  mg_disk: fix error return code in mg_probe()
  rsxx: remove unused variable
  rsxx: enable error return of rsxx_eeh_save_issued_dmas()
  block: removes dynamic allocation on stack
  Block: blk-flush: Fixed indent code style
  cciss: fix invalid use of sizeof in cciss_find_cfgtables()
  loop: cleanup partitions when detaching loop device
  loop: fix error return code in loop_add()
  mtip32xx: fix error return code in mtip_pci_probe()
  xen-blkfront: remove frame list from blk_shadow
  xen-blkfront: pre-allocate pages for requests
  xen-blkback: don't store dev_bus_addr
  xen-blkfront: switch from llist to list
  xen-blkback: fix foreach_grant_safe to handle empty lists
  xen-blkfront: replace kmalloc and then memcpy with kmemdup
  xen-blkback: fix dispatch_rw_block_io() error path
  rsxx: fix missing unlock on error return in rsxx_eeh_remap_dmas()
  Adding in EEH support to the IBM FlashSystem 70/80 device driver
  block: IBM RamSan 70/80 error message bug fix.
  block: IBM RamSan 70/80 branding changes.
  ...

11 years agoRevert "lockdep: check that no locks held at freeze time"
Paul Walmsley [Sun, 31 Mar 2013 00:04:40 +0000 (00:04 +0000)]
Revert "lockdep: check that no locks held at freeze time"

This reverts commit 6aa9707099c4b25700940eb3d016f16c4434360d.

Commit 6aa9707099c4 ("lockdep: check that no locks held at freeze time")
causes problems with NFS root filesystems.  The failures were noticed on
OMAP2 and 3 boards during kernel init:

  [ BUG: swapper/0/1 still has locks held! ]
  3.9.0-rc3-00344-ga937536 #1 Not tainted
  -------------------------------------
  1 lock held by swapper/0/1:
   #0:  (&type->s_umount_key#13/1){+.+.+.}, at: [<c011e84c>] sget+0x248/0x574

  stack backtrace:
    rpc_wait_bit_killable
    __wait_on_bit
    out_of_line_wait_on_bit
    __rpc_execute
    rpc_run_task
    rpc_call_sync
    nfs_proc_get_root
    nfs_get_root
    nfs_fs_mount_common
    nfs_try_mount
    nfs_fs_mount
    mount_fs
    vfs_kern_mount
    do_mount
    sys_mount
    do_mount_root
    mount_root
    prepare_namespace
    kernel_init_freeable
    kernel_init

Although the rootfs mounts, the system is unstable.  Here's a transcript
from a PM test:

  http://www.pwsan.com/omap/testlogs/test_v3.9-rc3/20130317194234/pm/37xxevm/37xxevm_log.txt

Here's what the test log should look like:

  http://www.pwsan.com/omap/testlogs/test_v3.8/20130218214403/pm/37xxevm/37xxevm_log.txt

Mailing list discussion is here:

  http://lkml.org/lkml/2013/3/4/221

Deal with this for v3.9 by reverting the problem commit, until folks can
figure out the right long-term course of action.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Mandeep Singh Baines <msb@chromium.org>
Cc: Jeff Layton <jlayton@redhat.com>
Cc: Shawn Guo <shawn.guo@linaro.org>
Cc: <maciej.rutecki@gmail.com>
Cc: Fengguang Wu <fengguang.wu@intel.com>
Cc: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Ben Chan <benchan@chromium.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending
Linus Torvalds [Sat, 30 Mar 2013 20:13:05 +0000 (13:13 -0700)]
Merge git://git./linux/kernel/git/nab/target-pending

Pull SCSI target fixes from Nicholas Bellinger:
 "This includes the bug-fix for a >= v3.8-rc1 regression specific to
  iscsi-target persistent reservation conflict handling (CC'ed to
  stable), and a tcm_vhost patch to drop VIRTIO_RING_F_EVENT_IDX usage
  so that in-flight qemu vhost-scsi-pci device code can detect the
  proper vhost feature bits.

  Also, there are two more tcm_vhost patches still being discussed by
  MST and Asias for v3.9 that will be required for the in-flight qemu
  vhost-scsi-pci device patch to function properly, and that should
  (hopefully) be the last target fixes for this round."

* git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
  target: Fix RESERVATION_CONFLICT status regression for iscsi-target special case
  tcm_vhost: Avoid VIRTIO_RING_F_EVENT_IDX feature bit

11 years agodw_dmac: adjust slave_id accordingly to request line base
Andy Shevchenko [Wed, 20 Feb 2013 11:52:17 +0000 (13:52 +0200)]
dw_dmac: adjust slave_id accordingly to request line base

On some hardware configurations we have got the request line with the offset.
The patch introduces convert_slave_id() helper for that cases. The request line
base is came from the driver data provided by the platform_device_id table.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
11 years agodmaengine: dw_dma: fix endianess for DT xlate function
Arnd Bergmann [Sun, 3 Mar 2013 20:51:28 +0000 (20:51 +0000)]
dmaengine: dw_dma: fix endianess for DT xlate function

As reported by Wu Fengguang's build robot tracking sparse warnings, the
dma_spec arguments in the dw_dma_xlate are already byte swapped on
little-endian platforms and must not get swapped again. This code is
currently not used anywhere, but will be used in Linux 3.10 when the
ARM SPEAr platform starts using the generic DMA DT binding.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
11 years agoPNP: List Rafael Wysocki as a maintainer
Rafael J. Wysocki [Fri, 29 Mar 2013 21:59:53 +0000 (22:59 +0100)]
PNP: List Rafael Wysocki as a maintainer

The Adam Belay's e-mail address in MAINTAINERS under PNP SUPPORT
is not valid any more and I started to maintain that code in the
meantime as a matter of fact, so list myself as a maintainer of it
along with Bjorn and remove the Adam's entry from it.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agostaging: sync: Add compat_ioctl handlers to sync drivers
Dmitry Pervushin [Fri, 29 Mar 2013 17:50:02 +0000 (10:50 -0700)]
staging: sync: Add compat_ioctl handlers to sync drivers

The sync drivers are missing compat_ioctl handlers, so this
patch adds them.

The same change has been submitted to AOSP:
        https://android-review.googlesource.com/#/c/54901/
        Change-Id: If1a1ecc3952b321c8d64c6a8b050104859efc4b1

Cc: Erik Gilling <konkers@android.com>
Cc: Dmitry Pervushin <dmitry.pervushin@linaro.org>
Cc: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
Cc: Android Kernel Team <kernel-team@android.com>
Signed-off-by: Dmitry Pervushin <dmitry.pervushin@linaro.org>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph...
Linus Torvalds [Fri, 29 Mar 2013 18:47:43 +0000 (11:47 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/sage/ceph-client

Pull ceph fix from Sage Weil:
 "This fixes a regression introduced during the last merge window when
  mapping non-existent images."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client:
  rbd: don't zero-fill non-image object requests

11 years agorbd: don't zero-fill non-image object requests
Alex Elder [Wed, 27 Mar 2013 14:16:30 +0000 (09:16 -0500)]
rbd: don't zero-fill non-image object requests

A result of ENOENT from a read request for an object that's part of
an rbd image indicates that there is a hole in that portion of the
image.  Similarly, a short read for such an object indicates that
the remainder of the read should be interpreted a full read with
zeros filling out the end of the request.

This behavior is not correct for objects that are not backing rbd
image data.  Currently rbd_img_obj_request_callback() assumes it
should be done for all objects.

Change rbd_img_obj_request_callback() so it only does this zeroing
for image objects.  Encapsulate that special handling in its own
function.  Add an assertion that the image object request is a bio
request, since we assume that (and we currently don't support any
other types).

This resolves a problem identified here:
    http://tracker.ceph.com/issues/4559

The regression was introduced by bf0d5f503dc11d6314c0503591d258d60ee9c944.

Reported-by: Dan van der Ster <dan@vanderster.com>
Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-off-by: Sage Weil <sage@inktank.com>
11 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux...
Linus Torvalds [Fri, 29 Mar 2013 18:13:25 +0000 (11:13 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/mason/linux-btrfs

Pull btrfs fixes from Chris Mason:
 "We've had a busy two weeks of bug fixing.  The biggest patches in here
  are some long standing early-enospc problems (Josef) and a very old
  race where compression and mmap combine forces to lose writes (me).
  I'm fairly sure the mmap bug goes all the way back to the introduction
  of the compression code, which is proof that fsx doesn't trigger every
  possible mmap corner after all.

  I'm sure you'll notice one of these is from this morning, it's a small
  and isolated use-after-free fix in our scrub error reporting.  I
  double checked it here."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
  Btrfs: don't drop path when printing out tree errors in scrub
  Btrfs: fix wrong return value of btrfs_lookup_csum()
  Btrfs: fix wrong reservation of csums
  Btrfs: fix double free in the btrfs_qgroup_account_ref()
  Btrfs: limit the global reserve to 512mb
  Btrfs: hold the ordered operations mutex when waiting on ordered extents
  Btrfs: fix space accounting for unlink and rename
  Btrfs: fix space leak when we fail to reserve metadata space
  Btrfs: fix EIO from btrfs send in is_extent_unchanged for punched holes
  Btrfs: fix race between mmap writes and compression
  Btrfs: fix memory leak in btrfs_create_tree()
  Btrfs: fix locking on ROOT_REPLACE operations in tree mod log
  Btrfs: fix missing qgroup reservation before fallocating
  Btrfs: handle a bogus chunk tree nicely
  Btrfs: update to use fs_state bit

11 years agoia64 idle: delete stale (*idle)() function pointer
Len Brown [Fri, 29 Mar 2013 18:02:30 +0000 (11:02 -0700)]
ia64 idle: delete stale (*idle)() function pointer

Commit 3e7fc708eb41 ("ia64 idle: delete pm_idle") in 3.9-rc1 didn't
finish the job, leaving an un-initialized reference to (*idle)().

[ Haven't seen a crash from this - but seems like we are just being
  lucky that "idle" is zero so it does get initialized before we jump to
  randomland  - Len ]

Reported-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agoMerge branch 'for-curr' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc
Linus Torvalds [Fri, 29 Mar 2013 18:00:43 +0000 (11:00 -0700)]
Merge branch 'for-curr' of git://git./linux/kernel/git/vgupta/arc

Pull arc architecture fixes from Vineet Gupta:
 "This includes fix for a serious bug in DMA mapping API, make
  allyesconfig wreckage, removal of bogus email-list placeholder in
  MAINTAINERS, a typo in ptrace helper code and last remaining changes
  for syscall ABI v3 which we are finally starting to transition-to
  internally.

  The request is late than I intended to - but I was held up with
  debugging a timer link list corruption, for which a proposed fix to
  generic timer code was sent out to lkml/tglx earlier today."

* 'for-curr' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc:
  ARC: Fix the typo in event identifier flags used by ptrace
  arc: fix dma_address assignment during dma_map_sg()
  ARC: Remove SET_PERSONALITY (tracks cross-arch change)
  ARC: ABIv3: fork/vfork wrappers not needed in "no-legacy-syscall" ABI
  ARC: ABIv3: Print the correct ABI ver
  ARC: make allyesconfig build breakages
  ARC: MAINTAINERS update for ARC

11 years agostaging: speakup: use native error codes
Andy Shevchenko [Thu, 28 Mar 2013 09:02:44 +0000 (11:02 +0200)]
staging: speakup: use native error codes

The mapping as follows:
E_RANGE -> ERANGE
E_UNDEF -> ENODATA
E_TOOLONG -> E2BIG
SET_DEFAULT -> ERESTART

As a side effect it fixes a bug in spk_var_store() where return code was
mistakenly compared to negative value instead of positive.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: speakup: reuse native kernel functions
Andy Shevchenko [Thu, 28 Mar 2013 09:02:43 +0000 (11:02 +0200)]
staging: speakup: reuse native kernel functions

We have simple_strtoul and simple_strtol. Don't repeat their functionality
here.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoMerge tag 'iio-for-3.10b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23...
Greg Kroah-Hartman [Fri, 29 Mar 2013 15:37:58 +0000 (08:37 -0700)]
Merge tag 'iio-for-3.10b' of git://git./linux/kernel/git/jic23/iio into staging-next

Jonathan writes:

Second round of IIO cleanups for the 3.10 cycle

1) A nice little removal of the unwanted private pointer from
   struct iio_trigger.
2) Some clean up of the ad799x driver.
3) Couple of cleanups for the exynos_adc driver and some documentation.
4) Move the mxs-lradc initialization a little earlier in the driver to avoid
   wiping out the configuration just after setting it.

A nice small set of worthy bits and bobs.

11 years agoBtrfs: don't drop path when printing out tree errors in scrub
Josef Bacik [Fri, 29 Mar 2013 14:09:34 +0000 (08:09 -0600)]
Btrfs: don't drop path when printing out tree errors in scrub

A user reported a panic where we were panicing somewhere in
tree_backref_for_extent from scrub_print_warning.  He only captured the trace
but looking at scrub_print_warning we drop the path right before we mess with
the extent buffer to print out a bunch of stuff, which isn't right.  So fix this
by dropping the path after we use the eb if we need to.  Thanks,

Cc: stable@vger.kernel.org
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
11 years agoiio: adc: Document the regulator/clocks for exynos-adc
Doug Anderson [Wed, 13 Mar 2013 20:39:00 +0000 (20:39 +0000)]
iio: adc: Document the regulator/clocks for exynos-adc

The exynos ADC won't work without a regulator called "vdd" and a clock
called "adc".  Document this fact in the device tree bindings.

Signed-off-by: Doug Anderson <dianders@chromium.org>
Reviewed-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio: mxs-lradc: Do hardware initialization earlier
Alexandre Belloni [Thu, 28 Mar 2013 22:04:00 +0000 (22:04 +0000)]
iio: mxs-lradc: Do hardware initialization earlier

We need to initialize hardware before registering the touchscreen. Else,
we end up setting registers in mxs_lradc_ts_open(), getting called just
after registering the touchscreen with input_register_device() and by
the end of mxs_lradc_probe(), we reset the LRADC block hence losing the
correct configuration.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Marek Vasut <marex@denx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
11 years agoiio: exynos-adc: Fix typo in DT documentation
Sachin Kamat [Tue, 26 Mar 2013 11:52:00 +0000 (11:52 +0000)]
iio: exynos-adc: Fix typo in DT documentation

Fixes some typos in the documentation of exynos-adc.txt.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio: exynos_adc: Remove redundant of_match_ptr macro
Sachin Kamat [Tue, 26 Mar 2013 09:42:00 +0000 (09:42 +0000)]
iio: exynos_adc: Remove redundant of_match_ptr macro

exynos_adc is a DT only driver and exynos_adc_match table is always
compiled in. Hence remove the macro.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agostaging:iio:ad799x: Preallocate sample buffer
Lars-Peter Clausen [Tue, 26 Mar 2013 18:43:00 +0000 (18:43 +0000)]
staging:iio:ad799x: Preallocate sample buffer

Avoid allocating and freeing the sample buffer for each transfer. Instead
allocate it once when we start sampling. Also pre-compute the number of bytes we
need to transfer in the same way.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agostaging:iio:ad799x: Set IIO_CHAN_INFO_SCALE mask
Lars-Peter Clausen [Tue, 26 Mar 2013 18:43:00 +0000 (18:43 +0000)]
staging:iio:ad799x: Set IIO_CHAN_INFO_SCALE mask

The driver has support for reporting a channels scale, but none of the channels
set the IIO_CHAN_INFO_SCALE mask. Add the IIO_CHAN_INFO_SCALE to all channels to
indicate that the drivers supports reporting the scale.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agostaging:iio:ad799x: Add helper macro for channel initialization
Lars-Peter Clausen [Tue, 26 Mar 2013 18:43:00 +0000 (18:43 +0000)]
staging:iio:ad799x: Add helper macro for channel initialization

The ad779x channels all follow the same pattern. Add a helper macro to
initialize the channel spec, this allows us to drop quite a few lines.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agostaging:iio:ad799x: Use i2c_smbus_{read,write}_word_data_swapped
Lars-Peter Clausen [Tue, 26 Mar 2013 18:43:00 +0000 (18:43 +0000)]
staging:iio:ad799x: Use i2c_smbus_{read,write}_word_data_swapped

Use i2c_smbus_{read,write}_word_data_swapped instead of open-coding it.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agostaging:iio:ad799x: Remove internal reference support
Lars-Peter Clausen [Tue, 26 Mar 2013 18:43:00 +0000 (18:43 +0000)]
staging:iio:ad799x: Remove internal reference support

None of the devices supported by this driver have an internal voltage reference,
so remove support for it from the driver.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agostaging:iio:ad799x: Remove unused ad799x_state fields
Lars-Peter Clausen [Tue, 26 Mar 2013 18:42:00 +0000 (18:42 +0000)]
staging:iio:ad799x: Remove unused ad799x_state fields

Remove fields from the ad799x_state struct which are not used.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agotarget: Fix RESERVATION_CONFLICT status regression for iscsi-target special case
Nicholas Bellinger [Fri, 29 Mar 2013 06:06:00 +0000 (23:06 -0700)]
target: Fix RESERVATION_CONFLICT status regression for iscsi-target special case

This patch fixes a regression introduced in v3.8-rc1 code where a failed
target_check_reservation() check in target_setup_cmd_from_cdb() was causing
an incorrect SAM_STAT_GOOD status to be returned during a WRITE operation
performed by an unregistered / unreserved iscsi initiator port.

This regression is only effecting iscsi-target due to a special case check
for TCM_RESERVATION_CONFLICT within iscsi_target_erl1.c:iscsit_execute_cmd(),
and was still correctly disallowing WRITE commands from backend submission
for unregistered / unreserved initiator ports, while returning the incorrect
SAM_STAT_GOOD status due to the missing SAM_STAT_RESERVATION_CONFLICT
assignment.

This regression was first introduced with:

commit de103c93aff0bed0ae984274e5dc8b95899badab
Author: Christoph Hellwig <hch@lst.de>
Date:   Tue Nov 6 12:24:09 2012 -0800

    target: pass sense_reason as a return value

Go ahead and re-add the missing SAM_STAT_RESERVATION_CONFLICT assignment
during a target_check_reservation() failure, so that iscsi-target code
sends the correct SCSI status.

All other fabrics using target_submit_cmd_*() with a RESERVATION_CONFLICT
call to transport_generic_request_failure() are not effected by this bug.

Reported-by: Jeff Leung <jleung@curriegrad2004.ca>
Cc: Christoph Hellwig <hch@lst.de>
Cc: <stable@vger.kernel.org>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
11 years agotcm_vhost: Avoid VIRTIO_RING_F_EVENT_IDX feature bit
Nicholas Bellinger [Thu, 28 Mar 2013 00:23:41 +0000 (17:23 -0700)]
tcm_vhost: Avoid VIRTIO_RING_F_EVENT_IDX feature bit

This patch adds a VHOST_SCSI_FEATURES mask minus VIRTIO_RING_F_EVENT_IDX
so that vhost-scsi-pci userspace will strip this feature bit once
GET_FEATURES reports it as being unsupported on the host.

This is to avoid a bug where ->handle_kicks() are missed when EVENT_IDX
is enabled by default in userspace code.

(mst: Rename to VHOST_SCSI_FEATURES + add comment)

Acked-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Asias He <asias@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
11 years agoRevert "mm: introduce VM_POPULATE flag to better deal with racy userspace programs"
Michel Lespinasse [Thu, 28 Mar 2013 23:26:23 +0000 (16:26 -0700)]
Revert "mm: introduce VM_POPULATE flag to better deal with racy userspace programs"

This reverts commit 186930500985 ("mm: introduce VM_POPULATE flag to
better deal with racy userspace programs").

VM_POPULATE only has any effect when userspace plays racy games with
vmas by trying to unmap and remap memory regions that mmap or mlock are
operating on.

Also, the only effect of VM_POPULATE when userspace plays such games is
that it avoids populating new memory regions that get remapped into the
address range that was being operated on by the original mmap or mlock
calls.

Let's remove VM_POPULATE as there isn't any strong argument to mandate a
new vm_flag.

Signed-off-by: Michel Lespinasse <walken@google.com>
Signed-off-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>