OSDN Git Service

uclinux-h8/linux.git
10 years agoStaging: bcm: Misc whitespace fixes
Matthias Beyer [Fri, 27 Jun 2014 09:55:12 +0000 (11:55 +0200)]
Staging: bcm: Misc whitespace fixes

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6656: device_init_registers move out vnt_set_bss_mode
Malcolm Priestley [Sat, 28 Jun 2014 22:55:46 +0000 (23:55 +0100)]
staging: vt6656: device_init_registers move out vnt_set_bss_mode

Move to vnt_add_interface and allow to refresh at the start
of every software scan in vnt_sw_scan_start

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6656: set BBvSetVGAGainOffset inside vnt_set_bss_mode
Malcolm Priestley [Sat, 28 Jun 2014 22:55:45 +0000 (23:55 +0100)]
staging: vt6656: set BBvSetVGAGainOffset inside vnt_set_bss_mode

vnt_set_bss_mode changes the state of abyBBVGA so move
BBvSetVGAGainOffset to the function.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6656: remove vnt_add_basic_rate
Malcolm Priestley [Sat, 28 Jun 2014 22:55:44 +0000 (23:55 +0100)]
staging: vt6656: remove vnt_add_basic_rate

The driver never sets basic rate any more so remove function.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6656: dead code remove RXvWorkItem and RXvFreeRCB
Malcolm Priestley [Sat, 28 Jun 2014 22:55:43 +0000 (23:55 +0100)]
staging: vt6656: dead code remove RXvWorkItem and RXvFreeRCB

Remove work_struct and queue variables

Remove EnqueueRCB and DequeueRCB macros

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6656: Remove rx handing from RXvWorkItem
Malcolm Priestley [Sat, 28 Jun 2014 22:55:42 +0000 (23:55 +0100)]
staging: vt6656: Remove rx handing from RXvWorkItem

In s_nsBulkInUsbIoCompleteRead reuse or reallocate sb_buff and resubmit
urb.

In device_alloc_bufs allocate memory to rcb individually and
call PIPEnsBulkInUsbRead to submit the urbs

Change handling to free rcb in device_free_rx_bufs

Remove calls to workqueue.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6656: vnt_tx_packet remove first assignment of time_stamp.
Malcolm Priestley [Sat, 28 Jun 2014 22:55:41 +0000 (23:55 +0100)]
staging: vt6656: vnt_tx_packet remove first assignment of time_stamp.

This is assigned later in function and should have been removed in
an out-of-tree merge.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6656: rxtx replace wFragCtl with frag_ctl.
Malcolm Priestley [Sat, 28 Jun 2014 22:55:40 +0000 (23:55 +0100)]
staging: vt6656: rxtx replace wFragCtl with frag_ctl.

Use base type to __le16 and do endian correction.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6656: rxtx struct vnt_mic_hdr change tsc_47_16/tsc_15_0
Malcolm Priestley [Sat, 28 Jun 2014 22:55:39 +0000 (23:55 +0100)]
staging: vt6656: rxtx struct vnt_mic_hdr change tsc_47_16/tsc_15_0

Replace with ccmp_pn with size of IEEE80211_CCMP_PN_LEN(6)

memcpy the struct ieee80211_key_seq -> ccmp.pn onto ccmp_pn
removing the need for endian conversion.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: mite: cleanup mite_unsetup()
H Hartley Sweeten [Fri, 20 Jun 2014 18:10:35 +0000 (11:10 -0700)]
staging: comedi: mite: cleanup mite_unsetup()

This function is only called by comedi drivers during the (*detach) of the
driver. After it is called mite_free() is always called to kfree the allocated
mite_struct pointer.

Rename this function to mite_detach() and merge the kfree() from mite_free()
into it.

Remove the unnecessary clearing of the mite variables since the mite pointer
is going to be kfree()'d anyway.

The mite_detach() function checks if the pointer is valid so remove the
unnecessary checks in the callers.

The check can also be removed in ni_660x since the ni_660x_free_mite_rings()
function does not actually need the 'mite' pointer.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: mite.h: remove mite_device()
H Hartley Sweeten [Fri, 20 Jun 2014 18:10:34 +0000 (11:10 -0700)]
staging: comedi: mite.h: remove mite_device()

This inline function is not used. Just remove it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: mite.h: remove mite_irq()
H Hartley Sweeten [Fri, 20 Jun 2014 18:10:33 +0000 (11:10 -0700)]
staging: comedi: mite.h: remove mite_irq()

This inline function simply returns the 'irq' of the struct pci_dev pointer
that is stored in struct mite_struct. This pci_dev pointer is the same as
the one that is already available in the (*auto_attach) functions where
mite_irq() is used.

Use the pci_dev pointer directly to get the irq and remove the unnecessary
inline function to remove the indirection.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: ni_pcimio: remove ATMIO and PCIMIO defines
H Hartley Sweeten [Fri, 20 Jun 2014 18:10:32 +0000 (11:10 -0700)]
staging: comedi: ni_pcimio: remove ATMIO and PCIMIO defines

