OSDN Git Service

android-x86/kernel.git
9 years agodrivers: staging: rtl8723au: Fix "space required after that ','" errors
Greg Donald [Tue, 16 Sep 2014 23:37:41 +0000 (18:37 -0500)]
drivers: staging: rtl8723au: Fix "space required after that ','" errors

Fix checkpatch.pl "space required after that ','" errors

Signed-off-by: Greg Donald <gdonald@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8723au: fix sparse incorrect type assignment warnings
Kieron Browne [Tue, 16 Sep 2014 22:28:09 +0000 (23:28 +0100)]
staging: rtl8723au: fix sparse incorrect type assignment warnings

Use cpu_to_le16 to cast int for assignment to __le16 members

Signed-off-by: Kieron Browne <kieron.browne@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8723au: Fix checkpatch errors
MihaelaGaman [Sun, 14 Sep 2014 09:56:43 +0000 (12:56 +0300)]
staging: rtl8723au: Fix checkpatch errors

Fix checkpatch.pl "spaces required around":
>, =, =, =, =, +=, >, >, <, <, :, <  errors.

Signed-off-by: MihaelaGaman <mp.gaman@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl8188eu: os_dep: Compression of lines for immediate return
Vaishali Thakkar [Sun, 14 Sep 2014 08:16:37 +0000 (13:46 +0530)]
Staging: rtl8188eu: os_dep: Compression of lines for immediate return

This patch compresses two lines in to a single line in file rtw_android.c
if immediate return statement is found. It also removes variable bytes_written as
it is no longer needed.

It is done using script Coccinelle. And coccinelle uses following semantic
patch for this compression function:

@@
expression ret;
identifier f;
@@

-ret =
+return
     f(...);
-return ret;

Signed-off-by: Vaishali Thakkar<vthakkar1994@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8188eu: core: Fixed wrong space error.
Gulsah Kose [Sat, 20 Sep 2014 21:13:29 +0000 (00:13 +0300)]
staging: rtl8188eu: core: Fixed wrong space error.

This patch fixes "foo     * bar" should be "foo   *bar" checkpatch.pl error in rtw_cmd.c

Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: iio: impedance-analyzer: add blank line after declaration
Catalina Mocanu [Fri, 19 Sep 2014 21:54:54 +0000 (14:54 -0700)]
staging: iio: impedance-analyzer: add blank line after declaration

This fixes the following checkpatch.pl warning:
WARNING: Missing a blank line after declarations.

Signed-off-by: Catalina Mocanu <catalina.mocanu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: iio: trigger: add blank lines after declarations
Catalina Mocanu [Fri, 19 Sep 2014 21:32:09 +0000 (14:32 -0700)]
staging: iio: trigger: add blank lines after declarations

This fixes the following checkpatch.pl warning:
WARNING: Missing a blank line after declarations.

Signed-off-by: Catalina Mocanu <catalina.mocanu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: iio: resolver: Missing a blank line after declarations
Aybuke Ozdemir [Fri, 19 Sep 2014 15:48:05 +0000 (18:48 +0300)]
Staging: iio: resolver: Missing a blank line after declarations

This patch fixes these warning messages found by checkpatch.pl:
WARNING : Missing a blank line after declarations

Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: iio: dummy: add blank lines after declarations.
Catalina Mocanu [Thu, 18 Sep 2014 21:55:06 +0000 (14:55 -0700)]
staging: iio: dummy: add blank lines after declarations.

This fixes the following checkpatch.pl warning:
WARNING: Missing a blank line after declarations.

Signed-off-by: Catalina Mocanu <catalina.mocanu@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: iio: meter: ade7753: Fixed checkpatch.pl warnings
Tina Johnson [Sat, 13 Sep 2014 10:16:15 +0000 (15:46 +0530)]
Staging: iio: meter: ade7753: Fixed checkpatch.pl warnings

Clean-up patch to fix the following checkpatch.pl warnings:

ade7753.c:325: WARNING: Missing a blank line after declarations
ade7753.c:383: WARNING: Missing a blank line after declarations

Signed-off-by: Tina Johnson<tinajohnson.1234@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: iio: meter: ade7753: Merged assignment with immediately following return...
Tina Johnson [Sun, 14 Sep 2014 11:00:05 +0000 (16:30 +0530)]
Staging: iio: meter: ade7753: Merged assignment with immediately following return statement

Saved one line of code by merging the assigning and return statements
of variable ret. And thus removed variable len which was no longer useful.

This patch was done using Coccinelle script and the following semantic
patch was used:

@@
expression ret;
identifier f;
@@

-ret =
+return
      f(...);
-return ret;

Signed-off-by: Tina Johnson <tinajohnson.1234@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Acked-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: llite: Use kzalloc and rewrite null tests
Julia Lawall [Thu, 18 Sep 2014 20:24:02 +0000 (22:24 +0200)]
staging: lustre: llite: Use kzalloc and rewrite null tests

This patch removes some kzalloc-related macros and rewrites the
associated null tests to use !x rather than x == NULL.

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

// <smpl>
@@
expression ptr;
statement S,S1;
@@

  \(OBD_ALLOC\|OBD_ALLOC_WAIT\|OBD_ALLOC_PTR\|OBD_ALLOC_PTR_WAIT\)(ptr,...);
  if (
+     !
      ptr
-      == NULL
     ) S else S1

@@
expression ptr,size;
@@

- OBD_ALLOC(ptr,size)
+ ptr = kzalloc(size, GFP_NOFS)

@@
expression ptr,size;
@@

- OBD_ALLOC_WAIT(ptr,size)
+ ptr = kzalloc(size, GFP_KERNEL)

@@
expression ptr,size;
@@

- OBD_ALLOC_PTR(ptr)
+ ptr = kzalloc(sizeof(*ptr), GFP_NOFS)

@@
expression ptr,size;
@@

- OBD_ALLOC_PTR_WAIT(ptr,size)
+ ptr = kzalloc(sizeof(*ptr), GFP_KERNEL)
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging/bcm: Fix whitespace/comments in Ioctl.h
Martin Kelly [Tue, 16 Sep 2014 04:16:15 +0000 (21:16 -0700)]
Staging/bcm: Fix whitespace/comments in Ioctl.h

