Commit graph

33220 commits

Author SHA1 Message Date
Ian Abbott
57334a30c8 staging: comedi: das08: use better MODULE_DESCRIPTION()
Replace the boiler-plate Comedi module description string with something
more specific.

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>
2015-06-12 17:06:42 -07:00
Ian Abbott
34cce4628b staging: comedi: das08: clarify sign-magnitude conversion
For DAS08/JR/16 and DAS08/JR/AO-16 boards, the 16-bit analog input
readings are assumed to be in a sign-magnitude format and need
converting to the COMEDI unsigned sample format.  The expressions to do
the conversion look a little messy.  Use a local variable `magnitude` to
make it easier to follow.

Also, there seems to be some discrepancy between the manual for these
boards and the COMEDI code.  The manual implies that 0 is full-scale
negative and 65535 is full-scale positive.  However, the COMEDI code has
used the sign-magnitude conversion for these boards since these two
boards were initially supported by a patch from an external contributor
to the COMEDI project back in 2001.  Assume the code is correct for now,
but add a comment to mention the discrepancy.

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>
2015-06-12 17:06:42 -07:00
Ian Abbott
3919c3d589 staging: comedi: das08: rename das08_do_wbits() & das08jr_do_wbits()
`das08_do_wbits()` and `das08jr_do_wbits()` are handlers for the Comedi
`INSN_BITS` instruction for the digital output subdevice on "non-JR" and
"JR" boards, respectively.  Rename them to `das08_do_insn_bits()` and
`das08jr_do_insn_bits()` respectively for consistency.

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>
2015-06-12 17:06:41 -07:00
Ian Abbott
9f05914d0c staging: comedi: das08: rename das08_di_rbits() & das08jr_di_rbits()
`das08_di_rbits()` and `das08jr_di_rbits()` are handlers for the Comedi
`INSN_BITS` instruction for the digital input subdevice on "non-JR" and
"JR" boards, respectively.  Rename them to `das08_di_insn_bits()` and
`das08jr_di_insn_bits()` respectively for consistency.

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>
2015-06-12 17:06:41 -07:00
Ian Abbott
c224a91957 staging: comedi: das08: rename das08_ai_rinsn()
`das08_ai_rinsn()` is the handler for Comedi `INSN_READ` instructions
for the AI subdevice.  Rename the function to `das08_ai_insn_read()` for
consistency.

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>
2015-06-12 17:06:41 -07:00
Ian Abbott
fcd63ec8f3 staging: comedi: das08: rename the gainlist variables
`das08_pgh_gainlist[]`, `das08_pgl_gainlist[]`, and
`das08_pgm_gainlist[]` hold the gain codes indexed by range index for
various boards that support programmable gain. `das08_gainlist[]` is a
look-up table to find the appropriate gain list for a board.  These are
all associated with the analog input Comedi subdevice.  Rename the
variables to reflect that.

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>
2015-06-12 17:06:41 -07:00
Ian Abbott
a76ccfa81e staging: comedi: das08: rename ai range tables
The `range_das08_pgl`, `range_das08_pgm`, and `range_das08_pgh`
variables define the analog input ranges for the "PGL", "PGM", and "PGH"
board variants, and are also used for the "AOL", "AOM", and "AOH" board
variants.  Rename them to use the `das08_` prefix for consistency.

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>
2015-06-12 17:06:41 -07:00
Ian Abbott
194869dbe8 staging: comedi: das08.c: reformat remaining comments
Use the preferred style for block comments.  Squash double spaces after
the comment opening sequence for single-line comments.

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>
2015-06-12 17:06:41 -07:00
Ian Abbott
66774ce6ca staging: comedi: das08.c: reformat copyright comment
Replace double spaces with single spaces at the start of each line in
the copyright comment at the top of the file.

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>
2015-06-12 17:06:41 -07:00
Ian Abbott
646e70c5d1 staging: comedi: das08: remove board register map comments
The "das08" module contains some comments outlining the register maps
for some of the ISA boards supported by this module in combination with
the "das08_isa" module.  The comments are somewhat sporadically placed,
don't detail all the boards, and don't use the preferred block comment
style.  If anywhere, they should probably be in the "das08_isa" module.
Just remove them.  The comments for the register macros indicate which
boards they apply to anyway, so we don't lose much information.

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>
2015-06-12 17:06:41 -07:00
Ian Abbott
6814b4a3fd staging: comedi: das08: rename DAS08AO_AO_UPDATE
"AOL", "AOM", and "AOH" boards have a jumper that controls whether
analog output channels are updated simultaneously or individually.  When
set to update individually, individual channels are updated when the
high byte register is written.  When set to update simultaneously,
channels are not updated until any of the analog output registers are
read.  The driver doesn't know the jumper setting and is not interested
in the simultaneous update feature, so it updates a channel by writing
the low byte register, the high byte register, and then reading channel
0's low byte register.

The `DAS08AO_AO_UPDATE` macro contains the offset to the low byte
register for analog output channel 0 on the "AOL", "AOM", and "AOH"
boards, which the driver reads to update the analog outputs.  Rename the
macro to `DAS08AOX_AO_UPDATE_REG` and add a comment.

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>
2015-06-12 17:06:41 -07:00
Ian Abbott
3c98c1d3f1 staging: comedi: das08: rename DAS08AO_AO_LSB() and DAS08AO_AO_MSB()
The `DAS08AO_AO_LSB(x)` macro returns the offset to the analog output
low byte register for channel x (0 or 1) for "AOL", "AOM", and "AOH"
boards.  The `DAS08AO_AO_MSB(x)` macro returns the offset to the
corresponding high byte register.  Rename the macros to
`DAS08AOX_AO_LSB_REG(x)` and `DAS08AOX_AO_MSB_REG(x)` respectively, and
add some comments.

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>
2015-06-12 17:06:41 -07:00
Ian Abbott
f1c04fd421 staging: comedi: das08: replace DAS08AO_GAIN_CONTROL/STATUS
The `DAS08AO_GAIN_CONTROL` and `DAS08AO_GAIN_STATUS` macros hold the
offset to the "programmable gain" register on "PGL", "PGM", "PGH",
"AOL", "AOM" and "AOH" boards.  Writing a code to this register sets the
gain for the current analog input channel (selected in the main control
register).  The written value can be read back in bits 3..0 of the
register.  Other bits of the register are read-only and not used by the
driver.  Rename `DAS08AO_GAIN_CONTROL` to `DAS08_GAIN_REG` and add a
comment.  Remove `DAS08AO_GAIN_STATUS` as the driver does not use it and
the read-only parts of the register are documented in the comment.

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>
2015-06-12 17:06:41 -07:00
Ian Abbott
09ed1b72cf staging: comedi: das08: add DAS08JR_AO_UPDATE_REG
"JR" boards with analog output channels have a jumper that controls
whether analog output channels are updated simultaneously or
individually.  When set to update individually, individual channels are
updated when the high byte register is written. When set to update
simultaneously, channels are not updated until the digital inputs
register is read.  The driver doesn't know how the jumper is set and is
not interested in the simultaneous output feature, so it updates a
channel by writing the low byte, then the high byte, then reading the
digital inputs register.  To make the code more explicit, add a macro
`DAS08JR_AO_UPDATE_REG` with the same value as the `DAS08JR_DI_REG`
macro (for digital inputs) and use it when reading the register to
update the analog outputs.

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>
2015-06-12 17:06:40 -07:00
Ian Abbott
7b2098f626 staging: comedi: das08: rename DAS08JR_AO_LSB() and DAS08JR_AO_MSB()
The `DAS08JR_AO_LSB(x)` macro returns the offset to the analog output
low byte register for channel x (0 or 1) for "JR" boards with analog
output support.  The `DAS08JR_AO_MSB(x)` macro returns the offset to the
corresponding high byte register.  Rename the macros to
`DAS08JR_AO_LSB_REG(x)` and `DAS08JR_AO_MSB_REG(x)` respectively, and
add some comments.

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>
2015-06-12 17:06:40 -07:00
Ian Abbott
c47c0ed2d5 staging: comedi: das08: rename and split DAS08JR_DIO
The `DAS08JR_DIO` macro contains the offset to the read-only digital
input register and write-only digital output register on the "JR"
boards.  Replace the macro with two new macros (with the same numeric
value) named `DAS08JR_DI_REG` for the digital input register and
`DAS08JR_DO_REG` for the digital output register, and add some comments.

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>
2015-06-12 17:06:40 -07:00
Ian Abbott
11e8457f02 staging: comedi: das08: rename DAS08_OP() and DAS08_DO_MASK
The `DAS08_DO_MASK` macro is a bitmask for the control register
corresponding to the digital output channels (except on "JR" boards).
Rename it to `DAS08_CONTROL_DO_MASK` and add a comment.

The `DAS08_OP(x)` macro takes a bitvector of the desired digital output
channel states and returns the corresponding bits for the control
register (except on "JR" boards).  Rename it to `DAS08_CONTROL_DO(x)`
and add a comment.

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>
2015-06-12 17:06:40 -07:00
Ian Abbott
6a3a22bcad staging: comedi: das08: rename and rewrite DAS08_INTE
The `DAS08_INTE` macro contains a mask for the "INTE" bit in the control
register (except on "JR" boards).  Setting it to 1 enables interrupts.
Setting it to 0 disables interrupts and clears the "IRQ" bit in the
status register.  Rename the macro to `DAS08_CONTROL_INTE` and add a
comment.  Also use the `BIT()` macro to define its value.  (Note: the
driver does not currently enable interrupts.)

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>
2015-06-12 17:06:40 -07:00
Ian Abbott
ac81df6097 staging: comedi: das08: rename DAS08_MUX() and DAS08_MUX_MASK
The `DAS08_MUX_MASK` macro is a bitmask for the control register
corresponding to the analog input multiplexor channel selection bits.
Rename it to `DAS08_CONTROL_MUX_MASK` and add a comment.  Note that the
current setting of the multiplexor can also be read from the same bit
positions in the status register, but the driver does not use it.  Add a
comment to that effect.