These defines were probably intended to be used so that ni_mio_common.c
could detect if it was included by a driver that uses ioport or memory
mapped register access. This can actually be detected by checking if
the 'mite' member in the private data has been allocated.

Regardless, the symbols are not used. Just remove them.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: ni_mio_cs: remove ATMIO and PCIMIO defines
H Hartley Sweeten [Fri, 20 Jun 2014 18:10:31 +0000 (11:10 -0700)]
staging: comedi: ni_mio_cs: remove ATMIO and PCIMIO defines

These defines were probably intended to be used so that ni_mio_common.c
could detect if it was included by a driver that uses ioport or memory
mapped register access. This can actually be detected by checking if
the 'mite' member in the private data has been allocated.

Regardless, the symbols are not used. Just remove them.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: ni_atmio: remove ATMIO and PCIMIO defines
H Hartley Sweeten [Fri, 20 Jun 2014 18:10:30 +0000 (11:10 -0700)]
staging: comedi: ni_atmio: remove ATMIO and PCIMIO defines

These defines were probably intended to be used so that ni_mio_common.c
could detect if it was included by a driver that uses ioport or memory
mapped register access. This can actually be detected by checking if
the 'mite' member in the private data has been allocated.

Regardless, the symbols are not used. Just remove them.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: ni_pcimio: remove DRV_NAME define
H Hartley Sweeten [Fri, 20 Jun 2014 18:10:29 +0000 (11:10 -0700)]
staging: comedi: ni_pcimio: remove DRV_NAME define

This define is not used ny the driver. Remove it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: ni_stc.h: the boardinfo 'name' should be first
H Hartley Sweeten [Thu, 26 Jun 2014 17:13:08 +0000 (10:13 -0700)]
staging: comedi: ni_stc.h: the boardinfo 'name' should be first

By convention, the first member of the boardinfo is a 'const char *' to
the board name, especially for those comedi drivers that rely on the
comedi core to set dev->board_ptr to the entry matching the board name
when doing a legacy (*attach) to a comedi driver.

Modify the ni_board_struct appropriately for consistency, although the
board name is only used for informational purposes by this driver (only
the driver name is matched by the comedi core).

For aesthetics, also move the members in the boardinfo declarations.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: ni_atmio: tidy up the boardinfo
H Hartley Sweeten [Fri, 20 Jun 2014 18:10:27 +0000 (11:10 -0700)]
staging: comedi: ni_atmio: tidy up the boardinfo

For aesthetics, add some whitespace to the boardinfo declaration.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: ni_mio_cs: remove NI_SIZE define
H Hartley Sweeten [Fri, 20 Jun 2014 18:10:26 +0000 (11:10 -0700)]
staging: comedi: ni_mio_cs: remove NI_SIZE define

This define is not used by the driver. Remove it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: ni_atmio: remove NI_SIZE define
H Hartley Sweeten [Fri, 20 Jun 2014 18:10:25 +0000 (11:10 -0700)]
staging: comedi: ni_atmio: remove NI_SIZE define

This define is only used in the comedi_request_region() to specify the
size of the region. Remove the define and just open code the value.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: ni_atmio: remove '= 0' boardinfo data
H Hartley Sweeten [Fri, 20 Jun 2014 18:10:24 +0000 (11:10 -0700)]
staging: comedi: ni_atmio: remove '= 0' boardinfo data

Remove all the boardinfo data the is set to '0'. They will default
to that when the boardinfo is declared.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: ni_mio_common.c: remove IRQ_POLARITY defines
H Hartley Sweeten [Fri, 20 Jun 2014 18:10:23 +0000 (11:10 -0700)]
staging: comedi: ni_mio_common.c: remove IRQ_POLARITY defines

Pass the irq_polarity to ni_E_init() and remove the defines.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: ni_mio_common drivers: remove NI_E_IRQ_FLAGS defines
H Hartley Sweeten [Fri, 20 Jun 2014 18:10:22 +0000 (11:10 -0700)]
staging: comedi: ni_mio_common drivers: remove NI_E_IRQ_FLAGS defines

These defines are only used in the request_irq() calls. Remove them
and just open code the values.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: ni_mio_common.c: remove interrupt_pin() macros
H Hartley Sweeten [Fri, 20 Jun 2014 18:10:21 +0000 (11:10 -0700)]
staging: comedi: ni_mio_common.c: remove interrupt_pin() macros

Pass the 'interrupt_pin' to ni_E_init() and remove the macros.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: ni_pcimio: remove forward declarations
H Hartley Sweeten [Fri, 20 Jun 2014 18:10:20 +0000 (11:10 -0700)]
staging: comedi: ni_pcimio: remove forward declarations

Move some functions to avoid the need for the forward declarations.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoMerge tag 'iio-for-3.17b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23...
Greg Kroah-Hartman [Sun, 29 Jun 2014 16:49:28 +0000 (09:49 -0700)]
Merge tag 'iio-for-3.17b' of git://git./linux/kernel/git/jic23/iio into staging-next

Jonathan writes:

Second round of new drivers and cleanups for IIO in the 3.17 cycle.

New drivers
* mcp4902, mcp4912 and mcp4922 SPI DAC driver.
* max1027, max1029 and max1031 SPI ADC driver.

Cleanups
* cm32181 - use devm APIs to simplify error paths.
* ak8975 - use devm APIs to simplify error paths.
* ad9850 - drop some unused defines and an unnecessary goto.
* hmc5843 - add missing devices to the device id table and the documentation.
* ad9832 - small formatting cleanups.
* sca3000 - hide direct use of the stufftoread element by adding a
    data_available function.  This is a precursor for the addition of buffer
    watermarks to the subsystem but stands as a good cleanup on its own.

10 years agoiio: staging: sca3000: hide stufftoread logic
Josselin Costanzi [Fri, 27 Jun 2014 16:20:00 +0000 (17:20 +0100)]
iio: staging: sca3000: hide stufftoread logic

Change sca3000_ring implementation so that it exports a data_available
function to iio.

Signed-off-by: Josselin Costanzi <josselin.costanzi@mobile-devices.fr>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
10 years agostaging: iio: Coding style issues fix.
Federico Di Pierro [Sun, 29 Jun 2014 09:41:00 +0000 (10:41 +0100)]
staging: iio: Coding style issues fix.

Fix some little style issues in drivers/staging/iio/frequency/ad9832.c .
This is my latest task of the eudyptula challenge (third attempt!)

Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
10 years agoiio: magnetometer: ak8975: Use devm_* APIs
Beomho Seo [Mon, 23 Jun 2014 12:34:00 +0000 (13:34 +0100)]
iio: magnetometer: ak8975: Use devm_* APIs

This patch use devm_* APIs make driver simpler.

Signed-off-by: Beomho Seo <beomho.seo@samsung.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
10 years agoDocumentation: iio: Extend documentation for hmc5843 bindings.
Marek Belisko [Fri, 14 Feb 2014 14:25:00 +0000 (14:25 +0000)]
Documentation: iio: Extend documentation for hmc5843 bindings.

Signed-off-by: Marek Belisko <marek@goldelico.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
10 years agostaging: iio: hmc5843: Add all available models to device tree id table.
Marek Belisko [Fri, 14 Feb 2014 14:25:00 +0000 (14:25 +0000)]
staging: iio: hmc5843: Add all available models to device tree id table.

Signed-off-by: Marek Belisko <marek@goldelico.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
10 years agostaging: iio: ad9850.c: code cleanup
Guillaume Morin [Sat, 28 Jun 2014 15:54:00 +0000 (16:54 +0100)]
staging: iio: ad9850.c: code cleanup

checkpath.pl was complaining about value_mask:
ERROR: Macros with complex values should be enclosed in parenthesis

I fixed this by simply removing it since it's not used (as well as another
macro).  Got rid of the un-necessary error_ret label as well.

Signed-off-by: Guillaume Morin <guillaume@morinfr.org>
Reported-by: Michael Welling <mwelling@ieee.org>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
10 years agostaging: winbond: remove driver
Kristina Martšenko [Sat, 28 Jun 2014 21:26:50 +0000 (00:26 +0300)]
staging: winbond: remove driver

The driver hasn't been cleaned up and nobody is working to do so, so
remove it.

Signed-off-by: Kristina Martšenko <kristina.martsenko@gmail.com>
Cc: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoiio: add support of the max1027
Philippe Reynes [Sat, 14 Jun 2014 22:27:00 +0000 (23:27 +0100)]
iio: add support of the max1027

This driver add partial support of the
maxim 1027/1029/1031. Differential mode is not
supported.

It was tested on armadeus apf27 board.

Signed-off-by: Philippe Reynes <tremyfr@yahoo.fr>
Reviewed-by: Hartmut Knaack <knaack.h@gmx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
10 years agostaging: bcm: nvm.c: Cleaning up check unsigned is less than zero
Rickard Strandqvist [Wed, 25 Jun 2014 14:38:01 +0000 (16:38 +0200)]
staging: bcm: nvm.c: Cleaning up check unsigned is less than zero

Remove checking if a unsigned int is less than zero