Cleanup whitespace and comments in Ioctl.h in a few ways:
- > 80 character cleanup
- Comment clarification
- More consistent vertical alignment

Signed-off-by: Martin Kelly <martkell@amazon.com>
Reviewed-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8821ae: Remove space after unary operator in efuse.c
Fabien Malfoy [Mon, 15 Sep 2014 07:02:36 +0000 (09:02 +0200)]
staging: rtl8821ae: Remove space after unary operator in efuse.c

Several pointer declaration syntax have been fixed to match the coding style.

Signed-off-by: Fabien Malfoy <fabien.malfoy@laposte.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192u: sparse warnings: declare ieee80211_TURBO_Info static
Merlin Chlosta [Sun, 14 Sep 2014 23:56:10 +0000 (01:56 +0200)]
staging: rtl8192u: sparse warnings: declare ieee80211_TURBO_Info static

Declare ieee80211_TURBO_Info static to fix a sparse "symbol was not declared" warning.

Signed-off-by: Merlin Chlosta <eudyptula@merlin.geekmail.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: emxx_udc: fix compile warnings: discarding const qualifier
Vincenzo Scotti [Sat, 13 Sep 2014 11:39:20 +0000 (13:39 +0200)]
staging: emxx_udc: fix compile warnings: discarding const qualifier

Signed-off-by: Vincenzo Scotti <vinc94@gmail.com>
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: exxx_udc: Convert pr_warning to pr_warn
Masanari Iida [Fri, 12 Sep 2014 16:14:30 +0000 (01:14 +0900)]
staging: exxx_udc: Convert pr_warning to pr_warn

This patch Convert pr_warning to pr_warn.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: uislib: uislib.c: sparse warning of context imbalance
Sudip Mukherjee [Fri, 12 Sep 2014 12:27:26 +0000 (17:57 +0530)]
staging: unisys: uislib: uislib.c: sparse warning of context imbalance

fixed sparse warning : context imbalance in 'destroy_device'
                        unexpected unlock
this patch will generate warning from checkpatch for
lines over 80 character , but since those are user-visible strings
so it was not modified.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Tested-by: Benjamin Romer <benjamin.romer@unisys.com>
Acked-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: Fix sparse error - accessing __iomem directly
Luke Hart [Fri, 12 Sep 2014 09:48:33 +0000 (10:48 +0100)]
staging: unisys: Fix sparse error - accessing __iomem directly

Copy the channel type into a temporary buffer so that code will work
for architectures that don't support MMIO. This now works in same way
as other tests in same function.

Signed-off-by: Luke Hart <luke.hart@birchleys.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: et131x: logical continuations should be on the previous line
Mark Einon [Sun, 14 Sep 2014 15:59:05 +0000 (16:59 +0100)]
staging: et131x: logical continuations should be on the previous line

Fix two occurrences of the checkpatch check:

CHECK: Logical continuations should be on the previous line

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: et131x: Fix 'else is not generally useful after a break or return'
Mark Einon [Sun, 14 Sep 2014 15:59:04 +0000 (16:59 +0100)]
staging: et131x: Fix 'else is not generally useful after a break or return'

Fix this checkpatch warning:

WARNING: else is not generally useful after a break or return

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: et131x: Use variable names instead of types in sizeof
Mark Einon [Sun, 14 Sep 2014 15:59:08 +0000 (16:59 +0100)]
staging: et131x: Use variable names instead of types in sizeof

A few calls to sizeof() in et131x.c give the type as a parameter
- use the equivalent variable name instead.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: et131x: Use braces on all arms of if/else statements
Mark Einon [Sun, 14 Sep 2014 15:59:07 +0000 (16:59 +0100)]
staging: et131x: Use braces on all arms of if/else statements

In some places in et131x.c, one arm of am if/else statement has braces
and the other not - put braces on both arms where this happens.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: et131x: Remove spaces after casts
Mark Einon [Sun, 14 Sep 2014 15:59:06 +0000 (16:59 +0100)]
staging: et131x: Remove spaces after casts

In three places in et131x.c, spaces exist after a cast. Remove them.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: et131x: Add spinlock definition comments
Mark Einon [Sun, 14 Sep 2014 15:59:02 +0000 (16:59 +0100)]
staging: et131x: Add spinlock definition comments

Checkpatch --strict advises that spinlocks should be described when
defined, seems a good idea so this change does that.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: et131x: Remove useless assignment to NULL
Mark Einon [Sun, 14 Sep 2014 15:59:01 +0000 (16:59 +0100)]
staging: et131x: Remove useless assignment to NULL

The stack variable skb is no longer used after it's set to
NULL. Don't set it to NULL.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: et131x: Remove send_hw_lock spinlock
Mark Einon [Sun, 14 Sep 2014 15:59:00 +0000 (16:59 +0100)]
staging: et131x: Remove send_hw_lock spinlock

We don't need to use this lock - the tx path is protected by the
networking subsystem xmit_lock, so we don't also need it in
nic_send_packet().

The other use of this spinlock in et1310_enable_phy_coma() to protect
a low power flag makes no sense, so can just be removed.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: et131x: Simplify unlocking tcb_send_qlock in et131x_tx_timeout()
Mark Einon [Sun, 14 Sep 2014 15:58:59 +0000 (16:58 +0100)]
staging: et131x: Simplify unlocking tcb_send_qlock in et131x_tx_timeout()

The tcb_send_qlock spinlock is unlocked in all three paths at the end of
et131x_tx_timeout(). We can call it once before entering any of the paths,
saving ourselves a few lines of code.

This change puts tcb->count++ outside of the lock, but et131x_tx_timeout()
itself is protected by the tx_global_lock, so this shouldn't matter.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: et131x: Remove blank lines form et131x.c
Mark Einon [Sun, 14 Sep 2014 15:58:58 +0000 (16:58 +0100)]
staging: et131x: Remove blank lines form et131x.c

Remove some unecessary blank lines from et131x.c

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: et131x: Remove extra blank lines in et131x.h
Mark Einon [Sun, 14 Sep 2014 17:53:37 +0000 (18:53 +0100)]
staging: et131x: Remove extra blank lines in et131x.h

