GitHub/moto-9609/android_kernel_motorola_exynos9610.git
10 years agostaging: comedi: addi_apci_1564: move apci1564_do_insn_bits() to addi_apci_1564.c
Chase Southwood [Thu, 22 May 2014 00:41:15 +0000 (19:41 -0500)]
staging: comedi: addi_apci_1564: move apci1564_do_insn_bits() to addi_apci_1564.c

This function is already compliant with the comedi API and is behaving as
comedi core expects.  This patch moves it out of
addi-data/hwdrv_apci1564.c and into the driver proper since no further
work needs to be done on it.

Signed-off-by: Chase Southwood <chase.southwood@gmail.com>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: addi_apci_1564: move apci1564_di_insn_bits() to addi_apci_1564.c
Chase Southwood [Thu, 22 May 2014 00:40:09 +0000 (19:40 -0500)]
staging: comedi: addi_apci_1564: move apci1564_di_insn_bits() to addi_apci_1564.c

This function is already compliant with the comedi API and is behaving as
comedi core expects.  This patch moves it out of
addi-data/hwdrv_apci1564.c and into the driver proper since no further
work needs to be done on it.

Signed-off-by: Chase Southwood <chase.southwood@gmail.com>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: comedi: fixed warning shown by checkpatch tool on cb_das16_cs.c file
Raghavendra Ganiga [Mon, 19 May 2014 16:11:36 +0000 (21:41 +0530)]
Staging: comedi: fixed warning shown by checkpatch tool on cb_das16_cs.c file

This is a patch to fix the warnings shown by checkpatch tool on
file cb_das16_cs.c

Signed-off-by: Raghavendra Chandra Ganiga <ravi23ganiga@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: comedi: fixed warnings reported by checkpatch tool on comedi_test.c file
Raghavendra Ganiga [Mon, 19 May 2014 16:19:03 +0000 (21:49 +0530)]
Staging: comedi: fixed warnings reported by checkpatch tool on comedi_test.c file

This is a patch to remove warnings reported by checkpatch tool on
comedi_test.c file

Signed-off-by: Raghavendra Chandra Ganiga <ravi23ganiga@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: Fixes Coding Style Warning in file das08.h
Sheetal Tigadoli [Thu, 8 May 2014 10:13:37 +0000 (15:43 +0530)]
staging: comedi: Fixes Coding Style Warning in file das08.h

The Patch fixes following Warnings, found using checkpatch.pl, in file das08.h

./scripts/checkpatch.pl --file --terse drivers/staging/comedi/drivers/das08.h
drivers/staging/comedi/drivers/das08.h:43: WARNING: line over 80 characters
total: 0 errors, 1 warnings, 50 lines checked

Signed-off-by: Sheetal Tigadoli <sheetal.tigadoli@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: ii_pci20kc: fix usage of uninit scalar in ii20k_attach()
Christian Engelmayer [Wed, 7 May 2014 19:45:52 +0000 (21:45 +0200)]
staging: comedi: ii_pci20kc: fix usage of uninit scalar in ii20k_attach()

This driver supports the PCI-20001C-1a and PCI-20001C-2a carrier boards.
The -2a version has 32 on-board DIO channels. In case this variant is
detected, local variable 'has_dio' is set accordingly. Otherwise it is
left uninitialized and the following subdevice instantiation depends on
the stack. Detected by Coverity - CID 1077830.

Signed-off-by: Christian Engelmayer <cengelma@gmx.at>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: addi_apci_1564: remove boardinfo
Chase Southwood [Wed, 7 May 2014 07:04:17 +0000 (02:04 -0500)]
staging: comedi: addi_apci_1564: remove boardinfo

This driver only supports a single board type.  Remove the boardinfo and
its use in the driver.

Signed-off-by: Chase Southwood <chase.southwood@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: addi_apci_1564: remove check for timer subdevice
Chase Southwood [Wed, 7 May 2014 07:03:32 +0000 (02:03 -0500)]
staging: comedi: addi_apci_1564: remove check for timer subdevice

The only board served by this driver always has a timer, so we can init
the timer subdevice without checking first.

The boardinfo about the timer can also be removed and the data used
directly.

Signed-off-by: Chase Southwood <chase.southwood@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: remove subdevice member of struct comedi_async
Ian Abbott [Tue, 6 May 2014 12:12:18 +0000 (13:12 +0100)]
staging: comedi: remove subdevice member of struct comedi_async

The `async` member of `struct comedi_subdevice` may point to a `struct
comedi_async` or may be NULL.  The `subdevice` member of `struct
comedi_async` points back to the `struct comedi_subdevice` associated
with it in a one-to-one relationship.

All uses of the `subdevice` member of `struct comedi_async` apart from
its initialization have now been removed (by passing around a pointer to
the subdevice instead of to the "async" structure), so get rid of it.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: mite: pass subdevice to mite_sync_output_dma()
Ian Abbott [Tue, 6 May 2014 12:12:17 +0000 (13:12 +0100)]
staging: comedi: mite: pass subdevice to mite_sync_output_dma()

`mite_sync_output_dma()` in the "mite" module currently takes a pointer
to a `struct comedi_async` and gets a pointer to the owning `struct
comedi_subdevice` from the `subdevice` member.  Change it to take a
pointer to a `struct comedi_subdevice` and use the `async` member.

The motivation for this is to eliminate the `subdevice` member of
`struct comedi_async`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: mite: pass subdevice to mite_sync_input_dma()
Ian Abbott [Tue, 6 May 2014 12:12:16 +0000 (13:12 +0100)]
staging: comedi: mite: pass subdevice to mite_sync_input_dma()