This was found using a static code analysis program called cppcheck.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: bcm: hostmibs.c: Shortened lines
Matthias Beyer [Mon, 23 Jun 2014 19:50:47 +0000 (21:50 +0200)]
Staging: bcm: hostmibs.c: Shortened lines

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Reviewed-by: Jake Edge <jake@lwn.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: bcm: replaced member accessing with variable for readability
Matthias Beyer [Mon, 23 Jun 2014 19:50:44 +0000 (21:50 +0200)]
Staging: bcm: replaced member accessing with variable for readability

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Reviewed-by: Jake Edge <jake@lwn.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: bcm: Added missing blank line after declarations
Matthias Beyer [Mon, 23 Jun 2014 19:30:21 +0000 (21:30 +0200)]
Staging: bcm: Added missing blank line after declarations

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: bcm: Replaced member accssing with variable
Matthias Beyer [Mon, 23 Jun 2014 19:30:20 +0000 (21:30 +0200)]
Staging: bcm: Replaced member accssing with variable

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: bcm: Whitespace for indentation fixed
Matthias Beyer [Mon, 23 Jun 2014 19:30:19 +0000 (21:30 +0200)]
Staging: bcm: Whitespace for indentation fixed

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: bcm: line length fixed
Matthias Beyer [Mon, 23 Jun 2014 19:30:18 +0000 (21:30 +0200)]
Staging: bcm: line length fixed

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: bcm: Line length cleanup
Matthias Beyer [Mon, 23 Jun 2014 19:25:17 +0000 (21:25 +0200)]
Staging: bcm: Line length cleanup

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: bcm: Shortened some lines in select_alternate_setting_for_highspeed_modem()
Matthias Beyer [Mon, 23 Jun 2014 19:25:16 +0000 (21:25 +0200)]
Staging: bcm: Shortened some lines in select_alternate_setting_for_highspeed_modem()

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: bcm: Outsourced selecting of alternate setting
Matthias Beyer [Mon, 23 Jun 2014 19:25:15 +0000 (21:25 +0200)]
Staging: bcm: Outsourced selecting of alternate setting

This patch outsources a chunk of code which is for selecting an
alternate setting for highspeed modem into a new function.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: bcm: Merged some lines which got shorter by the latest patch
Matthias Beyer [Mon, 23 Jun 2014 19:25:14 +0000 (21:25 +0200)]
Staging: bcm: Merged some lines which got shorter by the latest patch

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: bcm: Replaced member accessing with variable in InterfaceAdapterInit()
Matthias Beyer [Mon, 23 Jun 2014 19:25:13 +0000 (21:25 +0200)]
Staging: bcm: Replaced member accessing with variable in InterfaceAdapterInit()

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: bcm: Replaced member accessing with variable in device_run()
Matthias Beyer [Mon, 23 Jun 2014 19:25:12 +0000 (21:25 +0200)]
Staging: bcm: Replaced member accessing with variable in device_run()

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: bcm: replaced member accessing by variable
Matthias Beyer [Mon, 23 Jun 2014 19:25:11 +0000 (21:25 +0200)]
Staging: bcm: replaced member accessing by variable

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: bcm: Shortened some lines
Matthias Beyer [Mon, 23 Jun 2014 19:25:10 +0000 (21:25 +0200)]
Staging: bcm: Shortened some lines

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: bcm: led_control.c: Replaced nested ifs with logical AND concatenation
Matthias Beyer [Mon, 23 Jun 2014 19:18:31 +0000 (21:18 +0200)]
Staging: bcm: led_control.c: Replaced nested ifs with logical AND concatenation

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: bcm: led_control.c: Replaced member accessing by variable
Matthias Beyer [Mon, 23 Jun 2014 19:18:30 +0000 (21:18 +0200)]
Staging: bcm: led_control.c: Replaced member accessing by variable

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: bcm: led_control.c: Replaced member accessing by variable
Matthias Beyer [Mon, 23 Jun 2014 19:18:29 +0000 (21:18 +0200)]
Staging: bcm: led_control.c: Replaced member accessing by variable

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: bcm: led_control.c: Replaced doubled if-check by logical OR in one check
Matthias Beyer [Mon, 23 Jun 2014 19:18:28 +0000 (21:18 +0200)]
Staging: bcm: led_control.c: Replaced doubled if-check by logical OR in one check

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: bcm: led_control.c: Replaced time selecting ifelse with ternary operator
Matthias Beyer [Mon, 23 Jun 2014 19:18:27 +0000 (21:18 +0200)]
Staging: bcm: led_control.c: Replaced time selecting ifelse with ternary operator

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: bcm: led_control.c: More variable names refactored
Matthias Beyer [Mon, 23 Jun 2014 19:18:26 +0000 (21:18 +0200)]
Staging: bcm: led_control.c: More variable names refactored

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: bcm: led_control.c: Refactored line lengths
Matthias Beyer [Mon, 23 Jun 2014 19:18:25 +0000 (21:18 +0200)]
Staging: bcm: led_control.c: Refactored line lengths

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: bcm: led_control.c: Removed dead code
Matthias Beyer [Mon, 23 Jun 2014 19:18:24 +0000 (21:18 +0200)]
Staging: bcm: led_control.c: Removed dead code

This patch removes the never-entered else-block inside
blink_in_normal_bandwidth(). The condition of the preceding if statement
is always true.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: bcm: led_control.c: Refactored variable name
Matthias Beyer [Mon, 23 Jun 2014 19:18:23 +0000 (21:18 +0200)]
Staging: bcm: led_control.c: Refactored variable name

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: bcm: led_control.c: Outsourced code chunk
Matthias Beyer [Mon, 23 Jun 2014 19:18:22 +0000 (21:18 +0200)]
Staging: bcm: led_control.c: Outsourced code chunk

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: bcm: led_control.c: Replaced member accessing
Matthias Beyer [Mon, 23 Jun 2014 19:18:21 +0000 (21:18 +0200)]
Staging: bcm: led_control.c: Replaced member accessing