Remove some blank lines from et131.h, including double blank lines.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: et131x: Remove 'reduce number of spinlocks' TODO item
Mark Einon [Thu, 11 Sep 2014 21:59:46 +0000 (22:59 +0100)]
staging: et131x: Remove 'reduce number of spinlocks' TODO item

The number of spinlocks has been halved, from 8 to 4 since this
comment was made, let's see if this is enough.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: et131x: Simplify code in nic_rx_pkts() for multicast_pkts_rcvd
Mark Einon [Thu, 11 Sep 2014 21:59:45 +0000 (22:59 +0100)]
staging: et131x: Simplify code in nic_rx_pkts() for multicast_pkts_rcvd

In nic_rx_pkts(), we check that a multicast packet received (when using
a multicast list) is one that was requested - despite setting the list
up with the hardware. We shouldn't expect to get a mc packet we didn't
ask for, so remove these extra checks.

This also means that the surrounding code can be tiedied up a little.

Tested somewhat with omping, with no adverse effects seen.

Also remove this item from the TODO list.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: et131x: Combine two if statements with same effect
Mark Einon [Thu, 11 Sep 2014 21:59:44 +0000 (22:59 +0100)]
staging: et131x: Combine two if statements with same effect

Both these if statements have the same effect when true, so combine
them and save a few lines.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: et131x: Remove struct tcb->flags
Mark Einon [Thu, 11 Sep 2014 21:59:43 +0000 (22:59 +0100)]
staging: et131x: Remove struct tcb->flags

'struct tcb' member 'flags' was only used to collect tx stats, now
we are no longer collecting those particular stats, we no longer
need tcb->flags or the code used to peek into the skb to set it's
value.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: et131x: Remove ununsed statistics
Mark Einon [Thu, 11 Sep 2014 21:59:42 +0000 (22:59 +0100)]
staging: et131x: Remove ununsed statistics

From struct ce_stats; unicast_pkts_rcvd, unicast_pkts_xmtd,
multicast_pkts_xmtd, broadcast_pkts_rcvd and broadcast_pkts_xmtd
are not returned or used for anything meaningful - remove the code
that collects them, and the struct members too.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: et131x: Tidy up rx/tx dropped & bytes stats
Mark Einon [Thu, 11 Sep 2014 21:59:41 +0000 (22:59 +0100)]
staging: et131x: Tidy up rx/tx dropped & bytes stats

Remove some fairly useless comments regarding rx/tx _bytes and
_dropped, and use rcvd_pkts_dropped stat value to provide rx_dropped.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: et131x: In et131x_tx(), don't return NETDEV_TX_BUSY, just drop the packet
Mark Einon [Thu, 11 Sep 2014 21:59:40 +0000 (22:59 +0100)]
staging: et131x: In et131x_tx(), don't return NETDEV_TX_BUSY, just drop the packet

Memory allocation errors do not denote NETDEV_TX_BUSY, simply drop
the packet silently with kfree_skb() and return NETDEV_TX_OK.

Also remove this item from the TODO list.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: et131x: Remove et131x_send_packets() function
Mark Einon [Thu, 11 Sep 2014 21:59:39 +0000 (22:59 +0100)]
staging: et131x: Remove et131x_send_packets() function

Remove et131x_send_packets() and replace the only use in et131x_tx
with the removed function's body.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: ni_usb6501: add counter subdevice
Luca Ellero [Fri, 19 Sep 2014 11:50:41 +0000 (13:50 +0200)]
staging: comedi: ni_usb6501: add counter subdevice

Add counter support for NI USB-6501.

The following functions are introduced:
- ni6501_counter_command()
- ni6501_cnt_insn_config()
- ni6501_cnt_insn_read()
- ni6501_cnt_insn_write()

Signed-off-by: Luca Ellero <luca.ellero@brickedbrain.com>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: ni_usb6501: rename ni6501_send_command()
Luca Ellero [Fri, 19 Sep 2014 11:50:40 +0000 (13:50 +0200)]
staging: comedi: ni_usb6501: rename ni6501_send_command()

Rename ni6501_send_command to ni6501_port_command

Signed-off-by: Luca Ellero <luca.ellero@brickedbrain.com>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: ni_usb6501: remove empty lines
Luca Ellero [Fri, 19 Sep 2014 11:50:39 +0000 (13:50 +0200)]
staging: comedi: ni_usb6501: remove empty lines

ni6501_send_command(): remove empty lines in case statements

Signed-off-by: Luca Ellero <luca.ellero@brickedbrain.com>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: ni_usb6501: remove useless check
Luca Ellero [Fri, 19 Sep 2014 11:50:38 +0000 (13:50 +0200)]
staging: comedi: ni_usb6501: remove useless check

Remove useless test in ni6501_send_command. The check is useless since this
function is called only in this driver.

Signed-off-by: Luca Ellero <luca.ellero@brickedbrain.com>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: ni_usb6501: replace spaces with tabs
Luca Ellero [Fri, 19 Sep 2014 11:50:37 +0000 (13:50 +0200)]
staging: comedi: ni_usb6501: replace spaces with tabs

ni6501_auto_attach(): replace spaces with tabs to get proper alignment

Signed-off-by: Luca Ellero <luca.ellero@brickedbrain.com>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: ni_usb6501: cleanup response_size
Luca Ellero [Fri, 19 Sep 2014 11:50:36 +0000 (13:50 +0200)]
staging: comedi: ni_usb6501: cleanup response_size

Cleanup response_size in ni6501_send_command (READ_PORT command).
No logical/functional change is introduced by this patch.

Signed-off-by: Luca Ellero <luca.ellero@brickedbrain.com>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: ni_usb6501: update comments
Luca Ellero [Fri, 19 Sep 2014 11:50:35 +0000 (13:50 +0200)]
staging: comedi: ni_usb6501: update comments

Signed-off-by: Luca Ellero <luca.ellero@brickedbrain.com>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: ni_usb6501: add counter commands
Luca Ellero [Fri, 19 Sep 2014 11:50:34 +0000 (13:50 +0200)]
staging: comedi: ni_usb6501: add counter commands

Signed-off-by: Luca Ellero <luca.ellero@brickedbrain.com>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: remove comedi_fc module
Ian Abbott [Mon, 15 Sep 2014 12:46:07 +0000 (13:46 +0100)]
staging: comedi: remove comedi_fc module