The `DAS08_MUX(x)` macro takes an analog input channel number and
returns the corresponding analog input multiplexor channel selection
bits for the control register.  Rename it to `DAS08_CONTROL_MUX(x)` and
add a comment.

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>
2015-06-12 17:06:40 -07:00
Ian Abbott
c800e51310 staging: comedi: das08: rename DAS08_CONTROL
The `DAS08_CONTROL` macro contains the offset to the write-only control
register.  Rename it to `DAS08_CONTROL_REG` and add a comment.

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>
2015-06-12 17:06:40 -07:00
Ian Abbott
4d14ac8a90 staging: comedi: das08: rename and rewrite DAS08_IP
The `DAS08_IP()` macro takes a value read from the status register and
returns the state of the three digital input channels (except on "JR"
boards).  Rename it to `DAS08_STATUS_DI()` and add a comment.  Also
re-arrange the expression used to extract the state of the digital
inputs for consistency with other register macros.

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>
2015-06-12 17:06:40 -07:00
Ian Abbott
2398391017 staging: comedi: das08: rename and rewrite DAS08_IRQ
The `DAS08_IRQ` macro contains a mask for the "IRQ" status bit.  This is
set to 1 when a rising edge is detected on the external interrupt input
pin of the external connector (which may be jumpered to a pacer output).
It is cleared by setting the "INTE" control bit to 0.  It is not used on
"JR" boards.  Rename the macro to `DAS08_STATUS_IRQ` and add a comment.
Also use the `BIT()` macro to define the value.

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>
2015-06-12 17:06:40 -07:00
Ian Abbott
851e5d5475 staging: comedi: das08: rename and rewrite DAS08_EOC
The `DAS08_EOC` macro contains a mask for the "end of A/D conversion"
bit in the status register.  The logic is reverse sense in that the bit
is set to 1 while the conversion is in progress and set to 0 when the
conversion is complete.  Rename the macro to `DAS08_STATUS_AI_BUSY` and
add a comment.  Also make use of the `BIT()` macro to define the value.

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>
2015-06-12 17:06:40 -07:00
Ian Abbott
b00b3f769a staging: comedi: das08: rename DAS08_STATUS
The `DAS08_STATUS` macro contains the offset to the read-only status
register.  Rename it to `DAS08_STATUS_REG` and add a comment.

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>
2015-06-12 17:06:40 -07:00
Ian Abbott
c2ba9e9637 staging: comedi: das08: rename DAS08_TRIG_12BIT
The `DAS08_TRIG_12BIT` macro contains the offset to the write-only
software trigger register for 12-bit or 16-bit analog-to-digital
conversions.  Rename the macro to `DAS08_AI_TRIG_REG` and add a comment.

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>
2015-06-12 17:06:40 -07:00
Ian Abbott
5826d99aed staging: comedi: das08: rename DAS08_LSB and DAS08_MSB
The `DAS08_LSB` and `DAS08_MSB` macros contain the offsets to the
least-significant and most-significant analog input data registers.
Rename them to `DAS08_AI_LSB_REG` and `DAS08_AI_MSB_REG` respectively
and add comments to document them.

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>
2015-06-12 17:06:40 -07:00
Ian Abbott
3c7cab30f4 staging: comedi: das08.h: make self-reliant
The Comedi "das08.h" header file is included by drivers for the
ComputerBoards/MeasurementComputing and Keithley Metrabyte boards in the
DAS08 series.  It does not compile cleanly when it is the first header
included by the ".c" file.  It uses `struct comedi_device *` in the
parameter list of a function prototype, so just declare `struct
comedi_device` as an incomplete type.  It also uses `bool`, so include
<linux/types.h> to declare 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>
2015-06-12 17:06:39 -07:00
Ian Abbott
2b56b35820 staging: comedi: das08: improve test for programmable gain
`das08_ai_rinsn()` handles Comedi `INSN_READ` instructions for the AI
subdevice.  This programs the gain for the analog input channel if the
board has support for that, and acquires data from the channel.  If
programmable gain is supported, the gain code is read from the array
pointed to by `devpriv->pg_gainlist` indexed by the range index.  The
function assumes that programmable gain is supported if the AI
subdevice's range table supports more than one range.  Replace that with
a more direct test for `devpriv->pg_gainlist` being non-NULL, as it is
only initialized to a non-NULL pointer for boards that support
programmable gain.

This will also allow range tables to be included for convenience for
those boards that support multiple ranges by DIP switches.  Those boards
are currently initialized to use a single "unknown" range.

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>
2015-06-12 17:06:39 -07:00
Ian Abbott
fba5963c92 staging: comedi: das08: use indexed initializer for AI range table types
The "das08" common module for DAS08 ISA, PCI, and PCMCIA drivers
includes a predefined set of AI range tables.  The static board data (of
type `struct das08_board_struct`) for a particular board contains an
index in its `ai_pg` member (of type `enum das08_lrange`) indicating
which of the predefined AI range tables to use.  The "das08" common
module looks up this index in `das08_ai_lranges[]` to get a pointer to
the predefined range table for the board.  The same index is also looked
up in `das08_gainlists[]` to get a corresponding pointer to a list of
hardware gain values for each range supported by the board (NULL for
boards without programmable gain).

To make this clearer, used indexed initializers for `das08_ai_lranges[]`
and `das08_gainlists[]`, using the enumerated constants from `enum
das08_lrange` as the indices.  Also add a short comment to the
definition of `enum das08_lrange`.

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>
2015-06-12 17:06:39 -07:00
Ian Abbott
d4d794330d staging: comedi: das08.h: reformat remaining comments
Reformat remaining comments to use the preferred style for single-line
and block comments.

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>
2015-06-12 17:06:39 -07:00
Ian Abbott
884f01c949 staging: comedi: das08.h: change description in copyright header comment
The copyright header comment includes a single-line description saying
it is for "das08.c" and "das08_cs.c".  However, it is also used by
"das08_isa.c" and "das08_pci.c".  Update the description to say it is
for common DAS08 support, similar to description in "das08.c" (the
common module for the DAS08 ISA/PCI/PCMCIA drivers).

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>
2015-06-12 17:06:39 -07:00
Ian Abbott
71f0d052cc staging: comedi: das08.h: reformat copyright comment
Reformat the copyright comment at the top of the file to use the
preferred block comment style.

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>
2015-06-12 17:06:39 -07:00
Ian Abbott
b08ad6657a staging: comedi: cb_pcimdas: fix handlers for DI and DO subdevices
Normally, low-level Comedi drivers set an `insn_bits` handler for
digital input (DI), digital output (DO) and digital input/output (DIO)
subdevice types to handle normal reading and writing of digital
channels.  The "cb_pcimdas" driver currently has an `insn_read` handler
for the DI subdevice and an `insn_write` handler for the DO subdevice.
However, the actual handler functions `cb_pcimdas_di_insn_read()` and
`cb_pcimdas_do_insn_write()` are written to behave like `insn_bits`
handlers.  Something's wrong there!  To fix it, set the functions as
`insn_bits` handlers and rename them for consistency.

Fixes: e56d03dee1 ("staging: comedi: cb_pcimdas: add main connector digital input/output")
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-12 17:05:40 -07:00
Matan Barak
8e37210b38 IB/core: Change ib_create_cq to use struct ib_cq_init_attr
Currently, ib_create_cq uses cqe and comp_vecotr instead
of the extendible ib_cq_init_attr struct.

Earlier patches already changed the vendors to work with
ib_cq_init_attr. This patch changes the consumers too.

Signed-off-by: Matan Barak <matanb@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
2015-06-12 14:49:10 -04:00
James Simmons
4f3ca89351 staging:lustre: Update license and copyright for the LNET headers
Point to the right place for GNU license. Update Intel copyright.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-11 22:41:20 -07:00
James Simmons
188acc61fb staging:lustre: LNet header code cleanup - indentation etc
Handle all the style issues reported by checkpatch.pl.
Remove general white spaces, spaces in function calls,
alignments etc.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-11 22:41:20 -07:00
James Simmons
a9cf72b642 staging:lustre: fix camel case for LNetInit and LNetFini
For the functions LNetInit and LNetFini move away from
camel case to lnet_init and lnet_fini.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-11 22:41:20 -07:00
James Simmons
db18b8e98d staging:lustre: separate kernel and user land defines in the LNet headers
Currently the lnet headers used by user land contain various internal
LNet structures that are only used by kernel space. Move the user land
structures to headers used by user land. The kernel structures are
relocated to headers that are never exposed to user land.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-11 22:41:20 -07:00
James Simmons
bbf00c3d91 staging:lustre: move LNet NID macros to LNet layer
Currently several special macros LNet NID macros exist
in libcfs.h and libcfs_private.h. Move those macros
out to the lnet header types.h. The new lnet header
nidstr.h contains LNet NID string data that can be
used by user land LNet utilities and the LNet kernel
drivers.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-11 22:39:18 -07:00
John L. Hammond
12c41f0010 staging:lustre: merge socklnd_lib-linux.h into socklnd.h
Originally socklnd_lib-linux.h contained linux specific
wrappers and defines but since the linux kernel is the
only supported platform now we can merge what little
remains in the header into socklnd.h. This is broken
out of the original patch 12932 that was merged to the
Intel/OpenSFS branch.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2675
Reviewed-on: http://review.whamcloud.com/12932
Reviewed-by: Isaac Huang <he.huang@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-11 22:39:18 -07:00
John L. Hammond
134a7a7a10 staging:lustre: rename socklnd_lib-linux.c
With the move to support only the linux kernel their is
no need to keep "linux" in the socklnd source file names.
This is broken out of the original patch 12932 that was
merged to the Intel/OpenSFS branch.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2675
Reviewed-on: http://review.whamcloud.com/12932
Reviewed-by: Isaac Huang <he.huang@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-11 22:39:18 -07:00
John L. Hammond
d664d1fd5c staging:lustre: remove lnet/include/lnet/linux/
Remove the linux specific headers from lnet/include/lnet/linux/,
moving whatever was worthwhile from them to their parent headers or
elsewhere.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2675
Reviewed-on: http://review.whamcloud.com/12932
Reviewed-by: Isaac Huang <he.huang@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-11 22:39:18 -07:00
James Simmons
f57081a572 staging:lustre: Delete all obsolete LND drivers
Remove ralnd, ptllnd, mxlnd, qswlnd drivers. They are no
longer supported and have not even been buildable
for a long time.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6209
Reviewed-on: http://review.whamcloud.com/13663
Reviewed-by: Isaac Huang <he.huang@intel.com>
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-11 22:39:17 -07:00
Dean Lee
72ed4dc73d staging: wilc1000: change WILC_BOOL to bool
change own data type(WILC_BOOL) to common data type(bool)
but that's contain true/false value. so change with them.

Signed-off-by: Dean Lee <dean.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-11 22:37:18 -07:00
Chaehyun Lim
ab6a167f19 staging: wilc1000: remove unused typedef
Remove unused typedef for custom data types.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-11 22:37:18 -07:00
Hari Prasath Gujulan Elango
4a01f1c3ab staging: wilc1000: use memdup_user
This patch replaces the kmalloc followed by copy_from_user by the
wrapper routine memdup_user.

Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-11 09:11:32 -07:00
Dean Lee
2235fb69ef staging: wilc1000: modify odd print message
This driver has odd message in print string.
So this patch removes the data type.

Signed-off-by: Dean Lee <dean.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-11 09:09:39 -07:00
Chris Park
1b612a127e staging: wilc1000: fix warning while printing
size_t should print using %zu, but here it was use %lu.
we were getting warning while printing.

Signed-off-by: Chris Park <chris.park@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-11 09:09:38 -07:00
Chaehyun Lim
8a69ebc277 staging: wilc1000: remove WILC_Sint64
remove unused WILC_Sint64.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-11 09:08:59 -07:00
Chaehyun Lim
fb4ec9caa4 staging: wilc1000: remove WILC_Sint32
Use s32 instead of WILC_Sint32.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-11 09:08:59 -07:00
Chaehyun Lim
4320f6febc staging: wilc1000: remove WILC_Sint16
Use s16 instead of WILC_Sint16.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-11 09:08:59 -07:00
Chaehyun Lim
ca356ada7c staging: wilc1000: remove WILC_Sint8
Use s8 instead of WILC_Sint8.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-11 09:08:59 -07:00
Chaehyun Lim
57b298f54e staging: wilc1000: remove WILC_Uint64
Use u64 instead of WILC_Uint64.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-11 09:08:59 -07:00
Chaehyun Lim
4e4467fdd6 staging: wilc1000: remove WILC_Uint32
Use u32 instead of WILC_Uint32.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-11 09:08:59 -07:00
Chaehyun Lim
d85f5326e4 staging: wilc1000: remove WILC_Uint16
Use u16 instead of WILC_Uint16.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-11 09:07:59 -07:00
Chaehyun Lim
8a54d91719 staging: wilc1000: remove UWORD32
Use u32 instead of UWORD32.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-11 09:07:59 -07:00
Chaehyun Lim
3703480b02 staging: wilc1000: remove UWORD8
Use u8 instead of UWORD8.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-11 09:07:19 -07:00
Julia Lawall
ee0ec1946e lustre: ptlrpc: Replace uses of OBD_{ALLOC,FREE}_LARGE
Replace uses of OBD_ALLOC_LARGE by libcfs_kvzalloc and OBD_FREE_LARGE by
kvfree.

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

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

- OBD_ALLOC_LARGE(ptr,size)
+ ptr = libcfs_kvzalloc(size, GFP_NOFS)

@@
expression ptr,size;
@@

- OBD_FREE_LARGE(ptr, size);
+ kvfree(ptr);
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-11 09:06:11 -07:00
Julia Lawall
6b0e43db28 lustre: obdclass: linux: Replace uses of OBD_{ALLOC, FREE}_LARGE
Replace uses of OBD_ALLOC_LARGE by libcfs_kvzalloc and OBD_FREE_LARGE by
kvfree.

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

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

- OBD_ALLOC_LARGE(ptr,size)
+ ptr = libcfs_kvzalloc(size, GFP_NOFS)

@@
expression ptr,size;
@@

