1
0
Fork 0
Commit Graph

23197 Commits (9e06f631ecef84a949a89765e0787c61d63c3f56)

Author SHA1 Message Date
Mark Hounschell 928d70bb1e staging: dgap: Remove unneeded code from dgap.c
This patch removes more unneeded code that was
supporting the old firmware loading process

Signed-off-by: Mark Hounschell <markh@compro.net>
Tested-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 14:33:34 -07:00
Mark Hounschell abbdd11ac3 staging: dgap: remove some unused defines in dgap.h
This patch removes some unused defines in dgap.h

Signed-off-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 14:33:34 -07:00
Mark Hounschell 93fb1e256a staging: dgap: fix a few more 80+ char lines (02/02)
This patch fixes a few more 80+ char lines as reported by checkpatch

Signed-off-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 14:32:03 -07:00
Mark Hounschell 84e88287d8 staging: dgap: fix a few more 80+ char lines (01/02)
This patch fixes a few more 80+ char lines as reported by checkpatch

Signed-off-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 14:32:03 -07:00
Mark Hounschell 70d97a616f staging: dgap: fix a few 80+ char lines
This patch fixes a few 80+ char lines
as reported by checkpatch

Signed-off-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 14:31:47 -07:00
Malcolm Priestley 6ae4663342 staging: vt6656: [BUG] set usb_fill_int_urb interval to 1
As result of patch
staging: vt6656: [BUG] Fix Warning BOGUS urb xfer, pipe 3 != type 1

has resulted in sluggish TX performance due to interupt inverval
being too long.

Set int_interval to 1 as set in bInterval of endpoint 1.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 14:29:50 -07:00
Gary Rookard d4b54fb74f Staging: lustre: fld: fix split strings.
unsplit strings from two lines to one. Changes resulted
in line over 80 characters warning. Leaving the latter
of the two warnings for possible string grepping reasons.

Signed-off-by: Gary Alan Rookard <garyrookard@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 14:24:35 -07:00
Gary Rookard 238bbffb99 Staging: lustre: fld: fix spacing issue.
fixed up a spacing issue.

Signed-off-by: Gary Alan Rookard <garyrookard@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 14:24:35 -07:00
Gary Rookard fdb59a46c6 Staging: lustre: fld: fix split string.
unsplit string from two lines to one.

Signed-off-by: Gary Alan Rookard <garyrookard@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 14:24:35 -07:00
Gary Rookard 5cbcd111f0 Staging: lustre: fid: fix split strings.
unsplit strings from two lines to one.

Signed-off-by: Gary Alan Rookard <garyrookard@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 14:24:35 -07:00
Daeseok Youn 5ddd113297 staging: cxt1e1: remove redundant memset() call
The banner array doens't need to set to 0.
sprintf() adds a terminating '\0'.

And the sn array can be declared and initialized to zero.
So remove redundant memset() with zero.

Remove unnecessary cast for memcpy().

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 14:22:47 -07:00
Daeseok Youn 14eec44430 staging: cxt1e1: remove redundant memset() call
The name array doens't need to set to 0. Because
sprintf/snprintf adds a terminating '\0'.

And also it doesn't need to assign name array
address to np pointer.

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 14:22:47 -07:00
Monam Agarwal b0a0fb1e29 Staging: slicoss: Replace macro with inline defination in slicoss.c
This patch moves the macro "SLIC_GET_SLIC_HANDLE(_adapter, _pslic_handle)" to inline
in slicoss.c since it has been used only once.

Signed-off-by: Monam Agarwal <monamagarwal123@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 14:21:25 -07:00
H Hartley Sweeten 79e5e6addb staging: comedi: das6402: rewrite broken driver
This driver is _really_ broken.

It initializes an analog input subdevice that only has a (*cancel)
function. It also does a request_irq() to hookup an interrupt handler
using it->options[0] as the IRQ. This option is actually the base
address of the I/O region used by the board. If the interrupt handler
actually did get hooked up, the rest of the code assumes that IRQ 10
is being used.

Rewrite the driver to properly support the hardware.

The DAS6402-12/16 boards have 64 single-ended / 32 differential analog
inputs, 2 analog outputs, 8 digital inputs, and 8 digital outputs. Add
proper support for these subdevices.

Stub in the analog input async command support.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 14:20:10 -07:00
H Hartley Sweeten 2925cc8637 staging: comedi: rti802: update the MODULE_DESCRIPTION
Change the generic MODULE_DESCRIPTION text to something more
specific for this driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 14:20:10 -07:00
H Hartley Sweeten 8f3367af3d staging: comedi: rti802: tidy up the multi-line comments
Tidy up the milti-line comments so they follow the CodingStyle.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 14:20:10 -07:00
H Hartley Sweeten 6938dd289d staging: comedi: rti802: tidy up the register map defines
For aesthetics, add some whitespace to the register map defines and
convert the offsets to hex.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 14:20:09 -07:00
H Hartley Sweeten 052c198b6e staging: comedi: rti802: tidy up the subdevice init
For aesthetics, add some whitespace to the subdevice init.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 14:20:09 -07:00
H Hartley Sweeten 57450d9036 staging: comedi: rti802: tidy up rti802_ao_insn_write()
Use comedi_offset_munge() to handle munging the offset binary to two's
complement.

Tidy up the function a bit.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 14:20:09 -07:00
H Hartley Sweeten c0c6ae260a staging: comedi: rti802: tidy up rti802_ao_insn_read()
To clarify the function a bit, add a local variable for the 'chan'
that is being read and change the final return to 'insn->n'.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 14:20:09 -07:00
H Hartley Sweeten df8f09bb44 staging: comedi: rti802: remove RTI802_SIZE define
This define is only used in the attach to specify the I/O region size
passed to comedi_request_region(). Remove the define and just open
code the value.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 14:20:09 -07:00
H Hartley Sweeten f0571cb440 staging: comedi: gsc_hpdi: tidy up multi-line comment
Tidy up the comment to follow the CodingStyle.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 14:19:51 -07:00
H Hartley Sweeten 63810f3b55 staging: comedi: gsc_hpdi: remove pr_fmt() define
This driver no longer has any pr_{level} messages. Remove the pr_fmt().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 14:19:51 -07:00
H Hartley Sweeten 47266aaf35 staging: comedi: gsc_hpdi: convert comedi_error() messages to dev_err()
For aesthetics, convert the comedi_error() messages to dev_err().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 14:19:51 -07:00
H Hartley Sweeten d67107fe91 staging: comedi: gsc_hpdi: tidy up the boardinfo
Remove the unnecessary comments in the boardinfo definition and
tidy up the declaration.

FWIW, I'm not sure this boardinfo is really needed...

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 14:19:51 -07:00
H Hartley Sweeten fce0ff523a staging: comedi: gsc_hpdi: tidy up the register map
For aesthetics, convert the various enums into simple defines to
describe the register map for the board. Group the bit defines with
the associated register define. Convert the helper functions for
the register bit/shift/mask stuff into simple defines.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 14:19:51 -07:00
H Hartley Sweeten 4cbbacb285 staging: comedi: gsc_hpdi: rename 'hpdi_iobase' in private data
This member in the private data holds the ioremaped PCI BAR2 address
which is the primary base address for the boards registers.

For aesthetics, rename this member simply 'mmio'.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 14:19:51 -07:00
H Hartley Sweeten 139740370c staging: comedi: gsc_hpdi: rename 'plx9080_iobase' in private data
Rename this member to fix two checkpatch.pl warnings about lines > 80
characters.

Also remove the unnecessary comment.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 14:19:51 -07:00
H Hartley Sweeten d213563198 staging: comedi: gsc_hpdi: tidy up gsc_hpdi_drain_dma()
Refactor this function to clarify the loop that reads all the full
buffers.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 14:19:51 -07:00
H Hartley Sweeten 2a5a3d0c8f staging: comedi: gsc_hpdi: remove 'volatile' from the private data members
As reported by checkpatch.pl, the private data members do not need
the volatile tag. Remove them.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 14:19:50 -07:00
H Hartley Sweeten ab5cf49317 staging: comedi: gsc_hpdi: remove hpdi_writel()
This helper function is used to OR bits with a software copy of a
register value then writel() the new value to the register. The
software copies are never updated in the driver so they are always
0 due to the kzalloc.

Remove the unnecessary 'bits' from the private data and replace
the hpdi_writel() calls with writel().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 14:19:50 -07:00
H Hartley Sweeten 42ea78126c staging: comedi: gsc_hpdi: remove disable_plx_interrupts()
This helper function is just a simple writel(). Remove it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 14:19:50 -07:00
H Hartley Sweeten 63da0d087c staging: comedi: gsc_hpdi: rename init_hpdi()
For aesthetics, rename this function so it has namespace associated
with the driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 14:19:50 -07:00
H Hartley Sweeten 201a81437c staging: comedi: gsc_hpdi: rename init_plx9080()
For aesthetics, rename this function so it has namespace associated
with the driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 14:19:50 -07:00
H Hartley Sweeten 6a23558b34 staging: comedi: gsc_hpdi: rename hpdi_find_board()
For aesthetics, rename this function so it has namespace associated
with the driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 14:19:50 -07:00
H Hartley Sweeten 1335cee5d2 staging: comedi: gsc_hpdi: rename the (*auto_attach) and (*detach) functions
For aesthetics, rename these functions so they have namespace associated
with the driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 14:19:49 -07:00
H Hartley Sweeten 9fe635cd86 staging: comedi: gsc_hpdi: rename drain_dma_buffers()
For aesthetics, rename this function so it has namespace associated
with the driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 14:19:49 -07:00
H Hartley Sweeten 3521d454d2 staging: comedi: gsc_hpdi: rename handle_interrupt()
For aesthetics, rename this function so it has namespace associated
with the driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 14:19:49 -07:00
H Hartley Sweeten 9cbf669737 staging: comedi: gsc_hpdi: rename abort_dma()
For aesthetics, rename this function so it has namespace associated
with the driver.

Also, remove the unnecessary forward declaration.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 14:19:49 -07:00
H Hartley Sweeten 3547473931 staging: comedi: gsc_hpdi: rename hpdi_cancel()
For aesthetics, rename this function so it has namespace associated
with the driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 14:19:49 -07:00
H Hartley Sweeten 6b0cca01ac staging: comedi: gsc_hpdi: tidy up hpdi_cmd_test()
For aesthetics, rename this function so it has namespace associated
with the driver and move it so that it is not in the middle of the
interrupt support code.

Absorb the di_cmd_test() helper and tidy up the function a bit.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 14:19:49 -07:00
H Hartley Sweeten 627e52f741 staging: comedi: gsc_hpdi: tidy up hpdi_cmd()
For aesthetics, rename this function so it has namespace associated
with the driver and move it so that it is not in the middle of the
interrupt support code.

Absorb the di_cmd() helper and tidy up the function a bit.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 14:19:49 -07:00
H Hartley Sweeten 66951e0588 staging: comedi: gsc_hpdi: tidy up setup_dma_descriptors()
For aesthetics, rename this function so it has namespace associated
with the driver and move it so that it is not in the middle of the
async command support code.

Tidy up the function a bit.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 14:19:48 -07:00
H Hartley Sweeten b0360a989d staging: comedi: gsc_hpdi: tidy up dio_config_insn()
For aesthetics, rename this function so it has namespace associated
with the driver and move it so that it is not in the middle of the
async command support code.

Absorb the dio_config_block_size() helper function and remove the
forward declaration.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 14:19:48 -07:00
H Hartley Sweeten d987d372eb staging: comedi: gsc_hpdi: move the (*auto_attach) helper functions
For aesthetics, move a couple helper functions that are only called
by the (*auto_attach) closer to that function.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 14:19:48 -07:00
H Hartley Sweeten 7de0b0dfac staging: comedi: gsc_hpdi: absorb setup_subdevices()
This function is only called by the (*auto_attach). Absorb it into that
function to clarify the attach and remove the need for some of the forward
declarations.

For aesthetics, add some whitespace to the subdevice init.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 14:19:48 -07:00
H Hartley Sweeten 4ddc6ba41d staging: comedi: gsc_hpdi: move the (*auto_attach) and (*detach) functions
Move these functions closer to the comedi_driver declaration. This removes
the need for one of the forward declarations.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 14:19:48 -07:00
H Hartley Sweeten 884c015f3a staging: comedi: fl512: tidy up the multi-line comments
Tidy up the multi-line comments to follow the CodingStyle.

Add the GPL boilerplate comment found in other comedi drivers.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 14:16:16 -07:00
H Hartley Sweeten 6632d65e34 staging: comedi: fl512: tidy up fl512_ao_insn_read()
Tidy up this function.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 14:16:16 -07:00
H Hartley Sweeten 3ecbbb56cb staging: comedi: fl512: tidy up fl512_ao_insn_write()
Tidy up this function. Only save the last value written for readback.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 14:16:16 -07:00
H Hartley Sweeten 96653ed60e staging: comedi: fl512: define the register map
Define the register map and remove the magic values and some unnecessary
comments.