This patch replaces member accessing with a variable in
BcmGetGPIOPinInfo().

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: bcm: led_control.c: Simplified nested if conditions
Matthias Beyer [Mon, 23 Jun 2014 19:18:20 +0000 (21:18 +0200)]
Staging: bcm: led_control.c: Simplified nested if conditions

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: bcm: led_control.{c,h}: Fixed macro
Matthias Beyer [Mon, 23 Jun 2014 19:18:19 +0000 (21:18 +0200)]
Staging: bcm: led_control.{c,h}: Fixed macro

This patch fixes the TURN_{ON,OFF}_LED() macros by adding the adapter as
parameter.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: bcm: led_control.c: Outsourced adapter driver state handling
Matthias Beyer [Mon, 23 Jun 2014 19:18:18 +0000 (21:18 +0200)]
Staging: bcm: led_control.c: Outsourced adapter driver state handling

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: bcm: led_control.c: Indentation/Whitespace/Line length cleanup
Matthias Beyer [Mon, 23 Jun 2014 19:18:17 +0000 (21:18 +0200)]
Staging: bcm: led_control.c: Indentation/Whitespace/Line length cleanup

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: slicoss: fixed frivolous else statement warnings in slicoss.c
Vincent Heuken [Mon, 23 Jun 2014 12:09:18 +0000 (05:09 -0700)]
Staging: slicoss: fixed frivolous else statement warnings in slicoss.c

This is a patch for the slicoss.c file that fixes four instances
of the following warning:
WARNING: else is not generally useful after a break or return

Signed-off-by: Vincent Heuken <me@vincentheuken.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: emxx_udc: Use module_platform_driver
Sachin Kamat [Mon, 23 Jun 2014 06:25:32 +0000 (11:55 +0530)]
staging: emxx_udc: Use module_platform_driver

module_platform_driver removes some boiler plate and makes
code simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: emxx_udc: Fix build error
Sachin Kamat [Mon, 23 Jun 2014 06:13:08 +0000 (11:43 +0530)]
staging: emxx_udc: Fix build error

devm_request_and_ioremap has been removed since commit c9d53c0f2d23
("devres: remove devm_request_and_ioremap()") Use devm_ioremap_resource
instead. While at it, also remove redundant error message as it is now
handled by devm_ioremap_resource. Without this patch we get the following
build error:
drivers/staging/emxx_udc/emxx_udc.c:3370:2: error: implicit declaration of function ‘devm_request_and_ioremap’ [-Werror=implicit-function-declaration]

Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: lustre: llite: dir.c - fix for coding style issues
Anil Belur [Wed, 25 Jun 2014 04:57:30 +0000 (14:57 +1000)]
staging: lustre: llite: dir.c - fix for coding style issues

- this fixes some coding style issues "ERROR: "(foo*)" should be "(foo *)"

Signed-off-by: Anil Belur <askb23@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: lustre: llite: dir.c - fixes indented labels in code
Anil Belur [Wed, 25 Jun 2014 04:57:29 +0000 (14:57 +1000)]
staging: lustre: llite: dir.c - fixes indented labels in code

- this fixes "WARNING: labels should not be indented"

Signed-off-by: Anil Belur <askb23@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: lustre: llite: llite_capa.c - fixed warning to use recomended headers <linux...
Anil Belur [Wed, 25 Jun 2014 04:57:28 +0000 (14:57 +1000)]
staging: lustre: llite: llite_capa.c - fixed warning to use recomended headers <linux/uaccess.h>

- this fixes "WARNING: Use #include <linux/uaccess.h> instead of
  <asm/uaccess.h>"

Signed-off-by: Anil Belur <askb23@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: lustre: llite: llite_capa.c - fixes checkpatch errors - unecessary init...
Anil Belur [Wed, 25 Jun 2014 04:57:27 +0000 (14:57 +1000)]
staging: lustre: llite: llite_capa.c - fixes checkpatch errors - unecessary init of static variables to 0

- this commit fixes some "ERROR: do not initialise statics to 0 or NULL"

Signed-off-by: Anil Belur <askb23@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: lustre: lustre: libcfs: fail.c - fix sparse warnings EXPORT_SYMBOL
Anil Belur [Mon, 23 Jun 2014 12:40:00 +0000 (22:40 +1000)]
staging: lustre: lustre: libcfs: fail.c - fix sparse warnings EXPORT_SYMBOL

- this fixes "WARNING: EXPORT_SYMBOL(foo); should immediately follow its
  function/variable"

Signed-off-by: Anil Belur <askb23@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging/lustre/lnet: abort messages whose MD has been unlinked
Isaac Huang [Mon, 23 Jun 2014 01:32:22 +0000 (21:32 -0400)]
staging/lustre/lnet: abort messages whose MD has been unlinked

If LNetMDUnlink has been called, all outgoing messages
on that MD should be aborted before lnet_ni_send() is
called.

