[PATCH 2/4] staging: comedi: hwdrv_apci3120: add a blank line after declarations

2014-09-09 Thread Chase Southwood
Signed-off-by: Chase Southwood Cc: Ian Abbott Cc: H Hartley Sweeten --- drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3

[PATCH 3/4] staging: comedi: hwdrv_apci3120: else is not useful after return

2014-09-09 Thread Chase Southwood
The statement nested in an else after a return may be brought out one indent level, the else is useless. Signed-off-by: Chase Southwood Cc: Ian Abbott Cc: H Hartley Sweeten --- drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

[PATCH 4/4] staging: comedi: hwdrv_apci3120: remove void function return statement

2014-09-09 Thread Chase Southwood
Returns at the end of void functions are useless. Remove this one. Signed-off-by: Chase Southwood Cc: Ian Abbott Cc: H Hartley Sweeten --- drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/comedi/drivers/addi-data/hw

[PATCH 1/4] staging: comedi: hwdrv_apci3120: clean up comments

2014-09-09 Thread Chase Southwood
This patch fixes improper comment indentation, removes dead code and obsolete comments, and conforms remaining comments to a consistent kernel commenting style. Signed-off-by: Chase Southwood Cc: Ian Abbott Cc: H Hartley Sweeten --- .../comedi/drivers/addi-data/hwdrv_apci3120.c | 364

[PATCH 0/4] staging: comedi: hwdrv_apci1320: style cleanups

2014-09-09 Thread Chase Southwood
This patchset begins by cleaning up the mess of the comments in this driver, then follows that with three very small and trivial checkpatch warning fixes. Chase Southwood (4): staging: comedi: hwdrv_apci3120: clean up comments staging: comedi: hwdrv_apci3120: add a blank line after declaration

[PATCH V2] Staging: octeon-hcd: removed dummy label

2014-09-09 Thread Nitin Kuppelur
This is a patch to the octeon-hcd.c file that fixes removes dummy label i.e. label followed by return of void function Signed-off-by: Nitin Kuppelur --- drivers/staging/octeon-usb/octeon-hcd.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/octeon-usb/octeo

Re: [PATCH] Staging: octeon-hcd: removed dummy label