`mite_sync_input_dma()` in the "mite" module currently takes a pointer
to a `struct comedi_async` and gets a pointer to the owning `struct
comedi_subdevice` from the `subdevice` member.  Change it to take a
pointer to a `struct comedi_subdevice` and use the `async` member.

The motivation for this is to eliminate the `subdevice` member of
`struct comedi_async`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: mite: pass subdevice to mite_buf_change()
Ian Abbott [Tue, 6 May 2014 12:12:15 +0000 (13:12 +0100)]
staging: comedi: mite: pass subdevice to mite_buf_change()

`mite_buf_change()` in the "mite" module currently takes a pointer to a
`struct comedi_async` and gets a pointer to the owning `struct
comedi_subdevice` from the `subdevice` member.  Change it to take a
pointer to a `struct comedi_subdevice` and use the `async` member.

The motivation for this is to eliminate the `subdevice` member of
`struct comedi_async`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: pass subdevice to comedi_buf_write_n_available()
Ian Abbott [Tue, 6 May 2014 12:12:14 +0000 (13:12 +0100)]
staging: comedi: pass subdevice to comedi_buf_write_n_available()

Local function `comedi_buf_write_n_available()` currently takes a
pointer to a `struct comedi_async`.  Change it to take a pointer to a
`struct comedi_subdevice` and use the `async` member for consistency
with the other comedi buffer handling functions.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: pass subdevice to __comedi_buf_write_alloc()
Ian Abbott [Tue, 6 May 2014 12:12:13 +0000 (13:12 +0100)]
staging: comedi: pass subdevice to __comedi_buf_write_alloc()

Local function `__comedi_buf_write_alloc()` is called by
`comedi_buf_write_alloc()` and `comedi_buf_put()`.  It currently takes a
pointer to a `struct comedi_async`.  Change it to take a pointer to a
`struct comedi_subdevice` and use the `async` member for consistency
with other comedi buffer handling functions.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: pass subdevice to comedi_buf_munge()
Ian Abbott [Tue, 6 May 2014 12:12:12 +0000 (13:12 +0100)]
staging: comedi: pass subdevice to comedi_buf_munge()

Local function `comedi_buf_munge()` is called by
`comedi_buf_write_free()` to modify (or "munge") the data copied from
a device into the buffer.

Currently, the function takes a pointer to a `struct comedi_async` and
gets a pointer to the comedi subdevice from the `subdevice` member.
Change it to take a pointer to a `struct comedi_subdevice` and get a
pointer to the "async" structure from the `async` member.

The main motivation for this is to elimate the `subdevice` member of
`struct comedi_async`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: pass subdevice to comedi_buf_is_mmapped()
Ian Abbott [Tue, 6 May 2014 12:12:11 +0000 (13:12 +0100)]
staging: comedi: pass subdevice to comedi_buf_is_mmapped()

Change the parameters of `comedi_buf_is_mmapped()` to pass a pointer to
the comedi subdevice instead of a pointer to the "async" structure
belonging to the subdevice.

The main aim at the moment is to replace all the `struct comedi_async *`
parameters with `struct comedi_subdevice *` parameters in the comedi
driver API.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: pass subdevice to comedi_buf_reset()
Ian Abbott [Tue, 6 May 2014 12:12:10 +0000 (13:12 +0100)]
staging: comedi: pass subdevice to comedi_buf_reset()

Change the parameters of `comedi_buf_reset()` to pass a pointer to the
comedi subdevice instead of a pointer to the "async" structure belonging
to the subdevice.

The main aim at the moment is to replace all the `struct comedi_async *`
parameters with `struct comedi_subdevice *` parameters in the comedi
driver API.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: pass subdevice to comedi_buf_read_n_available()
Ian Abbott [Tue, 6 May 2014 12:12:09 +0000 (13:12 +0100)]
staging: comedi: pass subdevice to comedi_buf_read_n_available()

Change the parameters of `comedi_buf_read_n_available()` to pass a
pointer to the comedi subdevice instead of a pointer to the "async"
structure belonging to the subdevice.

The main aim at the moment is to replace all the `struct comedi_async *`
parameters with `struct comedi_subdevice *` parameters in the comedi
driver API.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: pass subdevice to comedi_buf_read_free()
Ian Abbott [Tue, 6 May 2014 12:12:08 +0000 (13:12 +0100)]
staging: comedi: pass subdevice to comedi_buf_read_free()

Change the parameters of `comedi_buf_read_free()` to pass a pointer to
the comedi subdevice instead of a pointer to the "async" structure
belonging to the subdevice.

The main aim at the moment is to replace all the `struct comedi_async *`
parameters with `struct comedi_subdevice *` parameters in the comedi
driver API.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: pass subdevice to comedi_buf_read_alloc()
Ian Abbott [Tue, 6 May 2014 12:12:07 +0000 (13:12 +0100)]
staging: comedi: pass subdevice to comedi_buf_read_alloc()

Change the parameters of `comedi_buf_read_alloc()` to pass a pointer to
the comedi subdevice instead of a pointer to the "async" structure
belonging to the subdevice.

The main aim at the moment is to replace all the `struct comedi_async *`
parameters with `struct comedi_subdevice *` parameters in the comedi
driver API.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: pass subdevice to comedi_buf_write_n_allocated()
Ian Abbott [Tue, 6 May 2014 12:12:06 +0000 (13:12 +0100)]
staging: comedi: pass subdevice to comedi_buf_write_n_allocated()

Change the parameters of `comedi_buf_write_n_allocated()` to pass a
pointer to the comedi subdevice instead of a pointer to the "async"
structure belonging to the subdevice.

The main aim at the moment is to replace all the `struct comedi_async *`
parameters with `struct comedi_subdevice *` parameters in the comedi
driver API.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: pass subdevice to comedi_buf_write_free()
Ian Abbott [Tue, 6 May 2014 12:12:05 +0000 (13:12 +0100)]
staging: comedi: pass subdevice to comedi_buf_write_free()