All the exported functions in the "comedi_fc" module have been migrated
to the core "comedi" module and renamed, so it is now just a dummy
module.  Remove it.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: migrate copyrights from "comedi_fc.c"
Ian Abbott [Mon, 15 Sep 2014 12:46:06 +0000 (13:46 +0100)]
staging: comedi: migrate copyrights from "comedi_fc.c"

The "comedi_fc" module was originally written and copyrighted by Frank
Mori Hess, but the functionality has been migrated into the core
"comedi" module.  Move the copyright notices over to the affected .c
files in the core comedi 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: add comedi_read_array_from_buffer()
Ian Abbott [Mon, 15 Sep 2014 12:46:05 +0000 (13:46 +0100)]
staging: comedi: add comedi_read_array_from_buffer()

The "comedi_fc" module contains a few functions useful to Comedi
drivers.  Their functionality is being migrated to the core "comedi"
module and renamed to start with the prefix `comedi_`.  As part of this
migration, move `cfc_read_array_from_buffer()` into the core comedi
module and rename it to `comedi_read_array_from_buffer()`.  Change the
external declaration of `cfc_read_array_from_buffer()` into an inline
function that calls `comedi_read_array_from_buffer()`.

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: comedi_fc.h: use comedi_write_array_to_buffer()
Ian Abbott [Mon, 15 Sep 2014 12:46:04 +0000 (13:46 +0100)]
staging: comedi: comedi_fc.h: use comedi_write_array_to_buffer()

Since `cfc_write_array_to_buffer()` is just an inline function that
calls `comedi_write_array_to_buffer()`, replace calls to the former to
the latter in the "comedi_fc.h" header.  This is part of the migration
of functionality from the "comedi_fc" module to the core "comedi"
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: add comedi_write_array_to_buffer()
Ian Abbott [Mon, 15 Sep 2014 12:46:03 +0000 (13:46 +0100)]
staging: comedi: add comedi_write_array_to_buffer()

The "comedi_fc" module contains a few functions useful to Comedi
drivers.  Their functionality is being migrated to the core "comedi"
module and renamed to start with the prefix `comedi_`.  As part of this
migration, move `cfc_write_array_to_buffer()` into the core comedi
module and rename it to `comedi_write_array_to_buffer()`.  Change the
external declaration of `cfc_write_array_to_buffer()` into an inline
function that calls `comedi_write_array_to_buffer()`.

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: comedi_fc: cfc_write_array_to_buffer() data is const
Ian Abbott [Mon, 15 Sep 2014 12:46:02 +0000 (13:46 +0100)]
staging: comedi: comedi_fc: cfc_write_array_to_buffer() data is const

The `data` pointer of `cfc_write_array_to_buffer()` ought to point to
`const` data.

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: add comedi_handle_events()
Ian Abbott [Mon, 15 Sep 2014 12:46:01 +0000 (13:46 +0100)]
staging: comedi: add comedi_handle_events()

The "comedi_fc" module contains a few functions useful to Comedi
drivers.  Their functionality is being migrated to the core "comedi"
module and renamed to start with the prefix `comedi_`.  As part of this
migration, move `cfc_handle_events()` into the core comedi module and
rename it to `comedi_handle_events()`.  Change the external declaration
of `cfc_handle_events()` into an inline function that calls
`comedi_handle_events()`.

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: comedi_fc: use comedi_inc_scan_progress()
Ian Abbott [Mon, 15 Sep 2014 12:46:00 +0000 (13:46 +0100)]
staging: comedi: comedi_fc: use comedi_inc_scan_progress()

Since `cfc_inc_scan_progress()` is just an inline function that calls
`comedi_inc_scan_progress()`, replace calls to the former to the latter
in the "comedi_fc" module.  This is part of the migration of
functionality from the "comedi_fc" module to the core "comedi" 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: add comedi_inc_scan_progress()
Ian Abbott [Mon, 15 Sep 2014 12:45:59 +0000 (13:45 +0100)]
staging: comedi: add comedi_inc_scan_progress()

The "comedi_fc" module contains a few functions useful to Comedi
drivers.  Their functionality is being migrated to the core "comedi"
module and renamed to start with the prefix `comedi_`.  As part of this
migration, move `cfc_inc_scan_progress()` into the core comedi module
and rename it to `comedi_inc_scan_progress()`.  Change the external
declaration of `cfc_inc_scan_progress()` into an inline function that
calls `comedi_inc_scan_progress()`.

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: comedi_fc: use comedi_bytes_per_scan()
Ian Abbott [Mon, 15 Sep 2014 12:45:58 +0000 (13:45 +0100)]
staging: comedi: comedi_fc: use comedi_bytes_per_scan()

Since `cfc_bytes_per_scan()` is just an inline function that calls
`comedi_bytes_per_scan()`, replace calls to the former to the latter in
the "comedi_fc" module.  This is part of the migration of functionality
from the "comedi_fc" module to the core "comedi" 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: add comedi_bytes_per_scan()
Ian Abbott [Mon, 15 Sep 2014 12:45:57 +0000 (13:45 +0100)]
staging: comedi: add comedi_bytes_per_scan()

The "comedi_fc" module contains a few functions useful to Comedi
drivers.  Their functionality is being migrated to the core "comedi"
module and renamed to start with the prefix `comedi_`.  As part of this
migration, move `cfc_bytes_per_scan()` into the core comedi module and
rename it to `comedi_bytes_per_scan()`.  Change the external declaration
of `cfc_bytes_per_scan()` into an inline function that calls
`comedi_bytes_per_scan()`.

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: addi_apci_3120: simplify setting of devpriv->us_UseDma
Ian Abbott [Fri, 12 Sep 2014 11:19:57 +0000 (12:19 +0100)]
staging: comedi: addi_apci_3120: simplify setting of devpriv->us_UseDma

`apci3120_auto_attach()` first sets `devpriv->us_UseDma` to 1, then sets
it back to 0 if it fails to allocate the DMA buffer.  Since `*devpriv`
is initially zeroed out by `comedi_alloc_devpriv()`, change it to only
set `devpriv->us_UseDma` to 1 if the allocation succeeds.  Also, don't
bother explicitly initializing `devpriv->b_DmaDoubleBuffer` to 0 as it
is already zeroed out.

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: addi_apci_3120: use dma_alloc_coherent()
Ian Abbott [Fri, 12 Sep 2014 11:19:56 +0000 (12:19 +0100)]
staging: comedi: addi_apci_3120: use dma_alloc_coherent()