2014-09-09 Thread Nitin Kuppelur
Hi Dan, Sorry for that. While doing some last movement changes related to indentation I accidentally removed the brace and did not build it after :-( I am sending PATCH with correction. Regards, Nitin > > Wat? Does this still compile without the curly brace? > > regards, > dan carpenter >

[PATCH 17/34] staging: comedi: me4000: validate cmd->stop_arg in step 3 of (*do_cmdtest)

2014-09-09 Thread H Hartley Sweeten
The async command arguments are supposed to be trivially validated in step 3 of the (*do_cmdtest). Fix the validation of the stop_arg. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/me4000.c | 12 +--- 1 file changed, 5 inserti

[PATCH 29/34] staging: comedi: s626: remove 'ai_continuous' from private data

2014-09-09 Thread H Hartley Sweeten
This member of the private data is set based on the cmd->stop_src. Just use the cmd->stop_src directly and remove the member. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/s626.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(

[PATCH 33/34] staging: comedi: usbdux: prevent "empty acquisition" async commands

2014-09-09 Thread H Hartley Sweeten
This driver currently allows a cmd->stop_src == TRIG_COUNT with a cmd->stop_arg of 0 for both the analog input and output async commands. The (*do_cmd) for both subdevices sets up and starts the command without handling the "empty acquisition". This results in the interrupt functions trying to tran

[PATCH 25/34] staging: comedi: pcmuio: remove 'continuous' from private data

2014-09-09 Thread H Hartley Sweeten
This member of the private data is set based on the cmd->stop_src. Just use the cmd->stop_src directly and remove the member. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcmuio.c | 6 +- 1 file changed, 1 insertion(+), 5 deletio

[PATCH 31/34] staging: comedi: s626: 'ai_sample_count' is always 'stop_arg'

2014-09-09 Thread H Hartley Sweeten
When the cmd->stop_src == TRIG_COUNT, the 'ai_sample_count' is the cmd->stop_arg. For a stop_src == TRIG_NONE the 'ai_sample_count' is currently set to 1 but the driver never actually uses the value. Simplify the 'stop_count' initialization by just setting it to the cmd->stop_arg. Signed-off-by

[PATCH 07/34] staging: comedi: amplc_pci224: simplify cmd->stop_arg validation

2014-09-09 Thread H Hartley Sweeten
The validation of the cmd->stop_arg when the cmd->stop_src == TRIG_EXT is a bit over thought. The comments state that the stop_arg is validated to force an external trigger of 0 and allow the CR_EDGE flag, which is ignored. In reality the stop_arg is not even used by the driver when the stop_src is

[PATCH 05/34] staging: comedi: amplc_dio200_common: return void from dio200_start_intr()

2014-09-09 Thread H Hartley Sweeten
This function always returns '0' so the comedi_event() is never done by the callers. Change the return type to void and remove the comedi_event() dead code. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/amplc_dio200_common.c | 18 +++

[PATCH 19/34] staging: comedi: ni_pcidio: prevent "empty acquisition" async command

2014-09-09 Thread H Hartley Sweeten
This driver currently allows a cmd->stop_src == TRIG_COUNT with a cmd->stop_arg of 0. The (*do_cmd) then sets up and starts the command without handling the "empty acquisition". This results in the interrupt function trying to transfer 0 data samples. Validate that the cmd->stop_arg is >= 1 in th

[PATCH 30/34] staging: comedi: s626: clarify COMEDI_CB_EOA code

2014-09-09 Thread H Hartley Sweeten
The end-of-acquisition only applies when the cmd->stop_src == TRIG_COUNT. Refactor the code in s626_handle_eos_interrupt() that detects the end-of- acquisition to clarify this. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/s626.c | 1

[PATCH 08/34] staging: comedi: amplc_pci224: 'ao_stop_count' is always 'stop_arg'

2014-09-09 Thread H Hartley Sweeten
When the cmd->stop_src == TRIG_COUNT, the 'ao_stop_count' is the cmd->stop_arg. For any other stop_src the 'ao_stop_count' is 0, which is also the cmd->stop_arg. Simplify the 'ao_stop_count' initialization. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/st

[PATCH 11/34] staging: comedi: amplc_pci230: remove analog input "empty acquisition" async command

2014-09-09 Thread H Hartley Sweeten
This driver currently allows a cmd->stop_src == TRIG_COUNT with a cmd->stop_arg of 0. This causes the (*do_cmd) to immediately generate a COMEDI_CB_EOA event without acquiring any data. This "empty acquisition" async command is not really useful. Validate that the cmd->stop_arg is >= 1 in the (*do

[PATCH 21/34] staging: comedi: pcmmio: remove "empty acquisition" async command

2014-09-09 Thread H Hartley Sweeten
This driver currently allows a cmd->stop_src == TRIG_COUNT with a cmd->stop_arg of 0. This causes the (*do_cmd) to immediately generate a COMEDI_CB_EOA event without acquiring any data. This "empty acquisition" async command is not really useful. Validate that the cmd->stop_arg is >= 1 in the (*do

[PATCH 10/34] staging: comedi: amplc_pci230: 'ao_scan_count' is always 'stop_arg'

2014-09-09 Thread H Hartley Sweeten
When the cmd->stop_src == TRIG_COUNT, the 'ao_scan_count' is the cmd->stop_arg. For any other stop_src the 'ao_scan_count' is 0, which is also the cmd->stop_arg. Simplify the 'ao_scan_count' initialization. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/st

[PATCH 09/34] staging: comedi: amplc_pci230: remove analog output "empty acquisition" async command

2014-09-09 Thread H Hartley Sweeten
This driver currently allows a cmd->stop_src == TRIG_COUNT with a cmd->stop_arg of 0. This causes the (*do_cmd) to immediately generate a COMEDI_CB_EOA event without acquiring any data. This "empty acquisition" async command is not really useful. Validate that the cmd->stop_arg is >= 1 in the (*do

[PATCH 20/34] staging: comedi: pcl711: remove "empty acquisition" async command

2014-09-09 Thread H Hartley Sweeten
This driver currently allows a cmd->stop_src == TRIG_COUNT with a cmd->stop_arg of 0. This causes the (*do_cmd) to immediately generate a COMEDI_CB_EOA event without acquiring any data. This "empty acquisition" async command is not really useful. Validate that the cmd->stop_arg is >= 1 in the (*do

[PATCH 12/34] staging: comedi: amplc_pci230: 'ai_scan_count' is always 'stop_arg'

2014-09-09 Thread H Hartley Sweeten
When the cmd->stop_src == TRIG_COUNT, the 'ai_scan_count' is the cmd->stop_arg. For any other stop_src the 'ai_scan_count' is 0, which is also the cmd->stop_arg. Simplify the 'ai_scan_count' initialization. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/st

[PATCH 16/34] staging: comedi: dt282x: prevent "empty acquisition" async commands

2014-09-09 Thread H Hartley Sweeten
This driver currently allows a cmd->stop_src == TRIG_COUNT with a cmd->stop_arg of 0 for both the analog input and output async commands. The (*do_cmd) for both subdevices sets up and starts the command without handling the "empty acquisition". This results in the interrupt functions trying to tran

[PATCH 32/34] staging: comedi: s626: fix cmd->stop_arg validation for stop_src == TRIG_COUNT

2014-09-09 Thread H Hartley Sweeten
The only limit for the stop_arg with a stop_src == TRIG_COUNT is that there is at least 1 scan in order to prevent an empty acquisition. The max test is bogus. Fix the validation. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/s626.c

[PATCH 28/34] staging: comedi: rtd520: prevent "empty acquisition" async command

2014-09-09 Thread H Hartley Sweeten
This driver currently allows a cmd->stop_src == TRIG_COUNT with a cmd->stop_arg of 0. The (*do_cmd) then sets up and starts the command without handling the "empty acquisition". This results in the interrupt function trying to transfer 0 data samples. Validate that the cmd->stop_arg is >= 1 in th

[PATCH 27/34] staging: comedi: pcmuio: return void from pcmuio_start_intr()

2014-09-09 Thread H Hartley Sweeten
This function always returns '0' so the comedi_event() is never done by the callers. Change the return type to void and remove the comedi_event() dead code. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcmuio.c | 18

[PATCH 34/34] staging: comedi: usbduxsigma: prevent "empty acquisition" async commands

2014-09-09 Thread H Hartley Sweeten
This driver currently allows a cmd->stop_src == TRIG_COUNT with a cmd->stop_arg of 0 for both the analog input and output async commands. The (*do_cmd) for both subdevices sets up and starts the command without handling the "empty acquisition". This results in the interrupt functions trying to tran

[PATCH 14/34] staging: comedi: das16: prevent "empty acquisition" async command

2014-09-09 Thread H Hartley Sweeten
This driver currently allows a cmd->stop_src == TRIG_COUNT with a cmd->stop_arg of 0. The (*do_cmd) then sets up and starts the command without handling the "empty acquisition". This results in the interrupt function trying to transfer 0 data samples. Validate that the cmd->stop_arg is >= 1 in th

[PATCH 01/34] staging: comedi: addi_apci_2032: remove "empty acquisition" async command

2014-09-09 Thread H Hartley Sweeten
This driver currently allows a cmd->stop_src == TRIG_COUNT with a cmd->stop_arg of 0. This causes the (*do_cmd) to immediatelt generate a COMEDI_CB_EOA event without acquiring any data. This "empty acquisition" async command is not really useful. Validate that the cmd->stop_arg is >= 1 in the (*do

[PATCH 04/34] staging: comedi: amplc_dio200_common: 'stopcount' is always 'stop_arg'

2014-09-09 Thread H Hartley Sweeten
When the cmd->stop_src == TRIG_COUNT, the 'stopcount' is the cmd->stop_arg. When the stop_src == TRIG_NONE the 'stopcount' is 0, which is also the cmd->stop_arg. Simplify the 'stopcount' initialization. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging

[PATCH 26/34] staging: comedi: pcmuio: 'stop_count' is always 'stop_arg'

2014-09-09 Thread H Hartley Sweeten
When the cmd->stop_src == TRIG_COUNT, the 'stop_count' is the cmd->stop_arg. For any other stop_src the 'stop_count' is 0, which is also the cmd->stop_arg. Simplify the 'stop_count' initialization. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/come

[PATCH 00/34] staging: comedi: cleanup async cmd->stop_{src, arg} usage

2014-09-09 Thread H Hartley Sweeten
The cmd->stop_src is used to determine how an async command is terminated. Typically the following sources are used: TRIG_NONE: command must be stopped with a (*cancel) operation cmd->stop_arg is always 0 TRIG_COUNT: command terminates after cmd->stop_arg scans TRIG_EXT: c

[PATCH 18/34] staging: comedi: ni_atmio16d: prevent "empty acquisition" async command

2014-09-09 Thread H Hartley Sweeten
This driver currently allows a cmd->stop_src == TRIG_COUNT with a cmd->stop_arg of 0. The (*do_cmd) then sets up and starts the command without handling the "empty acquisition". This results in the interrupt function trying to transfer 0 data samples. Validate that the cmd->stop_arg is >= 1 in th

[PATCH 03/34] staging: comedi: amplc_dio200_common: remove "empty acquisition" async command

2014-09-09 Thread H Hartley Sweeten
This driver currently allows a cmd->stop_src == TRIG_COUNT with a cmd->stop_arg of 0. This causes the (*do_cmd) to immediatelt generate a COMEDI_CB_EOA event without acquiring any data. This "empty acquisition" async command is not really useful. Validate that the cmd->stop_arg is >= 1 in the (*do

[PATCH 22/34] staging: comedi: pcmmio: 'stop_count' is always 'stop_arg'

2014-09-09 Thread H Hartley Sweeten
When the cmd->stop_src == TRIG_COUNT, the 'stop_count' is the cmd->stop_arg. For any other stop_src the 'stop_count' is 0, which is also the cmd->stop_arg. Simplify the 'stop_count' initialization. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/come

[PATCH 23/34] staging: comedi: pcmmio: return void from pcmmio_start_intr()

2014-09-09 Thread H Hartley Sweeten
This function always returns '0' so the comedi_event() is never done by the callers. Change the return type to void and remove the comedi_event() dead code. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcmmio.c | 18

[PATCH 06/34] staging: comedi: amplc_pci224: remove "empty acquisition" async command

2014-09-09 Thread H Hartley Sweeten
This driver currently allows a cmd->stop_src == TRIG_COUNT with a cmd->stop_arg of 0. This causes the (*do_cmd) to immediately generate a COMEDI_CB_EOA event without acquiring any data. This "empty acquisition" async command is not really useful. Validate that the cmd->stop_arg is >= 1 in the (*do

[PATCH 24/34] staging: comedi: pcmuio: remove "empty acquisition" async command

2014-09-09 Thread H Hartley Sweeten
This driver currently allows a cmd->stop_src == TRIG_COUNT with a cmd->stop_arg of 0. This causes the (*do_cmd) to immediately generate a COMEDI_CB_EOA event without acquiring any data. This "empty acquisition" async command is not really useful. Validate that the cmd->stop_arg is >= 1 in the (*do

[PATCH 02/34] staging: comedi: addi_apci_2032: absorb apci2032_int_start()

2014-09-09 Thread H Hartley Sweeten
This function always returns 'false' so the caller never does the comedi_event(). Absorb the function into the caller and remove the 'do_event' dead code. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/addi_apci_2032.c | 28 ++---

[PATCH 15/34] staging: comedi: das16m1: prevent "empty acquisition" async command

2014-09-09 Thread H Hartley Sweeten
This driver currently allows a cmd->stop_src == TRIG_COUNT with a cmd->stop_arg of 0. The (*do_cmd) then sets up and starts the command without handling the "empty acquisition". This results in the interrupt function trying to transfer 0 data samples. Validate that the cmd->stop_arg is >= 1 in th

[PATCH 13/34] staging: comedi: cb_pcidas: prevent "empty acquisition" async commands

2014-09-09 Thread H Hartley Sweeten
This driver currently allows a cmd->stop_src == TRIG_COUNT with a cmd->stop_arg of 0 for both the analog input and output async commands. The (*do_cmd) for both subdevices sets up and starts the command without handling the "empty acquisition". This results in the interrupt functions trying to tran

[PATCH 3/3] staging: emxx_udc: fix style warnings: const strings should be const char

2014-09-09 Thread Vincenzo Scotti
Signed-off-by: Vincenzo Scotti --- drivers/staging/emxx_udc/emxx_udc.c | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/drivers/staging/emxx_udc/emxx_udc.c b/drivers/staging/emxx_udc/emxx_udc.c index 512ebe5..ef956df 100644 --- a/drivers/staging/

[PATCH 2/3] staging: emxx_udc: fix style warnings: return in void functions

2014-09-09 Thread Vincenzo Scotti
Signed-off-by: Vincenzo Scotti --- drivers/staging/emxx_udc/emxx_udc.c | 14 -- 1 file changed, 14 deletions(-) diff --git a/drivers/staging/emxx_udc/emxx_udc.c b/drivers/staging/emxx_udc/emxx_udc.c index 114ed25..512ebe5 100644 --- a/drivers/staging/emxx_udc/emxx_udc.c +++ b/driver

[PATCH 1/3] staging: emxx_udc: fix style warnings: blank line after declarations

2014-09-09 Thread Vincenzo Scotti
Signed-off-by: Vincenzo Scotti --- drivers/staging/emxx_udc/emxx_udc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging/emxx_udc/emxx_udc.c b/drivers/staging/emxx_udc/emxx_udc.c index adc24a9..114ed25 100644 --- a/drivers/staging/emxx_udc/emxx_udc.c +++ b/drivers/staging/emx

[PATCH] checkpatch: Warn on macros with flow control statements

2014-09-09 Thread Joe Perches
Macros with flow control statements (goto and return) are not very nice to read as any flow movement is unexpected. Try to highlight them and emit a warning on their definition. Avoid warning on macros that use argument concatenation as those macros commonly create another function where the conc

Re: [PATCH 1/3] staging: emxx_udc: cleanup checkpatch warnings

2014-09-09 Thread Dan Carpenter
Resend with better, unique and meaningful subjects. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

[PATCH 1/3] staging: emxx_udc: cleanup checkpatch warnings

2014-09-09 Thread Vincenzo Scotti
* missing a blank line after declarations Signed-off-by: Vincenzo Scotti --- drivers/staging/emxx_udc/emxx_udc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging/emxx_udc/emxx_udc.c b/drivers/staging/emxx_udc/emxx_udc.c index adc24a9..114ed25 100644 --- a/drivers/staging/em

[PATCH 2/3] staging: emxx_udc: cleanup checkpatch warnings

2014-09-09 Thread Vincenzo Scotti
* void function return statements are not generally useful Signed-off-by: Vincenzo Scotti --- drivers/staging/emxx_udc/emxx_udc.c | 14 -- 1 file changed, 14 deletions(-) diff --git a/drivers/staging/emxx_udc/emxx_udc.c b/drivers/staging/emxx_udc/emxx_udc.c index 114ed25..512ebe5 1

[PATCH 3/3] staging: emxx_udc: cleanup checkpatch warnings

2014-09-09 Thread Vincenzo Scotti
* const strings should be static const char Signed-off-by: Vincenzo Scotti --- drivers/staging/emxx_udc/emxx_udc.c | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/drivers/staging/emxx_udc/emxx_udc.c b/drivers/staging/emxx_udc/emxx_udc.c index 5

[PATCH 14/30] staging: comedi: adl_pci9118: change type of pci9118_dmabuf 'virt' member

2014-09-09 Thread H Hartley Sweeten
For aesthetics, change the type of this member to avoid the casts when allocating and freeing the DMA buffers. This does introduce a cast in move_block_from_dma() but that cast is cleaner. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/driver

[PATCH 29/30] staging: comedi: adl_pci9118: absorb DMA and non-DMA helpers

2014-09-09 Thread H Hartley Sweeten
Currently the pci9118_ai_docmd_dma() or pci9118_ai_docmd_sampl() helper is called by the (*do_cmd) to do the final setup for the command. Most of this invloves setting various bits in 'ai_ctrl' and 'int_ctrl' to setup the acquisition based on the 'ai_do' mode. Most of this is the same for the DMA a

[PATCH 27/30] staging: comedi: adl_pci9118: introduce pci9118_ai_cmd_start()

2014-09-09 Thread H Hartley Sweeten
Introduce a helper function to start the async command. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/adl_pci9118.c | 43 1 file changed, 18 insertions(+), 25 deletions(-) diff --git a/drivers/staging/com

[PATCH 03/30] staging: comedi: adl_pci9118: always try to use interrupt and DMA

2014-09-09 Thread H Hartley Sweeten
This driver currently supports both the (*auto_attach) and legacy (*attach) mechanisms. The (*auto_attach) always tries to use the interrupt and DMA to support async commands with the analog input subdevice. The legacy (*attach) only enables them depending on a user option that is passed to the (*a

[PATCH 20/30] staging: comedi: adl_pci9118: absorb pci9118_ai_set_range_aref()

2014-09-09 Thread H Hartley Sweeten
This function is called by the analog input (*insn_read) and (*do_cmd) operations. The pci9118_set_chanlist() function is also called by those operations. Setting the range and aref logically belongs with setting the chanlist. To clarify the code, absorb pci9118_ai_set_range_aref() into pci9118_set

[PATCH 07/30] staging: comedi: adl_pci9118: handle hardware errors in interrupt handler

2014-09-09 Thread H Hartley Sweeten
Hardware errors will now always terminate an async command. For aesthetics, absorb pci9118_decode_error_status() into the interrupt handler and use the register map defines to remove the "magic" numbers. Refactor the code to set the appropriate comedi event bits and handle the event. Remove the un

[PATCH 16/30] staging: comedi: adl_pci9118: exttrg source is always EXTTRG_AI

2014-09-09 Thread H Hartley Sweeten
The 'source' passed to pci9118_exttrg_{add,del}() is always EXTTRG_AI. Remove the parameter and unnecessary sanity checking. Also, since there is only one vaild exttrg source, remove the unnecessary 'exttrg_users' member from the private data. The pci9118_exttrg_{add,del}() functions always succe

[PATCH 10/30] staging: comedi: adl_pci9118: remove 'dmabuf_panic_size' from private data

2014-09-09 Thread H Hartley Sweeten
This member of the private data is only used in some #if 0'ed code. Remove it along with the unused code. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/adl_pci9118.c | 17 - 1 file changed, 17 deletions(-) diff --git

[PATCH 18/30] staging: comedi: adl_pci9118: remove unused parameters from setup_channel_list()

2014-09-09 Thread H Hartley Sweeten
The 'rot' and 'usedma' parameters are not used in this function. Remove them. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/adl_pci9118.c | 15 +-- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/drivers/sta

[PATCH 30/30] staging: comedi: adl_pci9118: move pci9118_ai_cmdtest()

2014-09-09 Thread H Hartley Sweeten
For aesthetics, move this function closer to the (*do_cmd). Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/adl_pci9118.c | 324 +-- 1 file changed, 162 insertions(+), 162 deletions(-) diff --git a/drivers/stagi

[PATCH 21/30] staging: comedi: adl_pci9118: tidy up pci9118_set_chanlist()

2014-09-09 Thread H Hartley Sweeten
Define some macros to set the 'chan' and 'range' bits in the chanlist register. Use them to tidy up this function. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/adl_pci9118.c | 48 ++-- 1 file changed, 24 inser

[PATCH 11/30] staging: comedi: adl_pci9118: convert private data true/false flags to bit-fields

2014-09-09 Thread H Hartley Sweeten
For aesthetics convert the private data true/false flags to bit-fields. The 'usemux' member is used in the driver as a flag. Refactor the analog input subdevice init so this member can also be a bit-field. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/stagi

[PATCH 25/30] staging: comedi: adl_pci9118: tidy up 'ai_cfg' in pci9118_ai_docmd_dma()

2014-09-09 Thread H Hartley Sweeten
The 'ai_cfg' was already set to PCI9118_AI_CFG_PDTRG | PCI9118_AI_CFG_PETRG. Don't bother setting those bits in pci9118_ai_docmd_dma(). Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/adl_pci9118.c | 12 +++- 1 file changed, 3 i

[PATCH 08/30] staging: comedi: adl_pci9118: do cfc_handle_events() at end of interrupt

2014-09-09 Thread H Hartley Sweeten
Each of the error detections currently do a cfc_handle_events() and exits the interrupt handler if the error is detected. The DMA and non-DMA handlers also to a cfc_handle_events(). For aesthetics, use goto to exit the interrupt handler if an error is detected and move the cfc_handle_events() call

[PATCH 01/30] staging: comedi: adl_pci9118: factor out DMA alloc/free

2014-09-09 Thread H Hartley Sweeten
For aesthetics, factor the DMA allocation/free code out of the attach and detach functions. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/adl_pci9118.c | 85 1 file changed, 48 insertions(+), 37 deletions(

[PATCH 28/30] staging: comedi: adl_pci9118: clarify async command start

2014-09-09 Thread H Hartley Sweeten
The async command can start immediately (TRIG_NOW), from an internal trigger (TRIG_INT), or from an external trigger (TRIG_EXT). Currently the start of the command is scattered in the DMA and non-DMA helper functions. Consolidate the start of the async command at the end of the (*do_cmd) function.

[PATCH 13/30] staging: comedi: adl_pci9118: introduce struct pci9118_dmabuf

2014-09-09 Thread H Hartley Sweeten
For aesthetics, wrap the DMA buffer information in a struct. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/adl_pci9118.c | 96 ++-- 1 file changed, 48 insertions(+), 48 deletions(-) diff --git a/drivers/stagin

[PATCH 26/30] staging: comedi: adl_pci9118: enable DMA in common code path

2014-09-09 Thread H Hartley Sweeten
The pci9118_ai_docmd_dma() function enables the DMA bit in the ai control register for all acquisition modes. For aesthetics, move the enable of this bit into the (*do_cmd). Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/adl_pci9118.c

[PATCH 06/30] staging: comedi: adl_pci9118: handle error detection in main interrupt handler

2014-09-09 Thread H Hartley Sweeten
The DMA and non-DMA both check the analog input status value to detect hardware errors. For aesthetics, move the this detection into the main interrupt handler. This allows removing the unused 'int_adstat' parameter from the DMA and non-DMA handlers. In addition, the 'int_daq' parameter is also no

[PATCH 12/30] staging: comedi: adl_pci9118: remove 'dmabuf_used_size' from private data

2014-09-09 Thread H Hartley Sweeten
This member of the private data is set but never used. Just remove it. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/adl_pci9118.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/comedi/drivers/adl_pci9118.c b/d

[PATCH 23/30] staging: comedi: adl_pci9118: TRIG_INT is not a valid scan_begin_src

2014-09-09 Thread H Hartley Sweeten
The (*do_cmdtest) validates the scan_begin_src as TRIG_FOLLOW, TRIG_TIMER, or TRIG_EXT. Remove the invalid check for TRIG_INT in the (*do_cmd). Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/adl_pci9118.c | 3 +-- 1 file changed, 1 ins

[PATCH 24/30] staging: comedi: adl_pci9118: clarify acquisition mode (ai_do) determination

2014-09-09 Thread H Hartley Sweeten
The async command can operation in 4 modes in this driver. Modes 1 and 4 use timers 1 and 2 as a cascaded timer to trigger each conversion. Mode 1 begins the acquisitions immediately (scan_begin_src == TRIG_FOLLOW) and Mode 4 begins after an external trigger (scan_begin_src == TRIG_EXT). Both mode

[PATCH 00/30] staging: comedi: adl_pci9118: continue cleanup

2014-09-09 Thread H Hartley Sweeten
Start cleaning up the async command support in this comedi driver. This is a repost of the series. I missed the first patch last time. H Hartley Sweeten (30): staging: comedi: adl_pci9118: factor out DMA alloc/free staging: comedi: adl_pci9118: DMA requires an interrupt staging: comedi: adl

[PATCH 09/30] staging: comedi: adl_pci9118: remove PCI9118_PARANOIDCHECK code

2014-09-09 Thread H Hartley Sweeten
The comment states that paramoid checks are broken. They also would only work for 12-bit analog input samples. Instead of fixing the paranoid checking just remove it to simplify the driver a bit. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi

[PATCH 02/30] staging: comedi: adl_pci9118: DMA requires an interrupt

2014-09-09 Thread H Hartley Sweeten
In order for DMA to work we also need an interrupt. Refactor the code so that the DMA allocation is only done if the interrupt is available. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/adl_pci9118.c | 19 ++- 1 file

[PATCH 22/30] staging: comedi: adl_pci9118: remove sanity checks in pci9118_calc_divisors()

2014-09-09 Thread H Hartley Sweeten
The 'tim2' parameter to this function is actually the cmd->convert_arg which was validated in the (*do_cmdtest) as: err |= cfc_check_trigger_arg_min(&cmd->convert_arg, devprivriv->ai_ns_min); The sanity checks in this function are just repeating th

[PATCH 19/30] staging: comedi: adl_pci9118: rename setup_channel_list()

2014-09-09 Thread H Hartley Sweeten
Rename this function so it has namespace associated with the driver. Also, this function always succeeds. Change the return type to void and remove the unnecessary error handling by the callers. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/

[PATCH 04/30] staging: comedi: adl_pci9118: don't ignore hardware errors

2014-09-09 Thread H Hartley Sweeten
The legacy (*attach) currently allows the user to pass a mask of error conditions to ignore when running async commands. Remove this support so that the async command is always terminated if the hardware reports an error. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman -

[PATCH 05/30] staging: comedi: adl_pci9118: handle master/target abort in main interrupt handler

2014-09-09 Thread H Hartley Sweeten
For aesthetics, move the master/target abort detection from the DMA handler to the main interrupt handler. This allows removing the unused 'int_amcc' parameter from the DMA and non-DMA handlers. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi

[PATCH 15/30] staging: comedi: adl_pci9118: fix interrupt_pci9118_ai_mode4_switch()

2014-09-09 Thread H Hartley Sweeten
This function modifies the analog input acquistion programming after the first DMA cycle to continue a "mode4" acqusition. Part of this programs timer 0 based on the hardware address of the next buffer. When double buffering is not used for DMA the "next" buffer is always the first, and only, buffe

[PATCH 17/30] staging: comedi: adl_pci9118: merge pci9118_exttrg_{add, del}()

2014-09-09 Thread H Hartley Sweeten
For aesthetics, merge these two helper functions and add a parameter, 'enable', to determine if the external trigger is being added (enabled) or deleted (disabled). Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/adl_pci9118.c | 34

Re: [Patch v2 0/2] Move Digi Neo card support from dgnc to jsm

2014-09-09 Thread Konrad Zapalowicz
On 09/08, Bill Pemberton wrote: > On 09/08/2014 04:17 PM, Greg KH wrote: > >On Sat, Aug 30, 2014 at 04:35:56PM -0400, wf...@worldbroken.com wrote: > >>From: Bill Pemberton > >> > >>The jsm driver (drivers/tty/serial/jsm) already supports the Digi Neo > >>cards that dgnc (staging) supports. In fac

Re: [PATCH] Staging: octeon-hcd: removed dummy label

2014-09-09 Thread Dan Carpenter
On Tue, Sep 09, 2014 at 05:22:19PM +0200, Nitin Kuppelur wrote: > This is a patch to the octeon-hcd.c file that > removes dummy label i.e. label followed by return of > void function > > Signed-off-by: Nitin Kuppelur > --- > drivers/staging/octeon-usb/octeon-hcd.c | 5 + > 1 file changed, 1

[PATCH 0/4] staging: speakup: fix coding style issues

2014-09-09 Thread Domagoj Trsan
Split the patch from [PATCH v2] staging: speakup: fix coding style issues Domagoj Trsan (4): staging: speakup: fix warnings: line over 80 characters staging: speakup: fix redundant return in void functions staging: speakup: fix line indentations staging: speakup: fix missing blank lines af

[PATCH 3/4] staging: speakup: fix line indentations

2014-09-09 Thread Domagoj Trsan
Signed-off-by: Domagoj Trsan --- drivers/staging/speakup/keyhelp.c | 3 ++- drivers/staging/speakup/spk_types.h | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/staging/speakup/keyhelp.c b/drivers/staging/speakup/keyhelp.c index 5091625..d9c664f 100644 --- a/dri

[PATCH 2/4] staging: speakup: fix redundant return in void functions

2014-09-09 Thread Domagoj Trsan
Signed-off-by: Domagoj Trsan --- drivers/staging/speakup/buffers.c | 1 - drivers/staging/speakup/main.c| 1 - drivers/staging/speakup/varhandlers.c | 1 - 3 files changed, 3 deletions(-) diff --git a/drivers/staging/speakup/buffers.c b/drivers/staging/speakup/buffers.c index 382973

[PATCH 4/4] staging: speakup: fix missing blank lines after declarations

2014-09-09 Thread Domagoj Trsan
Signed-off-by: Domagoj Trsan --- drivers/staging/speakup/keyhelp.c| 4 drivers/staging/speakup/kobjects.c | 1 + drivers/staging/speakup/main.c | 41 +++- drivers/staging/speakup/serialio.c | 2 ++ drivers/staging/speakup/speakup_a

[PATCH 1/4] staging: speakup: fix warnings: line over 80 characters

2014-09-09 Thread Domagoj Trsan
Signed-off-by: Domagoj Trsan --- drivers/staging/speakup/i18n.h | 28 +--- drivers/staging/speakup/main.c | 3 ++- 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/drivers/staging/speakup/i18n.h b/drivers/staging/speakup/i18n.h index dd338f4..16a0871 10064

[PATCH] Staging: octeon-hcd: removed dummy label

2014-09-09 Thread Nitin Kuppelur
This is a patch to the octeon-hcd.c file that removes dummy label i.e. label followed by return of void function Signed-off-by: Nitin Kuppelur --- drivers/staging/octeon-usb/octeon-hcd.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/staging/octeon-usb/octeon-hcd

RE: [PATCH 00/48] staging: comedi: avoid using comedi_board()

2014-09-09 Thread Hartley Sweeten
On Tuesday, September 09, 2014 3:26 AM, Ian Abbott wrote: > > The `comedi_board` inline function takes a single parameter of type > `struct comedi_device *` and merely returns the value of the `board_ptr` > member therein. This is somewhat superfluous as the member can be > accessed directly. > >

RE: [PATCH 01/29] staging: comedi: adl_pci9118: DMA requires and interrupt

2014-09-09 Thread Hartley Sweeten
On Tuesday, September 09, 2014 3:08 AM, Ian Abbott wrote: > On 2014-09-09 00:18, H Hartley Sweeten wrote: >> In order for DMA to work we also need an interrupt. Refactor the code >> so that the DMA allocation is only done if the interrupt is available. >> >> Signed-off-by: H Hartley Sweeten >> Cc

Re: [PATCH 0/2] Two imx-drm oops fixes

2014-09-09 Thread Greg Kroah-Hartman
On Tue, Sep 09, 2014 at 11:13:41PM +0800, Shawn Guo wrote: > On Mon, Sep 08, 2014 at 12:09:49PM -0700, Greg Kroah-Hartman wrote: > > On Mon, Sep 08, 2014 at 12:08:59PM -0700, Greg Kroah-Hartman wrote: > > > On Mon, Sep 01, 2014 at 06:07:12PM +0100, Russell King - ARM Linux wrote: > > > > Greg, > >

Re: [PATCH 0/2] Two imx-drm oops fixes

2014-09-09 Thread Shawn Guo
On Mon, Sep 08, 2014 at 12:09:49PM -0700, Greg Kroah-Hartman wrote: > On Mon, Sep 08, 2014 at 12:08:59PM -0700, Greg Kroah-Hartman wrote: > > On Mon, Sep 01, 2014 at 06:07:12PM +0100, Russell King - ARM Linux wrote: > > > Greg, > > > > > > Here's two oops fixes for imx-drm, which I've had queued u

Re: [PATCH 1/3] staging: lustre: fix coding style on long lines

2014-09-09 Thread Dan Carpenter
On Tue, Sep 09, 2014 at 04:36:25PM +0200, Hugues Morisset wrote: > From: Hugues Morisset This is fine, but next time leave this line out. We get the information from your email address unless you are forwarding patches on behalf of someone else. regards, dan carpenter _

[PATCH 2/3] staging: lustre: fix inappropriate enums declarations.

2014-09-09 Thread Hugues Morisset
From: Hugues Morisset Signed-off-by: Hugues Morisset --- drivers/staging/lustre/lustre/include/obd.h | 10 +++--- drivers/staging/lustre/lustre/lmv/lmv_obd.c | 2 +- drivers/staging/lustre/lustre/lmv/lproc_lmv.c | 6 +++--- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git

[PATCH 3/3] staging: lustre: fix coding style of function's pointer

2014-09-09 Thread Hugues Morisset
From: Hugues Morisset Signed-off-by: Hugues Morisset --- drivers/staging/lustre/lustre/include/obd.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/lustre/lustre/include/obd.h b/drivers/staging/lustre/lustre/include/obd.h index 7f2b8cb..318aec9 1006

[PATCH 1/3] staging: lustre: fix coding style on long lines

2014-09-09 Thread Hugues Morisset
From: Hugues Morisset Signed-off-by: Hugues Morisset --- drivers/staging/lustre/lustre/include/obd.h | 34 +++-- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/drivers/staging/lustre/lustre/include/obd.h b/drivers/staging/lustre/lustre/include/obd.h ind

[PATCH 0/3] fix coding style on lustre

2014-09-09 Thread Hugues Morisset
From: Hugues Morisset fix coding style issues including: * Better alignement of some structures * Fonction pointer with wrong style * Remove enums declarations * A missing empty line Hugues Morisset (3): staging: lustre: fix coding style on long lines and a missing empty line staging

Re: [PATCH 3/7] staging: lustre: lov: expand the GOTO macro

2014-09-09 Thread Julia Lawall
From: Julia Lawall The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ identifier lbl; identifier rc; constant c; @@ - GOTO(lbl,\(rc\|c\)); + goto lbl; @@ identifier lbl; expression rc; @@ - GOTO(lbl,rc); + rc; + goto lbl; // Signed-off-by: Julia Law

Re: [PATCH 6/7] staging: lustre: obdclass: expand the GOTO macro + break

2014-09-09 Thread Drokin, Oleg
Hello! On Sep 9, 2014, at 8:54 AM, Dan Carpenter wrote: > 460 #define OBD_CHECK_DT_OP(obd, op, err) \ > 461 do {\ > 462 if (!OBT(obd) || !OBP((obd), op)) { \ > 463 if (

  1   2   >