For aesthetics, remove the 'iobase' local variable and use dev->iobase
directly.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 14:16:15 -07:00
H Hartley Sweeten 18c4110eb4 staging: comedi: fl512: tidy up fl512_ao_insn_read()
For aesthetics, tidy up this function to match the style used in most
of the comedi drivers for analog output (*insn_read) functions.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 14:16:15 -07:00
H Hartley Sweeten 8f28c9d978 staging: comedi: fl512: remove Fl512_SIZE define
This define is only used in the comedi_request_region() call to specify
the size of the I/O region to request. Remove the define and just open
code the value.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 14:16:15 -07:00
H Hartley Sweeten 6a083a685c staging: comedi: fl512: rename the subdevice (*insn_{read, write}) functions
For aesthetics, rename these functions and remove the unnecessary comments.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 14:16:15 -07:00
H Hartley Sweeten 638622a265 staging: comedi: fl512: tidy up subdevice init
Remove the obvious comments and add some whitespace to the subdevice
init.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 14:16:15 -07:00
Ian Abbott 268d1e7996 staging: comedi: 8255_pci: initialize MITE data window
According to National Instruments' PCI-DIO-96/PXI-6508/PCI-6503 User
Manual, the physical address in PCI BAR1 needs to be OR'ed with 0x80 and
written to register offset 0xC0 in the "MITE" registers (BAR0).  Do so
during initialization of the National Instruments boards handled by the
"8255_pci" driver.  The boards were previously handled by the
"ni_pcidio" driver, where the initialization was done by `mite_setup()`
in the "mite" module.  The "mite" module comes with too much extra
baggage for the "8255_pci" driver to deal with so use a local, simpler
initialization function.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Cc: <stable@vger.kernel.org> # 3.10.y, 3.11.y, 3.12.y, 3.13.y, 3.14.y
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 14:14:22 -07:00
H Hartley Sweeten 99999e2747 staging: comedi: dac02: introduce comedi driver for DAC02 boards
This board is currently supported by the poc driver. That driver used
to support a number of simple boards but now only provides support for
the DAC02 board.

Introduce a new comedi driver specifically for the DAC02 board. This
allows cleaning up all the cruft.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 14:12:56 -07:00
Matei Oprea a100032b5b Staging: comedi: ni_daq_dio24: fix a line over 80 characters
Fix a coding style issue.

Signed-off-by: Matei Oprea <eu@opreamatei.ro>
Cc: ROSEdu Kernel Commmunity <firefly@lists.rosedu.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 14:12:26 -07:00
H Hartley Sweeten 82604bfb70 staging: comedi: c6xdigio: update the MODULE_DESCRIPTION
Change the generic MODULE_DESCRIPTION text to something more
specific for this driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 14:04:01 -07:00
H Hartley Sweeten cc284a09b5 staging: comedi: c6xdigio: tidy up the multi-line comments
Reformat the multi-line comments at the beginning of the code to
follow the CodingStyle.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 14:04:01 -07:00
H Hartley Sweeten 8d9c93b448 staging: comedi: c6xdigio: add readback of last pwm channel values
Add and (*insn_read) for the PWM subdevice to allow reading back the
last value written to the channels.

There are only 2 PWM channels and they have a maxdata of 500. Pack
the last values in the subdevice 'state' instead of adding a private
data struct to this driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 14:04:00 -07:00
H Hartley Sweeten a7b31d3996 staging: comedi: c6xdigio: use comedi_offset_munge()
The value read from the encoders is in two's complement format. Use
the comedi_offset_munge() helper to convert the value to offset binary.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 14:04:00 -07:00
H Hartley Sweeten c034f1f677 staging: comedi: c6xdigio: consolidate the board_init()
For aesthetics, rename this function so it has namespace associated
with the driver.

Absorb the c6xdigio_pwm_init() and c6xdigio_encoder_reset() helpers.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 14:04:00 -07:00
H Hartley Sweeten 3ccdcf3255 staging: comedi: c6xdigio: tidy up subdevice 1 init
Remove the commented out init of the 'trig'.

For aesthetics, add some whitespace to the init and rename the 'insn_read'
function.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 14:04:00 -07:00
H Hartley Sweeten 6c8df38a95 staging: comedi: c6xdigio: tidy up subdevice 0 init
This subdevice is a PWM output not and analog output, fix the 'type'.

Fix the subdevice 'range', range_bipolar does not make sense for a PWM
output. The range_unknown is a better choice.

Remove the commented out init of the 'trig'.

For aesthetics, add some whitespace to the init and rename the 'insn_write'
function.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 14:04:00 -07:00
H Hartley Sweeten 28c2c50c72 staging: comedi: c6xdigio: define the data register bits
To clarify the code, define the bits in the data register and remove the
magic numbers.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 14:03:59 -07:00
H Hartley Sweeten 19d0a87284 staging: comedi: c6xdigio: tidy up c6xdigio_pwm_write()
The 10-bit pwm value (2-498) is written by banging 2-bits in the data register.

Refactor this function to remove the need for the union pcmcmdtype and struct
pwmbitstype.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 14:03:59 -07:00
H Hartley Sweeten bea8052074 staging: comedi: c6xdigio: introduce c6xdigio_get_encoder_bits()
The 24-bit encoder value is read using 3-bits in the status register. The
data register is banged between each read of the status register to advance
the bits.

Introduce a helper function to handle this and remove the union encvaluetype
and struct encbitsbyte.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 14:03:59 -07:00
H Hartley Sweeten 721869e855 staging: comedi: c6xdigio: define the register map
The register map was already defined but it was not being used. Rename
to defines and use them in the code.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 14:03:59 -07:00
H Hartley Sweeten 6d758307ee staging: comedi: c6xdigio: introduce c6xdigio_write_data()
All writes to the hardware involve writing the the data register then
checking the status register. Introduce a helper function to handle this.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 14:03:59 -07:00
H Hartley Sweeten bf336ebfdb staging: comedi: c6xdigio: change first param to c6xdigio_chk_status()
For aesthetics, pass the comedi_device pointer instead of the dev->iobase
as the first parameter.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 14:03:59 -07:00
H Hartley Sweeten 375a02810c staging: comedi: c6xdigio: tidy up C6X_encInput()
Rename the CamelCase function.

For aesthetics, pass the comedi_device pointer instead of the dev->iobase
as the first parameter.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 14:03:58 -07:00
H Hartley Sweeten c774049adb staging: comedi: c6xdigio: tidy up C6X_pwmOutput()
Rename the CamelCase function.

For aesthetics, pass the comedi_device pointer instead of the dev->iobase
as the first parameter.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 14:03:58 -07:00
H Hartley Sweeten b133c2bfad staging: comedi: c6xdigio: tidy up C6X_encResetAll()
Rename the CamelCase function.

For aesthetics, pass the comedi_device pointer instead of the dev->iobase.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 14:03:58 -07:00
H Hartley Sweeten 0aeb924b34 staging: comedi: c6xdigio: tidy up C6X_pwmInit()
Rename the CamelCase function.

For aesthetics, pass the comedi_device pointer instead of the dev->iobase.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 14:03:58 -07:00
H Hartley Sweeten 8a0b00771c staging: comedi: c6xdigio: factor out status check busywait
Factor out the common code that busywaits for the status to change.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 14:03:58 -07:00
H Hartley Sweeten 2ec577ce84 staging: comedi: c6xdigio: remove C6XDIGIO_SIZE
This define is only used in the comedi_request_region() call and does
not add any additional clarity to the code. Remove it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 14:03:58 -07:00
H Hartley Sweeten 5afa3c5450 staging: comedi: c6xdigio: remove WriteByteToHwPort()
This CamelCase function is just a wrapper around outb_p(). Remove it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 14:03:57 -07:00
H Hartley Sweeten f2aee30e83 staging: comedi: c6xdigio: remove ReadByteFromHwPort()
This CamelCase function is just a wrapper around inb(). Remove it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 14:03:57 -07:00
Fred Akers c5a20c4f5c Staging: Comedi: addi-data: Clean up function comments
These comments look terrible and are full of redundant information.
Also reformat the license at the head of the file to wrap at 80 char.

Signed-off-by: Fred Akers <knivey@botops.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 13:59:24 -07:00
Fred Akers 805077b90c Staging: comedi: addi-data: Fix long CamelCase function names
This patch fixes a few function names that are very long and are
not in the correct naming style

Signed-off-by: Fred Akers <knivey@botops.net>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 13:59:24 -07:00
Chase Southwood 3e418b7c5a Staging: comedi: addi-data: style cleanups in hwdrv_apci1564.c
This patch cleans up a few trivial style issues, including fixing crazy
indentation problems in the defines near the top of the file, removing a
couple of unneeded braces, and wrapping a couple of long comments onto new
lines to fix lines which were in excess of 80 characters.

Signed-off-by: Chase Southwood <chase.southwood@yahoo.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 13:57:34 -07:00
Chase Southwood a7aa94ce79 Staging: comedi: propagate timeout errors in s626.c
This patch for s626.c propagates the errors from the newly introduced
calls to comedi_timeout() as far as possible.

Signed-off-by: Chase Southwood <chase.southwood@yahoo.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 13:57:34 -07:00
Chase Southwood 59a32a4624 Staging: comedi: convert while loops to timeouts in s626.c
This patch changes a handful of while loops to timeouts to prevent
infinite looping on hardware failure. A couple such loops are in a
function (s626_debi_transfer()) which is called from critical sections,
so comedi_timeout() is unusable for them, and an iterative timeout is
used instead. For the while loops in a context where comedi_timeout() is
allowed, a new callback function, s626_send_dac_eoc(), has been defined
to evaluate the conditions that the while loops are testing.  The new
callback employs a switch statement based on a simple new enum so that
it is usable for all of the different conditions tested in while loops
in s626_send_dac().  The proper comedi_timeout() calls are then used.

Signed-off-by: Chase Southwood <chase.southwood@yahoo.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 13:57:34 -07:00
H Hartley Sweeten 52037a0d52 staging: comedi: drivers should not clear the async->events
The comedi core resets the async->events in comedi_buf_reset() which is
called when the subdevice is restored to an idle state and at the start
of an async command. The async->events are also cleared after handling
the events in comedi_event().

Drivers should not clear the events manually.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 13:55:57 -07:00
H Hartley Sweeten fb6aa25009 staging: comedi: quatech_daqp_cs: use cfc_handle_events()
Use the comedi_fc helper function to automatically call the subdevice
(*cancel) function when needed and call comedi_event().

Update the Kconfig so that COMEDI_QUATECH_DAQP_CS selects COMEDI_FC.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 13:55:57 -07:00
H Hartley Sweeten a4ccee260c staging: comedi: ni_pcidio: use cfc_handle_events()
Use the comedi_fc helper function instead of duplicating the code.

In the Kconfig, COMEDI_NI_PCIDIO selects COMEDI_FC indirectly by
selecting COMEDI_MITE which selects COMEDI_FC.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 13:55:57 -07:00
H Hartley Sweeten 3c5e6a62e3 staging: comedi: ni_labpc: use cfc_handle_events()
Use the comedi_fc helper function to automatically call the subdevice
(*cancel) function when needed and call comedi_event().

Also, remove the clearing of the events, comedi_event() does that.

In the Kconfig, COMEDI_NI_LABPC already selects COMEDI_FC.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 13:55:56 -07:00
H Hartley Sweeten d288151847 staging: comedi: dt3000: use cfc_handle_events()
Use the comedi_fc helper function to automatically call the subdevice
(*cancel) function when needed and call comedi_event().

Update the Kconfig so that COMEDI_DT3000 selects COMEDI_FC.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 13:55:56 -07:00
H Hartley Sweeten 199c3536dd staging: comedi: ni_660x: use cfc_handle_events()
Use the comedi_fc helper function instead of duplicating the code.

In the Kconfig, COMEDI_NI_660X selects COMEDI_FC indirectly by selecting
COMEDI_NI_TIOCMD which selects COMEDI_MITE which selects COMEDI_FC.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 13:55:56 -07:00
H Hartley Sweeten 2f1f7ea0c5 staging: comedi: pcl818: use cfc_handle_events()
Use the comedi_fc helper function to automatically call the subdevice
(*cancel) function when needed and call comedi_event().

Update the Kconfig so that COMEDI_PCL818 selects COMEDI_FC.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 13:55:56 -07:00
H Hartley Sweeten 61c3393f93 staging: comedi: pcl816: use cfc_handle_events()
Use the comedi_fc helper function to automatically call the subdevice
(*cancel) function when needed and call comedi_event().

Update the Kconfig so that COMEDI_PCL816 selects COMEDI_FC.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 13:55:56 -07:00
H Hartley Sweeten 8a8bd45441 staging: comedi: pcl812: use cfc_handle_events()
Use the comedi_fc helper function to automatically call the subdevice
(*cancel) function when needed and call comedi_event().

Update the Kconfig so that COMEDI_PCL812 selects COMEDI_FC.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 13:55:55 -07:00
H Hartley Sweeten 38255b623e staging: comedi: cb_pcidas: use cfc_handle_events()
Use the comedi_fc helper function to automatically call the subdevice
(*cancel) function when needed and call comedi_event().