Change the parameters of `comedi_buf_write_free()` to pass a pointer to
the comedi subdevice instead of a pointer to the "async" structure
belonging to the subdevice.

The main aim at the moment is to replace all the `struct comedi_async *`
parameters with `struct comedi_subdevice *` parameters in the comedi
driver API.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: pass subdevice to comedi_buf_write_alloc()
Ian Abbott [Tue, 6 May 2014 12:12:04 +0000 (13:12 +0100)]
staging: comedi: pass subdevice to comedi_buf_write_alloc()

Change the parameters of `comedi_buf_write_alloc()` to pass a pointer to
the comedi subdevice instead of a pointer to the "async" structure
belonging to the subdevice.

The main aim at the moment is to replace all the `struct comedi_async *`
parameters with `struct comedi_subdevice *` parameters in the comedi
driver API.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: ni_tiocmd: pass subdevice to command setup functions
Ian Abbott [Tue, 6 May 2014 12:12:03 +0000 (13:12 +0100)]
staging: comedi: ni_tiocmd: pass subdevice to command setup functions

The `ni_tio_input_cmd()`, `ni_tio_output_cmd()` and `ni_tio_cmd_setup()`
functions are called from `ni_tio_cmd()` to set up a comedi command.
They currently get passed two parameters, a pointer to a `struct
ni_gpct` and a pointer to a `struct comedi_async`, but both of those
come from members of a `struct comedi_subdevice` (the former from the
`private` member).  Replace the parameters with a pointer to the `struct
comedi_subdevice`.

The main motive is to make the comedi subdevice more easily available to
the functions for the use of subsequent patches to remove the `struct
comedi_async *` parameters from the comedi buffer handling functions.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: pass subdevice to comedi_buf_memcpy_from()
Ian Abbott [Tue, 6 May 2014 12:12:02 +0000 (13:12 +0100)]
staging: comedi: pass subdevice to comedi_buf_memcpy_from()

Change the parameters of `comedi_buf_memcpy_from()` to pass a pointer to
the comedi subdevice instead of a pointer to the "async" structure
belonging to the subdevice.

The main aim at the moment is to replace all the `struct comedi_async *`
parameters with `struct comedi_subdevice *` parameters in the comedi
driver API.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: pass subdevice to comedi_buf_memcpy_to()
Ian Abbott [Tue, 6 May 2014 12:12:01 +0000 (13:12 +0100)]
staging: comedi: pass subdevice to comedi_buf_memcpy_to()

Change the parameters of `comedi_buf_memcpy_to()` to pass a pointer to
the comedi subdevice instead of a pointer to the "async" structure
belonging to the subdevice.

The main aim at the moment is to replace all the `struct comedi_async *`
parameters with `struct comedi_subdevice *` parameters in the comedi
driver API.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: pass subdevice to comedi_buf_get()
Ian Abbott [Tue, 6 May 2014 12:12:00 +0000 (13:12 +0100)]
staging: comedi: pass subdevice to comedi_buf_get()

Change the parameters of `comedi_buf_get()` to pass a pointer to the
comedi subdevice instead of a pointer to the "async" structure belonging
to the subdevice.

The function gets a sample value from the comedi buffer, but currently
only deals with 16-bit sample types.  A future version could deal with
16 or 32-bit sample types depending on the value of the SDF_LSAMPL
subdevice flag.

The main aim at the moment is to replace all the `struct comedi_async *`
parameters with `struct comedi_subdevice *` parameters in the comedi
driver API.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: pass subdevice to comedi_buf_put()
Ian Abbott [Tue, 6 May 2014 12:11:59 +0000 (13:11 +0100)]
staging: comedi: pass subdevice to comedi_buf_put()

Change the parameters of `comedi_buf_put()` to pass a pointer to the
comedi subdevice instead of a pointer to the "async" structure belonging
to the subdevice.

The function puts a sample value in the comedi buffer, but currently
only deals with 16-bit sample types.  A future version could deal with
16 or 32-bit sample types depending on the value of the SDF_LSAMPL
subdevice flag.

The main aim at the moment is to replace all the `struct comedi_async *`
parameters with `struct comedi_subdevice *` parameters in the comedi
driver API.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: pcl730: add support for Diamond Systems PC/104 modules
H Hartley Sweeten [Tue, 6 May 2014 23:08:56 +0000 (16:08 -0700)]
staging: comedi: pcl730: add support for Diamond Systems PC/104 modules

The Diamond Systems OPMM-1616-XT board is a PC/104 module with 16
optoisolated inputs and 16 relay outputs.

The PEARL-MM-P board is a PC/104 module with 16 relay outputs.

Both of these boards can be supported by the pcl730 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>
10 years agostaging: comedi: amplc_pci224: use comedi_fc helpers to validate timer args
H Hartley Sweeten [Tue, 6 May 2014 19:26:04 +0000 (12:26 -0700)]
staging: comedi: amplc_pci224: use comedi_fc helpers to validate timer args

Use the comedi_fc helper cfc_check_trigger_arg_is() to validate the
scan_begin_arg when the scan_begin_src is TRIG_TIMER.

For aesthetics reasons, rename the local variable 'tmp' to 'arg'.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: amplc_dio200_common: remove 'continuous' from subdevice private...
H Hartley Sweeten [Tue, 6 May 2014 17:55:23 +0000 (10:55 -0700)]
staging: comedi: amplc_dio200_common: remove 'continuous' from subdevice private data

