Re: [patch] staging: lowmemorykiller: remove bogus NULL check

2016-04-08 Thread Tetsuo Handa
Dan Carpenter wrote: > The NULL checking here doesn't make sense, so it causes a static checker > warning. It turns out that p->mm can't be NULL so the inconsistency is > harmless and we should just remove the check. Commit 77ed2c5745d9 ("android,lowmemorykiller: Don't abuse TIF_MEMDIE.") replace

Re: [RFC][PATCH] MAINTAINERS: Add Android Ion as a separate entry

2016-04-08 Thread Greg Kroah-Hartman
On Fri, Apr 08, 2016 at 04:35:25PM -0700, Laura Abbott wrote: > The android drivers have a few other people reviewing patches. > Add a separate entry to ensure patches go to the right people. > > Signed-off-by: Laura Abbott > --- > Sumit and I have been doing review anyway so I think it makes sen

[RFC][PATCH] MAINTAINERS: Add Android Ion as a separate entry

2016-04-08 Thread Laura Abbott
The android drivers have a few other people reviewing patches. Add a separate entry to ensure patches go to the right people. Signed-off-by: Laura Abbott --- Sumit and I have been doing review anyway so I think it makes sense for us to be cc-ed on patches in addition to the generic Android mainta

Re: [PATCH] ion: scatterlist offset not used for buffer map

2016-04-08 Thread Laura Abbott
On 04/07/2016 11:56 PM, John Einar Reitan wrote: On Thu, Apr 07, 2016 at 12:37:50PM -0700, Laura Abbott wrote: On 04/07/2016 04:29 AM, John Einar Reitan wrote: ion's default user/kernel page mapping code don't honor the offset option for scatterlists. It uses sg_page and expect the whole page t

[PATCH v2 01/37] staging: comedi: das1800: tidy up digital output subdevice init

2016-04-08 Thread H Hartley Sweeten
For aesthetics, add some whitespace to the subdevice init and rename the (*insn_bits) function. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/das1800.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) di

[PATCH v2 23/37] staging: comedi: das1800: absorb control_a_bits()

2016-04-08 Thread H Hartley Sweeten
Absorb this helper function into the analog input (*do_cmd). For aesthetics, convert the switch code into if/else. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/das1800.c | 31 +++ 1 file changed, 7 inserti

[PATCH v2 35/37] staging: comedi: das1800: clarify the analog input cmd triggers

2016-04-08 Thread H Hartley Sweeten
Clarify the documentation in the comedi driver comment block to better explain the cmd triggert. Add a comment to step 2b of the (*do_cmdtest) to clarify the trigger check. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/das1800.c | 36

[PATCH v2 04/37] staging: comedi: das1800: tidy up analog input subdevice init

2016-04-08 Thread H Hartley Sweeten
For aesthetics, add some whitespace to the subdevice init and rename the subdevice support functions. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/das1800.c | 57 1 file changed, 28 insertions(+), 29

[PATCH v2 36/37] staging: comedi: das1800: allow setting the external trigger polarity

2016-04-08 Thread H Hartley Sweeten
The external pin TGIN can be used to start and/or stop the analog input command. Currently the driver only supports negative edge polarity for this signal. Add support to allow the user to select positive edge polarity using the CR_INVERT flag. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc

[PATCH v2 28/37] staging: comedi: das1800: remove the private data member comments

2016-04-08 Thread H Hartley Sweeten
The comments about the members of the private data are not really necessary and removing them fixes a couple checkpatch.pl issues. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/das1800.c | 6 ++ 1 file changed, 2 insertions(+), 4

[PATCH v2 09/37] staging: comedi: das1800: remove 'resolution' boardinfo

2016-04-08 Thread H Hartley Sweeten
The "hr" type boards have 16-bit analog inputs and outputs. All other board types have 12-bit. Remove the 'resolution' member of the boardinfo and use the 'id' member to determine the subdevices 'maxdata'. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/stag

[PATCH v2 12/37] staging: comedi: das1800: tidy up das1800_ao_insn_write()

2016-04-08 Thread H Hartley Sweeten
The (*insn_write) functions are supposed to write insn->n values to the specified channel. Tidy up this function and make it work like the core expects. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/das1800.c | 46 ++--

[PATCH v2 37/37] staging: comedi: das1800: update the MODULE_DESCRIPTION

2016-04-08 Thread H Hartley Sweeten
Change the MODULE_DESCRIPTION to something more usefull than the generic "Comedi low-level driver". Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/das1800.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/st

[PATCH v2 10/37] staging: comedi: das1800: remove 'do_n_chan' boardinfo