- OBD_FREE_LARGE(ptr, size);
+ kvfree(ptr);
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-11 09:06:11 -07:00
Julia Lawall
fea2e68e21 lustre: obdclass: Replace uses of OBD_{ALLOC,FREE}_LARGE
Replace uses of OBD_ALLOC_LARGE by libcfs_kvzalloc and OBD_FREE_LARGE by
kvfree.

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

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

- OBD_ALLOC_LARGE(ptr,size)
+ ptr = libcfs_kvzalloc(size, GFP_NOFS)

@@
expression ptr,size;
@@

- OBD_FREE_LARGE(ptr, size);
+ kvfree(ptr);
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-11 09:06:11 -07:00
Julia Lawall
337844670a lustre: mdc: Replace uses of OBD_{ALLOC,FREE}_LARGE
Replace uses of OBD_ALLOC_LARGE by libcfs_kvzalloc and OBD_FREE_LARGE by
kvfree.

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

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

- OBD_ALLOC_LARGE(ptr,size)
+ ptr = libcfs_kvzalloc(size, GFP_NOFS)

@@
expression ptr,size;
@@

- OBD_FREE_LARGE(ptr, size);
+ kvfree(ptr);
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-11 09:06:11 -07:00
Julia Lawall
3d0ba7160c lustre: lov: Replace uses of OBD_{ALLOC,FREE}_LARGE
Replace uses of OBD_ALLOC_LARGE by libcfs_kvzalloc and OBD_FREE_LARGE by
kvfree.

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

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

- OBD_ALLOC_LARGE(ptr,size)
+ ptr = libcfs_kvzalloc(size, GFP_NOFS)

@@
expression ptr,size;
@@

- OBD_FREE_LARGE(ptr, size);
+ kvfree(ptr);
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-11 09:06:11 -07:00
Julia Lawall
8cc3792a2a lustre: lmv: Replace uses of OBD_{ALLOC,FREE}_LARGE
Replace uses of OBD_ALLOC_LARGE by libcfs_kvzalloc and OBD_FREE_LARGE by
kvfree.

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

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

- OBD_ALLOC_LARGE(ptr,size)
+ ptr = libcfs_kvzalloc(size, GFP_NOFS)

@@
expression ptr,size;
@@

- OBD_FREE_LARGE(ptr, size);
+ kvfree(ptr);
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-11 09:06:11 -07:00
Julia Lawall
e958f49bc7 lustre: llite: Replace uses of OBD_{ALLOC,FREE}_LARGE
Replace uses of OBD_ALLOC_LARGE by libcfs_kvzalloc and OBD_FREE_LARGE by
kvfree.

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

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

- OBD_ALLOC_LARGE(ptr,size)
+ ptr = libcfs_kvzalloc(size, GFP_NOFS)

@@
expression ptr,size;
@@

- OBD_FREE_LARGE(ptr, size);
+ kvfree(ptr);
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-11 09:06:10 -07:00
Oleg Drokin
a75034345b staging/lustre/llite: fix ll_getname user buffer copy
strncpy_from_user could return negative values on error,
so need to take those into account.
Since ll_getname is used to get a single component name from userspace
to transfer to server as-is, there's no need to allocate 4k buffer
as done by __getname. Allocate NAME_MAX+1 buffer instead to ensure
we have enough for a null terminated max valid length buffer.

This was discovered by Al Viro in https://lkml.org/lkml/2015/4/11/243

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-11 09:03:59 -07:00
Oleg Drokin
d8bc89a7f3 staging/lustre/llite: remove LL_IOC_REMOVE_ENTRY handler
It uses getname in unsafe manner and since it's to deal with corrupted
or inconsistent filesystem, we are probably better to deal with
it from lfsck anyway.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-11 09:03:59 -07:00
Greg Kroah-Hartman
78a66b00d9 Third round of new IIO drivers, cleanups and functionality for the 4.2 cycle.
Given Linus announced a 4.8rc coming up, hopefully time for one more
 lot of IIO patches this cycle.  Some of these are actually
 improvements / fixes for patches earlier in the cycle.
 
 New device support
 * st_accel driver - support devices with 8 bit channels.
 
 Cleanup
 * A general cleanup of the iio tools under /tools/ from Hartmut.
   I'm more than a little embarassed by how bad some of these were! Are well,
   much more refined and less bug prone now.
   These cover lots of stuff like unhandled error returns, memory leaks as
   well as general refactoring to tidy the code up.
 * iio_simple_dummy - fix memory leaks in the init functions, drop some
   pointless error returns from functions that never generate errors and
   make the module parameter explicitly unsigned.
 * More buffer handling reworks from Lars-Peter, this time targetting hardware
   buffers (a little used corner that looks likely to get more use in the near
   future). Specifically:
   - Always compute the masklength as inkernel buffer users may need it.
   - Add a means of labeling which buffer modes a given buffer implementation
     supports.
   - In the case of hardware buffers, require strict scan matching rather than
     matching to a superset.  Currently the demux is bypassed by these drivers
     (this may well not change for efficiency reasons) so allowing a superset
     of channels to be selected would otherwise lead to more data than requested
     confusing userspace.
 
 Driver funcationality improvments
 * mmc35240 - adds a compensation to the raw values as borrowed form Memsic's
   own input driver.
 * mma8452
   - event support
   - event debouncing
   - high  pass filter configuration
   - triggers
 * vf610 - allow conversion mode to be adjusted
 
 Fixlets
 * mmc35240
   - Off by one error that by coincidence had no real effect.
   - i2c_device_name should be lowercase.
   - Lack of null terminator at end of attributes array.
   - Avoid computing the fractional part of the magnetic field by moving
     the scaling into userspace where floating point is available to simplify
     the maths.
   - Use a smaller sleep before assuming the measurement is done.  This is
     safe and improves the possible polling rate.
   - Fix sensitivity on z-axis - datasheet disagrees with Memsic's releasedd
     code and the value used in the code seems to be correct.
 * stk3310 - make a local variable signed to ensure error handling works.
 * twl4030
   - fix calculation of the temperature sense current - bug unlikely
     to have ever been noticed as the difference is small.
   - Fix errors in descriptions.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABCAAGBQJVdgz8AAoJEFSFNJnE9BaIMSoP/RYq9yzkRtQ+T7ZnxdW0uaVK
 W8zhcg9W62dKbu0ccMVI+ESv9bg+3Ti/ZHE2251olYzXER5qrUUqB7llpgJeoni+
 ft1RyOZYYTWqv/2fx9Jdn+h4792tv4nykdgY3YhxR3anPD5Tb3PcRryCJ739d6xL
 c8HZedMP9znbC7BiEzRcLBPiyiv+NFKHF0T6LCkwlTGoe6q+8yaW1blmxTRmtpnD
 Wpf08/vafBmbjUmxfcvtgyOr73D6/kNOk9xYtvbQguD5nG5oHRe96nlaTtW7//hi
 ybP0q+UPV7Hss1pgufEZufPfWglsqOpIWJ7diUyXzvf9x7FAUd2nuiAHKybUg4bT
 yC2dSCVgRAa1zLEwcTub5MNtjkcfM0l9wsnCCIssD5p9s4EEenge1UjHsV7zm/KA
 JzBKBRz98Mo6m+F2gWZkkpuIb9UbI99oLBVDzhFBYf77b1L8curJ+pBH2lcICMun
 K5+WC3itkl7QImbyrCXdHmu9/oWS2+MSVHsmmL4omMFb071/C1iAUCIJahJrbgcy
 jIjaNJp3WgOplQp4tlP6WtsbzHh0DzjjLj+RKFv2mqYMlHhhAFdoH68qXPxG3kYo
 IxyGh7sH7ic5BQyt4B8/GhxakDuf55O/kyS7t01B3c5JbJp/IAbobfWkpCtuICYV
 GIIZTKI5kJb1Q8P7AbUD
 =sNVc
 -----END PGP SIGNATURE-----

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

Jonathan writes:

Third round of new IIO drivers, cleanups and functionality for the 4.2 cycle.

Given Linus announced a 4.8rc coming up, hopefully time for one more
lot of IIO patches this cycle.  Some of these are actually
improvements / fixes for patches earlier in the cycle.

New device support
* st_accel driver - support devices with 8 bit channels.

Cleanup
* A general cleanup of the iio tools under /tools/ from Hartmut.
  I'm more than a little embarassed by how bad some of these were! Are well,
  much more refined and less bug prone now.
  These cover lots of stuff like unhandled error returns, memory leaks as
  well as general refactoring to tidy the code up.
* iio_simple_dummy - fix memory leaks in the init functions, drop some
  pointless error returns from functions that never generate errors and
  make the module parameter explicitly unsigned.
* More buffer handling reworks from Lars-Peter, this time targetting hardware
  buffers (a little used corner that looks likely to get more use in the near
  future). Specifically:
  - Always compute the masklength as inkernel buffer users may need it.
  - Add a means of labeling which buffer modes a given buffer implementation
    supports.
  - In the case of hardware buffers, require strict scan matching rather than
    matching to a superset.  Currently the demux is bypassed by these drivers
    (this may well not change for efficiency reasons) so allowing a superset
    of channels to be selected would otherwise lead to more data than requested
    confusing userspace.

Driver funcationality improvments
* mmc35240 - adds a compensation to the raw values as borrowed form Memsic's
  own input driver.
* mma8452
  - event support
  - event debouncing
  - high  pass filter configuration
  - triggers
* vf610 - allow conversion mode to be adjusted

Fixlets
* mmc35240
  - Off by one error that by coincidence had no real effect.
  - i2c_device_name should be lowercase.
  - Lack of null terminator at end of attributes array.
  - Avoid computing the fractional part of the magnetic field by moving
    the scaling into userspace where floating point is available to simplify
    the maths.
  - Use a smaller sleep before assuming the measurement is done.  This is
    safe and improves the possible polling rate.
  - Fix sensitivity on z-axis - datasheet disagrees with Memsic's releasedd
    code and the value used in the code seems to be correct.
* stk3310 - make a local variable signed to ensure error handling works.
* twl4030
  - fix calculation of the temperature sense current - bug unlikely
    to have ever been noticed as the difference is small.
  - Fix errors in descriptions.
2015-06-10 20:48:34 -07:00
Andrzej Pietrasiewicz
e703f23747 staging: rtl8188eu: eliminate spaces before commas
Eliminate "space prohibited before that ','" errors found by checkpatch,
but do this only to lines which after the patch is applied do not
exceed 80 characters. Out of that only those lines are changed, whose
context does not exceed 80 characters in each line. In other words the
changes are limited to cases where the patch generated is itself
checkpatch-correct.

Rebased onto next-20150605.

Signed-off-by: Andrzej Pietrasiewicz <andrzejtp2010@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-10 18:04:04 -07:00
Zoltán Lajos Kis
623f0e137c Staging: lustre: fix space before and after comma in dt_object.c
Fixes a space prohibited before that ',' and space required after
that ',' error in lustre/lustre/obdclass/dt_object.c that were
found by the checkpatch.pl tool.

Signed-off-by: Zoltán Lajos Kis <zoltan.lajos.kis@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-10 17:55:37 -07:00
Zoltán Lajos Kis
4828d1fdf4 Staging: lustre: fix braces are not necessary in dt_object.c
Fixes a braces {} are not necessary for any arm of this statement
warning in lustre/lustre/obdclass/dt_object.c that was found by
the checkpatch.pl tool.

Signed-off-by: Zoltán Lajos Kis <zoltan.lajos.kis@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-10 17:55:37 -07:00
Zoltán Lajos Kis
84ea37b6d2 Staging: lustre: fix line over 80 characters in dt_object.c
Fixes a line over 80 characters warining in
lustre/lustre/obdclass/dt_object.c that was found by the
checkpatch.pl tool.

Signed-off-by: Zoltán Lajos Kis <zoltan.lajos.kis@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-10 17:55:09 -07:00
Fabian Frederick
6d37b17192 staging: lustre: lnet: o2iblnd: use swap() in kiblnd_dev_failover()
Use kernel.h macro definition.