Also, remove the clearing of the events, comedi_event() does that.

In the Kconfig, COMEDI_CB_PCIDAS already selects COMEDI_FC.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 13:55:55 -07:00
H Hartley Sweeten 94c0377d56 staging: comedi: amplc_pci224: use cfc_handle_events()
Use the comedi_fc helper function to automatically call the subdevice
(*cancel) function when needed and call comedi_event().

In the Kconfig, COMEDI_AMPLC_PCI224 already selects COMEDI_FC.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 13:55:55 -07:00
H Hartley Sweeten a21eacfeb5 staging: comedi: ni_mio_common: use cfc_handle_events()
The ni_event() function in this file is an open coded version of
cfc_handle_events() where instead of calling the subdevice (*cancel)
function a switch is used to call the function based on the subdevice
'index'.

Use the comedi_fc helper function to simplify the code.

This also allows removing a couple of the forward declarations.

Fix the #ifdef/#endif for the ni_gpct_cancel() foward declaration and
around the function. This function is now only referenced by code that
is blocked with #ifdef PCIDMA.

This source file is included by the ni_atmio, ni_mio_cs, and ni_pcimio
drivers. In the Kconfig, the config options for these drivers already
select COMEDI_FC.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 13:55:55 -07:00
H Hartley Sweeten e5bdf51216 staging: comedi: ni_at_a2150: use cfc_handle_events()
Use the comedi_fc helper function to automatically call the subdevice
(*cancel) function when needed and call comedi_event().

Also, remove the clearing of the events, comedi_event() does that.

In the Kconfig, COMEDI_NI_AT_A2150 already selects COMEDI_FC.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 13:55:55 -07:00
H Hartley Sweeten f21c74fa4c staging: comedi: dt282x: use cfc_handle_events()
Use the comedi_fc helper function to automatically call the subdevice
(*cancel) function when needed and call comedi_event().

This also fixes two bugs.
  1) the analog input command is canceled due to a buffer overflow
     without sending an event (@@ -341,7 +340,7 @@).
  2) an analog output error causes the command to cancel but the event
     is reported to the analog input subdevice (@@ -449,15 +447,13 @@).

In the Kconfig, COMEDI_DT282X already selects COMEDI_FC.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 13:55:54 -07:00
H Hartley Sweeten c969509301 staging: comedi: das1800: use cfc_handle_events()
Use the comedi_fc helper function to automatically call the subdevice
(*cancel) function when needed and call comedi_event().

In the Kconfig, COMEDI_DAS1800 already selects COMEDI_FC.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 13:55:54 -07:00
H Hartley Sweeten f382898fab staging: comedi: das800: use cfc_handle_events()
Use the comedi_fc helper function to automatically call the subdevice
(*cancel) function when needed and call comedi_event().

Also, remove the clearing of the event, comedi_event() does that.

In the Kconfig, COMEDI_DAS800 already selects COMEDI_FC.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 13:55:54 -07:00
H Hartley Sweeten 6278c5d892 staging: comedi: das16m1: use cfc_handle_events()
Use the comedi_fc helper function to automatically call the subdevice
(*cancel) function when needed and call comedi_event().

In the Kconfig, COMEDI_DAS16M1 already selects COMEDI_FC.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 13:55:54 -07:00
H Hartley Sweeten a18fad85cc staging: comedi: adv_pci1710: use cfc_handle_events()
Use the comedi_fc helper function to automatically call the subdevice
(*cancel) function when needed and call comedi_event().

Update the Kconfig to select COMEDI_FC when COMEDI_ADL_PCI9111 is enabled.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 13:55:54 -07:00
H Hartley Sweeten 0056f54813 staging: comedi: adl_pci9111: use cfc_handle_events()
Use the comedi_fc helper function to automatically call the subdevice
(*cancel) function when needed and call comedi_event().

In the Kconfig, COMEDI_ADL_PCI9111 already selects COMEDI_FC.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 13:55:54 -07:00
H Hartley Sweeten def69d7f82 staging: comedi: adl_pci9118: use cfc_handle_events()
Use the comedi_fc helper function to automatically call the subdevice
(*cancel) function when needed and call comedi_event().

In the Kconfig, COMEDI_ADL_PCI9118 already selects COMEDI_FC.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 13:55:53 -07:00
H Hartley Sweeten 12d6dda6b9 staging: comedi: mite: use cfc_inc_scan_progress()
Use the comedi_fc helper function instead of duplicating the code.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 13:55:53 -07:00
H Hartley Sweeten bcc6df4d64 staging: comedi: comedi_fc: export increment_scan_progress()
Rename this function to cfc_inc_scan_progress() and export it for
use by the comedi drivers.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 13:55:53 -07:00
H Hartley Sweeten a1b5b0bfcd staging: comedi: comedi_fc: export cfc_bytes_per_scan()
This helper function is a bit long to be inlined. Move it to the
source file and export it.

The mite driver is the only external user right now. Update the
Kconfig to select COMEDI_FC when COMEDI_MITE is enabled.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 13:55:53 -07:00
H Hartley Sweeten 68ef50f6cb staging: comedi: comedi_fc: tidy up cfc_bytes_per_scan()
This function returns the total number of bytes for a full scan of
an async command chanlist. The returned value is an unsigned int.

Change all the local variables to unsigned int and use a local
variable for the s->async->cmd.chanlist_len.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 13:55:53 -07:00
H Hartley Sweeten a3065bc9b4 staging: comedi: comedi_fc: rename comedi_subdevice variables in header
Typically the comedi_subdevice variable is simply named 's'. Rename
the variables in comedi_fc.h.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 13:55:52 -07:00
H Hartley Sweeten 8af9dd1211 staging: comedi: comedi_fc: remove 'extern' from function prototypes
The 'extern' is not needed in the prototypes for the exported functions
in the header. Remove it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 13:55:52 -07:00
H Hartley Sweeten b6b9377332 staging: comedi: comedi_fc: tidy up multi-line comment in header
Tidy up the multi-line comment to follow the CodingStyle.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 13:55:52 -07:00
H Hartley Sweeten b625520f36 staging: comedi: comedi_fc: remove unnecessary prefix in dev_warn() message
The dev_warn() will automatically have the "comedi" prefix.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 13:55:52 -07:00
H Hartley Sweeten 658ebb8ce2 staging: comedi: comedi_fc: rename comedi_subdevice variables
Typically the comedi_subdevice variable is simply named 's'. Rename
the variables in this file.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 13:55:52 -07:00
H Hartley Sweeten 5e733d0449 staging: comedi: comedi_fc: tidy up multi-line comment
Tidy up the multi-line comment to follow the CodingStyle.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 13:55:51 -07:00
H Hartley Sweeten 0a9d6458bb staging: comedi: comedi_fc: tidy up module init
For aesthetics, move the MODULE_* information to the end of the file
and move the module_{init,exit}() after the functions.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 13:55:51 -07:00
H Hartley Sweeten d6ae506204 staging: comedi: jr3_pci: remove 'channel_no' from subdevice private data
This member of the subdevice private data is just the subdevice 'index'. Use
that instead and remove the member.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 12:38:54 -07:00
H Hartley Sweeten da1331a503 staging: comedi: jr3_pci: rename struct poll_delay_t
Rename this private struct so it has namespace associated with the
driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 12:38:54 -07:00
H Hartley Sweeten 0a44493fb1 staging: comedi: jr3_pci: rename struct transform_t
Rename this private struct so it has namespace associated with the
driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 12:38:54 -07:00
H Hartley Sweeten ed8cd56020 staging: comedi: jr3_pci: remove 'n_channels' from private data
This member of the private data is actually the number of subdevices. We
can get that information directly from the comedi_device. Do that instead
and remove the unnecessary member from the private data.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 12:38:54 -07:00
H Hartley Sweeten 7211806a7c staging: comedi: jr3_pci: introduce boardinfo for the supported boards
Create an enum for the boards supported by this driver and pass that enum in
the pci_driver id_table as the driver_data.

Introduce a boardinfo struct to hold the board specific data for the boards
supported by this driver. Use the boardinfo when attaching to the driver
instead of using the pcidev->device and the switch.

Since the PCI device ids are now only used in the id_table, remove the
defines and open code the device ids.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 12:38:53 -07:00
H Hartley Sweeten 16a86abea7 staging: comedi: jr3_pci: tidy up jr3_pci_ai_insn_read()
Refactor this function to make it clearer.

The channel does not need to be validated. The comedi core does that for us.

Exit early if the subdevice private data is invalid.

Exit early if the subdevice 'state' is not done or there is an error.

Factor out the code that actually reads the channel data to reduce the
indent level.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 12:38:53 -07:00
H Hartley Sweeten 617cd65312 staging: comedi: jr3_pci: tidy up jr3_pci_open()
For aesthetics, rename the subdevice private data pointer from 'p' to
'spriv' and add a local variable for the comedi_subdevice pointer.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 12:38:53 -07:00
H Hartley Sweeten 127301cb5d staging: comedi: jr3_pci: tidy up jr3_download_firmware()
This callback function for comedi_load_firmware() first validates that
the firmware data is the correct format then it writes the data to each
subdevice.

Split the two operations out as separate functions to clarify the code.
Tidy up the new functions.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 12:38:53 -07:00
H Hartley Sweeten 01fca4732b staging: comedi: jr3_pci: tidy up jr3_pci_poll_subdevice()
Refactor the function to reduce the indent level.

For aesthetics, rename the subdevice private data pointer from 'p'
to 'spriv'.

Rename the lacal variable used for the channel->full_scale to 'fs'
to reduce the line lengths.

Remove the setting of range[8]. The min,max values are the same as
the ones used when the subdevice private data was allocated and
initialized.

Remove the poll_delay_min_max() that are the same as the default.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 12:38:53 -07:00
H Hartley Sweeten a448376e4d staging: comedi: jr3_pci: tidy up jr3_pci_poll_dev()
For aesthetics, rename the subdevice private data pointer from 'subdevpriv'
to 'spriv' and add a local variable for the comedi_subdevice pointer.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 12:38:53 -07:00
H Hartley Sweeten 3c77274cbd staging: comedi: jr3_pci: rename some local vars in the (*attach)
For aesthetics, rename the subdevice private data pointer from 'p'
to 'spriv' and the variable used to check the errno from 'result'
to 'ret'.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 12:38:52 -07:00
H Hartley Sweeten 9e4d67423d staging: comedi: jr3_pci: factor subdevice private data init out of (*attach)
Factor the code that allocates and initializes the subdevice private data
out of the (*attach) to reduce the indent level and make the code easier
to follow.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 12:38:52 -07:00
H Hartley Sweeten 6fe9bb6705 staging: comedi: jr3_pci: use comedi_alloc_spriv()
Use the helper function to allocate the subdevice private data. This
sets the s->private variable for us and allows the comedi core to
automatically kfree() the memory during the (*detach).

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 12:38:52 -07:00
H Hartley Sweeten 050389f5eb staging: comedi: jr3_pci: tidy up subdevice init
For aesthetics, use a pointer to the comedi_subdevice instead of
accessing the dev->subdevices array directly.

Move the local variable for the subdevice private data so that
this function does not declare the variable twice.

Change the kzalloc for the subdevice private data to remove the
sizeof(struct foo).

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 12:38:52 -07:00
H Hartley Sweeten c6cd0eefb2 staging: comedi: comedi_fops: introduce __comedi_get_user_chanlist()
The COMEDI_CMD and COMEDI_CMDTEST ioctl functions both copy the chanlist
passed by the user from __user memory space to kernel memory space. They
then do some sanity checking of the chanlist with comedi_check_chanlist()
before the subdevice (*do_cmdtest) and (*do_cmd) operations are called.

Introduce a helper function to handle the memdup_user() and the sanity
checking.

Also, remove the unnecessary dev_dbg() when the memdup_user() or
comedi_check_chanlist() fail.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 12:27:58 -07:00
H Hartley Sweeten 87ece58331 staging: comedi: comedi_fops: introduce __comedi_get_user_cmd()
The COMEDI_CMD and COMEDI_CMDTEST ioctl functions both copy the
comedi_cmd passed by the user from __user memory space to kernel
memory space. They then do some basic sanity checking of the cmd
before the subdevice (*do_cmdtest) and (*do_cmd) operations are
called.

Introduce a helper function to handle the copy_from_user() and
do the basic sanity checking.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 12:27:58 -07:00
Joshua Baldock a11f5d2b2b Staging: bcm: fixed parentheses and quoted string across lines coding style in CmHost.c
This is a patch to the CmHost.c file that fixes up parentheses and
quoted string across lines warnings found by checkpatch.pl tool.

Signed-off-by: Joshua Baldock <joshua.baldock@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 12:11:29 -07:00
Davide Berardi ba79e52b69 staging: line6: long line fixes
Fixed some line over 80 characters.