This member of the subdevice private data can be determined from the
cmd->stop_src. Do that instead.

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>
10 years agostaging: comedi: adl_pc19111: remove 'chanlist_len' from private data
H Hartley Sweeten [Mon, 5 May 2014 16:48:19 +0000 (09:48 -0700)]
staging: comedi: adl_pc19111: remove 'chanlist_len' from private data

This member of the private data is a copy of the cmd->chanlist_len. Use
that instead.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: adl_pc19111: rename 'async_cmd' variable in (*do_cmd)
H Hartley Sweeten [Mon, 5 May 2014 16:48:18 +0000 (09:48 -0700)]
staging: comedi: adl_pc19111: rename 'async_cmd' variable in (*do_cmd)

The comedi_cmd pointer is typically just called 'cmd'. Rename the local
variable in pci9111_ai_do_cmd().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: adl_pc19111: remove 'stop_is_none' from private data
H Hartley Sweeten [Mon, 5 May 2014 16:48:17 +0000 (09:48 -0700)]
staging: comedi: adl_pc19111: remove 'stop_is_none' from private data

This member of the private data can be determined by checking the
cmd->stop_src. Do that instead.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: adl_pci9118: remove 'dmabuf_samples' from private data
H Hartley Sweeten [Mon, 5 May 2014 16:35:48 +0000 (09:35 -0700)]
staging: comedi: adl_pci9118: remove 'dmabuf_samples' from private data

This member of the private data is set but never used. Remove it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: adl_pci9118: remove 'cnt0_divisor' from private data
H Hartley Sweeten [Mon, 5 May 2014 16:35:47 +0000 (09:35 -0700)]
staging: comedi: adl_pci9118: remove 'cnt0_divisor' from private data

This member of the private data is not used. Remove it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: adl_pci9118: tidy up start_pacer()
H Hartley Sweeten [Mon, 5 May 2014 16:35:46 +0000 (09:35 -0700)]
staging: comedi: adl_pci9118: tidy up start_pacer()

For aesthetics, rename this function so it has namespace associated
with the driver.

The divisors used to load the counters are stored in the private data.
Get them from there and remove the parameters.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: adl_pci9118: tidy up interrupt_pci9118()
H Hartley Sweeten [Mon, 5 May 2014 16:35:45 +0000 (09:35 -0700)]
staging: comedi: adl_pci9118: tidy up interrupt_pci9118()

For aesthetics, rename this function so it has namespace associated
with the driver.

Refactor the function to reduce the indent level and tidy up 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>
10 years agostaging: comedi: adl_pci9118: remove 'int_ai_func' from private data
H Hartley Sweeten [Mon, 5 May 2014 16:35:44 +0000 (09:35 -0700)]
staging: comedi: adl_pci9118: remove 'int_ai_func' from private data

The devpriv->usedma flag can be checked to determine which handler
function should be used to transfer the analog input data. Do that
instead and remove the member from the private data.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: adl_pci9118: remove 'ai16bits' from private data
H Hartley Sweeten [Mon, 5 May 2014 16:35:43 +0000 (09:35 -0700)]
staging: comedi: adl_pci9118: remove 'ai16bits' from private data

This member of the private data is only set when the analog input
subdevice maxdata is 0xffff. Just check the s->maxdata and remove
the private data member.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: adl_pci9118: remove 'useeoshandle' from private data
H Hartley Sweeten [Mon, 5 May 2014 16:35:42 +0000 (09:35 -0700)]
staging: comedi: adl_pci9118: remove 'useeoshandle' from private data

This member of the private data is always set to 0. Remove it and the
affected 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>
10 years agostaging: comedi: adl_pci9118: remove 'cnt0_users' from private data
H Hartley Sweeten [Mon, 5 May 2014 16:35:41 +0000 (09:35 -0700)]
staging: comedi: adl_pci9118: remove 'cnt0_users' from private data

This member of the private data is set to 0 but never used. Remove it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: adl_pci9118: remove 'valid' from private data
H Hartley Sweeten [Mon, 5 May 2014 16:35:40 +0000 (09:35 -0700)]
staging: comedi: adl_pci9118: remove 'valid' from private data

This member of the private data is set only used during the (*detach)
to check if the board can be reset. The pci9118_reset() function just
needs a valid dev->iobase. Use that instead.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: adl_pci9118: remove 'ai_buf_ptr' from private data
H Hartley Sweeten [Mon, 5 May 2014 16:35:39 +0000 (09:35 -0700)]
staging: comedi: adl_pci9118: remove 'ai_buf_ptr' from private data

This member of the private data is set to 0 but never used. Remove it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: adl_pci9118: cmd->stop_src == TRIG_INT is not supported
H Hartley Sweeten [Mon, 5 May 2014 16:35:38 +0000 (09:35 -0700)]
staging: comedi: adl_pci9118: cmd->stop_src == TRIG_INT is not supported

The (*do_cmdtest) only allows TRIG_COUNT, TRIG_NONE, or TRIG_EXT as the
cmd->stop_src. Remove the disabled 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>
10 years agostaging: comedi: adl_pci9118: remove 'usessh' from private data
H Hartley Sweeten [Mon, 5 May 2014 16:35:37 +0000 (09:35 -0700)]
staging: comedi: adl_pci9118: remove 'usessh' from private data

This member of the private data is only set when the cmd->convert_src
is TRIG_NOW. Use that instead.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: adl_pci9118: remove 'ai_scans' from private data
H Hartley Sweeten [Mon, 5 May 2014 16:35:36 +0000 (09:35 -0700)]
staging: comedi: adl_pci9118: remove 'ai_scans' from private data

This member of the private data is just a copy of the cmd->stop_arg.
Use that instead.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: adl_pci9118: remove 'i8254_osc_base' from private data
H Hartley Sweeten [Mon, 5 May 2014 16:35:35 +0000 (09:35 -0700)]
staging: comedi: adl_pci9118: remove 'i8254_osc_base' from private data