Thanks to Julia Lawall for Coccinelle scripting support.

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-10 17:55:09 -07:00
James Simmons
60ecf96eb2 staging:lustre: Update license and copyright for lib-socket.c
Point to the right place for GNU license. Update Intel copyright.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-10 17:50:56 -07:00
James Simmons
7309289203 staging:lustre: lib-socket.c code cleanup - indentation etc
Handle all the style issues reported by checkpatch.pl.
Remove general white spaces, spaces in function calls,
etc.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-10 17:50:56 -07:00
James Simmons
5c2414ef1c staging:lustre: use available kernel wrappers in lib-socket.c
Instead of handling calls to struct proto ourselves we can use
equivalent kernel wrappers. No wrapper exist for unlocked ioctl
handling so we create one here for our use. I expect some day
that function will be integrated into sock.c.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-10 17:50:55 -07:00
James Simmons
1ad6a73ef2 staging:lustre: rename tcpip handling functions to lnet_* prefix
With all the TCPIP handling done in the lnet layer we should
rename all the functions with the prefix lnet_*. One other
change done was changing the remove argument of lnet_sock_getaddr
from a int to a bool.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-10 17:50:55 -07:00
James Simmons
45bd3ebe32 staging:lustre: remove useless libcfs_sock_abort_accept
Another one of those silly one line wrappers which is not
needed. Replace libcfs_sock_abort_accept wrapper with a
direct call to wake_up_all on the lnet_acceptor_state sock.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-10 17:50:55 -07:00
James Simmons
e52fc91d40 staging:lustre: remove useless libcfs_sock_release
There is no reason to have a one line exported function
libcfs_sock_release. Instead we can call sock_release directly.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-10 17:48:42 -07:00
James Simmons
7da308e1c4 staging:lustre: move tcpip abstraction
Rename libcfs/linux/linux-tcpip.c to lnet/lnet/lib-socket.c

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-10 17:48:42 -07:00
Stanislav Kholmanskikh
13994d1e05 staging: wilc1000: coreconfigurator: Align enums and defines
Aligned enum members and defines to follow a common style
per enum/(group of defines).

Signed-off-by: Stanislav Kholmanskikh <kholmanskikh.s.s@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-10 17:46:32 -07:00
Stanislav Kholmanskikh
cea3b20212 staging: wilc1000: coreconfigurator: Change return(X) to return X
Changed 'return(X)' to 'return X' in coreconfigurator.c
to satisfy checkpatch.pl warning:

ERROR: return is not a function, parentheses are not required

Signed-off-by: Stanislav Kholmanskikh <kholmanskikh.s.s@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-10 17:46:32 -07:00
Stanislav Kholmanskikh
1fad279db5 staging: wilc1000: coreconfigurator: Remove spaces before "\n"
In accordance to checkpatch.pl, a space before a quoted
newline ("\n") is unnecessary, therefore substituted " \n"
with "\n" in coreconfigurator.c

Signed-off-by: Stanislav Kholmanskikh <kholmanskikh.s.s@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-10 17:46:32 -07:00
Johnny Kim
842f1d71f6 staging: wilc1000: remove uninitialized warnings
This patch is for the initialization of the local variables.

Signed-off-by: Johnny Kim <johnny.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-10 17:45:34 -07:00
Johnny Kim
8a14330f6d staging: wilc1000: modify printk format
This remove compile warnings about printk format.

Signed-off-by: Johnny Kim <johnny.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-10 17:45:16 -07:00
Hari Prasath Gujulan Elango
96baf5a61b staging: wilc1000: fix build warning related to time_after_eq macro
This patch fixes a build warning related to the use of the time_after_eq
macro.Adding a typecast to the second argument suppresses the
warning.This warning was created by one my previous patch.

Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-10 17:43:38 -07:00
Johannes Berg
30686bf7f5 mac80211: convert HW flags to unsigned long bitmap
As we're running out of hardware capability flags pretty quickly,
convert them to use the regular test_bit() style unsigned long
bitmaps.

This introduces a number of helper functions/macros to set and to
test the bits, along with new debugfs code.

The occurrences of an explicit __clear_bit() are intentional, the
drivers were never supposed to change their supported bits on the
fly. We should investigate changing this to be a per-frame flag.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-06-10 16:05:36 +02:00
Piotr S. Staszewski
ee8defecea [media] staging: media: omap4iss: Reformat overly long lines
This reformats lines that were previously above 80 characters long,
improving readability and making checkpatch.pl happier.

Signed-off-by: Piotr S. Staszewski <p.staszewski@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-06-09 19:20:18 -03:00
Ksenija Stanojevic
3466835061 [media] Staging: media: lirc: Replace timeval with ktime_t
'struct timeval last_tv' is used to get the time of last signal change
and 'struct timeval last_intr_tv' is used to get the time of last UART
interrupt.
32-bit systems using 'struct timeval' will break in the year 2038, so we
have to replace that code with more appropriate types.
Here struct timeval is replaced with ktime_t.

Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-06-09 18:45:59 -03:00
Mauro Carvalho Chehab
0df289a209 [media] dvb: Get rid of typedev usage for enums
The DVB API was originally defined using typedefs. This is against
Kernel CodingStyle, and there's no good usage here. While we can't
remove its usage on userspace, we can avoid its usage in Kernelspace.

So, let's do it.

This patch was generated by this shell script:

	for j in $(grep typedef include/uapi/linux/dvb/frontend.h |cut -d' ' -f 3); do for i in $(find drivers/media -name '*.[ch]' -type f) $(find drivers/staging/media -name '*.[ch]' -type f); do sed "s,${j}_t,enum $j," <$i >a && mv a $i; done; done

While here, make CodingStyle fixes on the affected lines.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Acked-by: Stefan Richter <stefanr@s5r6.in-berlin.de> # for drivers/media/firewire/*
2015-06-09 17:47:35 -03:00
Madhusudhanan Ravindran
21175ef7e0 staging: wilc1000: remove unused variables
removed few variables which are assigned but
never used.

Signed-off-by: Madhusudhanan Ravindran <mravindr@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-09 10:43:11 -07:00
Sudip Mukherjee
11f2323ad3 staging: fbtft: fix build error
while building on i386 it gives a build warning about msg undeclared.

Fixes: e6ffd1ba55 ("staging: fbtft: fix out of bound access")
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-09 10:37:52 -07:00
David S. Miller
941742f497 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-06-08 20:06:56 -07:00
Markus Böhme
bfee7c9665 staging: rtl8188eu: core/rtw_led.c: fix coding style issue
Convert spaces at the start of a line to a tab.

Signed-off-by: Markus Böhme <markus.boehme@mailbox.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:45:30 -07:00
Dan Carpenter
1208097416 staging: rtl8192e: fix some confusing indenting
The indenting here causes a static checker warning:

	drivers/staging/rtl8192e/rtllib_rx.c:626 RxReorderIndicatePacket()
	warn: curly braces intended?