Signed-off-by: Davide Berardi <berardi.dav@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 12:08:42 -07:00
Greg Kroah-Hartman e40bffaeae Merge 3.14-rc7 into staging-next
This resolves a merge issue with drivers/staging/cxt1e1/linux.c that was
fixed in a report from Stephen Rothwell

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 11:27:39 -07:00
Aybuke Ozdemir cc43adab9a staging: bcm: Typedefs.h Fix "foo * bar" warning.
This patch fixes these error messages found by checkpatch.pl:
ERROR: "foo* bar" should be "foo *bar"

Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 22:24:41 -07:00
Aybuke Ozdemir 54585e56ed staging: bcm: Typedefs.h Fix do not use // c99 comments.
This patch fixes "do not use // C99 comments"
errors in Typedefs.h

Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 22:23:01 -07:00
Aybuke Ozdemir 64052b783d staging: vt6656: power.c Fix line over 80 characters.
Fix checkpatch.pl issue with
line over 80 characters in power.c

Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 22:10:23 -07:00
Aybuke Ozdemir 0315dd70a5 staging: nokia_h4p: nokia_fw-bcm.c Fix line over 80 characters.
Fix checkpatch.pl issue with
line over 80 characters in nokia_fw-bcm.c

Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 22:10:23 -07:00
Gulsah Kose beeefedee3 staging: winbond: Moved trailing statement to next line
Fix checkpatch.pl issues with trailing statement to next line in wb35reg.c

Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 22:10:23 -07:00
Gulsah Kose 0a6088c3e6 staging: cxt1e1: Fix space prohibited between function name and open parenthesis
Fix checkpatch.pl issues with space prohibited between function name and
open parenthesis in libsbew.h

Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 22:04:48 -07:00
Gulsah Kose d5229247c8 staging: dgnc: Fix quoted string split across lines warning
This patch fixes "quoted string split across lines warning" warning in
dgnc_cls.c

Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 22:04:41 -07:00
Gulsah Kose 6461900342 staging: line6: Fix line over 80 characters
Fix checkpatch.pl issue with line over 80 characters in midi.c

Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 22:01:50 -07:00
Himangi Saraogi 432f8574a7 staging:keucr: Remove typedefs
As suggested by Pablo, this patch uses a coccinelle script to remove the
typedefs:
typedef u8 BOOLEAN;  <-- use "bool" instead.
typedef u8 BYTE;     <-- use "u8"
typedef u8 *PBYTE;   <-- use "u8 *"
typedef u16 WORD;    <-- use "u16"
typedef u16 *PWORD;  <-- use "u16 *"
typedef u32 DWORD;   <-- use "u32"
typedef u32 *PDWORD; <-- use "u32 *"
in common.h.

The coccinelle script is:
/* coccinelle script to remove typedefs. */
@remove_typedef@
@@
-typedef bool BOOLEAN;
-typedef u8 BYTE;
-typedef u8 *PBYTE;
-typedef u16 WORD;
-typedef u16 *PWORD;
-typedef u32 DWORD;
-typedef u32 *PDWORD;

@fix_usage@
typedef BOOLEAN;
@@
-BOOLEAN
+bool

@fix_usage1@
typedef BYTE;
@@
-BYTE
+u8

@fix_usage2@
typedef PBYTE;
@@
-PBYTE
+u8 *

@fix_usage3@
typedef WORD;
@@
-WORD
+u16

@fix_usage4@
typedef PWORD;
@@
-PWORD
+u16 *

@fix_usage5@
typedef DWORD;
identifier f;
@@
-DWORD
+u32

@fix_usage6@
typedef PDWORD;
@@
-PDWORD
+u32 *

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 22:01:41 -07:00
Ana Rey 68b350073f staging: rtl8187se: Remove initialization of static variable in ieee80211/ieee80211_softmac.c
Fix checkpatch.pl errors:
ERROR: do not initialise statics to 0 or NULL

Signed-off-by: Ana Rey <anarey@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 21:57:24 -07:00
Ana Rey 12d6d1e31c staging: rtl8187se: Fix pointer declarations in ieee80211/ieee80211_softmac.c
Fix pointer declarations as the codingStyle of the kernel recommends in
ieee80211/ieee80211_softmac.c

Fix checkpatch.pl errors:
ERROR: "foo* bar" should be "foo *bar"
ERROR: "(foo*)" should be "(foo *)"

Signed-off-by: Ana Rey <anarey@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 21:57:24 -07:00
Ana Rey 687b549577 staging: rtl8187se: Move trailing statement to next line
Move trailing statements to next line as the codingStyle of
the kernel recommends.

Fix checkpatch.pl errors:
ERROR: trailing statements should be on next line

Signed-off-by: Ana Rey <anarey@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 21:57:24 -07:00
Ana Rey a152ba983b staging: rtl8187se: Delete some innecesary whitespaces
Delete some whitespaces (whitespace before a quoted newline, space
at the start of a line and space before a tabs) as the codingStyle of
the kernel recommends.

Fix checkpatch.pl errors:
WARNING: unnecessary whitespace before a quoted newline
WARNING: please, no spaces at the start of a line
WARNING: please, no space before tabs

Signed-off-by: Ana Rey <anarey@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 21:57:24 -07:00
Ana Rey 7c6a49a258 staging: rtl8187se: Add whitespaces around '&', '||' and '&&'
Add whitespaces around '&', '||' and '&&' as the codingStyle of the kernel
recommends.

Fix checkpatch.pl errors:
ERROR: spaces required around that '||' (ctx:VxV)
ERROR: spaces required around that '&&' (ctx:VxV)
ERROR: need consistent spacing around '&'

Signed-off-by: Ana Rey <anarey@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 21:57:24 -07:00
Ana Rey b254a30663 staging: rtl8187se: Add whitespaces around '+=' and '=='
Add whitespaces around '+=' and '==' and fix coding style in these lines
as the codingStyle of the kernel recommends.