Signed-off-by: Isaac Huang <he.huang@intel.com>
Reviewed-on: http://review.whamcloud.com/8041
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4006
Reviewed-by: Liang Zhen <liang.zhen@intel.com>
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging/lustre/llite: fix a flag bug of vvp_io_kernel_fault()
Li Xi [Mon, 23 Jun 2014 01:32:21 +0000 (21:32 -0400)]
staging/lustre/llite: fix a flag bug of vvp_io_kernel_fault()

After vvp_io_kernel_fault() locked the page, it should set
VM_FAULT_LOCKED.

Signed-off-by: Li Xi <lixi@ddn.com>
Reviewed-on: http://review.whamcloud.com/10740
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging/lustre/vvp: release mmap_sem in error case
Patrick Farrell [Mon, 23 Jun 2014 01:32:20 +0000 (21:32 -0400)]
staging/lustre/vvp: release mmap_sem in error case

The mmap_sem is downed in vvp_mmap_locks, but in case of
error from cl_io_lock_alloc_add, it is not upped.

Credit to Paul Casella at Cray for finding this.

Signed-off-by: Patrick Farrell <paf@cray.com>
Reviewed-on: http://review.whamcloud.com/10741
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5221
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging/lustre/obdclass: runtime load lustre client when needed
Bob Glossman [Mon, 23 Jun 2014 01:32:19 +0000 (21:32 -0400)]
staging/lustre/obdclass: runtime load lustre client when needed

Manually force loading of lustre.ko during client
mounts with request_module for cases where
autoloading doesn't happen.

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-on: http://review.whamcloud.com/10587
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4800
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging/lustre/ptlrpc: unlink request buffer correctly
Alexey Lyashkov [Mon, 23 Jun 2014 01:32:18 +0000 (21:32 -0400)]
staging/lustre/ptlrpc: unlink request buffer correctly

outgoning buffer may be hold by lnet and don't unlinked fast,
it's break unloading a lustre modules as request hold a
reference to the export/obd

Signed-off-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com>
Xyratex-bug-id: MRP-1848
Reviewed-on: http://review.whamcloud.com/10353
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5073
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Liang Zhen <liang.zhen@intel.com>
Reviewed-by: Isaac Huang <he.huang@intel.com>
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging/lustre/llite: Fix uninitialized variable
Dmitry Eremin [Mon, 23 Jun 2014 01:32:17 +0000 (21:32 -0400)]
staging/lustre/llite: Fix uninitialized variable

'f.f_flags' might be used uninitialized in this function.

xattr.c:248: 'f.f_flags' is declared.
xattr.c:244: lump!= ( (void* )0) is true
xattr.c:254: 'f.f_flags' is used, but is uninitialized.

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-on: http://review.whamcloud.com/10663
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4629
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging/lustre/osc: osc_extent_truncate()) ASSERTION( !ext->oe_urgent ) failed
Andriy Skulysh [Mon, 23 Jun 2014 01:32:16 +0000 (21:32 -0400)]
staging/lustre/osc: osc_extent_truncate()) ASSERTION( !ext->oe_urgent ) failed

The bug was caused by race between truncate & fsync.
osc_extent_wait() doesn't takes into account oe_trunc_pending
during setting oe_urgent. The race arises after
osc_object_unlock().
osc_extent_wait() should ignore extents with oe_trunc_pending
while waiting for OES_INV. osc_cache_truncate_end() will set
oe_urgent and call osc_io_unplug_async()

Signed-off-by: Andriy Skulysh <Andriy_Skulysh@xyratex.com>
Reviewed-on: http://review.whamcloud.com/10204
Xyratex-bug-id: LELUS-239
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4852
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging/lustre/obdclass: Fix uninitialized variables
Dmitry Eremin [Mon, 23 Jun 2014 01:32:15 +0000 (21:32 -0400)]
staging/lustre/obdclass: Fix uninitialized variables

'sd.page_link' is used uninitialized in this function.
'ss.page_link' is used uninitialized in this function.
'sl.page_link' is used uninitialized in this function.

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-on: http://review.whamcloud.com/10613
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4629
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging/lustre/ptlrpc: Add schedule point to ptlrpc_check_set()
Christopher J. Morrone [Mon, 23 Jun 2014 01:32:14 +0000 (21:32 -0400)]
staging/lustre/ptlrpc: Add schedule point to ptlrpc_check_set()

Most ptlrpc sets are believed to be small and bounded in length.  However
at the very least the ptlrpcd reuses the ptlrpc sets at its primary work
queue.  This work queue can easily have work added faster than the ptlrpcd
thread can process the work.  The unbounded work can lead to the ptlrpcd
monopolizing a CPU for hundreds of seconds.  Obviously a well-behaved
kernel function should obey the scheduler and share the processor.

We address that problem by inserting a cond_resched() at the top of the
main loop of ptlrpc_check_set().