This member of the private data is always set to I8254_OSC_BASE_4MHZ.
Use that instead.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: adl_pci9118: remove 'ai_n_scanlen' from private data
H Hartley Sweeten [Mon, 5 May 2014 16:35:34 +0000 (09:35 -0700)]
staging: comedi: adl_pci9118: remove 'ai_n_scanlen' from private data

This member of the private data is just a copy of the cmd->scan_end_arg.
Use that instead.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: adl_pci9118: remove 'ai_timer2' from private data
H Hartley Sweeten [Mon, 5 May 2014 16:35:33 +0000 (09:35 -0700)]
staging: comedi: adl_pci9118: remove 'ai_timer2' from private data

This member of the private data is set but never used. Remove it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: adl_pci9118: remove 'ai_timer1' from private data
H Hartley Sweeten [Mon, 5 May 2014 16:35:32 +0000 (09:35 -0700)]
staging: comedi: adl_pci9118: remove 'ai_timer1' from private data

This member of the private data is set but never used. Remove it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: adl_pci9118: remove 'ai_data_len' from private data
H Hartley Sweeten [Mon, 5 May 2014 16:35:31 +0000 (09:35 -0700)]
staging: comedi: adl_pci9118: remove 'ai_data_len' from private data

This member of the private data is just a copy of the s->async->prealloc_bufsz.
Use that instead.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: adl_pci9118: remove 'ai_chanlist' from private data
H Hartley Sweeten [Mon, 5 May 2014 16:35:30 +0000 (09:35 -0700)]
staging: comedi: adl_pci9118: remove 'ai_chanlist' from private data

This member of the private data is just a copy of the cmd->chanlist.
Use that instead.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: adl_pci9118: remove 'ai_n_chan' from private data
H Hartley Sweeten [Mon, 5 May 2014 16:35:29 +0000 (09:35 -0700)]
staging: comedi: adl_pci9118: remove 'ai_n_chan' from private data

This member of the private data is just a copy of the cmd->chanlist_len.
Use that instead.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: addi_apci_1564: call apci1564_interrupt() directly
Chase Southwood [Sat, 3 May 2014 07:57:41 +0000 (02:57 -0500)]
staging: comedi: addi_apci_1564: call apci1564_interrupt() directly

Remove the boardinfo about the interrupt function and just call it
directly.

Signed-off-by: Chase Southwood <chase.southwood@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: addi_apci_1564: absorb apci1564_reset()
Chase Southwood [Sat, 3 May 2014 07:57:01 +0000 (02:57 -0500)]
staging: comedi: addi_apci_1564: absorb apci1564_reset()

This is the only reset fuction used by this driver.  We can remove it from
the boardinfo and absorb the code from hwdrv_apci1564.c into the driver.

Signed-off-by: Chase Southwood <chase.southwood@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: addi_apci_1564: don't allocate unused subdevices
Chase Southwood [Sat, 3 May 2014 07:56:27 +0000 (02:56 -0500)]
staging: comedi: addi_apci_1564: don't allocate unused subdevices

The addi-data common code always allocates 7 subdevices.  This driver
cannot or will not use the ones we are currently allocating for analog
input and output or EEPROM, so just don't allocate these subdevices at
all.

Signed-off-by: Chase Southwood <chase.southwood@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: addi_apci_1564: board has 32 digital outputs
Chase Southwood [Sat, 3 May 2014 07:55:29 +0000 (02:55 -0500)]
staging: comedi: addi_apci_1564: board has 32 digital outputs

This board always has 32 digital outputs.  Remove the test when
initializing the subdevice.

Also, since this board is the only one supported by this driver, remove
the boardinfo about the digital outputs and just use the data directly in
the subdevice init.

Signed-off-by: Chase Southwood <chase.southwood@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging/winbond: fix a style error
Michele CURTI [Sat, 3 May 2014 12:36:52 +0000 (14:36 +0200)]
staging/winbond: fix a style error

Removed a few spaces to fix style errors

Signed-off-by: Michele Curti <michele.curti@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: winbond: use dev_err() instead of printk()
Martin Kepplinger [Mon, 19 May 2014 10:55:11 +0000 (12:55 +0200)]
staging: winbond: use dev_err() instead of printk()

For obvious error messages, use dev_err() in order to provide userspace
with more useful information and use the common kernel coding style.

Signed-off-by: Martin Kepplinger <martink@posteo.de>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: ozwpan: Remove useless return variables
Peter Senna Tschudin [Tue, 20 May 2014 10:33:47 +0000 (12:33 +0200)]
staging: ozwpan: Remove useless return variables

This patch remove variables that are initialized with a constant,
are never updated, and are only used as parameter of return.
Return the constant instead of using a variable.

Verified by compilation only.

The coccinelle script that find and fixes this issue is:
// <smpl>
@@
type T;
constant C;
identifier ret;
@@
- T ret = C;
... when != ret
- return ret;
+ return C;
// </smpl>

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: ozwpan: Add missing blanklines after declarations
James A Shackleford [Wed, 21 May 2014 18:50:26 +0000 (14:50 -0400)]
staging: ozwpan: Add missing blanklines after declarations

Signed-off-by: James A Shackleford <shack@linux.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: ozwpan: Change Maintainer
Rupesh Gujare [Mon, 19 May 2014 14:17:30 +0000 (15:17 +0100)]
staging: ozwpan: Change Maintainer

I will be not able to work on ozwpan driver anymore.
Remove my name & add Tateno as maintainer.