Fix checkpatch.pl errors:
ERROR: spaces required around that '+=' (ctx:VxV
ERROR: spaces required around that '==' (ctx:VxW)

Signed-off-by: Ana Rey <anarey@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 21:57:24 -07:00
Ana Rey 84f26105fd staging: rtl8187se: Fix "code indent should use tabs where possible" error
Fix checkpatch.pl error:
ERROR: code indent should use tabs where possible

Also fix some problems with tabs in an if-statement.

Signed-off-by: Ana Rey <anarey@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 21:57:24 -07:00
Ana Rey 03854f39b8 staging: rtl8187se: Add whitespaces around commas
Add whitespaces around commas and fix coding style in these lines as
the codingStyle of the kernel recommends.

Fix checkpatch.pl errors:
ERROR: space required after that ','

Signed-off-by: Ana Rey <anarey@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 21:57:23 -07:00
Ana Rey 19cc3bc23b staging: rtl8187se: Add whitespaces around '+', '-' and '='
Add whitespaces around '+', '-' and '=' as the codingStyle of the kernel
recommends.

Fix checkpatch.pl errors:
ERROR: need consistent spacing around '+'
ERROR: spaces required around that '=' (ctx:VxV)
ERROR: need consistent spacing around '-'

Signed-off-by: Ana Rey <anarey@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 21:57:23 -07:00
Ana Rey da0c762477 staging: rtl8187se: Delete spaces prohibited around semicolons, colons and exclamations
Delete spaces prohibited before semicolon, before ':' and after '!' and
fix coding style in these lines when It is necessary.

Fix checkpàtch.pl error and warning messages:
WARNING: space prohibited before semicolon
ERROR: space prohibited before that ':'
ERROR: space prohibited after that '!'

Signed-off-by: Ana Rey <anarey@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 21:57:23 -07:00
Ana Rey 9ce6e6044f staging: rtl8187se: Delete space prohibited after open parenthesis.
Delete space prohibited after open parenthesis and fix coding style in
the lines changed when It is necessary

Fix checkpatch.pl errors:
ERROR: space prohibited after that open parenthesis '('

Signed-off-by: Ana Rey <anarey@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 21:57:23 -07:00
Ana Rey 8c98b99983 staging: rtl8187se: Delete space prohibited between function name and open parenthesis
Delete space prohibited between function name and open parenthesis and
fix coding style in the lines changed when It is necessary

Fix checkpatch.pl warning message:
WARNING: space prohibited between function name and open parenthesis '('.

Signed-off-by: Ana Rey <anarey@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 21:57:23 -07:00
Ana Rey e1aff4ee7d staging: rtl8187se: Add whitespaces in while and for structures.
Add a space required before the open parenthesis in while and for
structures as the codingStyle of the kernel recommends.

Signed-off-by: Ana Rey <anarey@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 21:57:23 -07:00
Ana Rey 40f5b98190 staging: rtl8187se: Add whitespaces between 'if' and the condition.
Add a space required before the open parenthesis in conditional
statements as the codingStyle of the kernel recommends.

Signed-off-by: Ana Rey <anarey@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 21:57:23 -07:00
Ana Rey 472f9c7647 staging: rtl8187se: Delete braces are not necessary in ieee80211/ieee80211_softmac.c
Delete braces are not necessary for single statement blocks and fix
coding style in these lines when It is necessary.

Fix checkpatch.pl warning:
WARNING: braces {} are not necessary for single statement blocks

Signed-off-by: Ana Rey <anarey@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 21:57:23 -07:00
Ana Rey b78f1b3797 staging: rtl8187se: Add necessary whitespaces in while and do-while statements.
Fix whitespaces in do-while statements and while statements as
the codingStyle of the kernel recommends in
ieee80211/ieee80211_softmac.c

Signed-off-by: Ana Rey <anarey@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 21:57:23 -07:00
Ana Rey 00dd31b3d4 staging: rtl8187se: Fix whitespace around else-statements
Fix whitespaces around else-statements and fix coding style in the
lines when It is necessary as the codingStyle of the kernel recommends
in ieee80211/ieee80211_softmac.c

Signed-off-by: Ana Rey <anarey@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 21:57:23 -07:00
Ana Rey 08d49d6487 staging: rtl8187se: Fix whitespaces in if-statement.
Fix whitespaces around braces in if-statement as the
codingStyle of the kernel recommends in ieee80211/ieee80211_softmac.c
Also, fix coding style in these lines when It is necessary.

Fix checkpatch.pl errors:
ERROR: space required before the open brace '{'

Signed-off-by: Ana Rey <anarey@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 21:57:23 -07:00
Ana Rey 3dde47c631 staging: rtl8187se: Remove unused functions 'rsn_authen_cipher_suite' and 'ext_ieee80211_send_beacon_wq'
Remove unused functions rsn_authen_cipher_suite() and
ext_ieee80211_send_beacon_wq() from ieee80211_softmac.c.

Fix sparse warnings:
drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c:27:11: warning: ‘rsn_authen_cipher_suite’ defined but not used [-Wunused-variable]
drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c:327:13: warning: ‘ext_ieee80211_send_beacon_wq’ defined but not used [-Wunused-function]

Signed-off-by: Ana Rey <anarey@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 21:57:23 -07:00
Ana Rey 77438bd8ed staging: rtl8187se: Re-write if statement with comment lines inside.
Move comments from inside if conditionals to the lines above the
if-statement. Also delete unnecessary whitespace in these lines.

Signed-off-by: Ana Rey <anarey@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 21:57:22 -07:00
Ana Rey 25778bbeb2 staging: rtl8187se: Clean-up comment line style
Convert style of comments from C99-style to C89 and fix alignment in
these lines as the CodingStyle recommends.

Signed-off-by: Ana Rey <anarey@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 21:57:22 -07:00
Ana Rey 9cc8a29dfd staging: rtl8187se: Remove unnecessary blank lines
Remove unnecessary blank lines in ieee80211/ieee80211_softmac.c
(and add some necessary blank lines).

Signed-off-by: Ana Rey <anarey@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 21:57:22 -07:00
Ana Rey 97a0e1f900 staging: rtl8187se: Delete commented code
Delete all commented code in ieee80211/ieee80211_softmac.c
that are not necessary.

Also, remove the unused variable referenced in the commented code.

Signed-off-by: Ana Rey <anarey@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 21:57:22 -07:00
Uma Sharma 3e1e788341 staging: media/omap24xx/tcm825x.h removed warning
This patch removes the following checkpatch.pl warning in tcm825x.h
Warning : missing space after return type

Signed-off-by: Uma Sharma <uma.sharma523@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 21:32:58 -07:00
Uma Sharma 6e878c0299 staging: media/msi3101/sdr-msi3101.c removed warning
This patch removes the following checkpatch.pl warning in sdr-msi3101.c
Warning : Unnecessary space after function pointer name

Signed-off-by: Uma Sharma <uma.sharma523@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 21:32:51 -07:00
Gulsah Kose 4353ea8f77 staging: crystalhd: Fix no space before tabs
This patch fixes no spaces before tabs warning in crystalhd_misc.h

Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 21:32:32 -07:00
Aybuke Ozdemir 5935caec8c staging: go7007: go7007-v4l2.c Fix line over 80 characters.
Fix checkpatch.pl issues with line over
80 characters in go7007-v4l2.c

Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 21:19:14 -07:00
Aybuke Ozdemir de82a6db75 staging: octeon: ethernet-mdio.c Fix line over 80 characters.
Fix checkpatch.pl issue with
line over 80 characters in ethernet-mdio.c

Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 21:19:14 -07:00
Ebru Akagunduz 7d057e7d63 Staging: bcm: Removed unreachable code line in Bcmchar.c
This patch removes unreachable code line and
unnecessary braces in Bcmchar.c

Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com>
Acked-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 20:37:39 -07:00
Ebru Akagunduz 18e26b358a Staging: bcm: fix line over 80 characters in Bcmchar.c
Fix checkpatch.pl issues with line over 80
characters in Bcmchar.c

Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 20:37:14 -07:00
Uma Sharma a8f853247c staging: removed space after return function in gdm_lte.h
This patch removes the following checkpatch.pl warning in gdm_lte.h
Warning : space after return function

Signed-off-by: Uma Sharma <uma.sharma523@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 20:34:28 -07:00
Gulsah Kose 4f7dcd615d staging: nokia_h4p: Fix quoted string split across lines
This patch fixes "quoted string split across lines warning" warning in
nokia_core.c

Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 20:32:11 -07:00
Gulsah Kose e563e464d0 staging: frontier: Fix quoted string split across lines
This patch fixes "quoted string split across lines warning" warning in
alphatrack.c

Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 20:26:51 -07:00
Ashley Smith c0b37b7002 staging: lustre: Remove extern keyword from function prototypes
A function prototype is always a declaration and thus has "extern" prepended by default.

Signed-off-by: Ashley Smith <ashley@eclipso.ch>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 20:13:33 -07:00
Gulsah Kose f137058f82 staging: silicom: Fix line over 80 characters.
Fix checkpatch.pl issues with line over 80 characters in bp_mod.h

Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 20:02:20 -07:00
Kristina Martšenko 3ce586107a staging: gdm72xx: remove completed TODO item
Remove an item from the TODO file since it appears to have been
completed by the following commits:
* 1839c7ebd9 "staging/gdm72xx: usb_boot: replace firmware upgrade API"
* 3afcb91c41 "staging/gdm72xx: usb_boot: replace firmware upgrade API in
  em_download"
* 9e412a0a58 "staging/gdm72xx: sdio_boot: replace firmware upgrade API"

Signed-off-by: Kristina Martšenko <kristina.martsenko@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 19:53:58 -07:00
Kristina Martšenko 8943a92fc2 staging: gdm72xx: replace printk() and debug macros with dynamic debugging
Replace printk(KERN_DEBUG ...) with netdev_dbg and dev_dbg. Remove
debug macros which become unnecessary.

This removes the following types of checkpatch warnings from the driver:
drivers/staging/gdm72xx/gdm_sdio.c:461: WARNING: Prefer netdev_dbg(netdev, ... then dev_dbg(dev, ... then pr_debug(...  to printk(KERN_DEBUG ...

Signed-off-by: Kristina Martšenko <kristina.martsenko@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 19:53:58 -07:00
Kristina Martšenko 4db0243565 staging: gdm72xx: use print_hex_dump_debug and remove debug macros
Since the kernel already has a function for hex dumps, use that instead
of the driver's own versions. The function supports dynamic debugging,
so also remove some unnecessary debug macros.

Signed-off-by: Kristina Martšenko <kristina.martsenko@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 19:53:58 -07:00
Aybuke Ozdemir 35db0350c5 staging: gdm724x: gdm_usb.c: Fix line over 80 characters.
Fix checkpatch.pl issues with line over 80 characters in gdm_usb.c

Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 19:49:00 -07:00
Gulsah Kose 0a7ba6239c staging: vt6655: Fix line over 80 characters.
Fix checkpatch.pl issues with line over 80 characters in 80211mgr.c

Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 19:45:52 -07:00
Aybuke Ozdemir 80b2392a4c drivers/staging/crystalhd:crystalhd_lnx.c: Fix line over 80 characters.
Fix checkpatch.pl issues with line over 80 characters in crystalhd_lnx.c

Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 19:39:02 -07:00
Jelena Bjelja e82efb2c11 staging: vt6655: Remove unnecessary braces in aes_ccmp.c
This patch fixes the checkpatch warnings:
	WARNING: braces {} are not necessary for single statement blocks

Signed-off-by: Jelena Bjelja <jelena.bjelja.ing@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 19:37:23 -07:00
Himangi Saraogi cdf11154b6 static: keucr: Fix sparse warning of static declarations
This patch fixes the warning:
drivers/staging/keucr/smilsub.c:603:6: warning: symbol '_Check_D_DevCode' was not declared. Should it be static?
by making function static as it is used within the file.

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Acked-by: Pablo Neira Ayuso <pablo@gnumonks.org>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 18:43:49 -07:00
Aybuke Ozdemir 4a9fdbbecc staging: core: tiomap3430.c Fix line over 80 characters.
Fix checkpatch.pl issues with line over 80 characters in tiomap3430.c

Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 18:42:52 -07:00
Ana Rey c92f473dad staging: rtl8192u: make in r819xU_phy.c some local functions static
Make some local functions static and fix coding style in these function
declarations when It is necessary

These are the local functions that were made static:
rtl8192_CalculateBitShift, rtl8192_phy_RFSerialRead,
rtl8192_phy_RFSerialWrite, rtl8192_InitBBRFRegDef,
rtl8192_BB_Config_ParaFile,rtl8192_SetTxPowerLevel,
rtl8192_phy_SetSwChnlCmdArray, rtl8192_phy_SwChnlStepByStep,
rtl8192_phy_FinishSwChnlNow

Fixed the following sparse warnings in r819xU_phy.c

drivers/staging/rtl8192u/r819xU_phy.c:47:5: warning: symbol 'rtl8192_CalculateBitShift' was not declared. Should it be static?
drivers/staging/rtl8192u/r819xU_phy.c:147:5: warning: symbol 'rtl8192_phy_RFSerialRead' was not declared. Should it be static?
drivers/staging/rtl8192u/r819xU_phy.c:232:6: warning: symbol 'rtl8192_phy_RFSerialWrite' was not declared. Should it be static?
drivers/staging/rtl8192u/r819xU_phy.c:574:6: warning: symbol 'rtl8192_InitBBRFRegDef' was not declared. Should it be static?
drivers/staging/rtl8192u/r819xU_phy.c:783:6: warning: symbol 'rtl8192_BB_Config_ParaFile' was not declared. Should it be static?
drivers/staging/rtl8192u/r819xU_phy.c:1073:6: warning: symbol 'rtl8192_SetTxPowerLevel' was not declared. Should it be static?
drivers/staging/rtl8192u/r819xU_phy.c:1242:4: warning: symbol 'rtl8192_phy_SetSwChnlCmdArray' was not declared. Should it be static?
drivers/staging/rtl8192u/r819xU_phy.c:1279:4: warning: symbol 'rtl8192_phy_SwChnlStepByStep' was not declared. Should it be static?
drivers/staging/rtl8192u/r819xU_phy.c:1436:6: warning: symbol 'rtl8192_phy_FinishSwChnlNow' was not declared. Should it be static?

Signed-off-by: Ana Rey <anarey@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 18:39:08 -07:00
Gulsah Kose 097b4d8ce2 staging: gdm724x: Fix line over 80 characters.
Fix checkpatch.pl issues with line over 80 characters in gdm_lte.c

Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 18:37:04 -07:00
Jelena Bjelja 9c45c42a54 staging:vt6655: Fix open brace placement related error
This patch fixes the following checkpatch error in aes_ccmp.c:
	ERROR: that open brace { should be on the previous line

Signed-off-by: Jelena Bjelja <jelena.bjelja.ing@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 18:35:57 -07:00
Kristina Martšenko 5ae7437ead staging: dt3155v4l: make q_ops static
Since q_ops is only referenced in dt3155v4l.c, mark it as static.

This removes the following sparse warning:
drivers/staging/media/dt3155v4l//dt3155v4l.c:302:22: warning: symbol 'q_ops' was not declared. Should it be static?

Signed-off-by: Kristina Martšenko <kristina.martsenko@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 18:27:48 -07:00
Himangi Saraogi e054e2a728 staging: dgap: Fix mismatch in function argument types
This patch fixes the following error reported by sparse:
drivers/staging/dgap/dgap.c:4428:13: error: symbol 'dgap_do_fep_load' redeclared with different type (originally declared at drivers/staging/dgap/dgap.c:215) - incompatible argument 2 (different address spaces)

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Acked-by: Pablo Neira Ayuso <pablo@gnumonks.org>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 18:26:24 -07:00
Andreea-Cristina Bernat 97a84f1203 Staging: unisys: Replace kmalloc/memset with kzalloc
This patch solves the Coccinelle warning: "kzalloc should be used instead of
kmalloc/memset".

Signed-off-by: Andreea-Cristina Bernat <bernat.ada@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 18:20:10 -07:00
Ana Rey ac0ba3f8e4 staging: rtl8192u: Deleted 'HTUseDefaultSetting' function in ieee80211/rtl819x_HTProc.c
This patch delete the 'HTUseDefaultSetting' function that is not used in anywhere in the driver.

Fix the following sparse warnings in ieee80211/rtl819x_HTProc.c

drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c:1323:6: warning: symbol 'HTUseDefaultSetting' was not declared. Should it be static?

Signed-off-by: Ana Rey <anarey@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 18:16:44 -07:00
Ana Rey 4b10d50c36 staging: rtl8192u: make in ieee80211/ieee80211_rx.c some local functions static
Make some local functions (AddReorderEntry, RxReorderIndicate and
parse_subframe) static and fix coding style in this function
declarations when It is necessary.

Fix the following sparse warnings in ieee80211/ieee80211_rx.c

drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c:521:1: warning: symbol 'AddReorderEntry' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c:604:6: warning: symbol 'RxReorderIndicatePacket' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c:774:4: warning: symbol 'parse_subframe' was not declared. Should it be static?

Signed-off-by: Ana Rey <anarey@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 18:16:44 -07:00
Ana Rey fabdbdb2fb staging: rtl8192u: make in ieee80211/ieee80211_softmac.c some local functions static
Make some local functions static and fix coding style in these function
declarations when It is necessary

These are the local functions that were made static:

ieee80211_MFIE_rate_len, ieee80211_MFIE_Brate, ieee80211_MFIE_Grate,
ieee80211_WMM_Info, enqueue_mgmt, dequeue_mgmt, init_mgmt_queue,
MgntQuery_MgntFrameTxRate, ieee80211_send_beacon,
ieee80211_send_beacon_cb, ieee80211_softmac_scan_wq,
ieee80211_beacons_start, ieee80211_beacons_stop,
ieee80211_softmac_stop_scan, ieee80211_auth_resp, ieee80211_null_func,
ieee80211_resp_to_assoc_rq, ieee80211_resp_to_auth,
ieee80211_resp_to_probe, ieee80211_associate_abort_cb,
ieee80211_associate_step1, ieee80211_auth_challenge,
ieee80211_associate_step2, ieee80211_associate_complete_wq,
ieee80211_associate_complete, ieee80211_associate_procedure_wq,
auth_rq_parse, assoc_rq_parse, ieee80211_sta_ps_send_null_frame,
ieee80211_sta_ps_sleep, ieee80211_process_action, ieee80211_resume_tx,
ieee80211_start_monitor_mode, ieee80211_start_ibss_wq,
ieee80211_associate_retry_wq, ieee80211_wpa_assoc_frame,
ieee80211_sta_ps, ieee80211_send_probe, ieee80211_start_scan
and ieee80211_assoc_resp

Fix the following sparse warnings in ieee80211/ieee80211_softmac.c

drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:41:14: warning: symbol 'ieee80211_MFIE_rate_len' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:59:6: warning: symbol 'ieee80211_MFIE_Brate' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:76:6: warning: symbol 'ieee80211_MFIE_Grate' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c💯6: warning: symbol 'ieee80211_WMM_Info' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:142:6: warning: symbol 'enqueue_mgmt' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:160:16: warning: symbol 'dequeue_mgmt' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:175:6: warning: symbol 'init_mgmt_queue' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:180:4: warning: symbol 'MgntQuery_MgntFrameTxRate' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:359:6: warning: symbol 'ieee80211_send_beacon' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:385:6: warning: symbol 'ieee80211_send_beacon_cb' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:488:6: warning: symbol 'ieee80211_softmac_scan_wq' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:532:6: warning: symbol 'ieee80211_beacons_start' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:543:6: warning: symbol 'ieee80211_beacons_stop' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:575:6: warning: symbol 'ieee80211_softmac_stop_scan' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:890:16: warning: symbol 'ieee80211_auth_resp' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:918:16: warning: symbol 'ieee80211_null_func' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:944:6: warning: symbol 'ieee80211_resp_to_assoc_rq' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:953:6: warning: symbol 'ieee80211_resp_to_auth' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:962:6: warning: symbol 'ieee80211_resp_to_probe' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:1244:6: warning: symbol 'ieee80211_associate_abort_cb' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:1250:6: warning: symbol 'ieee80211_associate_step1' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:1276:6: warning: symbol 'ieee80211_auth_challenge' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:1306:6: warning: symbol 'ieee80211_associate_step2' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:1325:6: warning: symbol 'ieee80211_associate_complete_wq' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:1372:6: warning: symbol 'ieee80211_associate_complete' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:1383:6: warning: symbol 'ieee80211_associate_procedure_wq' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:1556:5: warning: symbol 'auth_rq_parse' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:1612:5: warning: symbol 'assoc_rq_parse' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:1706:6: warning: symbol 'ieee80211_sta_ps_send_null_frame' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:1717:7: warning: symbol 'ieee80211_sta_ps_sleep' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:1882:6: warning: symbol 'ieee80211_process_action' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:2185:6: warning: symbol 'ieee80211_resume_tx' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:2314:6: warning: symbol 'ieee80211_start_monitor_mode' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:2324:6: warning: symbol 'ieee80211_start_ibss_wq' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:2497:6: warning: symbol 'ieee80211_associate_retry_wq' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:2768:6: warning: symbol 'ieee80211_wpa_assoc_frame' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:1765:13: warning: symbol 'ieee80211_sta_ps' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:398:6: warning: symbol 'ieee80211_send_probe' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:604:6: warning: symbol 'ieee80211_start_scan' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:836:16: warning: symbol 'ieee80211_assoc_resp' was not declared. Should it be static?

Signed-off-by: Ana Rey <anarey@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 18:16:43 -07:00
Ana Rey a5ac48acc3 staging: rtl8192u: make in ieee80211/ieee80211_tx.c some local functions static
Make some local functions (ieee80211_qurey_ShortPreambleMode and
ieee80211_query_HTCapShortGI) static and fix coding style in these
function declarations when It is necessary.

Fix the following sparse warnings in ieee80211/ieee80211_tx.c

drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c:381:6: warning: symbol 'ieee80211_qurey_ShortPreambleMode' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c:395:1: warning: symbol 'ieee80211_query_HTCapShortGI' was not declared. Should it be static?

Signed-off-by: Ana Rey <anarey@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 18:16:43 -07:00
Ana Rey 627877bd7a staging: rtl8192u: Added in r819xU_firmware_img.c an include to fix a sparse warning
Fix the following warnings from sparse in r819xU_firmware_img.c
due to the missing include of r819xU_firmware_img.h

  CHECK   drivers/staging/rtl8192u/r819xU_firmware_img.c
drivers/staging/rtl8192u/r819xU_firmware_img.c:4:5: warning: symbol 'Rtl8192UsbPHY_REGArray' was not declared. Should it be static?
drivers/staging/rtl8192u/r819xU_firmware_img.c:7:5: warning: symbol 'Rtl8192UsbPHY_REG_1T2RArray' was not declared. Should it be static?
drivers/staging/rtl8192u/r819xU_firmware_img.c:158:5: warning: symbol 'Rtl8192UsbRadioA_Array' was not declared. Should it be static?
drivers/staging/rtl8192u/r819xU_firmware_img.c:284:5: warning: symbol 'Rtl8192UsbRadioB_Array' was not declared. Should it be static?
drivers/staging/rtl8192u/r819xU_firmware_img.c:326:5: warning: symbol 'Rtl8192UsbRadioC_Array' was not declared. Should it be static?
drivers/staging/rtl8192u/r819xU_firmware_img.c:329:5: warning: symbol 'Rtl8192UsbRadioD_Array' was not declared. Should it be static?
drivers/staging/rtl8192u/r819xU_firmware_img.c:332:5: warning: symbol 'Rtl8192UsbMACPHY_Array' was not declared. Should it be static?
drivers/staging/rtl8192u/r819xU_firmware_img.c:341:5: warning: symbol 'Rtl8192UsbMACPHY_Array_PG' was not declared. Should it be static?
drivers/staging/rtl8192u/r819xU_firmware_img.c:354:5: warning: symbol 'Rtl8192UsbAGCTAB_Array' was not declared. Should it be static?

Signed-off-by: Ana Rey <anarey@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 18:16:43 -07:00
Ashley Smith a7e4be9d0e staging: bcm: Replace <asm/uaccess.h> by <linux/uaccess.h>
This patch fixes the checkpatch warning to include <linux/uaccess.h> instead
of <asm/uaccess.h>.

Signed-off-by: Ashley Smith <ashley@eclipso.ch>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 18:05:44 -07:00
Andreea-Cristina Bernat 0cb6dfd710 Staging: solo6x10: Replace expressions that don't use ALIGN macro
There are some expressions that compute the roundup of a number, but don't use
the existing macro defined in /include/kernel.h. This patch uses the following
Coccinelle semantic patch:
@ haskernel @
@@

@ depends on haskernel @
expression E1, E2;
@@

- (E1 + (E2 - 1)) & ~(E2 - 1)
+ ALIGN(E1, E2)

Signed-off-by: Andreea-Cristina Bernat <bernat.ada@gmail.com>
Acked-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 18:00:56 -07:00
Tugce Sirin 8fa7fdeb62 Staging: bcm: Fix sparse non-static symbol warning
Fix sparse non-static symbol warning in bcm driver.

Signed-off-by: Tugce Sirin <ztugcesirin@gmail.com>
Acked-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 17:54:55 -07:00
Tugce Sirin 36d9c250b4 Staging: wlan-ng: Fix sparse non-static symbol warning
Fix sparse non-static symbol warning in wlan-ng driver.

Signed-off-by: Tugce Sirin <ztugcesirin@gmail.com>
Acked-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 17:54:49 -07:00
Andreea-Cristina Bernat 98e2dda325 staging: sep: Add fallthrough comment
This patch solves the warning "possible switch/case default not preceded by
break or fallthrough comment".

Signed-off-by: Andreea-Cristina Bernat <bernat.ada@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 17:52:00 -07:00
Himangi Saraogi 87355c1b21 staging:lustre: Fix sparse warning of plain integer as NULL
This patch fixes the following sparse warning:
drivers/staging/lustre/lustre/lov/lov_request.c:53:28: warning: Using plain integer as NULL pointer

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 17:50:23 -07:00
Ana Rey feb600e597 staging: rtl8192u: Deleted 'rtl8192_beacon_stop' function in r8192U_core.c
This patch delete the 'rtl8192_beacon_stop' function that is not used
in anywhere in the driver.

Fix the following sparse warning in r8192U_core.c

drivers/staging/rtl8192u/r8192U_core.c:1332:6: warning: symbol 'rtl8192_beacon_stop' was not declared. Should it be static?

Signed-off-by: Ana Rey <anarey@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 17:46:55 -07:00
Ana Rey 4f59e193d0 staging: rtl8192u: Deleted 'rtl8192_proc_module_remove' function in r8192U_core.c
This patch delete the 'rtl8192_proc_module_remove' function that is not
used in anywhere in the driver.

Fix the following sparse warnings in r8192U_core.c

drivers/staging/rtl8192u/r8192U_core.c:595:6: warning: symbol 'rtl8192_proc_module_remove' was not declared. Should it be static?

Signed-off-by: Ana Rey <anarey@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 17:46:55 -07:00
Ana Rey a5cb9b391d staging: rtl8192u: Deleted 'rtl8192_set_mode' function in r8192U_core.c
This patch delete the 'rtl8192_set_mode' function that is not used in
anywhere in the driver.

Fix the following sparse warning in r8192U_core.c
drivers/staging/rtl8192u/r8192U_core.c:692:6: warning: symbol 'rtl8192_set_mode' was not declared. Should it be static?

Signed-off-by: Ana Rey <anarey@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 17:46:55 -07:00
Ana Rey 6a1bf3a5d1 staging: rtl8192u: Deleted 'rtl819xU_cmd_isr' function in r8192U_core.c
This patch delete the 'rtl819xU_cmd_isr' function that is not used in
anywhere in the driver.

Fix the following sparse warning in r8192U_core.c

drivers/staging/rtl8192u/r8192U_core.c:1516:6: warning: symbol 'rtl819xU_cmd_isr' was not declared. Should it be static?

Signed-off-by: Ana Rey <anarey@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 17:46:55 -07:00
Ana Rey 51296cdf9d staging: rtl8192u: make in ieee80211/rtl819x_BAProc.c some local functions static
Make some local functions (ActivateBAEntry, DeActivateBAEntry,
TxTsDeleteBA ,RxTsDeleteBA and ieee80211_send_DELBA) static and fix
coding style in this function declarations when It is necessary

Fix the following sparse warnings in ieee80211/rtl819x_BAProc.c

drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c:16:6: warning: symbol 'ActivateBAEntry' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c:28:6: warning: symbol 'DeActivateBAEntry' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c:40:4: warning: symbol 'TxTsDeleteBA' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c:70:4: warning: symbol 'RxTsDeleteBA' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c:310:6: warning: symbol 'ieee80211_send_DELBA' was not declared. Should it be static?

Signed-off-by: Ana Rey <anarey@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 17:46:55 -07:00
Ana Rey 140cdd73c1 staging: rtl8192u: make in ieee80211/rtl819x_HTProc.c some local functions static
Make some local functions static.

These are the local functions that were made static:

IsHTHalfNmode40Bandwidth, IsHTHalfNmodeSGI, HTIOTPeerDetermine,
HTIOTActIsDisableMCS14, HTIOTActIsDisableMCS15,
HTIOTActIsDisableMCSTwoSpatialStream, HTIOTActIsDisableEDCATurbo,
HTIOTActIsMgntUseCCK6M, HTIOTActIsCCDFsync, HT_PickMCSRate,
HTFilterMCSRate, HTUseDefaultSetting

Fix the following sparse warnings in ieee80211/rtl819x_HTProc.c

drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c:222:6: warning: symbol 'IsHTHalfNmode40Bandwidth' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c:241:6: warning: symbol 'IsHTHalfNmodeSGI' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c:379:6: warning: symbol 'HTIOTPeerDetermine' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c:416:4: warning: symbol 'HTIOTActIsDisableMCS14' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c:435:6: warning: symbol 'HTIOTActIsDisableMCS15' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c:472:6: warning: symbol 'HTIOTActIsDisableMCSTwoSpatialStream' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c:489:4: warning: symbol 'HTIOTActIsDisableEDCATurbo' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c:503:4: warning: symbol 'HTIOTActIsMgntUseCCK6M' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c:518:4: warning: symbol 'HTIOTActIsCCDFsync' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c:795:4: warning: symbol 'HT_PickMCSRate' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c:910:4: warning: symbol 'HTFilterMCSRate' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c:1320:6: warning: symbol 'HTUseDefaultSetting' was not declared. Should it be static?

Signed-off-by: Ana Rey <anarey@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 17:46:55 -07:00
Ana Rey 1d6fa8954b staging: rtl8192u: make in ieee80211/rtl819x_TSProc.c some local functions static
Make some local functions static and fix coding style in this function
declarations when It is necessary.

These are the local functions that were made static:
TsSetupTimeOut, TsInactTimeout RxPktPendingTimeout, TsAddBaProcess,
ResetTsCommonInfo, ResetTxTsEntry, ResetRxTsEntry, AdmitTS,
SearchAdmitTRStream, MakeTSEntry, RemoveTsEntry.

Fix the following sparse warnings in ieee80211/rtl819x_TSProc.c

drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c:6:6: warning: symbol 'TsSetupTimeOut' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c:12:6: warning: symbol 'TsInactTimeout' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c:25:6: warning: symbol 'RxPktPendingTimeout' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c:102:6: warning: symbol 'TsAddBaProcess' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c:113:6: warning: symbol 'ResetTsCommonInfo' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c:122:6: warning: symbol 'ResetTxTsEntry' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c:133:6: warning: symbol 'ResetRxTsEntry' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c:227:6: warning: symbol 'AdmitTS' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c:237:17: warning: symbol 'SearchAdmitTRStream' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c:312:6: warning: symbol 'MakeTSEntry' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c:475:6: warning: symbol 'RemoveTsEntry' was not declared. Should it be static?

Signed-off-by: Ana Rey <anarey@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 17:46:55 -07:00
Ana Rey a72eea3b7e staging: rtl8192u: Deleted 'alloc_tx_beacon_desc_ring' function in r8192U_core.c
This patch delete the 'alloc_tx_beacon_desc_ring' function that is not
used in anywhere in the driver.

Fix the following sparse warning in r8192U_core.c

drivers/staging/rtl8192u/r8192U_core.c:883:5: warning: symbol 'alloc_tx_beacon_desc_ring' was not declared. Should it be static?

Signed-off-by: Ana Rey <anarey@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 17:46:55 -07:00
Monam Agarwal 1633dc5ecc Staging: ft1000-usb: Fix Smatch Warning in ft1000_hw.c
This patch fixes following smatch warning:
/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c:1148 ft1000_proc_drvmsg() warn: returning -1 instead of -ENOMEM is sloppy

Signed-off-by: Monam Agarwal <monamagarwal123@gmail.com>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 17:43:17 -07:00
Ana Rey 2eeaa73cd9 staging: rts5139: Added in sd_cprm.c an include to fix a sparse warning
Fix the following warnings from sparse in drivers/staging/rts5139/sd_cprm.c
due to the missing include of sd_cprm.h

Signed-off-by: Ana Rey <anarey@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 17:41:13 -07:00
Ana Rey d2a276700c staging: rts5139: make thrts5139_usb_idse local variable static in rts51x.c
Make the local variable rts5139_usb_ids static

Fix the following sparse warnings in rts51x.c

CHECK   drivers/staging/rts5139/rts51x.c
drivers/staging/rts5139/rts51x.c:835:22: warning: symbol 'rts5139_usb_ids' was not declared. Should it be static?

Signed-off-by: Ana Rey <anarey@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 17:41:07 -07:00
Ana Rey 884715f34a staging: rts5139: Added in ms_mg.c an include to fix a sparse warning
Fix the following warnings from sparse in drivers/staging/rts5139/ms_mg.c
due to the missing include of ms_mg.h

drivers/staging/rts5139/ms_mg.c:81:5: warning: symbol 'mg_set_tpc_para_sub' was not declared. Should it be static?
drivers/staging/rts5139/ms_mg.c:122:5: warning: symbol 'rts51x_mg_set_leaf_id' was not declared. Should it be static?
drivers/staging/rts5139/ms_mg.c:173:5: warning: symbol 'rts51x_mg_get_local_EKB' was not declared. Should it be static?
drivers/staging/rts5139/ms_mg.c:232:5: warning: symbol 'rts51x_mg_chg' was not declared. Should it be static?
drivers/staging/rts5139/ms_mg.c:323:5: warning: symbol 'rts51x_mg_get_rsp_chg' was not declared. Should it be static?
drivers/staging/rts5139/ms_mg.c:392:5: warning: symbol 'rts51x_mg_rsp' was not declared. Should it be static?
drivers/staging/rts5139/ms_mg.c:450:5: warning: symbol 'rts51x_mg_get_ICV' was not declared. Should it be static?
drivers/staging/rts5139/ms_mg.c:514:5: warning: symbol 'rts51x_mg_set_ICV' was not declared. Should it be static?

Signed-off-by: Ana Rey <anarey@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 17:40:59 -07:00
Ana Rey cf883f9b06 staging: rts5139: make the local variable static
Make the local variable (media_not_present and invalid_cmd_field) static

Fix the following sparse warnings in rts51x_transport.c

drivers/staging/rts5139/rts51x_transport.c:649:4: warning: symbol 'media_not_present' was not declared. Should it be static?
drivers/staging/rts5139/rts51x_transport.c:651:4: warning: symbol 'invalid_cmd_field' was not declared. Should it be static?

Signed-off-by: Ana Rey <anarey@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 17:33:36 -07:00
Ana Rey f6bd19e0ae staging: rtl8192u: make in r8180_93cx6.c some local functions static
Make some local functions (eprom_cs, eprom_ck_cycle, eprom_w, eprom_r
and eprom_send_bits_string) static

Fix the following sparse warnings in r8180_93cx6.c

drivers/staging/rtl8192u/r8180_93cx6.c:23:6: warning: symbol 'eprom_cs' was not declared. Should it be static?
drivers/staging/rtl8192u/r8180_93cx6.c:40:6: warning: symbol 'eprom_ck_cycle' was not declared. Should it be static?
drivers/staging/rtl8192u/r8180_93cx6.c:56:6: warning: symbol 'eprom_w' was not declared. Should it be static?
drivers/staging/rtl8192u/r8180_93cx6.c:71:7: warning: symbol 'eprom_r' was not declared. Should it be static?
drivers/staging/rtl8192u/r8180_93cx6.c:85:6: warning: symbol 'eprom_send_bits_string' was not declared. Should it be static?

Signed-off-by: Ana Rey <anarey@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 17:07:06 -07:00
Ana Rey f4c6074aa6 staging: rtl8192u: make in r8192U_core.c the local functions static
Make some local functions static.

The local functions are CamResetAllEntry, tx_timeout,
rtl8192_data_hard_stop, rtl8192_data_hard_resume, rtl8192_hard_data_xmit,
rtl8192_hard_start_xmit, rtl8192_config_rate, rtl8192_update_cap,
rtl8192_net_update, MRateToHwRate8190Pci, tl8192_link_change,
rtl8192_update_beacon, WDCAPARA_ADD, rtl8192_qos_activate,
GetHalfNmodeSupportByAPs819xUsb, rtl8192_refresh_supportrate,
rtl8192_getSupportedWireleeMode, rtl8192_SetWirelessMode,
rtl8192_get_channel_map, rtl8192_init,
rtl8192_hwconfig, rtl8192_adapter_start, TxCheckStuck,
rtl819x_ifcheck_resetornot, CamRestoreAllEntry, rtl819x_ifsilentreset,
rtl819x_update_rxcounts, rtl8192_open, r8192_set_mac_adr, rtl8192_ioctl,
HwRateToMRate90, rtl819x_translate_todbm, rtl8192_process_phyinfo,
rtl8192_record_rxdesc_forlateruse, rtl8192_rx_nomal,
rtl819xusb_process_received_packet, rtl8192_rx_cmd.

Fix the following sparse warnings in r8192U_core.c

drivers/staging/rtl8192u/r8192U_core.c:241:6: warning: symbol 'CamResetAllEntry' was not declared. Should it be static?
drivers/staging/rtl8192u/r8192U_core.c:676:6: warning: symbol 'tx_timeout' was not declared. Should it be static?
drivers/staging/rtl8192u/r8192U_core.c:1014:6: warning: symbol 'rtl8192_data_hard_stop' was not declared. Should it be static?
drivers/staging/rtl8192u/r8192U_core.c:1020:6: warning: symbol 'rtl8192_data_hard_resume' was not declared. Should it be static?
drivers/staging/rtl8192u/r8192U_core.c:1028:6: warning: symbol 'rtl8192_hard_data_xmit' was not declared. Should it be static?
drivers/staging/rtl8192u/r8192U_core.c:1056:5: warning: symbol 'rtl8192_hard_start_xmit' was not declared. Should it be static?
drivers/staging/rtl8192u/r8192U_core.c:1380:6: warning: symbol 'rtl8192_config_rate' was not declared. Should it be static?
drivers/staging/rtl8192u/r8192U_core.c:1427:6: warning: symbol 'rtl8192_update_cap' was not declared. Should it be static?
drivers/staging/rtl8192u/r8192U_core.c:1449:6: warning: symbol 'rtl8192_net_update' was not declared. Should it be static?
drivers/staging/rtl8192u/r8192U_core.c:1677:4: warning: symbol 'MRateToHwRate8190Pci' was not declared. Should it be static?
drivers/staging/rtl8192u/r8192U_core.c:2043:6: warning: symbol 'rtl8192_link_change' was not declared. Should it be static?
drivers/staging/rtl8192u/r8192U_core.c:2075:6: warning: symbol 'rtl8192_update_beacon' was not declared. Should it be static?
drivers/staging/rtl8192u/r8192U_core.c:2090:5: warning: symbol 'WDCAPARA_ADD' was not declared. Should it be static?
drivers/staging/rtl8192u/r8192U_core.c:2091:6: warning: symbol 'rtl8192_qos_activate' was not declared. Should it be static?
drivers/staging/rtl8192u/r8192U_core.c:2319:6: warning: symbol 'GetHalfNmodeSupportByAPs819xUsb' was not declared. Should it be static?
drivers/staging/rtl8192u/r8192U_core.c:2333:6: warning: symbol 'rtl8192_refresh_supportrate' was not declared. Should it be static?
drivers/staging/rtl8192u/r8192U_core.c:2344:4: warning: symbol 'rtl8192_getSupportedWireleeMode' was not declared. Should it be static?
drivers/staging/rtl8192u/r8192U_core.c:2363:6: warning: symbol 'rtl8192_SetWirelessMode' was not declared. Should it be static?
drivers/staging/rtl8192u/r8192U_core.c:2783:7: warning: symbol 'rtl8192_get_channel_map' was not declared. Should it be static?
drivers/staging/rtl8192u/r8192U_core.c:2796:7: warning: symbol 'rtl8192_init' was not declared. Should it be static?
drivers/staging/rtl8192u/r8192U_core.c:2844:6: warning: symbol 'rtl8192_hwconfig' was not declared. Should it be static?
drivers/staging/rtl8192u/r8192U_core.c:2927:6: warning: symbol 'rtl8192_adapter_start' was not declared. Should it be static?
drivers/staging/rtl8192u/r8192U_core.c:3183:12: warning: symbol 'TxCheckStuck' was not declared. Should it be static?
drivers/staging/rtl8192u/r8192U_core.c:3286:12: warning: symbol 'rtl819x_ifcheck_resetornot' was not declared. Should it be static?
drivers/staging/rtl8192u/r8192U_core.c:3325:6: warning: symbol 'CamRestoreAllEntry' was not declared. Should it be static?
drivers/staging/rtl8192u/r8192U_core.c:3401:6: warning: symbol 'rtl819x_ifsilentreset' was not declared. Should it be static?
drivers/staging/rtl8192u/r8192U_core.c:3521:6: warning: symbol 'rtl819x_update_rxcounts' was not declared. Should it be static?
drivers/staging/rtl8192u/r8192U_core.c:3638:5: warning: symbol 'rtl8192_open' was not declared. Should it be static?
drivers/staging/rtl8192u/r8192U_core.c:3758:5: warning: symbol 'r8192_set_mac_adr' was not declared. Should it be static?
drivers/staging/rtl8192u/r8192U_core.c:3774:5: warning: symbol 'rtl8192_ioctl' was not declared. Should it be static?
drivers/staging/rtl8192u/r8192U_core.c:3865:4: warning: symbol 'HwRateToMRate90' was not declared. Should it be static?
drivers/staging/rtl8192u/r8192U_core.c:3951:6: warning: symbol 'rtl819x_translate_todbm' was not declared. Should it be static?
drivers/staging/rtl8192u/r8192U_core.c:3967:6: warning: symbol 'rtl8192_process_phyinfo' was not declared. Should it be static?
drivers/staging/rtl8192u/r8192U_core.c:4453:6: warning: symbol 'rtl8192_record_rxdesc_forlateruse' was not declared. Should it be static?
drivers/staging/rtl8192u/r8192U_core.c:4725:6: warning: symbol 'rtl8192_rx_nomal' was not declared. Should it be static?
drivers/staging/rtl8192u/r8192U_core.c:4875:6: warning: symbol 'rtl819xusb_process_received_packet' was not declared. Should it be static?
drivers/staging/rtl8192u/r8192U_core.c:4936:6: warning: symbol 'rtl8192_rx_cmd' was not declared. Should it be static?

Signed-off-by: Ana Rey <anarey@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 17:07:06 -07:00
Aybuke Ozdemir fa91783ec0 staging: solo6x10: solo6x10-v4l2-enc.c: Fix line over 80 characters.
Fix checkpatch.pl issues with line over 80 characters in solo6x10-v4l2-enc.c

Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 17:07:06 -07:00
Iulia Manda 9009dd160f staging: vt6656: Use __releases/__acquires annotations
This patch fixes the following sparse warnings:

drivers/staging/vt6656/usbpipe.c:147:24: warning: context imbalance in 'PIPEnsControlOut' - unexpected unlock
drivers/staging/vt6656/usbpipe.c:209:24: warning: context imbalance in 'PIPEnsControlIn' - unexpected unlock

Signed-off-by: Iulia Manda <iulia.manda21@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 17:07:06 -07:00
Gulsah Kose a1148034b3 staging: slicoss: Fix unnecessary line continuations
Removed unnecessary line continuations in slicoss.c

Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 16:49:56 -07:00
David S. Miller 85dcce7a73 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts:
	drivers/net/usb/r8152.c
	drivers/net/xen-netback/netback.c

Both the r8152 and netback conflicts were simple overlapping
changes.

Signed-off-by: David S. Miller <davem@davemloft.net>
2014-03-14 22:31:55 -04:00
Chi Pham 24e7d79901 staging: cxt1e1: Removed assignments from if statements.
Assignments removed from if statements.
Fixed checkpatch warning such as indentation and negative error returns in
adjacent code.

Coccinelle was used for this patch. The following script found the match:
@simple@
expression E1, E2;
statement S1, S2;
@@

+ E1 = E2;
  if (
-     (E1 = E2)
+     E1
     )
  S1 else S2

@left@
expression E0, E1, E2;
statement S1, S2;
@@

+ E1 = E2;
  if (
-     (E1 = E2)
+     E1
         == E0
     )
  S1 else S2

Signed-off-by: Chi Pham <fempsci@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-13 17:44:45 -07:00
Andreea-Cristina Bernat 5a9e30eec8 staging: lirc: Add fallthrough comment
This patch adds fallthrough comments for the cases not preceded by
break or fallthrough comment

Signed-off-by: Andreea-Cristina Bernat <bernat.ada@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-13 17:37:23 -07:00
Himangi Saraogi 18ce30c226 staging:lustre: Fix Sparse Warning for Static Declarations in console.c
This patch fixes the following Sparse warnings in console.c :
drivers/staging/lustre/lnet/selftest/console.c:65:1: warning: symbol 'lstcon_node_get' was not declared. Should it be static?
drivers/staging/lustre/lnet/selftest/console.c:118:1: warning: symbol 'lstcon_node_put' was not declared. Should it be static?
drivers/staging/lustre/lnet/selftest/console.c:348:1: warning: symbol 'lstcon_sesrpc_condition' was not declared. Should it be static?
drivers/staging/lustre/lnet/selftest/console.c:377:1: warning: symbol 'lstcon_sesrpc_readent' was not declared. Should it be static?
drivers/staging/lustre/lnet/selftest/console.c:834:1: warning: symbol 'lstcon_batch_find' was not declared. Should it be static?
drivers/staging/lustre/lnet/selftest/console.c:1002:1: warning: symbol 'lstcon_batrpc_condition' was not declared. Should it be static?
drivers/staging/lustre/lnet/selftest/console.c:1145:1: warning: symbol 'lstcon_testrpc_condition' was not declared. Should it be static?
drivers/staging/lustre/lnet/selftest/console.c:1374:1: warning: symbol 'lstcon_test_find' was not declared. Should it be static?
drivers/staging/lustre/lnet/selftest/console.c:1389:1: warning: symbol 'lstcon_tsbrpc_readent' was not declared. Should it be static?
drivers/staging/lustre/lnet/selftest/console.c:1468:1: warning: symbol 'lstcon_statrpc_readent' was not declared. Should it be static?
drivers/staging/lustre/lnet/selftest/console.c:1492:1: warning: symbol 'lstcon_ndlist_stat' was not declared. Should it be static?
drivers/staging/lustre/lnet/selftest/console.c:1581:1: warning: symbol 'lstcon_debug_ndlist' was not declared. Should it be static?

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-13 17:37:09 -07:00
Gulsah Kose 0dedbf9f56 staging: rts5208: Remove unnecessary parentheses.
Return is not a method and doesn't need parentheses. Removed unnecaasary
parentheses.

Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-13 17:37:01 -07:00
Himangi Saraogi cb90e78dcc staging:comedi: Fix sparse warnings of incorrect type in assignment
This patch fixes the following sparse warnings:
drivers/staging/comedi/drivers/mite.c:343:44: warning: incorrect type in assignment (different base types)
drivers/staging/comedi/drivers/mite.c:343:44:    expected unsigned int [unsigned] [usertype] count
drivers/staging/comedi/drivers/mite.c:343:44:    got restricted __le32 [usertype] <noident>
drivers/staging/comedi/drivers/mite.c:344:43: warning: incorrect type in assignment (different base types)
drivers/staging/comedi/drivers/mite.c:344:43:    expected unsigned int [unsigned] [usertype] addr
drivers/staging/comedi/drivers/mite.c:344:43:    got restricted __le32 [usertype] <noident>
drivers/staging/comedi/drivers/mite.c:346:43: warning: incorrect type in assignment (different base types)
drivers/staging/comedi/drivers/mite.c:346:43:    expected unsigned int [unsigned] [usertype] next
drivers/staging/comedi/drivers/mite.c:346:43:    got restricted __le32 [usertype] <noident>
drivers/staging/comedi/drivers/mite.c:351:45: warning: incorrect type in assignment (different base types)
drivers/staging/comedi/drivers/mite.c:351:45:    expected unsigned int [unsigned] [usertype] next
drivers/staging/comedi/drivers/mite.c:351:45:    got restricted __le32 [usertype] <noident>

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-13 17:36:55 -07:00
Gulsah Kose a53b74d7e1 staging: rts5208: Fix line over 80 characters.
Fix checkpatch.pl issues with line over 80 characters in rtsx.c

Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-13 17:36:46 -07:00
Andreea-Cristina Bernat 774448dc60 staging: rtl8712: Delete space before semicolon
This patch solves the warning: "space prohibited before semicolon".

Signed-off-by: Andreea-Cristina Bernat <bernat.ada@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-13 17:36:40 -07:00
Himangi Saraogi 983b412231 staging:rtl8187se: Fix sparse warning in right shift
This patch fixes the following sparse warning:
drivers/staging/rtl8187se/r8180_core.c:1328:40: warning: right shift by bigger than source value
by adding parenthesis.

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Acked-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-13 17:33:01 -07:00
Andreea-Cristina Bernat 74f161f619 /staging/vt6656: Delete extra paranthesis from macro definition
This patch solves the error of checkpatch.pl by deleting the extra paranthesis.

Signed-off-by: Andreea-Cristina Bernat <bernat.ada@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-13 17:30:22 -07:00
Himangi Saraogi 72dbeaf589 staging:rtl8187se:ieee80211: Fix sparse warning of cast to restricted __le16
This patch fixes the following sparse warnings:
drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_tkip.c:496:17: warning: cast to restricted __le16
drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_tkip.c:540:12: warning: cast to restricted __le16
drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_tkip.c:586:12: warning: cast to restricted __le16

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Reviewed-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-13 17:28:31 -07:00
Elena Oat 160eaf20a8 Staging: rtl8188eu: Fix sparse warnings.
This patch fixes following warnings produced by sparse:

drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:3867:31:    expected void
const *<noident>
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:3867:31:    got void
[noderef] <asn:1>*pointer
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:3869:38: warning:
incorrect type in argument 1 (different address spaces)
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:3869:38:    expected void
const *<noident>
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:3869:38:    got void
[noderef] <asn:1>*pointer
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:3871:38: warning:
incorrect type in argument 1 (different address spaces)
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:3871:38:    expected void
const *<noident>
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:3871:38:    got void
[noderef] <asn:1>*pointer
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:3873:38: warning:
incorrect type in argument 1 (different address spaces)
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:3873:38:    expected void
const *<noident>
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:3873:38:    got void
[noderef] <asn:1>*pointer
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:3875:38: warning:
incorrect type in argument 1 (different address spaces)
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:3875:38:    expected void
const *<noident>
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:3875:38:    got void
[noderef] <asn:1>*pointer
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:3878:38: warning:
incorrect type in argument 1 (different address spaces)
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:3878:38:    expected void
const *<noident>
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:3878:38:    got void
[noderef] <asn:1>*pointer
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:3880:38: warning:
incorrect type in argument 1 (different address spaces)
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:3880:38:    expected void
const *<noident>
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:3880:38:    got void
[noderef] <asn:1>*pointer
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:3883:38: warning:
incorrect type in argument 1 (different address spaces)
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:3883:38:    expected void const *<noident>
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:3883:38:    got void
[noderef] <asn:1>*pointer
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:3897:9: warning: cast
removes address space of expression

While at it, I have also fixed the warnings of lines over 80 characters.

Signed-off-by: Elena Oat <oat.elena@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-13 16:49:19 -07:00
Gulsah Kose 34a2c5fe5b staging: rtl8712: Remove unnecessary parentheses.
Remove unnecessary parentheses from rtl871x_cmd.c

Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-13 16:49:16 -07:00
Iulia Manda 56116b2b09 staging: unisys: visorutil: Use kzalloc instead of kmalloc with memset
Fix coccinelle warnings of better allocation by using kzalloc.
In these cases, kzalloc is preferred, as kmalloc may fail if it does not find
contiguous memory.

Signed-off-by: Iulia Manda <iulia.manda21@gmail.com>
Acked-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-13 16:49:02 -07:00
Iulia Manda 464a5028ea staging: android: ion: Use ERR_CAST instead of ERR_PTR
Fix the following coccinelle warnings in ion.c:
drivers/staging/android/ion/ion.c:511:9-16: WARNING: ERR_CAST can be used with buffer
drivers/staging/android/ion/ion.c:218:9-16: WARNING: ERR_CAST can be used with table
drivers/staging/android/ion/ion.c:1150:9-16: WARNING: ERR_CAST can be used with dmabuf

Signed-off-by: Iulia Manda <iulia.manda21@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-13 16:34:02 -07:00
Iulia Manda 164ad86d33 staging: android: ion: Replace seq_printf with seq_puts
It is preferred to use seq_puts instead of seq_printf here, as it suffices string printing.

Signed-off-by: Iulia Manda <iulia.manda21@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-13 16:33:54 -07:00
Iulia Manda 7287bb5258 staging: android: ion: Fix quoted string split across lines
Join strings from two separated lines, even if this makes line longer than 80
characters.

Signed-off-by: Iulia Manda <iulia.manda21@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-13 16:33:43 -07:00
Kristina Martšenko b812982e6b staging: rtl8188eu: explicitly convert from __le16 to integer
BA_para_set (of type __le16) is implicitly cast into an integer for
bitwise operations, after which the result is converted back into a
__le16. Make the initial cast explicit to make the code clearer. In
addition, refactor the code for readability.

This also removes five sparse warnings of the following type:
drivers/staging/rtl8188eu//core/rtw_mlme_ext.c:6114:70: warning: restricted __le16 degrades to integer

Signed-off-by: Kristina Martšenko <kristina.martsenko@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-13 16:24:19 -07:00
Andreea-Cristina Bernat 17e65fbbe2 staging/media/solo6x10: Fix coding-style error
This patch fixes the error "space required after that ';'" for
the file /drivers/staging/media/solo6x10/solo6x10-tx28.c

Signed-off-by: Andreea-Cristina Bernat <bernat.ada@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-13 16:21:12 -07:00
Ashley Smith 042bdadb85 staging: vt6655 : Fix placement of open brace
This patch fixes the checkpatch warning "that open brace { should be on
the previous line" for a non-function statement block.

Signed-off-by: Ashley Smith <ashley@eclipso.ch>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-13 16:20:58 -07:00
Iulia Manda 0469c7471e Staging: dgnc: fix indentation in dgnc_mgmt.c
Align test parts in if statement on separate lines.

Signed-off-by: Iulia Manda <iulia.manda21@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-13 16:17:59 -07:00
Himangi Saraogi 639296ba38 staging:cxt1e1:remove unused code with #if 0
The functions musycc_del_chan and musycc_del_chan_stats
are not being used at the moment and may not be required.
Remove them for now (with #if 0) till it is decided whether
it is really required.

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-13 16:06:39 -07:00
Elena Oat 2a8efee2c7 Staging: rtl8188eu: Fix warning of unchecked sscanf return value.
This patch fixes the warnings produced by checkpatch "unchecked sscanf
return value" in file ioctl_linux.c.

Signed-off-by: Elena Oat <oat.elena@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-13 16:06:31 -07:00
Ana Rey e03b52b5c9 staging: rtl8187se: Fix braces in ieee80211/ieee80211_crypt_tkip.c
This patch fixes braces errors as the codingStyle of the kernel
recommends.

Thus, this patch fixes these errors and warning messages found by
checkpatch.pl:
WARNING: braces {} are not necessary for single statement blocks
ERROR: that open brace { should be on the previous line

Signed-off-by: Ana Rey <anarey@gmail.com>
Reviewed-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-13 15:58:49 -07:00
Ana Rey 1a2a30029e staging: rtl8187se: Fix whitespaces in ieee80211/ieee80211_crypt_tkip.c
This patch fixes whitespaces as the codingStyle of the kernel
recommends.

Thus, this patch fixes these errors found by checkpatch.pl:

ERROR: space required before the open parenthesis '('
ERROR: space required before that '*' (ctx:OxV)
ERROR: spaces required around that '=' (ctx:VxW)

Signed-off-by: Ana Rey <anarey@gmail.com>
Reviewed-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-13 15:58:49 -07:00
Ana Rey 7758a3a9e2 staging: rtl8187se: Deleted rtl8225z2_rf_set_mode function
After the next warning messages by sparse tools:

drivers/staging/rtl8187se/r8180_rtl8225z2.c:609:6: warning: symbol 'rtl8225z2_rf_set_mode' was not declared. Should it be static?
drivers/staging/rtl8187se/r8180_rtl8225z2.c:609:13: warning: ‘rtl8225z2_rf_set_mode’ defined but not used [-Wunused-function]
 static void rtl8225z2_rf_set_mode(struct net_device *dev)

And the next search:
~/opw/dev/staging/drivers/staging/rtl8187se
 (staging-next) $ git grep rtl8225z2_rf_set_mode
r8180_rtl8225z2.c:void rtl8225z2_rf_set_mode(struct net_device *dev)

I decided to delete rtl8225z2_rf_set_mode function.

Signed-off-by: Ana Rey <anarey@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-13 15:52:14 -07:00
Ana Rey 24dd8e7fd9 staging: rtl8187se: Delete commented code in r8180.h
This patch deletes all commented code in r8180.h that is not necessary.

Signed-off-by: Ana Rey <anarey@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-13 15:49:55 -07:00
Ana Rey 428bd7df5d staging: rtl8187se: Convert _RT_PS_MODE typedef into an enum
The Documentation/CodingStyle doesn't recommend the use of typedef,
convert this into an enum.

While at it, I have also renamed the variable names that were used in
this typedef not to use Hungarian notation.

Signed-off-by: Ana Rey <anarey@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-13 15:49:55 -07:00