Use `dma_alloc_coherent()` to allocate the DMA buffers instead of
using `__get_free_pages()` to allocate and `virt_to_bus()` to get the
hardware address.  The coherent buffers are fairly small - at most 4
pages (although there are two of them).  Use of `virt_to_bus()` is
discouraged.

Note: `struct addi_private` is used by some other ADDI-DATA drivers as
well, but this is the only one using the affected members.

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: addi_apci_3120: don't overallocate DMA buffer
Ian Abbott [Fri, 12 Sep 2014 11:19:55 +0000 (12:19 +0100)]
staging: comedi: addi_apci_3120: don't overallocate DMA buffer

The last parameter of `__get_free_pages()` is log2 (the 'order') of the
number of pages to be allocated.  This driver seems to think it is the
linear number of pages, so `apci3120_auto_attach()` first tries to allocate
16 pages, but only uses 4 of them, setting the buffer size to PAGE_SIZE
multiplied by the 'order'.  If the allocation fails, it tries
progressively smaller orders, down to 0.  If the allocation at order 0
succeeds, the buffer size is set to 0, which is likely to cause
problems.

Set the buffer size to `PAGE_SIZE` shifted left by the allocation order.
Since the maximum buffer size previously used was 4, start with an
allocation order of 2 instead of 4.  Rename the `ui_DmaBufferPages` member of
`struct addi_private` to `ui_DmaBufferPageOrder` and rename the `pages`
local variable to `order` to make it clearer what it is.

Note: `struct addi_private` is used by some other ADDI-DATA drivers as
well, but this is the only one using the affected members.

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: addi_apci_3120: don't allocate 2nd DMA buffer on failure
Ian Abbott [Fri, 12 Sep 2014 11:19:54 +0000 (12:19 +0100)]
staging: comedi: addi_apci_3120: don't allocate 2nd DMA buffer on failure

`apci3120_auto_attach()` tries to allocate two DMA buffers but may
allocate a single buffer or none at all.  If it fails to allocate the
first buffer, it still tries to allocate the second buffer, even though
it won't be used.  Change it to not bother trying to allocate the second
buffer if the first one fails.

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: remove comedi_board()
Ian Abbott [Fri, 12 Sep 2014 09:11:20 +0000 (10:11 +0100)]
staging: comedi: remove comedi_board()

All calls to the inline function `comedi_board()` in "comedidev.h" have
been removed, so remove the function.

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: adl_pci9118: use dma_alloc_coherent()
Ian Abbott [Fri, 12 Sep 2014 09:04:44 +0000 (10:04 +0100)]
staging: comedi: adl_pci9118: use dma_alloc_coherent()

Use `dma_alloc_coherent()` to allocate the DMA buffers instead of
using `__get_free_pages()` to allocate and `virt_to_bus()` to get the
hardware address.  The coherent buffers are fairly small - at most 4
pages (although there are two of them).  Use of `virt_to_bus()` is
discouraged.

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: adl_pci9118: don't overallocate DMA buffer
Ian Abbott [Fri, 12 Sep 2014 09:04:43 +0000 (10:04 +0100)]
staging: comedi: adl_pci9118: don't overallocate DMA buffer

The last parameter of `__get_free_pages()` is log2 (the 'order') of the
number of pages to be allocated.  This driver seems to think it is the
linear number of pages, so `pci9118_alloc_dma()` first tries to allocate
16 pages, but only uses 4 of them, setting the buffer size to PAGE_SIZE
multiplied by the 'order'.  If the allocation fails, it tries
progressively smaller orders, down to 0.  If the allocation at order 0
succeeds, the buffer size is set to 0, which is likely to cause
problems.

Set the buffer size to `PAGE_SIZE` shifted left by the allocation order.
Since the maximum buffer size previously used was 4, start with an
allocation order of 2 instead of 4.  Rename the `pages` member of
`struct pci9118_dmabuf` (and the local variable in
`pci9118_alloc_dma()`) to `order` to make it clearer what it is.

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: adl_pci9118: don't allocate 2nd DMA buffer on failure
Ian Abbott [Fri, 12 Sep 2014 09:04:42 +0000 (10:04 +0100)]
staging: comedi: adl_pci9118: don't allocate 2nd DMA buffer on failure

`pci9118_alloc_dma()` tries to allocate two DMA buffers but may allocate
a single buffer or none at all.  If it fails to allocate the first
buffer, it still tries to allocate the second buffer, even though it
won't be used.  Change it to not bother trying to allocate the second
buffer if the first one fails.

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 agoMerge tag 'iio-for-3.18b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23...
Greg Kroah-Hartman [Fri, 19 Sep 2014 22:21:21 +0000 (15:21 -0700)]
Merge tag 'iio-for-3.18b' of git://git./linux/kernel/git/jic23/iio into staging-next

Jonathan writes:

Second round of new IIO drivers, features and cleanups for the 3.18 cycle.

New drivers and part support
* Bosch bmg160 Gyroscope driver
* Dyna-Image al3320a ambient light sensor driver
* Bosh bmi055 gyroscope part driver (accelerometer part supported by bmc150)
* isl29018 - add support for isl29023 and isl29035
* kxcjk-1013 - add support for kxcj9-1008 and kxtj2-1009
* bmc150 - additional part support (BMI055 accelerometer part, BMA255,
  BMA222E, BMA250E and BMA280).  Different resolutions but otherwise similar
  parts.
* bma180 - add BMA250 (note different from the BMA250E support above despite
  the naming).  A lot of driver reworking lead up to this - described below.

New features
* kxcjk1013 - add threshold event support.
* rockchip - document DT bindings.
* isl29018 - ACPI support
* bma180 - enable use without IRQ

Cleanups
* Tree wide - drop owner field assignment if using the module_platform_driver
  helper as that assigns it anyway.
* kxcjk1013 - drop a redundant assignment of the current range and fix a
  a defined but not used warning.