2016-04-08 Thread H Hartley Sweeten
The "hc" type boards have 8 digtial outputs. All other board types have 4. Remove the 'do_n_chan' member of the boardinfo and use the 'id' member to determine the subdevice 'n_chan'. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/das1

[PATCH v2 31/37] staging: comedi: das1800: fix comments in das1800_ai_cmd()

2016-04-08 Thread H Hartley Sweeten
Fix the checkpatch.pl issues: WARNING: Block comments use a trailing */ on a separate line WARNING: line over 80 characters Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/das1800.c | 17 ++--- 1 file changed, 10 insertions(

[PATCH v2 26/37] staging: comedi: das1800: change type of private data 'fifo_buf'

2016-04-08 Thread H Hartley Sweeten
Fix the checkpatch.pl issue: CHECK: Prefer kernel type 'u16' over 'uint16_t' Change the type to 'unsigned short' as that is more typical in comedi drivers. Use sizeof(*p) instead of sizeof(type) when allocation the buffer. Also fix the checkpatch.pl issue: WARNING: line over 80 characters Signed

[PATCH v2 27/37] staging: comedi: das1800: move comment about max conversion speeds

2016-04-08 Thread H Hartley Sweeten
For aesthetics, move this information into the comedi comment block. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/das1800.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/staging/comedi/drivers/das

[PATCH v2 29/37] staging: comedi: das1800: clarify step 4 of the ai (*do_cmdtest)

2016-04-08 Thread H Hartley Sweeten
This step of the (*do_cmdtest) fixes the timing arguments when the cmd->convert_src is TRIG_TIMER. The code is compact but it's a bit hard to understand the "burst mode" vs. "non burst mode" (i.e. paced) timing. Clarify the fixup by splitting it into separate functions to check the arguments based

[PATCH v2 00/37] staging: comedi: das1800: tidy up driver

2016-04-08 Thread H Hartley Sweeten
Tidy up this driver and fix all the checkpatch.pl issues. This series applies after the bug fix series: [PATCH v2 0/3] staging: comedi: das1800: bug fixes v2 changes: * refactor based on the bug fix series * reorder the series to tidy up das1800_probe() early and then use the board 'id'

[PATCH v2 16/37] staging: comedi: das1800: remove 'qram_len' boardinfo

2016-04-08 Thread H Hartley Sweeten
The "hc" type boards have 64 analog input channels with a 64 entry queue. All the others have 16 channels and a 256 entry queue. EXP-1800 expansion boards can be used to increase the number of analog inputs on the 16 channel boards, 16 channels per EXP-1800, for a total of 256 channels. Remove th

[PATCH v2 06/37] staging: comedi: das1800: tidy up das1800_probe()

2016-04-08 Thread H Hartley Sweeten
Refactor das1800_probe() to return an errno instead of the boardinfo pointer. Add the board 'id' to the boardinfo to tidy up this function to clarify the sanity check when the user provided a board name when trying to attach to the driver. Currently when this function probes for a boardinfo based

[PATCH v2 08/37] staging: comedi: das1800: use comedi_offset_munge() for analog output

2016-04-08 Thread H Hartley Sweeten
The analog outputs expect 2's complement data. For aesthetics, use the helper function to handle the munging instead of depending on the boardinfo 'resolution'. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/das1800.c | 3 +-- 1 file c

[PATCH v2 22/37] staging: comedi: das1800: use comedi_timeout()

2016-04-08 Thread H Hartley Sweeten
Use the helper function to handle the busywaiting for the analog input conversion to complete. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/das1800.c | 34 1 file changed, 21 insertions(+), 13 deletio

[PATCH v2 32/37] staging: comedi: das1800: fix comments in das1800_ai_handler()

2016-04-08 Thread H Hartley Sweeten
Fix the checkpatch.pl issues: WARNING: line over 80 characters Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/das1800.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/staging/comedi/drivers/das

[PATCH v2 15/37] staging: comedi: das1800: refactor 'range_ai' boardinfo

2016-04-08 Thread H Hartley Sweeten
The boards supported by this driver have analog inputs with gains of 1, 10, 50, and 250 ("01" type) or 1, 2, 4, and 8 ("02" type). Unfortunately, the "01"/"02" type cannot be determined from the boards id or by probing. Replace the 'range_ai' member of the boardinfo with a bit-field flag, 'is_01_s

[PATCH v2 30/37] staging: comedi: das1800: remove the function comments

2016-04-08 Thread H Hartley Sweeten
These comments are just added cruft. Remove them. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/das1800.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/staging/comedi/drivers/das1800.c b/drivers/staging/comedi/driver

[PATCH v2 18/37] staging: comedi: das1800: add analog output readback

2016-04-08 Thread H Hartley Sweeten
Use the core provided readback support to allow reading back the last value written to the analog output channels. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/das1800.c | 17 + 1 file changed, 9 insertions(+), 8 dele

[PATCH v2 25/37] staging: comedi: das1800: cleanup copyright and comedi comment blocks

2016-04-08 Thread H Hartley Sweeten
Tidy up these multi-line comments to fix the checkpatch.pl issues: WARNING: Block comments use * on subsequent lines WARNING: line over 80 characters Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/das1800.c | 150 --

[PATCH v2 34/37] staging: comedi: das1800: fix comments about the 'ao' board range

2016-04-08 Thread H Hartley Sweeten
The waveform analog outputs on the 'ao' boards are not currently supported. Modify the comment about the analog output range on these boards so that the information is saved but fixes the checkpatch.pl issues: WARNING: Block comments use a trailing */ on a separate line Move the comment so it's gr

[PATCH v2 24/37] staging: comedi: das1800: document the spinlock

2016-04-08 Thread H Hartley Sweeten
The comedi_device spinlock is used to protect the indirect addressing selected by the DAS1800_SELECT register. It also prevents races between the interrupt handler and the analog input (*poll). Update the comments to make this clear. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroa

[PATCH v2 21/37] staging: comedi: das1800: refactor program_chanlist()

2016-04-08 Thread H Hartley Sweeten
Refactor this function so it can be used to program the chanlist for the analog input (*do_cmd) and (*insn_read). Rename the function so it has namespace associated with the driver. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/das18

[PATCH v2 11/37] staging: comedi: das1800: initialize all analog outputs

2016-04-08 Thread H Hartley Sweeten
The current code used to initialize the analog outputs only sets the last channel. The other channels will be reloaded with the last value that was written to them. Move the code into the subdevice init and properly initialize all the channels to 0V. Signed-off-by: H Hartley Sweeten Cc: Ian Abbo

[PATCH v2 03/37] staging: comedi: das1800: tidy up analog output subdevice init

2016-04-08 Thread H Hartley Sweeten
For aesthetics, add some whitespace to the subdevice init and rename the (*insn_write) function. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/das1800.c | 24 1 file changed, 12 insertions(+), 12 deletions(-)

[PATCH v2 33/37] staging: comedi: das1800: fix lines over 80 characters

2016-04-08 Thread H Hartley Sweeten
These comments are just extra cruft. Remove them to fix the checkpatch.pl issues: WARNING: line over 80 characters Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/das1800.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-)