Signed-off-by: Rupesh Gujare <rupesh.gujare@atmel.com>
Acked-by: Shigekatsu Tateno <shigekatsu.tateno@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: ozwpan: ozproto.c fix for "WARNING: Prefer ether_addr_copy() over memcpy...
Anil Belur [Mon, 19 May 2014 09:42:48 +0000 (19:42 +1000)]
staging: ozwpan: ozproto.c fix for "WARNING: Prefer ether_addr_copy() over memcpy() if the Ethernet addresses are __aligned(2)"

Fixed the warning message by replacing memcpy() with ether_addr_copy()

Signed-off-by: Anil Belur <askb23@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: ozwpan: remove redundant NULL check for devs
Daeseok Youn [Fri, 16 May 2014 09:29:44 +0000 (18:29 +0900)]
staging: ozwpan: remove redundant NULL check for devs

The "devs" is a pointer to g_net_dev in ozmain.c.
g_net_dev has a default value as empty string.
So "devs" cannot be NULL, removes NULL check for "devs".

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: lustre: Use time_before()
Manuel Schölling [Wed, 21 May 2014 17:16:36 +0000 (19:16 +0200)]
staging: lustre: Use time_before()

To be future-proof and for better readability the time comparisons are modified
to use time_before() instead of plain, error-prone math.

Signed-off-by: Manuel Schölling <manuel.schoelling@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: lustre: lustre: ptlrpc: sec_config.c: Fix for possible null pointer dereference
Rickard Strandqvist [Mon, 19 May 2014 21:42:08 +0000 (23:42 +0200)]
staging: lustre: lustre: ptlrpc: sec_config.c: Fix for possible null pointer dereference

There is otherwise a risk of a possible null pointer dereference.

Was largely found by using a static code analysis program called cppcheck.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: lustre: lustre: lov: lov_obd.c: Fix for possible null pointer dereference
Rickard Strandqvist [Mon, 19 May 2014 21:40:35 +0000 (23:40 +0200)]
staging: lustre: lustre: lov: lov_obd.c: Fix for possible null pointer dereference

There is otherwise a risk of a possible null pointer dereference.

Was largely found by using a static code analysis program called cppcheck.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: lustre: check length of char array
Andreas Platschek [Mon, 19 May 2014 13:37:25 +0000 (13:37 +0000)]
staging: lustre: check length of char array

This fixes the following sparse error:

drivers/staging/lustre/lustre/obdclass/llog_ioctl.c:388:39: error: incompatible types for operation (>)
drivers/staging/lustre/lustre/obdclass/llog_ioctl.c:388:39:    left side has type char *ioc_inlbuf2
drivers/staging/lustre/lustre/obdclass/llog_ioctl.c:388:39:    right side has type int

Signed-off-by: Andreas Platschek <platschek@ict.tuwien.ac.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: lustre: socklnd: Remove unnecessary return brackets
Masaru Nomura [Thu, 15 May 2014 17:54:05 +0000 (18:54 +0100)]
staging: lustre: socklnd: Remove unnecessary return brackets

Remove unnecessary brackets from return statements in socklnd.c,
socklnd.h, socklnd_cb.c and socklnd_lib-linux.c to meet
kernel coding style.

Signed-off-by: Masaru Nomura <massa.nomura@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: lustre: socklnd: Remove unnecessary line continuation
Masaru Nomura [Thu, 15 May 2014 15:23:56 +0000 (16:23 +0100)]
staging: lustre: socklnd: Remove unnecessary line continuation

Remove unnecessary line continuation '\' in socklnd.c to meet
kernel coding style.

Signed-off-by: Masaru Nomura <massa.nomura@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: lustre: socklnd: Fix indenting
Masaru Nomura [Thu, 15 May 2014 00:03:42 +0000 (01:03 +0100)]
staging: lustre: socklnd: Fix indenting

Fixed indenting of if statement in socklnd.c to meet kernel coding style.

Signed-off-by: Masaru Nomura <massa.nomura@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: lustre: socklnd: Add a required space
Masaru Nomura [Wed, 14 May 2014 23:53:38 +0000 (00:53 +0100)]
staging: lustre: socklnd: Add a required space

Added a required space before open brace and parenthsis
in socklnd.c to meet kernel coding style.

Signed-off-by: Masaru Nomura <massa.nomura@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: lustre: socklnd: Remove unnecessary () from return statement
Masaru Nomura [Wed, 14 May 2014 21:33:37 +0000 (22:33 +0100)]
staging: lustre: socklnd: Remove unnecessary () from return statement

Remove unnecessary brackets from return statements in socklnd.c
to meet kernel coding style.

Signed-off-by: Masaru Nomura <massa.nomura@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging/lustre: fix sparse warnings in o2iblnd_cb.c
Zi Shen Lim [Mon, 12 May 2014 03:37:23 +0000 (20:37 -0700)]
staging/lustre: fix sparse warnings in o2iblnd_cb.c

This patch fixes the following sparse warnings:

drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:44:1: warning: symbol 'kiblnd_tx_done' was not declared. Should it be static?
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:102:10: warning: symbol 'kiblnd_get_idle_tx' was not declared. Should it be static?
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:131:1: warning: symbol 'kiblnd_drop_rx' was not declared. Should it be static?
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:212:10: warning: symbol 'kiblnd_find_waiting_tx_locked' was not declared. Should it be static?
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:238:1: warning: symbol 'kiblnd_handle_completion' was not declared. Should it be static?
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:277:1: warning: symbol 'kiblnd_send_completion' was not declared. Should it be static?
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:296:1: warning: symbol 'kiblnd_handle_rx' was not declared. Should it be static?
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:457:1: warning: symbol 'kiblnd_rx_complete' was not declared. Should it be static?
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:527:13: warning: symbol 'kiblnd_kvaddr_to_page' was not declared. Should it be static?
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:699:1: warning: symbol 'kiblnd_setup_rd_iov' was not declared. Should it be static?
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:752:1: warning: symbol 'kiblnd_setup_rd_kiov' was not declared. Should it be static?
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:792:1: warning: symbol 'kiblnd_post_tx_locked' was not declared. Should it be static?
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:996:1: warning: symbol 'kiblnd_tx_complete' was not declared. Should it be static?
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:1270:1: warning: symbol 'kiblnd_connect_peer' was not declared. Should it be static?
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:1627:1: warning: symbol 'kiblnd_reply' was not declared. Should it be static?
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:1814:1: warning: symbol 'kiblnd_thread_fini' was not declared. Should it be static?
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:1828:1: warning: symbol 'kiblnd_peer_notify' was not declared. Should it be static?
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:1934:1: warning: symbol 'kiblnd_handle_early_rxs' was not declared. Should it be static?
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:1957:1: warning: symbol 'kiblnd_abort_txs' was not declared. Should it be static?
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:1993:1: warning: symbol 'kiblnd_finalise_conn' was not declared. Should it be static?
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:2167:1: warning: symbol 'kiblnd_reject' was not declared. Should it be static?
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:2178:1: warning: symbol 'kiblnd_passive_connect' was not declared. Should it be static?
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:2452:1: warning: symbol 'kiblnd_reconnect' was not declared. Should it be static?
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:2516:1: warning: symbol 'kiblnd_rejected' was not declared. Should it be static?
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:2655:1: warning: symbol 'kiblnd_check_connreply' was not declared. Should it be static?
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:2754:1: warning: symbol 'kiblnd_active_connect' was not declared. Should it be static?
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:3025:1: warning: symbol 'kiblnd_check_conns' was not declared. Should it be static?
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:3108:1: warning: symbol 'kiblnd_disconnect_conn' was not declared. Should it be static?
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:3247:1: warning: symbol 'kiblnd_complete' was not declared. Should it be static?
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:904:20: warning: context imbalance in 'kiblnd_post_tx_locked' - unexpected unlock

Signed-off-by: Zi Shen Lim <zlim.lnx@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging/lustre: fix sparse warning: Using plain integer as NULL pointer
Brilliantov Kirill Vladimirovich [Fri, 9 May 2014 10:49:24 +0000 (14:49 +0400)]
staging/lustre: fix sparse warning: Using plain integer as NULL pointer

Signed-off-by: Brilliantov Kirill Vladimirovich <brilliantov@inbox.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: lustre: fix sparse warning "should it be static"
Toby Smith [Wed, 7 May 2014 06:21:21 +0000 (16:21 +1000)]
staging: lustre: fix sparse warning "should it be static"

Fix the following warning in lib-eq.c
warning: symbol 'lnet_eq_dequeue_event' was not declared. Should it be static?

Signed-off-by: Toby Smith <toby@tismith.id.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: lustre: fix sparse warning "unexpected unlock"
Toby Smith [Wed, 7 May 2014 06:21:22 +0000 (16:21 +1000)]
staging: lustre: fix sparse warning "unexpected unlock"

Fix the following warning in lib-eq.c
warning: context imbalance in 'lnet_eq_wait_locked' - unexpected unlock

Signed-off-by: Toby Smith <toby@tismith.id.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging/lustre: remove Peng Tao from Lustre contact list
Peng Tao [Sun, 4 May 2014 07:45:50 +0000 (15:45 +0800)]
staging/lustre: remove Peng Tao from Lustre contact list

I am leaving emc for a new company where I cannot have much
time working on Lustre. So remove myself from the contact
list. I will still be around and continue to contribute as a
hobbyist though.

Cc: Andreas Dilger <andreas.dilger@intel.com>
Cc: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Peng Tao <bergwolf@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: bcm: fix lines over 80 characters
Greg DeAngelis [Fri, 2 May 2014 20:40:30 +0000 (16:40 -0400)]
staging: bcm: fix lines over 80 characters

Signed-off-by: Greg DeAngelis <gdeangel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: bcm: Indentation fixes in Bcmchar.c
Matthias Beyer [Thu, 22 May 2014 10:17:28 +0000 (12:17 +0200)]
Staging: bcm: Indentation fixes in Bcmchar.c

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: bcm: Outsourced IsFlash2x() handling
Matthias Beyer [Thu, 22 May 2014 10:17:27 +0000 (12:17 +0200)]
Staging: bcm: Outsourced IsFlash2x() handling

This patch outsources the code from the IsFlash2x() check in
bcm_char_ioctl_nvm_rw() function to shorten it.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: bcm: Outsourced cmd handling to function
Matthias Beyer [Thu, 22 May 2014 10:17:26 +0000 (12:17 +0200)]
Staging: bcm: Outsourced cmd handling to function

This patch outsourced the true-branch for the IOCTL_BCM_NVM_READ command
handling to shorten the bcm_char_ioctl_nvm_rw() function.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: bcm: Fixed line lengths
Matthias Beyer [Thu, 22 May 2014 10:17:25 +0000 (12:17 +0200)]
Staging: bcm: Fixed line lengths

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: bcm: use kzalloc instead of kmalloc/memset
Daeseok Youn [Wed, 7 May 2014 06:01:04 +0000 (15:01 +0900)]
staging: bcm: use kzalloc instead of kmalloc/memset

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: binder: fix usage of uninit scalar in binder_transaction()
Christian Engelmayer [Wed, 7 May 2014 19:44:53 +0000 (21:44 +0200)]
staging: binder: fix usage of uninit scalar in binder_transaction()

Fix the error path when a cookie mismatch is detected. In that case the
function jumps to the exit label without setting the uninitialized, local
variable 'return_error'. Detected by Coverity - CID 201453.