The code is actually correct, it's just that these lines were pushed in
an extra indent level by mistake in 35e33b0468 ('staging: rtl8192e:
Fix LONG_LINE warnings').

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:45:30 -07:00
Mateusz Kulikowski
9c2ce8275d staging: rtl8192e: Remove dead code: mp_adapter
mp_adapter structure was used in past, but now is only initialized and
never read.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:44:15 -07:00
Mateusz Kulikowski
d8ca20fe83 staging: rtl8192e: Remove dead code: r8192_priv members
Remove unused members of rtl8192_priv structure.
Some of them are never used, other are just initialized and
never accessed.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:44:15 -07:00
Mateusz Kulikowski
b2b94bc9e9 staging: rtl8192e: Remove dead code: rt_stats
Remove unused fields from rt_stats structure.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:44:15 -07:00
Mateusz Kulikowski
c4262bdf24 staging: rtl8192e: Remove dead code: undefined arrays
Remove undefined and unused PHY array forward-declarations.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:44:15 -07:00
Mateusz Kulikowski
4f1c29687a staging: rtl8192e: Remove dead code: rtl_dm.[ch]
- Remove unused fields in dig_t structures. Some of them were only
  initialized and never accessed.
- Remove unused enums/macros/defines in rtl_dm.h
- Remove duplicated function declarations
- Remove unused dm_change_dynamic_initgain_thresh() function
- Remove unused dm_shadow_init() function

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:43:08 -07:00
Mateusz Kulikowski
b81b6d2843 staging: rtl8192e: Remove unused macros/structures in rtl_core.h
- Removed unused macros/enums/structures
- Remove unused fields in r8192_priv

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:43:08 -07:00
Mateusz Kulikowski
e6d948a57d staging: rtl8192e: Remove dead code: read/write_cam
Both functions are never used.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:43:08 -07:00
Mateusz Kulikowski
0ac3bb4ef4 staging: rtl8192e: Remove dead code: cmpk_message_handle_rx()
Remove cmpk_message_handle_rx() and static functions used by it.
This function was never called.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:43:08 -07:00
Mateusz Kulikowski
e8fdea21e1 staging: rtl8192e: Remove dead code: cmpk_handle_query_config_rx()
Remove cmpk_handle_query_config_rx function. It is called
once, does some calculation, but generates no output -
it has neither return value, nor modify its parameters.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:43:08 -07:00
Mateusz Kulikowski
669adbe6c9 staging: rtl8192e: Remove dead code
Delete unused code. Removed some macros, enums, unions and several
structures (tx_fwinfo, wmm_tspec, qos_tstream, sta_qos, bss_qos).

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:43:08 -07:00
Pedro Marzo Perez
c1ab2fa969 Staging: rtl8192u: Remove two useless lines at ieee80211_wep_null
Remove two lines at ieee80211_wep_null which checkpatch.pl reported as errors.
The first one because it has a C99 comment style and the second one because it is a void
return which is useless.
The function ieee80211_wep_null cannot be completely removed because it is exported and
used to autoload the module.

Signed-off-by: Pedro Marzo Perez <marzo.pedro@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:40:55 -07:00
Pedro Marzo Perez
251ae75c69 Staging: rtl8192u: Simplify error check code at prism2_wep_init
Simplify prism2_wep_init error check code employing goto when a failure is detected.
Removed pr_debug which was given a checkpatch.pl error because of literal string
 splitted across two lines of code, it was seldom going to be printed anyway.

Signed-off-by: Pedro Marzo Perez <marzo.pedro@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:40:55 -07:00
Gaston Gonzalez
bf95628e61 staging: rtl8192u: ieee80211: Fix sparse endianness warnings
Fix the following sparse warnings:

drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:663:32: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:663:32:    expected restricted __le16 [usertype] frame_ctl
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:663:32:    got int
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:664:50: warning: invalid assignment: |=
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:664:50:    left side has type restricted __le16
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:664:50:    right side has type int

Signed-off-by: Gaston Gonzalez <gascoar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:40:55 -07:00
Tolga Ceylan
2bd239d70e staging: rtl8192u/ieee80211/ieee80211_softmac.c: auth parse error code byte order fix
auth_parse() return result is in incorrect le16 byte order. Currently
this still works since the user code merely checks if error code is
equal to 0. However debug statement in ieee80211_check_auth_response()
prints the error code in the incorrect le16 byte order. This fix
corrects the byte order as cpu order.

Signed-off-by: Tolga Ceylan <tolga.ceylan@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:40:54 -07:00
Dan Carpenter
ba470f7c0e staging: ozwpan: prevent a couple of underflows
The underflow in OZ_DATA_F_ISOC_FIXED seems not harmful, but this patch
is a clean up and makes my static checker a bit happier.

The underflow in OZ_VENDOR_CLASS_RSP seems like it could result in
memory corruption.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:38:56 -07:00
Buţiu Alexandru Octavian
c938699ebb staging: rtl8192u: r819xU_firmware.h: fix line over 80 characters
Fixed coding style issue line "over 80 characters" detected by
checkpatch.pl in r819xU_firmware.h

Signed-off-by: Buţiu Alexandru Octavian <predator5047@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:38:56 -07:00
Buţiu Alexandru Octavian
f57d0b6baf staging: drivers: rtl8192u: r819xU_firmware.h: removed commented macro
Removed commented macro that was no longer needed

Signed-off-by: Buţiu Alexandru Octavian <predator5047@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:38:56 -07:00
Hari Prasath Gujulan Elango
ed701c4ab2 staging: rtl8188eu: use table to get channel plan from country code
Use a table to get a channel plan from a given country code.This was a
TODO mentioned as a comment in the driver.

Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:38:56 -07:00
Yijing Wang
6ed977428a staging: rts5208: Use common pci_get_bus_and_slot() instead of private one
We already have a inline pci_get_bus_and_slot() in include/linux/pci.h,
Use it instead of local one.

Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:38:56 -07:00
Prasanna Karthik
05871f994e staging:rtl8712:Fix compressed return statement
Fix reported by coccinelle compressing last two lines with single return
call

Signed-off-by: Prasanna Karthik <mkarthi3@visteon.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:38:56 -07:00
David Kershner
4abce83dca staging: unisys: Add the bus device to the visor device list.
When the bus device was created the list_all variables were not
being initialized. When the CONTROLVM_BUS_CONFIGURE message
was being sent, it was failing to find the bus and produced a
panic. Initialize the bus_info->list_all variable by doing a
INIT_LIST_HEAD.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:36:44 -07:00
Don Zickus
04dacacc14 staging: unisys: Fix clean up path
When unloading a module, we need to cleanup the platform registration.
However, unregistering the platform uncovered a couple of quirks, namely
a missing device_release function.  Fix things up so module unload works
and allows us to reload the module.

Signed-off-by: Don Zickus <dzickus@redhat.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:36:44 -07:00
Don Zickus
75439a17d4 staging: unisys: Fix double sysfs create for module version
When we combined visorchipset and visorbus into one driver we negelected
to strip out some of the MODULE_ stuff from one of the files.  When
building the drivers in, it causes a WARN that we try to create
/proc/modules/visorbus/version when it is already created.

visorchipset.c is the driver entry point, remove the cruft from
visorbus_main.c.

Signed-off-by: Don Zickus <dzickus@redhat.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:36:44 -07:00
David Kershner
c81e15a4b5 staging: unisys: Clean up diag_serverity enum
Get rid of unused values in the enum.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:36:44 -07:00
David Kershner
ee872fde4b staging: unisys: Remove unneeded fields in diagchannel.h
Diagchannel.h is used primarily for the diagnostics channel. The
diagnostics channel is not being used by linux guests currently, so
the majority of the file is not needed. What is left is what is
needed to perform postcode vmcalls. Those postcodes will eventually
end up in the diag channel.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:36:44 -07:00
David Kershner
01ef15f722 staging: unisys: Update diag serverity enum
Give the enum the correct values instead of based on other values.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:36:44 -07:00
Jes Sorensen
4239f82294 staging: unisys: Removed unused entries from struct visor_channeltype_descriptor
min_size/max_size aren't used anywhere, and they were just causing
headaches in the drivers being ported over to the new interfaces.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:36:43 -07:00
Don Zickus
a298bc0b59 staging: unisys: Convert device creation to use visor_device
This patch removes the legacy dev_info struct and instead creates
and passes around a traditional struct device.

This allows us to remove a lot of the various look up code and
removes the doubt if the struct exists or not.

Half of the churn is just the conversion of visorchipset_device_info
to visor_device.  Various cleanups include re-arranging the failure
paths to make more sense.

Pay attention to the create_visor_device function.  This had a lot of
churn to simplify everything.

Lots of functions disappeared because they are not needed any more.

Signed-off-by: Don Zickus <dzickus@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:36:43 -07:00
Don Zickus
d32517e392 staging: unisys: Convert bus creation to use visor_device
This patch removes the legacy bus_info struct and instead creates
and passes around a traditional struct device.

This allows us to remove a lot of the various look up code and
removes the doubt if the struct exists or not.

Half of the churn is just the conversion of visorchipset_bus_info
to visor_device.  Various cleanups include re-arranging the failure
paths to make more sense.

Signed-off-by: Don Zickus <dzickus@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:36:43 -07:00
Don Zickus
65bd6e4607 staging: unisys: Do not use 0 as the default bus root device number
I used 0 as the device id for the bus root, neglecting the fact that
device 0 is a valid id in Unisys's configuration.  Modify this to
use UINT_MAX instead as a unique number.

As fallout from this change it was noticed the bus_no and dev_no was not
defined the same way consistently.  Fix visorbus.h to use u32 there.  Fix
the resulting printk warning too.

Signed-off-by: Don Zickus <dzickus@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:36:43 -07:00
Don Zickus
ee983d902e staging: unisys: Remove server flags
The bus driver doesn't work in server mode, just remove the left over
pieces.

Signed-off-by: Don Zickus <dzickus@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:36:43 -07:00
Don Zickus
52c4cbd3fd staging: unisys: Remove unused cruft
Removing stuff that isn't being used.  Another prepartion patch to
allow us to use visor_device everywhere without the baggage of
bus/dev_info.

Signed-off-by: Don Zickus <dzickus@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:36:43 -07:00
Don Zickus
343506bf0a staging: unisys: Migrate bus from devdata to visor_device
The bus device and regular device were using two different
structs.  Let's combine them as they are not entirely different
from one another.

This allows us to move this creation up the stack later and
actually remove bus/dev_info easily.

Most of the churn is just renaming devdata -> dev and 'struct
visorbus_devdata' to 'struct visor_device'.

Signed-off-by: Don Zickus <dzickus@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:36:43 -07:00
Chaitanya Dhere
9c708f9461 staging: rtl8192u: Fix indentation issue
This change was detected with help of checkpatch.pl script.

Signed-off-by: Chaitanya Dhere <cvijaydh@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:34:05 -07:00
Chaitanya Dhere
a4f649bdab staging: rtl8192u: Patch to modify if, else conditions
In this patch, the if, else conditions are modified to remove the
unnecessary equality checks. This change was detected with help of
coccinelle tool.

Signed-off-by: Chaitanya Dhere <cvijaydh@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:34:05 -07:00
Douglas Barbonaglia Sathler Figueiredo
cfa6954ced staging: wlan-ng: fix long line
Style (line over 80 chars) in drivers/staging/wlan-ng/prism2fw.c

Signed-off-by: Douglas Barbonaglia Sathler Figueiredo <eng.douglasfigueiredo@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:33:40 -07:00
Madhusudhanan Ravindran
f51cd2b7d1 staging: emxx_udc: remove commented code
removed the commented INFO lines.

Signed-off-by: Madhusudhanan Ravindran <mravindr@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:33:40 -07:00
Hari Prasath Gujulan Elango
7eea766ad7 staging: rtl8712: fix indentation issue
Fixed indentation issue in few lines

Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:33:40 -07:00
Hari Prasath Gujulan Elango
3b83fb7589 staging: rtl8188eu: remove unwanted assignment
remove an unwanted assignment to a variable which is overwritten in the
very next line.The first value assigned is not used.

Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:33:39 -07:00
Hari Prasath Gujulan Elango
0aae092b5e staging: dgnc: remove ununsed Macro
Remove the ununsed Macro

Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:30:04 -07:00
Isaac Assegai
da295041a8 Staging: sm750fb: ddk750_display.c: Insert spaces after commas.
Insert Spaces after commas to rectify the
following checkpatch errors in ddk750_display.c:
ERROR: space required after that ','

Signed-off-by: Isaac Assegai <isaac.a.travers@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:26:31 -07:00
Isaac Assegai
195d2b643b Staging: sm750fb: Insert spaces after commas in two files.
Insert Spaces after commas to rectify the following
checkpatch errors in ddk750_help.c and ddk750_mode.c:
ERROR: space required after that ','

Signed-off-by: Isaac Assegai <isaac.a.travers@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:26:31 -07:00
Isaac Assegai
f31b55ac2a Staging: sm750fb: Insert spaces after commas in two files.
Insert Spaces after commas to rectify the following
checkpatch errors in ddk750_power.c and ddk750_swi2c.c:
ERROR: space required after that ','

Signed-off-by: Isaac Assegai <isaac.a.travers@gmail.com>:
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:26:31 -07:00
Isaac Assegai
c97b2c1536 Staging: sm750fb: sm750_cursor.c: Insert spaces after commas.
Insert Spaces after commas to rectify the
following checkpatch errors in sm750_cursor.c:
ERROR: space required after that ','

Signed-off-by: Isaac Assegai <isaac.a.travers@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:26:31 -07:00
Isaac Assegai
b5d63974bb Staging: sm750fb: sm750_accel.c: Insert spaces after commas.
Insert Spaces after commas to rectify the
following checkpatch errors in sm750_accel.c:
ERROR: space required after that ','

Signed-off-by: Isaac Assegai <isaac.a.travers@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:26:31 -07:00
Isaac Assegai
bdec77735e Staging: sm750fb: sm750_hw.c: Insert spaces after commas.
Insert Spaces after commas to rectify the
following checkpatch errors in sm750_hw.c:
ERROR: space required after that ','

Signed-off-by: Isaac Assegai <isaac.a.travers@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:26:30 -07:00
Isaac Assegai
555a6b1e24 Staging: sm750fb: Inserted spaces after commas in three files.
Insert Spaces after commas to rectify the
following checkpatch errors in ddk750_hwi2c.h,
ddk750_help.h and ddk750_chip.h:
ERROR: space required after that ','

Signed-off-by: Isaac Assegai <isaac.a.travers@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:26:30 -07:00
Isaac Assegai
5e93581388 Staging: sm750fb: Inserted spaces after commas in four files.
Insert Spaces after commas to rectify the
following checkpatch errors in sm750_cursor.h,
sm750_accel.h, ddk750_power.h and ddk750_mode.h:
ERROR: space required after that ','

Signed-off-by: Isaac Assegai <isaac.a.travers@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:26:30 -07:00
Isaac Assegai
e8b976da30 Staging: sm750fb: sm750.h: Insert spaces after commas.
Insert Spaces after commas to rectify the
following checkpatch errors in sm750.h:
ERROR: space required after that ','

Signed-off-by: Isaac Assegai <isaac.a.travers@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:26:30 -07:00
Isaac Assegai
afa34e7e74 Staging: sm750fb: sm750_help.h: Insert spaces after commas.
Insert Spaces after commas to rectify the
following checkpatch errors in sm750_help.h:
ERROR: space required after that ','

Signed-off-by: Isaac Assegai <isaac.a.travers@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:26:30 -07:00
Isaac Assegai
e9f490ea0c Staging: sm750fb: sm750_hw.h: Insert spaces after commas.
Insert Spaces after commas in sm750_hw.h to rectify the
following checkpatch errors in sm750_hw.h:
ERROR: space required after that ','

Signed-off-by: Isaac Assegai <isaac.a.travers@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:26:30 -07:00
Hari Prasath Gujulan Elango
2dc340910b staging: sm750fb: Add missing Kconfig dependency
The sm750fb driver has few Framebuffer configuration dependencies that
need to be selected in order to get compiled successfully

Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:26:30 -07:00
David Decotigny
02632342d4 staging: rtl8723au: core: remove redundant endianness conversion
Source and destination have the same little-endian annotation: this
patch removes incorrect byte-swap on non-LE cpus.

This addresses the following sparse warning:
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3911:56: warning: incorrect type in argument 1 (different base types)
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3911:56:    expected unsigned short [unsigned] [usertype] val
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3911:56:    got restricted __le16 [usertype] BA_timeout_value

Signed-off-by: David Decotigny <ddecotig@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:23:53 -07:00
David Decotigny
af17b56d1f staging: rtl8723au: core: avoid bitwise arithmetic with forced endianness
This fixes bitwise arithmetic performed on the host on a variable
previously converted to little-endian, and subsequently converted
again to little-endian:
  - issue_action_BA23a() called with "status" crafted in host byte order
  - "status" converted to LE
  - bitwise arithmetic on the (LE) "status", performed with masks and
    shifts in host byte order
  - result converted to LE (again) and stored in device structure

Sparse warning addressed by this patch:
  drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3806:16: warning: incorrect type in assignment (different base types)
  drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3806:16:    expected unsigned short [unsigned] status
  drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3806:16:    got restricted __le16 [usertype] <noident>

Additional notes: initial cpu_to_le16 was introduced by kernel bulk
  commit 5e93f3520 "staging: r8723au: Add source files for new driver
  - part 1", initially from github according to commit description. On
  github, this traces back to another bulk commit: 2896bda04353 "Add
  new files in core directory", which is the 1st version of the
  driver.

Signed-off-by: David Decotigny <ddecotig@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:23:52 -07:00
Sudip Mukherjee
e6ffd1ba55 staging: fbtft: fix out of bound access
str was 16 bytes but was mentioned as 128 in snprintf.
again msg is 128 bytes but not sufficient to hold the complete debug
message of register values.
Now removed the use of str, msg and print the register values from the
loop.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:22:45 -07:00
Madhusudhanan Ravindran
b38c760ab0 staging: fbtft: replace fbtft_dev_dbg with standard dev_dbg call
This patch attempts to simplify the debugging using standard
dev_dbg call so that individual debug prints can be enabled or
disbled by dynamic debugging rather than using module params.

Signed-off-by: Madhusudhanan Ravindran <mravindr@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:21:37 -07:00
Abhishek Sharma
e1f9ae3bca Staging: comedi: adv_pci1724: Remove redundant return statements
Replace unnecessary conditional checks for variable 'ret' and replace
by single return statement.

Signed-off-by: Abhishek Sharma <asharm14@visteon.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:21:37 -07:00
Joglekar Tejas
51bb618bff Staging: comedi: ni_at_a2150: remove extra spaces before tab
This patch fix warning given by checkpatch.pl abouts spaces given
before tab

Signed-off-by: Joglekar Tejas <joglekartejas@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:21:37 -07:00
Antonio Murdaca
71e8dd9a2f staging: lustre: cleanup not needed else clauses
cleanup checkpatch.pl warnings about not needed else
clauses after a break or return

Signed-off-by: Antonio Murdaca <antonio.murdaca@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:15:38 -07:00
Dan Carpenter
9ee81443b9 staging: wilc1000: prevent some overflows in debugfs
Add some limits here so we don't corrupt memory.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:09:41 -07:00
Abhishek Sharma
d35ebe8025 staging: wilc1000: Remove commented code lines
Removing the commented code lines.

Signed-off-by: Abhishek Sharma <asharm14@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:08:43 -07:00
Abhishek Sharma
542a6bc5cf staging: wilc1000: Remove commented variable declerations
Removing the commented static variable declerations.

Signed-off-by: Abhishek Sharma <asharm14@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:08:43 -07:00
Hari Prasath Gujulan Elango
0dcbea196b staging: wilc1000: remove commented code
Remove commented code from this file.

Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:08:42 -07:00
Hari Prasath Gujulan Elango
aa02a9392e staging: wilc1000: remove ununsed function
The function WILC_WFI_InitPriv() is not used anywhere in the
driver.Hence remove it.

Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:08:42 -07:00
Hari Prasath Gujulan yyElango
1a093b5fcd staging: wilc1000: use time_after_eq
use the time_after_eq macro for the comparison operation

Signed-off-by: Hari Prasath Gujulan yyElango <hgujulan@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 12:43:07 -07:00
Hari Prasath Gujulan Elango
4d77c6ccfb staging: wilc1000: remove dead code
Remove dead code or commented code

Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 12:43:07 -07:00
Hari Prasath Gujulan Elango
37bc15d8dd staging: wilc1000: remove unnecessary typecast
Remove ununecessary typecast for kzalloc.This patch was generated by
coccinelle tool

Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 12:43:06 -07:00
Chaitanya Dhere
0feae20091 staging: wilc1000: Modification in code to use ARRAY_SIZE macro
In this patch, ARRAY_SIZE() macro is used to determine the
size. This change was detected with the help of coccinelle
tool.

Signed-off-by: Chaitanya Dhere <cvijaydh@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 12:41:51 -07:00
Sudip Mukherjee
52db752077 staging: wilc1000: fix warning while printing
size_t should print using %zu and unsigned long int should use %lu
but here it was using %d and hence we were getting warning while
printing.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 12:41:51 -07:00
Julia Lawall
2d78b3c1ec lustre: lov: Drop rq_buflen field
The rq_buflen field of the lov_request structure is never initialized.  It
is only used in the free of req->rq_oi.oi_md in lov_finish_set.  But no
oi_md field is ever initialized to the result of calling OBD_ALLOC_LARGE.
So it seems that the call to OBD_FREE_LARGE in lov_finish_set and the
rq_buflen in the lov_request structure are simply not needed.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 12:39:48 -07:00
Julia Lawall
2b692c2e9b lustre: lov: Drop unneeded set_oabufs and set_pga fields
The fields set_oabufs and set_pga fields in the lov_request_set structure
are never set, so drop them.  Drop also the corresponding test and free in
lov_finish_set.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 12:39:48 -07:00
Julia Lawall
8fd18211d6 lustre: lov: Drop lov_lock_handles structure
The lov_lock_handles structure is only used as the type of the field
set_lockh in the lov_request_set structure, and this field is never set to
any value.  Drop a test and free of this field in lov_finish_set.  This
change enables also removing the functions lov_handle2llh and lov_llh_put
that manipulate values of type lov_lock_handles, but are now never called.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 12:39:48 -07:00
Dan Carpenter
1c01737a4b Staging: Lustre: lproc_fid: remove some dead code
We know "rc == 0" so there is no need to check.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 12:39:01 -07:00
Dan Carpenter
b815555df8 Staging: lustre: ptlrpc: signedness bug in high_priority_ratio_store()
We want to store a non-negative int here.  The original code had a check
for unsigned long less than zero which is a mistake but also casting
from a positive long to an int can result in a negative number.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 12:39:01 -07:00
Xavier Roche
02b310794b staging: lustre: fixed const warnings (struct seq_operations should be const in these contexts)
Minor warnings spotted by checkpatch.pl in lustre regarding const correctness: struct seq_operations should be const.

Signed-off-by: Xavier Roche <roche+git@httrack.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 12:39:01 -07:00
James Simmons
2f4246f71d staging:lustre: cleanup libcfs lock handling
Previously with libcfs being built for user land and kernel
space wrappers were created to transparently handle locking.
Now that user land support has been removed we delete all
those locking wrappers with this patch. Many of those changes
landed upstream but some nice cleanups still remain that are
pushed in this patch.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245
Reviewed-on: http://review.whamcloud.com/13793
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 12:39:01 -07:00
James Simmons
394453676b staging:lustre: fixup LNet resource container api
Both lnet_res_container_setup and lnet_res_container_create
have additional parameters that are no longer used with the
removal of the FREELIST code. This patch removes the no
longer needed function arguments.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 12:37:18 -07:00
John L. Hammond
d9c90615a4 staging:lustre: assume a kernel build
In lnet/lnet/ and lnet/selftest/ assume a kernel build (assume that
__KERNEL__ is defined). Remove some common code only needed for user
space LNet.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2675
Reviewed-on: http://review.whamcloud.com/13121
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Amir Shehata <amir.shehata@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 12:35:54 -07:00
Chris Hanna
d0bfef31f4 staging: lustre: ptlrpc: clean up whitespace and align function params
Minor changes to remove excessive whitespace and improve
readability of ptlrpc functions.

Signed-off-by: Chris Hanna <hannac@iu.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 12:32:09 -07:00
Chris Hanna
29ac6840d7 staging: lustre: osc: clean up whitespace and align function parameters
Minor changes to remove excessive whitespace and improve
readability of osc functions.

Signed-off-by: Chris Hanna <hannac@iu.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 12:32:09 -07:00
Aparna Karuthodi
06d0c4989f staging: lustre: llite: Fix No space after the declaration
Added a new line

Signed-off-by: Aparna Karuthodi <kdasaparna@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 12:28:40 -07:00
Prasanna Karthik
f559cfe37b Staging: lustre: Clean up Coding style Fix
Preferred use of '*' is adjacent to the data name or function name

Signed-off-by: Prasanna Karthik <mkarthi3@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 12:28:40 -07:00
Antonio Murdaca
23191c97c0 staging: lustre: lov: remove unnecessary parentheses
fix checkpatch.pl warning about unnecessary parentheses

Signed-off-by: Antonio Murdaca <antonio.murdaca@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 12:28:40 -07:00
Greg Kroah-Hartman
6394d6d01b Merge 4.1-rc7 into staging-testing
We want the staging tree fixes in here too to help with testing and
merge issues.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 10:34:44 -07:00
Mauro Carvalho Chehab
af8a819a25 [media] lirc_imon: simplify error handling code
Instead of using a state machine and a switch with lots of
fall-trough, use gotos and cleanup the error handling loop.

That removes those two smatch warnings:
	drivers/staging/media/lirc/lirc_imon.c:933 imon_probe() warn: possible memory leak of 'context'
	drivers/staging/media/lirc/lirc_imon.c:933 imon_probe() warn: possible memory leak of 'driver'

And make the error handling code more standard.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-06-05 11:26:48 -03:00
Lad, Prabhakar
4f26aa1786 [media] media: davinci_vpfe: use monotonic timestamp
V4L2 drivers should use MONOTONIC timestamps instead of gettimeofday,
which is affected by daylight savings time.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-06-05 06:36:03 -03:00
Lad, Prabhakar
171fe6d127 [media] media: davinci_vpfe: set minimum required buffers to three
this patch sets nbuffers to three or more and drops the
unset member video_limit which just a copy paste from
earlier driver.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-06-05 06:35:41 -03:00
Lad, Prabhakar
694f9963ed [media] media: davinci_vpfe: clear the output_specs
clear of the output_specs before passing it to the
configure_resizer_out_params(), so that no garbage values
are set.

This fixes following build warning:
drivers/staging/media/davinci_vpfe/dm365_resizer.c: In function 'resizer_set_stream':
drivers/staging/media/davinci_vpfe/dm365_resizer.c:190:46: warning: 'output_specs.vst_c'
may be used uninitialized in this function [-Wmaybe-uninitialized]
  param->ext_mem_param[index].rsz_sdr_ptr_s_c = output->vst_c;
                                              ^
drivers/staging/media/davinci_vpfe/dm365_resizer.c:316:30: note: 'output_specs.vst_c' was declared here
  struct vpfe_rsz_output_spec output_specs;
                              ^

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-06-05 06:34:48 -03:00
Tejun Heo
11f81becca page_writeback: revive cancel_dirty_page() in a restricted form
cancel_dirty_page() had some issues and b9ea25152e ("page_writeback:
clean up mess around cancel_dirty_page()") replaced it with
account_page_cleaned() which makes the caller responsible for clearing
the dirty bit; unfortunately, the planned changes for cgroup writeback
support requires synchronization between dirty bit manipulation and
stat updates.  While we can open-code such synchronization in each
account_page_cleaned() callsite, that's gonna be unnecessarily awkward
and verbose.

This patch revives cancel_dirty_page() but in a more restricted form.
All it does is TestClearPageDirty() followed by account_page_cleaned()
invocation if the page was dirty.  This helper covers all
account_page_cleaned() usages except for __delete_from_page_cache()
which is a special case anyway and left alone.  As this leaves no
module user for account_page_cleaned(), EXPORT_SYMBOL() is dropped
from it.

This patch just revives cancel_dirty_page() as a trivial wrapper to
replace equivalent usages and doesn't introduce any functional
changes.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Signed-off-by: Jens Axboe <axboe@fb.com>
2015-06-02 08:33:33 -06:00
Nicholas Mc Guire
084861124d staging: unisys: use schedule_timeout_interruptible()
API consolidation with coccinelle found:
./drivers/staging/unisys/visorbus/periodic_work.c:196:3-19:
        consolidation with schedule_timeout_*() recommended

This is a 1:1 conversion with respect to schedule_timeout() to the
schedule_timeout_interruptible() helper only - so only an API
consolidation to improve readability. The hard coded timeout of 10
jiffies is HZ dependent which it should not be, so it is converted
with msecs_to_jiffies.

Patch was compile tested with x86_64_defconfig + CONFIG_STAGING=y,
CONFIG_UNISYSSPAR=y, CONFIG_UNISYS_VISORBUS=m

Patch is against 4.1-rc5 (localversion-next is -next-20150529)

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-02 14:24:31 +09:00
Don Zickus
7726f81357 staging: unisys: Prepare vbus_hdr_info to be public
In order to remove bus_info, we need to migrate vbus_hdr_info into
the public namespace of visor_device.  Because the struct is private,
we use a void * to hide the contents.

As a result, we need to allocate vbus_hdr_info and manage it.

Also work around vbus_valid, as that variable will not be used
in the public namespace.

Signed-off-by: Don Zickus <dzickus@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-02 14:22:49 +09:00
Don Zickus
0274b5aec1 staging: unisys: Convert pending_msg_hdr to a pointer
In order for bus/dev_info structs to become public structs, one
element, pending_msg_hdr, needs to become opaque.  This is to keep
all the internals of the controlvm struct private to the bus layer.

So a simple conversion of embedding the pending_msg_hdr struct into
a pointer is done.  The rest of the patch is the fallout.

The rules are modified slightly.  Instead of relying on the 'id' to be
CONTROLVM_INVALID to indicate invalid, just use the pointer set to NULL.

In addition, because bus/dev_info can be NULL and we still need to send
a
response, pass pending_msg_hdr to all 'responders' instead of bus/

That change causes some fallout in the success case.  Instead of setting
state
bits and clearing info in the responders, do all that magic in the
responder
wrappers.

Signed-off-by: Don Zickus <dzickus@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-02 14:22:49 +09:00
Don Zickus
b32c4997c0 staging: unisys: Move channel creation up the stack
Instead of creating a channel struct to temporarily hold the channel
info and passing it through multiple functions until the device is
created, just create the channel from the start.

This allows us to remove the channel_info struct.

I noticed 'chan_info.addr_type' was not being used, so I just deleted it.

Signed-off-by: Don Zickus <dzickus@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-02 14:22:49 +09:00
Greg Kroah-Hartman
63d03e4773 staging: wilc1000: remove WILC_Uint8
Just use u8, as that's what you really want in a kernel driver.

Cc: Johnny Kim <johnny.kim@atmel.com>
Cc: Rachel Kim <rachel.kim@atmel.com>
Cc: Dean Lee <dean.lee@atmel.com>
Cc: Chris Park <chris.park@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-02 14:17:47 +09:00
Greg Kroah-Hartman
b1413b6084 staging: wilc100: remove WILC_NULL usage
Use the "real" NULL value, don't try to be cute and define your own
value for something that the compiler obviously supports.

Cc: Johnny Kim <johnny.kim@atmel.com>
Cc: Rachel Kim <rachel.kim@atmel.com>
Cc: Dean Lee <dean.lee@atmel.com>
Cc: Chris Park <chris.park@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-02 14:17:47 +09:00
Greg Kroah-Hartman
8e1d4e5cf2 staging: wilc1000: remove unused data types
There's some "custom" data types defined that are never used in the
driver, so remove them before we work on converting the rest to be
"standard" data types.

Cc: Johnny Kim <johnny.kim@atmel.com>
Cc: Rachel Kim <rachel.kim@atmel.com>
Cc: Dean Lee <dean.lee@atmel.com>
Cc: Chris Park <chris.park@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-02 14:17:47 +09:00
Arnd Bergmann
0b85618f3a staging: wilc1000: update TODO list
I have crossed off one item on the list, but found a few others that should
not get lost, so here is an update of the wilc1000 list

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-02 13:55:40 +09:00
Arnd Bergmann
7a8fd84175 staging: wilc1000: fix compiler warnings
This avoids the remaining warnings that one gets on a normal
build: unused variables, unused labels, and invalid printk
format strings.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-02 13:46:05 +09:00
Arnd Bergmann
057d1e9793 staging: wilc1000: fix const cast warnings
The wilc1000 driver produces a lot of warnings about invalid
casts between const and non-const variables. This reworks
the code to avoid all those warnings, by marking variables
and function arguments const.

A lot of the types use WILC_Uint8, I change them to const u8
for style reasons, as I'm touching them anyway.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-02 13:46:05 +09:00
Arnd Bergmann
83383ea33c staging: wilc1000: remove semaphore wrapper
The various semaphore functions all directly translate into
sema_init(), down() and up(), so we can just remove the API.

This is a mostly automated conversion using simple sed scripts,
plus some manual changes to account for down() returning no
error.

As a positive side-effect, down() no longer hangs after
receiving a signal, as the original code did by looping around
down_interruptible.

The semaphores still need to be turned into mutexes as a
follow-up step.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-02 13:46:05 +09:00
Arnd Bergmann
e14af67d8f staging: wilc1000: remove EXPORT_SYMTAB
The EXPORT_SYMTAB symbol has not been used in Linux for a very
long time, the driver does not need to set it.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-02 13:46:05 +09:00
Arnd Bergmann
d074f29390 staging: wilc1000: remove unused OS abstraction features
All the remaining features from the OS abstraction layer
are not used at all in the driver, so we can just remove
the remaining references to them.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-02 13:46:05 +09:00
Arnd Bergmann
042f19c935 staging: wilc1000: clean up timer feature
The driver has a simple wrapper around timer_list, and an
optional but unused feature to make the timer periodic.

This removes support for the periodic timer and simplifies
the code around timers.

A follow-up should replace the remaining wrapper with
open-coded timers.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-02 13:45:22 +09:00
Arnd Bergmann
b96ff76a07 staging: wilc1000: clean up sleep wrapper
The driver has a simple wrapper around msleep, as well as
a more advanced sleep function that is unused. This removes
the unused code and the options to turn the feature on or
off.

A follow-up should rework the code to use msleep directly.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-02 13:45:22 +09:00
Arnd Bergmann
5f928b9567 staging: wilc1000: simplify semaphore wrapper
The driver has its own API for semaphores. This should
be replaced with mutexes and completions, but for the moment
we can start by removing the obviously unused parts.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-02 13:45:22 +09:00
Arnd Bergmann
71b13e5990 staging: wilc1000: remove unused memory handling code
The driver contains its own abstraction for memory allocation,
most of it unused. This removes the unused parts, but the
rest should also be removed later.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-02 13:45:21 +09:00
Arnd Bergmann
2ed3dc1d3c staging: wilc1000: simplify msgqueue code
The driver contains an abstraction for message queues, with
optional unused features, while the driver requires the main
feature.

This makes the msgqueue code unconditional as it's required
but removes the unused parts.

A later cleanup should remove the entire msgqueue code
and replace it with some normal kernel API.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-02 13:45:21 +09:00
Arnd Bergmann
4ec5d4a4f6 staging: wilc1000: remove unused string functions
The driver provides wrappers for a lot of string operations.
Some of them are unused, while others should be replaced
with normal kernel functions.

This replaces the unused ones for now, and leaves the other
ones for a later cleanup.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-02 13:45:21 +09:00
Arnd Bergmann
f155bcf8de staging: wilc1000: remove time wrapper
The abstraction for time in this driver is completely
unused, so remove it.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-02 13:45:21 +09:00
Lars-Peter Clausen
225d59adf1 iio: Specify supported modes for buffers
For each buffer type specify the supported device modes for this buffer.
This allows us for devices which support multiple different operating modes
to pick the correct operating mode based on the modes supported by the
attached buffers.

It also prevents that buffers with conflicting modes are attached
to a device at the same time or that a buffer with a non-supported mode is
attached to a device (e.g. in-kernel callback buffer to a device only
supporting hardware mode).

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-06-01 11:31:12 +01:00
Vladimirs Ambrosovs
4dcaa5f754 staging: iio_simple_dummy: fix module_param type
Fix the module_param "instances" type to uint, since the variable type
holding the value is unsigned.

Signed-off-by: Vladimirs Ambrosovs <rodriguez.twister@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-06-01 11:22:22 +01:00
Vladimirs Ambrosovs
62a90da69d staging: iio_simple_dummy: fix return types
The functions iio_dummy_remove(), iio_simple_dummy_events_unregister() and
iio_dummy_evgen_release_irq() were changed to return void instead of int.

Signed-off-by: Vladimirs Ambrosovs <rodriguez.twister@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-06-01 11:21:46 +01:00
Vladimirs Ambrosovs
b3f6af36e5 staging: iio_simple_dummy: fix init function
This patch fixes the init function for the iio_simple_dummy driver.
The main issues were absence of kfree for the allocated array, and no
devices being removed in case the probe function fails, running in a loop.

Signed-off-by: Vladimirs Ambrosovs <rodriguez.twister@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-06-01 11:20:19 +01:00
Hannes Reinecke
b84b1d522f scsi: Do not set cmd_per_lun to 1 in the host template
'0' is now used as the default cmd_per_lun value,
so there's no need to explicitly set it to '1' in the
host template.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
2015-05-31 18:06:28 -07:00
David S. Miller
d803731462 As we get closer to the merge window, here are a few
more things for -next:
  * disconnect TDLS stations on CSA to avoid issues
  * fix a memory leak introduced in a recent commit
  * switch rfkill and cfg80211 to PM ops
  * in an unlikely scenario, prevent a bookkeeping
    value to get corrupted leading to dropped packets
  * fix a crash in VLAN assignment
  * switch rfkill-gpio to more modern gpiod API
  * send disconnected event to userspace with proper
    local/remote indication
 -----BEGIN PGP SIGNATURE-----
 
 iQIcBAABCAAGBQJVaEyAAAoJEDBSmw7B7bqrPiIQAKOrX4g2UNtyoTWJzA7YRu+g
 GEUu/CE4LQKCodCpBiEhFlhQo2WzXsHoLj5+Nr56aFAZx19VZjXWVC5JS785wYn5
 r8hpOVWUUA3MVnXeL/+yz4chm0wTYN9pSpElZ4FHlUI0OkCMh2rPCTvdrbSKoGzV
 MN8NEO0jVE89AgOMF8gHk5YKpJ6B4QibZuUuZpgkqdwIi5udaCcrPFFrUg/NfRpA
 nTauP6blFUPOUV0sxbhS78uC3rqGQuYsnvab/QeGc9PDKk5ukrXzFdgRCVZq8224
 Ge0JcPzwzWldk892oEJoc2OfGkg5HOil9HtC+S2ehBGuK0yEXOBIkO1ZgudTH1kC
 0rLOPWVKRzTWE+sq+gWK/OjfaA7Dl6HFYYHRQ2dhm1XkqtAw8SwGQMDSIPJYWr4O
 jp4gYpwKVjnMmsEAg7FdKWyIiTgLyI07VnIciORXDyefddYMuofXI2pJkfzUeFeH
 HjCVYm2NYXDty6uneP4RC1nUbNc53FKJ5O9fW3BPMyVXD4pTjam50p9H6N7OcDN3
 k3dEevWiVgvBjZPVc3HI8RaCzS/Ww1ym+MYgV97QkMfgiuE2VkiFwK+zhWn9axbc
 eutkzFEdDcIACCZ74hIWqMJjsMnZm9E11Uq7tifAE0bi1Wpku1xPAnxMPnI+0eiF
 Dgo2bmlQ/d1dHr3N3FC0
 =KmwY
 -----END PGP SIGNATURE-----

Merge tag 'mac80211-next-for-davem-2015-05-29' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next

Johannes Berg says:

====================
As we get closer to the merge window, here are a few
more things for -next:
 * disconnect TDLS stations on CSA to avoid issues
 * fix a memory leak introduced in a recent commit
 * switch rfkill and cfg80211 to PM ops
 * in an unlikely scenario, prevent a bookkeeping
   value to get corrupted leading to dropped packets
 * fix a crash in VLAN assignment
 * switch rfkill-gpio to more modern gpiod API
 * send disconnected event to userspace with proper
   local/remote indication
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
2015-05-31 17:34:26 -07:00
Oleg Drokin
1185aaf55c staging/lustre/ldlm: Fix up LDLM_POOL_SYSFS_WRITER*_STORE define
The store method defined by LDLM_POOL_SYSFS_WRITER_STORE and
LDLM_POOL_SYSFS_WRITER_NOLOCK_STORE defines should
use size_t count, not unsigned long.

This produced a warning on i386 (and other 32bit architectures too,
I guess) where unsigned long is not 32 bit.

Reported by kbuild test bot.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-01 07:18:14 +09:00
Drew Fustini
f6758e7961 staging: unisys: visorbus: add static declarations
Add static declarations to statisfy sparse warnings in:
  drivers/staging/unisys/visorbus/visorbus_main.c

  warning: symbol 'visorbus_debug' was not declared
  warning: symbol 'visorbus_forcematch' was not declared
  warning: symbol 'visorbus_forcenomatch' was not declared
  warning: symbol 'visorbus_devicetest' was not declared
  warning: symbol 'visorbus_debugref' was not declared
  warning: symbol 'visorbus_bus_groups' was not declared
  warning: symbol 'devmajorminor_create_file' was not declared
  warning: symbol 'devmajorminor_remove_file' was not declared
  warning: symbol 'devmajorminor_remove_all_files' was not declared
  warning: symbol 'unregister_devmajorminor_attributes' was not declared

Signed-off-by: Drew Fustini <pdp7pdp7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-01 07:18:14 +09:00
Sudip Mukherjee
9be83c0a44 staging: panel: use new parport device model
Converted to use the new device-model parallel port.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-01 07:08:19 +09:00
Mateusz Kulikowski
512e903123 staging: rtl8192e: Fix SPACING error
Fix SPACING error in rtl8192_hw_to_sleep().

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-01 06:33:23 +09:00
Mateusz Kulikowski
f0e5bb2b29 staging: rtl8192e: rtl8192E_suspend(): Fix WOL reporting
WOL capability was reported in an awkward way - print it nicely.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-01 06:33:23 +09:00
Mateusz Kulikowski
d9c1fff59a staging: rtl8192e: Fix trivial LONG_LINE errors
Reindent lines to make checkpatch happy.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-01 06:33:23 +09:00
Mateusz Kulikowski
3b4140afd9 staging: rtl8192e: Replace RT_TRACE(COMP_ERR, ...) with netdev_*
- Use netdev_* with log level depending on how serious error is
- Rework some messages to be more readable
- Pass net_device where needed for pretty prints

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-01 06:33:23 +09:00
Mateusz Kulikowski
156b80db36 staging: rtl8192e: rtl8192_phy_checkBBAndRF(): Don't check MAC
This function never supported checking of MAC block.
Instead of printing several warnings - print it once and exit.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-01 06:33:22 +09:00
Mateusz Kulikowski
fe1bbfc9b8 staging: rtl8192e: Remove unneeded RT_TRACE(COMP_ERR,...)
This messages are not needed, as failure is reported earlier in code.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-01 06:33:22 +09:00
Mateusz Kulikowski
622fd4942d staging: rtl8192e: Replace ?: with max
All get_key implementations return either -1 or small buffers, so
cast int->u16 is not a problem.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-01 06:33:22 +09:00
Mateusz Kulikowski
a5c06ad83b staging: rtl8192e: Replace ?: with min_t
Replace :? with min_t for readability. Remove check that is always false.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-01 06:33:22 +09:00
Mateusz Kulikowski
a94aa9adb6 staging: rtl8192e: Replace ?: with max_t
Improve readability and make checkpatch happy.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-01 06:33:22 +09:00
Mateusz Kulikowski
2b2215af34 staging: rtl8192e: Remove unused rtl_crypto.h
This header is not used - remove it to make driver code smaller.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-01 06:33:22 +09:00
Mateusz Kulikowski
7c3d257916 staging: rtl8192e: Fix OOM_MESSAGE warnings
Remove alloc failed messages where not needed to make checkpatch.pl happy.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-01 06:33:22 +09:00
Mateusz Kulikowski
0beee3ba61 staging: rtl8192e: Remove unimplemented iwpriv handlers
Remove the following private variables:
- force_mic_error - changes force_mic_error that is not used
- radio - changes sw_radio_on that is not used
- adhoc_peer_list - unimplemented
- firm_ver - unimplemented

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-01 06:33:22 +09:00
Mateusz Kulikowski
310852327a staging: rtl8192e: Fix LONG_LING in rtllib_parse_info_param()
Take out MIFE_TYPE_HT_CAP processing into separate function -
rtllib_parse_mfie_ht_cap()

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-01 06:33:22 +09:00
Mateusz Kulikowski
35e33b0468 staging: rtl8192e: Fix LONG_LINE warnings
Fix most of simple LONG_LINE warnings. None of the changes should affect
behaviour of code, so several modifications are included in this patch:
- Code is reindented where needed
- Local variable names are compacted (priv -> p)
- Unnecessary casts are removed
- Nested ifs are replaced with logical and
- a = b = c = d expressions are split
- Replace if/then series with clamp_t()
- Removed unneeded scopes

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-01 06:33:21 +09:00
Mateusz Kulikowski
7bdfaa0abf staging: rtl8192e: Fix PREFER_PR_LEVEL warnings
Fix most of remaining PREFER_PR_LEVEL warnings in rtllib.
Replace printk() with netdev_* if possible, pr_* in other cases.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-01 06:33:21 +09:00
Mateusz Kulikowski
ca93dcba3a staging: rtl8192e: Remove assert() macro
Assert macro printed warning message (and was used once).
Remove it, and add netdev_warn() in place where it was called.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-01 06:33:21 +09:00
Mateusz Kulikowski
db65e4aaf5 staging: rtl8192e: Remove remains of RTLLIB_*_DEBUG() (including proc entry)
Remove rest of rtllib "debug" system - it is no longer used -
proper netdev_* functions are used in most cases.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-01 06:33:21 +09:00
Mateusz Kulikowski
7232141526 staging: rtl8192e: Remove RTLLIB_DEBUG_DATA()
Use print_hex_dump_bytes() if VERBOSE_DEBUG is enabled.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-01 06:32:02 +09:00
Mateusz Kulikowski
b94436b5d5 staging: rtl8192e: Remove RTLLIB_DEBUG()
- Use netdev_dbg or netdev_vdbg instead of RTLLIB_DEBUG()
- Reformat some messages for better readability
- Remove RTLLIB_DEBUG messages that make no sense

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-01 06:32:02 +09:00
Mateusz Kulikowski
def16d2ee9 staging: rtl8192e: Remove RTLLIB_DEBUG_INFO()
Use pr_debug() instead.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-01 06:32:01 +09:00
Mateusz Kulikowski
e9fea2ecb0 staging: rtl8192e: Remove RTLLIB_DEBUG_MGMT()
- Use netdev_dbg() instead of RTLLIB_DEBUG_MGMT()
- Remove RTLLIB_DEBUG_MGMT()
- Pass net_device to auth_parse(), auth_rq_parse() and assoc_rq_parse()
- Remove duplicated messages

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-01 06:32:01 +09:00
Mateusz Kulikowski
8f90dfbf64 staging: rtl8192e: Remove RTLLIB_DEBUG_QOS()
- Pass extra argument (rtllib_device) to rtllib_parse_qos_info_param_IE()
  and update_network()
- Replace RTLLIB_DEBUG_QOS() with netdev_dbg()
- Remove RTLLIB_DEBUG_QOS()

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-01 06:32:01 +09:00
Mateusz Kulikowski
e77c752f39 staging: rtl8192e: Remove RTLLIB_DEBUG_(FRAG|EAP|DROP|STATE|TX|RX)()
Use netdev_dbg() instead.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-01 06:32:00 +09:00
Mateusz Kulikowski
521a9cbdb2 staging: rtl8192e: Remove RTLLIB_DEBUG_SCAN()
Use netdev_dbg() instead, remove duplicated logs.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-01 06:32:00 +09:00
Mateusz Kulikowski
ad5c8e0586 staging: rtl8192e: Simplify rtllib_process_probe_response()
- Extract frame_ctl once and use it as variable.
- Drop endian conversion in is_beacon() function
  (used in simplified function only)
- Simplify debug messages
- Invert STYPE checks in debug messages - it is valid
  as only BEACON and PROBE_RESP are allowed

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-01 06:32:00 +09:00
Mateusz Kulikowski
c6a91aba25 staging: rtl8192e: Remove RTLLIB_DEBUG_WX()
Use netdev_dbg() instead of RTLLIB_DEBUG_WX().
Rewrite some messages to be more readable.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-01 06:32:00 +09:00
Mateusz Kulikowski
f0dddb1d02 staging: rtl8192e: Remove RTLLIB_ERROR() and RTLLIB_WARNING()
Use pr_* where needed (rtllib init code).

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-01 06:32:00 +09:00
Mateusz Kulikowski
11e672c3e2 staging: rtl8192e: Replace RTLLIB_DEBUG(DL_ERR) with netdev_*()
Replace all RTLLIB_DEBUG(RTLLIB_DL_ERR, *) calls with netdev_err()
for errors that really should be reported to user.
Use netdev_warn() for the rest.
Rephrase some of the messages to make them more readable/compact.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-01 06:32:00 +09:00
Mateusz Kulikowski
1af35de29f staging: rtl8192e: Remove rtllib_crypt.[ch]
It is neither compiled nor used in rtl8192e.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-01 06:32:00 +09:00
Mateusz Kulikowski
c2f8b4ab8c staging: rtl8192e: Replace memcmp() with ether_addr_equal()
Use dedicated macro to compare ethernet addresses in probe_rq_parse().

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-01 06:31:59 +09:00
Mateusz Kulikowski
80d2579d86 staging: rtl8192e: Fix DEEP_INDENTATION warning in rtllib_parse_info_param()
Move MFIE_TYPE_GENERIC handler to rtllib_parse_mife_generic() function.
Code was not altered significantly, therefore in some places it generates
LONG_LINE checkpatch.pl warnings.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-01 06:31:59 +09:00
Mateusz Kulikowski
b57ceb19ab staging: rtl8192e: Fix PREFER_ETHER_ADDR_COPY warnings
Replace memcpy() with ether_addr_copy() where possible to make
checkpatch.pl happy.
Change was target tested (download 1Mb file over WPA2 network)
with BUG trap for unaligned addresses in ether_addr_copy()

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-01 06:31:59 +09:00
Mateusz Kulikowski
06c1110728 staging: rtl8192e: Make ethernet addresses properly aligned
Reorder ethernet addresses allocated on stack or in non-packed
structures to keep them aligned(2).
Use ETH_ALEN as array length in places where it was hardcoded to 6.

Alignment verified using pahole where possible and target-tested
with BUG_ON() trap in ether_addr_copy.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-01 06:31:59 +09:00
Mateusz Kulikowski
c7ddc288eb staging: rtl8192e: accept const MAC address
Make set_swcam, setKey and rtllib_probe_resp parameter (MAC address)
const.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-01 06:31:59 +09:00
Heiner Kallweit
9cd491e8c3 staging: fbtft: Add support for Himax HX8357D controller
The Himax HX8357D is used e.g. by the Adafruit PITFT Plus 3.5".
Adafruit added HX8357D support to an own fork of fbtft and support
Raspbian only (https://github.com/adafruit/adafruit-rpi-fbtft/).
They don't intend to push it upstream but gave me the ok to do so.
Original author: Sean Cross <xobs@kosagi.com>

I just applied small changes to the driver to align it with the other
fbtft drivers.
- add "compatible" argument to FBTFT_REGISTER_DRIVER call
- add missing MODULE_ALIAS declarations

Tested successfully with this display on an RPI2 under Arch Linux ARM
(kernel 3.18.13).

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-01 06:26:30 +09:00
Jakub Sitnicki
5df5910b13 staging: rtl8188eu: Kill dead calls to kill_pid()
There is no interface to register PIDs of processes the driver should
send a signal to.  Remove it.

Signed-off-by: Jakub Sitnicki <jsitnicki@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-01 06:25:51 +09:00
Malcolm Priestley
b5eeed8cb6 staging: vt6655: device_rx_srv check sk_buff is NULL
There is a small chance that pRD->pRDInfo->skb could go NULL
while the interrupt is processing.

Put NULL check on loop to break out.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-01 06:24:58 +09:00
Malcolm Priestley
41b9e5e516 staging: vt6655: replace and resize dwIsr
dwIsr is not used outside vnt_interrupt_process and should
be u32.

Move to function and resize to u32.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-01 06:24:57 +09:00