[PATCH v2 19/37] staging: comedi: das1800: introduce das1800_ai_chanspec_bits()

2016-04-08 Thread H Hartley Sweeten
Introduce a helper function for the common code needed to set the control c register bits for a channel specification. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/das1800.c | 47 +++- 1 file changed, 22 i

[PATCH v2 05/37] staging: comedi: das1800: tidy up boardinfo

2016-04-08 Thread H Hartley Sweeten
For aesthetics, add some whitespace to the boardinfo array. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/das1800.c | 377 +++ 1 file changed, 180 insertions(+), 197 deletions(-) diff --git a/drivers/stagi

[PATCH v2 17/37] staging: comedi: das1800: change type of 'ai_speed' boardinfo

2016-04-08 Thread H Hartley Sweeten
This value is compared against the unsigned int cmd->convert_arg to check the minimum value (max speed) for the analog input conversion timing. For aesthetics, change the type to match the cmd->convert_arg type. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- driver

[PATCH v2 07/37] staging: comedi: das1800: remove 'common' boardinfo member

2016-04-08 Thread H Hartley Sweeten
The "hc" type boards do not support common mode analog inputs all the other board types do. Remove the unnecessary member from the boardinfo and use the 'id' member to determine if the SDF_COMMON flag should be set for the subdevice. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroa

[PATCH v2 13/37] staging: comedi: das1800: remove 'ao_n_chan' boardinfo

2016-04-08 Thread H Hartley Sweeten
The "st-da" board types have 4 analog output channels. All other board types, with analog outputs, only have 2 channels. Remove the 'ao_n_chan' member of the boardinfo and use the 'id' member to determine the subdevice 'n_chan'. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Har

[PATCH v2 02/37] staging: comedi: das1800: tidy up digital input subdevice init

2016-04-08 Thread H Hartley Sweeten
For aesthetics, add some whitespace to the subdevice init and rename the (*insn_bits) function. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/das1800.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) di

[PATCH v2 14/37] staging: comedi: das1800: remove 'ao_ability' boardinfo