* inv_mpu6050 - Remove an unnecessary cast form a void pointer.
* rockchip - drop and unused variable.
* at91_adc - make a local function static.
* st-sensors-core - correctly handle an error in setting in
  st_sensors_set_drdy_int_pin
* isl29018 - typo fix
* bmc150 - fix incorrect scale value for 16G range (Driver new this cycle)
* bmc150 - fix issues when CONFIG_PM_RUNTIME not set (Driver new this cycle)
* ad7606 - line length tidy up.
* bmg160 - set power state only if PM_RUNTIME is defined.
* ak8975 - fix some unnecessary casting between char * and const char *
* bma180 - prefix remaining bits and bobs with bma180_ and ensure consistent.
         - use a bool instead of an int for state (as its either on or off).
         - expose the temperature channel
         - statically allocate buffers to avoid need for update_scan_mode
           callback.
         - refactor to allow futher chip variants including support for part
           specific config and disable code + different resolutions.

9 years agoMerge 3.17-rc5 into staging-next.
Greg Kroah-Hartman [Mon, 15 Sep 2014 02:33:47 +0000 (19:33 -0700)]
Merge 3.17-rc5 into staging-next.

This fixes a merge conflict in lustre, and we want the other fixes that
went into 3.17-rc5 as well.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoLinux 3.17-rc5
Linus Torvalds [Mon, 15 Sep 2014 00:50:12 +0000 (17:50 -0700)]
Linux 3.17-rc5