Some have suggested putting the cond_resched() lower in the loop.  However,
the only current way to bound the number of loops that we exceed our
allocated run time is to put the call at the top of the loop.  Putting it
lower would allow an unknown number (and since it is unknown, it might be
excessively large at times) of cycles through the loop before a
resched is allowed.

Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Reviewed-on: http://review.whamcloud.com/10358
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5053
Reviewed-by: Liang Zhen <liang.zhen@intel.com>
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging/lustre/mgc: replace hard-coded MGC_ENQUEUE_LIMIT value
Cheng Shao [Mon, 23 Jun 2014 01:32:13 +0000 (21:32 -0400)]
staging/lustre/mgc: replace hard-coded MGC_ENQUEUE_LIMIT value

During client mount, the client will send an LDLM_ENQUEUE request to
MGS with send delay set to MGC_ENQUEUE_LIMIT, which is hard coded to
50 seconds. On the other hand, the interval for pinger is deduced from
obd_timeout. When obd_timeout is configured for a longer period of
time, so does the pinger. We know that connecting to the secondary MGS
node is triggered by the pinger. Now that we have a longer interval,
the pinger will not be able to try the secondary before the
LDLM_ENQUEUE request fails the mount using the same delay limit.

This code change will replace the hard-coded send delay being
mentioned above with a value that is long enough to give the client a
chance to connect to the secondary MGS if exists.

Signed-off-by: Cheng Shao <cheng_shao@xyratex.com>
Reviewed-on: http://review.whamcloud.com/9217
Xyratex-bug-id: MRP-1516
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4582
Reviewed-by: Ryan Haasken <haasken@cray.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging/lustre/ptlrpc: race at req processing
Alexander.Boyko [Mon, 23 Jun 2014 01:32:12 +0000 (21:32 -0400)]
staging/lustre/ptlrpc: race at req processing

Race between ptlrpc_resend_req() and ptlrpc_check_set().
1 thread do ptlrpc_check_set()->after_reply()
2 thread do ptlrpc_resend_req()
The result is request with rq_resend = 1 and MSG_REPLY flag.
When this request will came to server it will cause client eviction.
The patch skip ptlrpc_resend_req logic if rq_replied is set,
and clear rq_resend flag at reply_in_callback() when client got
reply.

Signed-off-by: Alexander Boyko <alexander_boyko@xyratex.com>
Xyratex-bug-id: MRP-1888
Reviewed-on: http://review.whamcloud.com/10471
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5116
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Chris Horn <hornc@cray.com>
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging/lustre/osc: get rid of old checksum initial value
Bobi Jam [Mon, 23 Jun 2014 01:32:11 +0000 (21:32 -0400)]
staging/lustre/osc: get rid of old checksum initial value

Old code residue assumes initial checksum value as ~0, and relies on
that to check whether OST server has calculated bulk data checksum.
That is not the case anymore.

Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Reviewed-on: http://review.whamcloud.com/10354
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4937
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging/lustre/mgc: mgc import reconnect race
Andriy Skulysh [Mon, 23 Jun 2014 01:32:10 +0000 (21:32 -0400)]
staging/lustre/mgc: mgc import reconnect race

mgc import can be reconnected by pinger or
ptlrpc_reconnect_import().
ptlrpc_invalidate_import() isn't protected against
alteration of imp_invalid state. Import can be
reconnected by pinger which makes imp_invalid
equal to false. Thus LASSERT(imp->imp_invalid) fails
in ptlrpc_invalidate_import().

It is safe to call ptlrpc_invalidate_import() when
import is deactivated, but ptlrpc_reconnect_import() doesn't
deactivate it.
Let's use only pinger when available to reconnect import

Signed-off-by: Andriy Skulysh <Andriy_Skulysh@xyratex.com>
Reviewed-on: http://review.whamcloud.com/9967
Xyratex-bug-id: MRP-1746
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4913
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging/lustre/ptlrpc: fix NULL pointer dereference of {exp, imp}_obd
Dmitry Eremin [Mon, 23 Jun 2014 01:32:09 +0000 (21:32 -0400)]
staging/lustre/ptlrpc: fix NULL pointer dereference of {exp, imp}_obd

Pointer 'obd' checked for NULL at line 694 may be dereferenced at
line 813.

Pointer 'req->rq_export->exp_obd' checked for NULL at line 1155
may be dereferenced at line 1164. Also there is one similar error
on line 1170.

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-on: http://review.whamcloud.com/10062
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4629
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging/lustre: fix frong ldlm flags type used
Dmitry Eremin [Mon, 23 Jun 2014 01:32:08 +0000 (21:32 -0400)]
staging/lustre: fix frong ldlm flags type used

Fixed implicit conversion from 'unsigned long long' to 'int'.

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-on: http://review.whamcloud.com/7799
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4023
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging/lustre/llite: Only kill SGID/SUID bits
Nathaniel Clark [Mon, 23 Jun 2014 01:32:07 +0000 (21:32 -0400)]
staging/lustre/llite: Only kill SGID/SUID bits

Check that attr mode is valid before using it when determining if to
clear SGID and SUID bits in ll_setattr.

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-on: http://review.whamcloud.com/10153
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4924
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging/lustre/ptlrpc: Protect request buffer changing
Oleg Drokin [Mon, 23 Jun 2014 01:32:06 +0000 (21:32 -0400)]
staging/lustre/ptlrpc: Protect request buffer changing