2016-04-08 Thread H Hartley Sweeten
The "da" and "hc" type boards have normal analog outputs. The "ao" type boards have move advanced analog outputs with waveform generation capability. Remove the 'ao_ability' member of the boardinfo and use the 'id' member to determine if the subdevice should be initialized. The "ao" waveform anal

[PATCH v2 20/37] staging: comedi: das1800: absorb control_c_bits()

2016-04-08 Thread H Hartley Sweeten
Absorb this helper function into the analog input (*do_cmd). For aesthetics, convert the switch code into if/else. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/das1800.c | 58 +++- 1 file changed, 19 inser

RE: [PATCH v2 0/3] staging: comedi: das1800: bug fixes

2016-04-08 Thread Hartley Sweeten
On Friday, April 08, 2016 10:15 AM, H Hartley Sweeten wrote: > These fix a bug (patch 1) and a couple issues in the das1800 driver > that have existed forever (patches 2 and 3). Greg, Sorry, I forgot to add "v2" to the actual patches. Hartley > H Hartley Sweeten (3): > staging: comedi: das180

[PATCH 1/3] staging: comedi: das1800: fix possible NULL dereference

2016-04-08 Thread H Hartley Sweeten
DMA is optional with this driver. If it was not enabled the devpriv->dma pointer will be NULL. Fix the possible NULL pointer dereference when trying to disable the DMA channels in das1800_ai_cancel() and tidy up the comments to fix the checkpatch.pl issues: WARNING: line over 80 characters It's p

[PATCH v2 0/3] staging: comedi: das1800: bug fixes

2016-04-08 Thread H Hartley Sweeten
These fix a bug (patch 1) and a couple issues in the das1800 driver that have existed forever (patches 2 and 3). Patch 1 was originally posted in another series as two paches: "[PATCH 28/35] staging: comedi: das1800: fix das1800_ai_cancel()" "[PATCH 29/35] staging: comedi: das1800: fix NULL pointe

[PATCH 3/3] staging: comedi: das1800: fix das-1801st-da boardinfo

2016-04-08 Thread H Hartley Sweeten
The "da" type boards all have 4 analog outputs. Fix the boardinfo for the das-1801st-da. Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/das1800.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/stag

[PATCH 2/3] staging: comedi: das1800: fix analog input sample munging

2016-04-08 Thread H Hartley Sweeten
The analog input samples are 2's complement when the inputs are configured for bipolar ranges and offset binary when they are unipolar ranges. For bipolar ranges the sample needs to be munged to the offset binary format that comedi uses. The (*insn_read) does the munging correctly but the async co

RE: [PATCH] staging: comedi: das1800: fix analog input number of channels

2016-04-08 Thread Hartley Sweeten
On Friday, April 08, 2016 3:16 AM, Ian Abbott wrote: > On 07/04/16 18:45, Hartley Sweeten wrote: > The channel mapping is a bit warped as far as comedi is concerned. > > Each EXP-1800 is jumper configured for what board input channel will > be used to return the 16 channels on the EXP-1800. The

[PATCH] staging: unisys: visornic: prevent double-unlock of priv_lock

2016-04-08 Thread David Kershner
From: Tim Sell Previously, devdata->priv_lock was being unlocked in visornic_serverdown() both before calling visornic_serverdown_complete(), then again at the end of the function. This bug was corrected. The structure of visornic_serverdown() was also improved to make it easier to follow and t

[patch] staging: lowmemorykiller: remove bogus NULL check

2016-04-08 Thread Dan Carpenter
The NULL checking here doesn't make sense, so it causes a static checker warning. It turns out that p->mm can't be NULL so the inconsistency is harmless and we should just remove the check. Signed-off-by: Dan Carpenter diff --git a/drivers/staging/android/lowmemorykiller.c b/drivers/staging/an

[PATCH] staging: unisys: visorinput: remove erroneous 'FIXME' comments

2016-04-08 Thread David Kershner
From: Tim Sell These comments were mistakenly carried forward by a previous copy/paste. Signed-off-by: Tim Sell Signed-off-by: David Kershner --- drivers/staging/unisys/visorinput/visorinput.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/unisys/vis

Re: [PATCH] staging: comedi: das1800: fix analog input number of channels

2016-04-08 Thread Ian Abbott
On 07/04/16 18:45, Hartley Sweeten wrote: On Thursday, April 07, 2016 9:48 AM, Hartley Sweeten wrote: On Thursday, April 07, 2016 3:16 AM, Ian Abbott wrote: On 06/04/16 19:06, H Hartley Sweeten wrote: The "hc" type boards have 64 analog input channels with a 64 entry queue. All the others have