9 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Linus Torvalds [Mon, 15 Sep 2014 00:37:36 +0000 (17:37 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/viro/vfs

Pull vfs fixes from Al Viro:
 "double iput() on failure exit in lustre, racy removal of spliced
  dentries from ->s_anon in __d_materialise_dentry() plus a bunch of
  assorted RCU pathwalk fixes"

The RCU pathwalk fixes end up fixing a couple of cases where we
incorrectly dropped out of RCU walking, due to incorrect initialization
and testing of the sequence locks in some corner cases.  Since dropping
out of RCU walk mode forces the slow locked accesses, those corner cases
slowed down quite dramatically.

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  be careful with nd->inode in path_init() and follow_dotdot_rcu()
  don't bugger nd->seq on set_root_rcu() from follow_dotdot_rcu()
  fix bogus read_seqretry() checks introduced in b37199e
  move the call of __d_drop(anon) into __d_materialise_unique(dentry, anon)
  [fix] lustre: d_make_root() does iput() on dentry allocation failure

9 years agovfs: avoid non-forwarding large load after small store in path lookup
Linus Torvalds [Mon, 15 Sep 2014 00:28:32 +0000 (17:28 -0700)]
vfs: avoid non-forwarding large load after small store in path lookup

The performance regression that Josef Bacik reported in the pathname
lookup (see commit 99d263d4c5b2 "vfs: fix bad hashing of dentries") made
me look at performance stability of the dcache code, just to verify that
the problem was actually fixed.  That turned up a few other problems in
this area.

There are a few cases where we exit RCU lookup mode and go to the slow
serializing case when we shouldn't, Al has fixed those and they'll come
in with the next VFS pull.

But my performance verification also shows that link_path_walk() turns
out to have a very unfortunate 32-bit store of the length and hash of
the name we look up, followed by a 64-bit read of the combined hash_len
field.  That screws up the processor store to load forwarding, causing
an unnecessary hickup in this critical routine.

It's caused by the ugly calling convention for the "hash_name()"
function, and easily fixed by just making hash_name() fill in the whole
'struct qstr' rather than passing it a pointer to just the hash value.

With that, the profile for this function looks much smoother.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
9 years agoRevert "usb: dwc2: make the scheduler handle excessive NAKs better"
Greg Kroah-Hartman [Sun, 14 Sep 2014 19:53:51 +0000 (12:53 -0700)]
Revert "usb: dwc2: make the scheduler handle excessive NAKs better"

This reverts commit f5717a75db0d4e590c0c050a6f49c6cc0afcec8a, as it
wasn't ment to be applied to this branch / tree, it should go in through
the USB tree, my fault.

Reported-by: Paul Zimmerman <Paul.Zimmerman@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoiio:bma180: Add BMA250 chip support
Peter Meerwald [Tue, 19 Aug 2014 22:43:00 +0000 (23:43 +0100)]
iio:bma180: Add BMA250 chip support

the BMA250 has only 10-bit resolution; while the data readout registers
have identical layout, the configuration is completely different compared
to the BMA180

datasheet: http://ae-bst.resource.bosch.com/media/products/dokumente/bma250/BST-BMA250-DS002-05.pdf

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Cc: Oleksandr Kravchenko <o.v.kravchenko@globallogic.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio:bma180: Implement _available sysfs attribute dynamically
Peter Meerwald [Tue, 19 Aug 2014 22:43:00 +0000 (23:43 +0100)]
iio:bma180: Implement _available sysfs attribute dynamically

makes it easier to add more chip variants and removes redundancy:
scales and frequencies are now stated just once

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Cc: Oleksandr Kravchenko <o.v.kravchenko@globallogic.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoMerge branch 'parisc-3.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller...
Linus Torvalds [Sun, 14 Sep 2014 19:28:08 +0000 (12:28 -0700)]
Merge branch 'parisc-3.17-1' of git://git./linux/kernel/git/deller/parisc-linux

Pull parisc updates from Helge Deller:
 "The most important patch is a new Light Weigth Syscall (LWS) for 8,
  16, 32 and 64 bit atomic CAS operations which is required in order to
  be able to implement the atomic gcc builtins on our platform.

  Other than that, we wire up the seccomp, getrandom and memfd_create
  syscalls, fixes a minor off-by-one bug and a wrong printk string"

* 'parisc-3.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
  parisc: Implement new LWS CAS supporting 64 bit operations.
  parisc: Wire up seccomp, getrandom and memfd_create syscalls
  parisc: dino: fix %d confusingly prefixed with 0x in format string
  parisc: sys_hpux: NUL terminator is one past the end

9 years agoiio:bma180: Prepare for accelerometer channels with different resolutions
Peter Meerwald [Tue, 19 Aug 2014 22:43:00 +0000 (23:43 +0100)]
iio:bma180: Prepare for accelerometer channels with different resolutions

allow to specify channels resolution and compute shift assuming
16-bit registers and MSB allocation

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Cc: Oleksandr Kravchenko <o.v.kravchenko@globallogic.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio:bma180: Introduce part-specific _config() and disable() code
Peter Meerwald [Tue, 19 Aug 2014 22:43:00 +0000 (23:43 +0100)]
iio:bma180: Introduce part-specific _config() and disable() code

move part of bma180_init() to bma180_config() (split initialization and
configuration code); configuration is heavily chip-specific

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Cc: Oleksandr Kravchenko <o.v.kravchenko@globallogic.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio:bma180: Introduce part_info to differentiate further chip variants
Peter Meerwald [Tue, 19 Aug 2014 22:43:00 +0000 (23:43 +0100)]
iio:bma180: Introduce part_info to differentiate further chip variants

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Cc: Oleksandr Kravchenko <o.v.kravchenko@globallogic.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio:bma180: Drop _update_scan_mode()
Peter Meerwald [Tue, 19 Aug 2014 22:43:00 +0000 (23:43 +0100)]
iio:bma180: Drop _update_scan_mode()

statically allocate maximum size

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Cc: Oleksandr Kravchenko <o.v.kravchenko@globallogic.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agobe careful with nd->inode in path_init() and follow_dotdot_rcu()
Al Viro [Sun, 14 Sep 2014 01:59:43 +0000 (21:59 -0400)]
be careful with nd->inode in path_init() and follow_dotdot_rcu()

in the former we simply check if dentry is still valid after picking
its ->d_inode; in the latter we fetch ->d_inode in the same places
where we fetch dentry and its ->d_seq, under the same checks.

Cc: stable@vger.kernel.org # 2.6.38+
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
9 years agodon't bugger nd->seq on set_root_rcu() from follow_dotdot_rcu()
Al Viro [Sun, 14 Sep 2014 01:55:46 +0000 (21:55 -0400)]
don't bugger nd->seq on set_root_rcu() from follow_dotdot_rcu()

return the value instead, and have path_init() do the assignment.  Broken by
"vfs: Fix absolute RCU path walk failures due to uninitialized seq number",
which was Cc-stable with 2.6.38+ as destination.  This one should go where
it went.

To avoid dummy value returned in case when root is already set (it would do
no harm, actually, since the only caller that doesn't ignore the return value
is guaranteed to have nd->root *not* set, but it's more obvious that way),
lift the check into callers.  And do the same to set_root(), to keep them
in sync.

Cc: stable@vger.kernel.org # 2.6.38+
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
9 years agoMerge tag 'ntb-3.17' of git://github.com/jonmason/ntb
Linus Torvalds [Sun, 14 Sep 2014 17:54:12 +0000 (10:54 -0700)]
Merge tag 'ntb-3.17' of git://github.com/jonmason/ntb

Pull ntb driver bugfixes from Jon Mason:
 "NTB driver fixes for queue spread and buffer alignment.  Also, update
  to MAINTAINERS to reflect new e-mail address"

* tag 'ntb-3.17' of git://github.com/jonmason/ntb:
  ntb: Add alignment check to meet hardware requirement
  MAINTAINERS: update NTB info
  NTB: correct the spread of queues over mw's

9 years agoiio:bma180: Expose temperature channel
Peter Meerwald [Tue, 19 Aug 2014 22:43:00 +0000 (23:43 +0100)]
iio:bma180: Expose temperature channel

8-bit signed; 0 LSB @ 24 °C, 0.5 °C per LSB

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Cc: Oleksandr Kravchenko <o.v.kravchenko@globallogic.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio:bma180: Use bool instead of int for state
Peter Meerwald [Tue, 19 Aug 2014 22:43:00 +0000 (23:43 +0100)]
iio:bma180: Use bool instead of int for state

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Cc: Oleksandr Kravchenko <o.v.kravchenko@globallogic.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio:bma180: Rename BMA_180 to BMA180_
Peter Meerwald [Tue, 19 Aug 2014 22:43:00 +0000 (23:43 +0100)]
iio:bma180: Rename BMA_180 to BMA180_

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Cc: Oleksandr Kravchenko <o.v.kravchenko@globallogic.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio:bma180: Prefix remaining tables and functions with bma18_
Peter Meerwald [Tue, 19 Aug 2014 22:43:00 +0000 (23:43 +0100)]
iio:bma180: Prefix remaining tables and functions with bma18_

and minor cleanups

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Cc: Oleksandr Kravchenko <o.v.kravchenko@globallogic.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio:bma180: Enable use of device without IRQ
Peter Meerwald [Tue, 19 Aug 2014 22:43:00 +0000 (23:43 +0100)]
iio:bma180: Enable use of device without IRQ

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Cc: Oleksandr Kravchenko <o.v.kravchenko@globallogic.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: gyro: bmi055 gyro sensor driver
Irina Tirdea [Sun, 9 Feb 2014 11:59:00 +0000 (11:59 +0000)]
iio: gyro: bmi055 gyro sensor driver

Add support for the BMI055 gyroscope sensor. BMI055 is a package
consisting of an acceleration sensor and a gyroscope. This patch
adds support for the gyroscope only.

Spec downloaded from:
http://ae-bst.resource.bosch.com/media/products/dokumente/bmi055/BST-BMI055-DS000-06.pdf

The BMI055 gyroscope uses the same register definition as BMG160,
but does not specify a temp register. However, the temp register
seems to be working in the same way as for BMG160, so this patch
does not remove the temp channel for BMI055.

Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoMerge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 14 Sep 2014 17:37:10 +0000 (10:37 -0700)]
Merge branch 'irq-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

Pull ARM irq chip fixes from Thomas Gleixner:
 "Another pile of ARM specific irq chip fixlets:

   - off by one bugs in the crossbar driver
   - missing annotations
   - a bunch of "make it compile" updates

  I pulled the lot today from Jason, but it has been in -next for at
  least a week"

* 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  irqchip: gic-v3: Declare rdist as __percpu pointer to __iomem pointer
  irqchip: gic: Make gic_default_routable_irq_domain_ops static
  irqchip: exynos-combiner: Fix compilation error on ARM64
  irqchip: crossbar: Off by one bugs in init
  irqchip: gic-v3: Tag all low level accessors __maybe_unused
  irqchip: gic-v3: Only define gic_peek_irq() when building SMP

9 years agoiio: accel: kxcjk-1013: Fix defined but unused warning
Daniel Baluta [Sun, 9 Mar 2014 16:13:00 +0000 (16:13 +0000)]
iio: accel: kxcjk-1013: Fix defined but unused warning

Noticed when compiling with CONFIG_PM_RUNTIME not set:
kxcjk-1013.c: warning: ‘kxcjk1013_get_startup_times’ defined but not used [-Wunused-function]

Introduced by commit 124e1b1d (iio: accel: kxcjk-1013: support runtime pm).

Signed-off-by: Daniel Baluta <daniel.baluta@intel.com>
Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: magn: ak8975: fix unnecessary casting between char* and const char*
Irina Tirdea [Sat, 9 Aug 2014 14:18:00 +0000 (15:18 +0100)]
iio: magn: ak8975: fix unnecessary casting between char* and const char*

Use const char* instead of casting const char* to char*.

Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: gyro: bmg160: only set power state if PM_RUNTIME is defined
Irina Tirdea [Sat, 9 Aug 2014 14:05:00 +0000 (15:05 +0100)]
iio: gyro: bmg160: only set power state if PM_RUNTIME is defined

When CONFIG_PM_RUNTIME is not defined and bmg160 tries to power
off the device, bmg160_set_power_state will call pm_runtime_put_autosuspend,
which is not implemented (wil return -ENOSYS).

Only call bmg160_set_power_state when CONFIG_PM_RUNTIME is defined.

Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
Acked-by: Hartmut Knaack <knaack.h@gmx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agostaging: lustre: Cleaning up unnecessary use of memset in conjunction with strncpy
Rickard Strandqvist [Sun, 14 Sep 2014 16:03:16 +0000 (18:03 +0200)]
staging: lustre: Cleaning up unnecessary use of memset in conjunction with strncpy

Using memset before strncpy just to ensure a trailing null
character is an unnecessary double writing of a string

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: lustre: lustre: mdc: mdc_request: Removed useless variable
Tina Johnson [Sun, 14 Sep 2014 13:06:38 +0000 (18:36 +0530)]
Staging: lustre: lustre: mdc: mdc_request: Removed useless variable

Variable rc is initialised and returned by the function without modifying.
Hence replaced rc with it's initial value in the return statement and
removed the variable.

Signed-off-by: Tina Johnson <tinajohnson.1234@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: fix pointer whitespace style
Spencer Baugh [Sun, 14 Sep 2014 15:21:11 +0000 (11:21 -0400)]
staging: lustre: fix pointer whitespace style

Fix errors reported by checkpatch of this kind:
ERROR: "foo * bar" should be "foo *bar"

Signed-off-by: Spencer Baugh <sbaugh@andrew.cmu.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: fix function definition style
Spencer Baugh [Sun, 14 Sep 2014 15:21:10 +0000 (11:21 -0400)]
staging: lustre: fix function definition style

Fix errors reported by checkpatch of this kind:
ERROR: open brace '{' following function declarations go on the next line

Signed-off-by: Spencer Baugh <sbaugh@andrew.cmu.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: Fix address space mismatch in ksocknal_recv_iov()
Artemiy Volkov [Fri, 12 Sep 2014 16:31:33 +0000 (02:31 +1000)]
staging: lustre: Fix address space mismatch in ksocknal_recv_iov()

This patch fixes the following sparse warnings:

drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c:284:51: warning:
cast removes address space of expression
drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c:284:39: warning:
incorrect type in assignment (different address spaces)
drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c:284:39:    expected
void [noderef] <asn:1>*iov_base
drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c:284:39:    got
void *<noident>

by simplifying an expression containing non-__user-attributed type names.

Signed-off-by: Artemiy Volkov <artemiyv@acm.org>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agodrivers: staging: lustre: Cleanup src/dst comparisons in obdo_cmp_md()
Greg Donald [Thu, 11 Sep 2014 23:38:25 +0000 (18:38 -0500)]
drivers: staging: lustre: Cleanup src/dst comparisons in obdo_cmp_md()

Cleanup obdo_cmp_md() src/dst comparisons using bitwise OR assignments

Suggested-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Donald <gdonald@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: dwc2: make the scheduler handle excessive NAKs better
Nick Hudson [Thu, 11 Sep 2014 22:22:48 +0000 (15:22 -0700)]
usb: dwc2: make the scheduler handle excessive NAKs better

I'm seeing problems with a d-link dwcl-g122 wifi dongle that
someone sent me. There are reports of other wifi dongles with the
same/similar problem. The devices appear to be NAKing to the point
of confusing the dwc2 driver completely.

The attached patch helps with my d-link dwl-g122 - it's adapted
from the Raspberry Pi dwc_otg driver, which is a modified version
of the Synopsys vendor driver. The error recovery is still valid
after the patch, I think.

Cc: Dom Cobley <popcornmix@gmail.com>
Signed-off-by: Nick Hudson <skrll@netbsd.org>
Signed-off-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoiio: accel: kxcjk-1013: add support for kxtj2-1009
Daniel Baluta [Sun, 9 Mar 2014 08:33:00 +0000 (08:33 +0000)]
iio: accel: kxcjk-1013: add support for kxtj2-1009

This patch adds support for KXTJ2-1009 3-axis acceleromenter sensor.
KXTJ2-1009 uses the same register definitions as KXCJK-1013.

The specification for KXTJ2-1009 can be downloaded from:
http://www.kionix.com/sites/default/files/KXTJ2-1009%20Specifications%20Rev%204.pdf

Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoMerge tag 'irqchip-urgent-3.17' of git://git.infradead.org/users/jcooper/linux into...
Thomas Gleixner [Sun, 14 Sep 2014 13:19:19 +0000 (15:19 +0200)]
Merge tag 'irqchip-urgent-3.17' of git://git.infradead.org/users/jcooper/linux into irq/urgent

irqchip fixes for v3.17 from Jason Cooper

 - GIC/GICV3: Various fixlets
 - crossbar: Fix off-by-one bug
 - exynos-combiner: Fix arm64 build error