*_enlarge_reqbuf class of functions can change request body location
for a request that's already in replay list, as such a parallel
traverser of the list (after_reply -> ptlrpc_free_committed) might
access freed and scrambled memory causing assertion.

Since all such users only can get to this request under imp_lock, take
imp_lock to protect against them in *_enlarge_reqbuf

Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-on: http://review.whamcloud.com/10074
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3333
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging/lustre/libcfs: revert changes to libcfs_sock_ioctl
Oleg Drokin [Mon, 23 Jun 2014 01:32:05 +0000 (21:32 -0400)]
staging/lustre/libcfs: revert changes to libcfs_sock_ioctl

Changes introduced by 80db2734acbc78db12798cfb611d6acc7fe389e6
unfortunately totally break lustre, we use this function
to access not only socket proto obs, but also device ioctl
like SIOCGIFCONF that now fail.
Reverting part of the previous patch to regain the needed
functionality.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
CC: Fredrick John Berchmans <fredrickprashanth@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: gdm72xx: remove blank lines after an open brace
Ben Chan [Tue, 24 Jun 2014 07:34:14 +0000 (00:34 -0700)]
staging: gdm72xx: remove blank lines after an open brace

This patch fixes the following checkpatch warning:

  CHECK: Blank lines aren't necessary after an open brace '{'

Signed-off-by: Ben Chan <benchan@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: gdm72xx: fix block comment style
Ben Chan [Tue, 24 Jun 2014 07:55:58 +0000 (00:55 -0700)]
staging: gdm72xx: fix block comment style

This patch fixes the following checkpatch warnings, which are issued
when the gdm72xx driver is moved out of staging into drivers/net/wimax:

  WARNING: networking block comments don't use an empty /* line, use /* Comment...
  WARNING: networking block comments start with * on subsequent lines
  WARNING: networking block comments put the trailing */ on a separate line

Signed-off-by: Ben Chan <benchan@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: gdm72xx: check return value of sscanf
Ben Chan [Wed, 25 Jun 2014 01:11:08 +0000 (18:11 -0700)]
staging: gdm72xx: check return value of sscanf

Signed-off-by: Ben Chan <benchan@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: cxt1e1: fix sbeCrc function declaration
Pawel Lebioda [Sat, 21 Jun 2014 17:29:35 +0000 (19:29 +0200)]
staging: cxt1e1: fix sbeCrc function declaration

This patch fixes the following sparse warning:

drivers/staging/cxt1e1/sbecrc.c:86:1: warning: symbol 'sbeCrc' was not declared. Should it be static?

Furthermore it fixes wring sbeCrc return type in function declaration.

Signed-off-by: Pawel Lebioda <pawel.lebioda89@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: ft1000_dnld.c:code indent should use tabs where possible
Cheng-Wei Lee [Sat, 21 Jun 2014 01:22:30 +0000 (09:22 +0800)]
staging: ft1000_dnld.c:code indent should use tabs where possible

This patch fixes the following checkpatch.pl issue in
ft1000/ft1000-pcmcia/ft1000_dnld.c
ERROR: code indent should use tabs where possible

Signed-off-by: Quentin Lee <lee.rhapsody@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: ced1401: fix sparse warning for ced1401
Seunghun Lee [Sun, 22 Jun 2014 14:38:04 +0000 (23:38 +0900)]
staging: ced1401: fix sparse warning for ced1401

This patch fixes below warning.

drivers/staging/ced1401/ced_ioc.c:703:30: warning: incorrect type in assignment (different address spaces)
drivers/staging/ced1401/ced_ioc.c:703:30:    expected void *[usertype] lpvBuff
drivers/staging/ced1401/ced_ioc.c:703:30:    got char [noderef] <asn:1>*puBuf

Signed-off-by: Seunghun Lee <waydi1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8723au: Remove unused rtw_pwr_wakeup_ex()
Jes Sorensen [Thu, 26 Jun 2014 08:20:55 +0000 (10:20 +0200)]
staging: rtl8723au: Remove unused rtw_pwr_wakeup_ex()

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8723au: Remove no-op rtl8723a_sreset_linked_status_check()
Jes Sorensen [Thu, 26 Jun 2014 08:20:54 +0000 (10:20 +0200)]
staging: rtl8723au: Remove no-op rtl8723a_sreset_linked_status_check()

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8723au: sreset_priv->dbg_trigger_point is never set
Jes Sorensen [Thu, 26 Jun 2014 08:20:53 +0000 (10:20 +0200)]
staging: rtl8723au: sreset_priv->dbg_trigger_point is never set

No point carrying a bunch of code around that is never going to get
called.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8723au: Wifi_Error_Status isn't used for anything
Jes Sorensen [Thu, 26 Jun 2014 08:20:52 +0000 (10:20 +0200)]
staging: rtl8723au: Wifi_Error_Status isn't used for anything

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>