Signed-off-by: Christian Engelmayer <cengelma@gmx.at>
Acked-by: Arve <arve@android.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: binder: cleanup dereference of noderef expressions
Jerry Snitselaar [Thu, 1 May 2014 06:58:55 +0000 (23:58 -0700)]
staging: binder: cleanup dereference of noderef expressions

Clean up sparse warnings for cred struct dereference.

Signed-off-by: Jerry Snitselaar <dev@snitselaar.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: remove rts5139 driver code
Greg Kroah-Hartman [Fri, 23 May 2014 11:46:41 +0000 (20:46 +0900)]
staging: remove rts5139 driver code

Roger writes:
Since all patches have been applied and the device is now
supported by the new driver, would you remove the former staging
one at drivers/staging/rts5139?

Cc: Roger Tseng <rogerable@realtek.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoimx-hdmi: Make checkpatch happy
Fabio Estevam [Mon, 28 Apr 2014 11:01:07 +0000 (08:01 -0300)]
imx-hdmi: Make checkpatch happy

WARNING: Missing a blank line after declarations
#160: FILE: drivers/staging/imx-drm/imx-hdmi.c:160:
+ u8 val = hdmi_readb(hdmi, reg) & ~mask;
+ val |= data & mask;

WARNING: Missing a blank line after declarations
#1609: FILE: drivers/staging/imx-drm/imx-hdmi.c:1609:
+ const struct platform_device_id *device_id = of_id->data;
+ hdmi->dev_type = device_id->driver_data;

total: 0 errors, 2 warnings, 1767 lines checked

drivers/staging/imx-drm/imx-hdmi.c has style problems, please review.

If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: et131x: Remove empty file Module.symvers
Daniele Forsi [Sun, 27 Apr 2014 12:34:48 +0000 (14:34 +0200)]
staging: et131x: Remove empty file Module.symvers

It was added by commit e0349d5ba (staging: et131x: Remove unused rcv_pend_lock spinlock)

Signed-off-by: Daniele Forsi <dforsi@gmail.com>
Acked-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: et131x: add blank lines after declarations
Maarten de Jonge [Sun, 4 May 2014 17:26:51 +0000 (19:26 +0200)]
staging: et131x: add blank lines after declarations

Signed-off-by: Maarten de Jonge <mdejonge1990@gmail.com>
Acked-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: et131x: Remove useless return variables
Peter Senna Tschudin [Tue, 20 May 2014 10:33:45 +0000 (12:33 +0200)]
staging: et131x: Remove useless return variables

This patch remove variables that are initialized with a constant,
are never updated, and are only used as parameter of return.
Return the constant instead of using a variable.

Verified by compilation only.

The coccinelle script that find and fixes this issue is:
// <smpl>
@@
type T;
constant C;
identifier ret;
@@
- T ret = C;
... when != ret
- return ret;
+ return C;
// </smpl>

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Acked-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: silicom: Remove unused pointer in bypass_init_module()
Christian Engelmayer [Wed, 7 May 2014 19:26:43 +0000 (21:26 +0200)]
staging: silicom: Remove unused pointer in bypass_init_module()

Pointer 'pbpctl_dev_c' in function bypass_init_module() is unused. Thus remove
it. With the last variable declaration gone, there is no more need for an own
block. Remove it and adapt the indenting accordingly.

Signed-off-by: Christian Engelmayer <cengelma@gmx.at>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: silicom: Remove needless calls of get_status_port_fn()
Christian Engelmayer [Wed, 7 May 2014 19:24:00 +0000 (21:24 +0200)]
staging: silicom: Remove needless calls of get_status_port_fn()

Remove a needless pointer initialisation and call to get_status_port_fn()
in functions remove_bypass_tpl_auto() and set_tpl_fn(). Variable
'pbpctl_dev_b' is set correctly later in the function before first use.

Signed-off-by: Christian Engelmayer <cengelma@gmx.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: silicom: add blank line after declarations
Fernando Apesteguia [Wed, 7 May 2014 16:02:44 +0000 (18:02 +0200)]
staging: silicom: add blank line after declarations

Add blank line after declarations and delete extra blank line at the
beginning of the function

Signed-off-by: Fernando Apesteguia <fernando.apesteguia@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: cxt1e1: remove set a value to static variable
Daeseok Youn [Fri, 9 May 2014 10:10:07 +0000 (19:10 +0900)]
staging: cxt1e1: remove set a value to static variable

cleanup checkpatch.pl error:
 ERROR: do not initialise statics to 0 or NULL

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: cxt1e1: Fix line length over 80 characters in musycc.c
Daeseok Youn [Fri, 9 May 2014 10:09:35 +0000 (19:09 +0900)]
staging: cxt1e1: Fix line length over 80 characters in musycc.c

clean up checkpatch.pl warning:
 WARNING: Line length over 80 characters

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: cxt1e1: remove redundant curly braces in musycc.c
Daeseok Youn [Fri, 9 May 2014 10:08:59 +0000 (19:08 +0900)]
staging: cxt1e1: remove redundant curly braces in musycc.c

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: cxt1e1: remove dead code in musycc.c
Daeseok Youn [Fri, 9 May 2014 14:54:08 +0000 (23:54 +0900)]
staging: cxt1e1: remove dead code in musycc.c

Removes "#if 0" blocks.

And the musycc_dump_rxbuffer_ring(ch, 0) which is commented
out puts in RLD_DEBUG block and uncommented.
Because this function may be used for debugging.

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: cxt1e1: Fix no spaces at the start of a line in musycc.c
Daeseok Youn [Fri, 9 May 2014 10:02:20 +0000 (19:02 +0900)]
staging: cxt1e1: Fix no spaces at the start of a line in musycc.c

clean up checkpatch.pl warning:
 WARNING: please no spaces at the start of a line in

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>