Re: [PATCH] Staging: speakup: don't die if accessing sysfs without synth

2014-05-27 Thread Samuel Thibault
Sasha Levin, le Tue 27 May 2014 19:08:36 -0400, a écrit : > Setting a 'silent' parameter without a synth would crash the kernel. > > Signed-off-by: Sasha Levin Acked-by: Samuel Thibault > --- > drivers/staging/speakup/synth.c |3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/dri

[PATCH v2 8/9] staging: ion: shrink highmem pages on kswapd

2014-05-27 Thread Heesub Shin
ION system heap keeps pages in its pool for better performance. When the system is under memory pressure, slab shrinker calls the callback registered and then the pages pooled get freed. When the shrinker is called, it checks gfp_mask and determines whether the pages from highmem need to be freed

[PATCH v2 5/9] staging: ion: remove order from struct page_info

2014-05-27 Thread Heesub Shin
ION system heap uses an internal data structure, struct page_info, for tracking down the meta information of the pages allocated from the pool. Now that the pool returns compound pages, we don't need to store page order in struct page_info. Signed-off-by: Heesub Shin --- drivers/staging/android/

[PATCH v2 9/9] staging: ion: optimize struct ion_system_heap

2014-05-27 Thread Heesub Shin
struct ion_system_heap has an array for storing pointers to page pools and it is allocated separately from the containing structure. There is no point in allocating those two small objects individually, bothering slab allocator. Using a variable length array simplifies code lines and reduces overhe

[PATCH v2 6/9] staging: ion: remove struct page_info

2014-05-27 Thread Heesub Shin
ION system heap creates a temporary list of pages to build scatter/gather table, introducing an internal data type, page_info. Now that the order field has been removed from it, we do not need to depend on such data type anymore. Signed-off-by: Heesub Shin --- drivers/staging/android/ion/ion_sys

[PATCH v2 7/9] staging: ion: remove order argument from free_buffer_page()

2014-05-27 Thread Heesub Shin
Now that the pages returned from the pool are compound pages, we do not need to pass the order information to free_buffer_page(). Signed-off-by: Heesub Shin --- drivers/staging/android/ion/ion_system_heap.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/stag

[PATCH v2 3/9] staging: ion: remove struct ion_page_pool_item

2014-05-27 Thread Heesub Shin
The page pool uses an internal data structure, ion_page_pool_item, for wrapping pooled pages and constructing a list. As the struct page already provides ways for doing exactly the same thing, we do not need to reinvent the wheel. This commit removes the data structure and slab allocations for it.

[PATCH v2 0/9] staging: ion: system heap and page pool fixes

2014-05-27 Thread Heesub Shin
Hi, Here is my patchset with some modification, hoping reviews or comments from you guys. v2: o No changes in the code, just reworded changelog o Reorder patch Heesub Shin (9): staging: ion: tidy up a bit staging: ion: simplify ion_page_pool_total() staging: ion: remove struct ion_page_

[PATCH v2 1/9] staging: ion: tidy up a bit

2014-05-27 Thread Heesub Shin
For aesthetics and readability, rename goto labels, remove useless code lines, and clarify function return type. Signed-off-by: Heesub Shin --- drivers/staging/android/ion/ion_page_pool.c | 2 +- drivers/staging/android/ion/ion_priv.h| 2 +- drivers/staging/android/ion/ion_system_hea

[PATCH v2 4/9] staging: ion: use compound pages on high order pages for system heap

2014-05-27 Thread Heesub Shin
Using compound pages relieves burden on tracking the meta information which are currently stored in page_info. Signed-off-by: Heesub Shin --- drivers/staging/android/ion/ion_page_pool.c | 4 +++- drivers/staging/android/ion/ion_system_heap.c | 2 +- 2 files changed, 4 insertions(+), 2 deletion

[PATCH v2 2/9] staging: ion: simplify ion_page_pool_total()

2014-05-27 Thread Heesub Shin
ion_page_pool_total() returns the total number of pages in the pool. Depending on the argument passed, it counts highmem pages in or not. This commit simplifies the code lines for better readability. Signed-off-by: Heesub Shin --- drivers/staging/android/ion/ion_page_pool.c | 10 +- 1 fi

Re: [PATCH] hv: use correct order when freeing monitor_pages

2014-05-27 Thread Jason Wang
On 05/28/2014 01:16 AM, Radim Krčmář wrote: > We try to free two pages when only one has been allocated. > Cleanup path is unlikely, so I haven't found any trace that would fit, > but I hope that free_pages_prepare() does catch it. > > Cc: sta...@vger.kernel.org > Signed-off-by: Radim Krčmář > ---

Re: [PATCH 1/3] staging: comedi: addi_apci_1564: add a subdevice for Change-of-State interrupt support

2014-05-27 Thread Chase Southwood
On Tue, May 27, 2014 at 11:34 AM, Ian Abbott wrote: > On 2014-05-24 23:24, Chase Southwood wrote: >> >> This board supports an interrupt that can be generated by an AND/OR >> combination of 16 of the input channels. >> >> Create a separate subdevice to handle this interrupt. >> >> In doing this, t

Re: [PATCH] hv: use correct order when freeing monitor_pages

2014-05-27 Thread Amos Kong
On Tue, May 27, 2014 at 07:16:20PM +0200, Radim Krčmář wrote: > We try to free two pages when only one has been allocated. > Cleanup path is unlikely, so I haven't found any trace that would fit, > but I hope that free_pages_prepare() does catch it. > > Cc: sta...@vger.kernel.org > Signed-off-by:

Re: [PATCH] Staging: rtl8192u: r8180_93cx6.c & r8192U_wx.c fix checkpatch.pl errors and warnings

2014-05-27 Thread DaeSeok Youn
Hi, 2014-05-28 5:28 GMT+09:00 Chaitanya Hazarey : > Hey DaeSeok, > > I fixed all of them except - > > this "if" condition like below: > if (5 == wrqu->encoding.length || 13 == wrqu->encoding.length) > mask = 0x00; > and this should be outside "for" loop > > Can you please elaborate on this?

Re: [PATCH V2] staging: dgap: implement proper error handling in dgap_firmware_load()

2014-05-27 Thread DaeSeok Youn
Hi, Dan. 2014-05-27 19:20 GMT+09:00 Dan Carpenter : > The "brd->nasync = 0;" was wrong, yes, but my main complaint was that > you are writing complicated error handling. This v2 patch makes the > error handling even more complicated. If dgap_tty_init() fails it > should free the things it alloca

[PATCH] Staging: speakup: don't die if accessing sysfs without synth

2014-05-27 Thread Sasha Levin
Setting a 'silent' parameter without a synth would crash the kernel. Signed-off-by: Sasha Levin --- drivers/staging/speakup/synth.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/staging/speakup/synth.c b/drivers/staging/speakup/synth.c index 0b3549b..172cf62 100644 --- a/driv

Re: [PATCH] Staging: rtl8192u: r8180_93cx6.c Added missing spaces

2014-05-27 Thread Dan Carpenter
Great. Thanks. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

[PATCH] Staging: rtl8192u: r8180_93cx6.c Added missing spaces

2014-05-27 Thread Chaitanya Hazarey
Added spaces needed in the proper places to address: ERROR: space required after that ',' (ctx:VxV) ERROR: space required after that ';' (ctx:VxV) ERROR: space required after that close brace '}' ERROR: space required before the open brace '{' ERROR: space required before the open parenthesis '('

[PATCH] Staging: comedi: addi-data: clean up formatting of the else statement

2014-05-27 Thread Marcin Kostrzewa
Signed-off-by: Marcin Kostrzewa --- drivers/staging/comedi/drivers/addi-data/hwdrv_apci3501.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3501.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3501.c index 20e89

Re: [PATCH] remove duplicated comment and fix brace placement in drivers/staging/comedi/drivers/addi-data/hwdrv_acpi3501.c

2014-05-27 Thread Dan Carpenter
The subject should be: [PATCH] Staging: comedi: addi-data: On Tue, May 27, 2014 at 02:17:35PM +, Marcin Kostrzewa wrote: > Signed-off-by: Marcin Kostrzewa > --- > drivers/staging/comedi/drivers/addi-data/hwdrv_apci3501.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > dif

[PATCH] remove duplicated comment and fix brace placement in drivers/staging/comedi/drivers/addi-data/hwdrv_acpi3501.c

2014-05-27 Thread Marcin Kostrzewa
Signed-off-by: Marcin Kostrzewa --- drivers/staging/comedi/drivers/addi-data/hwdrv_apci3501.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3501.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3501.c index 20e89b0

Re: [PATCH 1/6] Staging: rtl8192u: r8180_93cx6.c & r8192U_wx.c fix checkpatch.pl errors and warnings

2014-05-27 Thread Chaitanya Hazarey
Well, it is what it is, will send the patch the right way. Best, Chaitanya On Tue, May 27, 2014 at 1:39 PM, Dan Carpenter wrote: > On Tue, May 27, 2014 at 01:09:45PM -0700, Chaitanya Hazarey wrote: >> Fixed the following: >> >> ERROR: do not use C99 // comments >> ERROR: space required after th

Re: [PATCH 6/9] staging: ion: remove struct page_info

2014-05-27 Thread Dan Carpenter
On Tue, May 27, 2014 at 11:36:07AM -0700, Mitchel Humpherys wrote: > On Mon, May 26 2014 at 03:04:58 AM, Heesub Shin > wrote: > > -static struct page_info *alloc_largest_available(struct ion_system_heap > > *heap, > > -struct ion_buffer *buffer, > > -

Re: [PATCH 10/15] staging: rtl8188eu:Remove unused variable struct adapter *pbuddy_padapter

2014-05-27 Thread Dan Carpenter
This one as well would have been easier to review if you folded patches 7-10 together. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH 06/15] staging: rtl8188eu:Remove unused function rtl8188eu_set_hw_type()

2014-05-27 Thread Dan Carpenter
These would have been easier to review if this patch were folded in with the previous two patches. What I look for in these patches is, "Will the compile break if you get it wrong?" For "[PATCH 04/15] staging: rtl8188eu:Assign RTL8188E to padapter->chip_type directly", you could get it wrong and

Re: [PATCH 1/6] Staging: rtl8192u: r8180_93cx6.c & r8192U_wx.c fix checkpatch.pl errors and warnings

2014-05-27 Thread Dan Carpenter
On Tue, May 27, 2014 at 01:09:45PM -0700, Chaitanya Hazarey wrote: > Fixed the following: > > ERROR: do not use C99 // comments > ERROR: space required after that ',' (ctx:VxV) > ERROR: space required after that ';' (ctx:VxV) > ERROR: space required before the open brace '{' > ERROR: spaces requir

Re: [PATCH] Staging: rtl8192u: r8180_93cx6.c & r8192U_wx.c fix checkpatch.pl errors and warnings

2014-05-27 Thread Chaitanya Hazarey
Hey DaeSeok, I fixed all of them except - this "if" condition like below: if (5 == wrqu->encoding.length || 13 == wrqu->encoding.length) mask = 0x00; and this should be outside "for" loop Can you please elaborate on this? Thanks, Chaitanya On Mon, May 26, 2014 at 11:56 PM, DaeSeok Youn

Re: [PATCH v2] staging: vt6655: refactor iwctl_giwaplist() to avoid -Wframe-larger-than warn.

2014-05-27 Thread Dan Carpenter
Thanks. :) Reviewed-by: Dan Carpenter regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

[PATCH 6/6] Staging: rtl8192u: r8180_93cx6.c & r8192U_wx.c fix checkpatch.pl errors and warnings

2014-05-27 Thread Chaitanya Hazarey
Cleaned up dead code, added curly {} braces where needed and fixed the following: ERROR: do not use C99 // comments ERROR: else should follow close brace '}' ERROR: space required after that ',' (ctx:VxV) ERROR: space required before the open brace '{' ERROR: spaces required around that '=

[PATCH 5/6] Staging: rtl8192u: r8180_93cx6.c & r8192U_wx.c fix checkpatch.pl errors and warnings

2014-05-27 Thread Chaitanya Hazarey
Cleaned up dead code, added curly {} braces where needed and fixed the following: ERROR: do not use C99 // comments ERROR: else should follow close brace '}' ERROR: space required after that ',' (ctx:VxV) ERROR: space required before the open brace '{' ERROR: spaces required around that '=

[PATCH 4/6] Staging: rtl8192u: r8180_93cx6.c & r8192U_wx.c fix checkpatch.pl errors and warnings

2014-05-27 Thread Chaitanya Hazarey
Cleaned up dead code, added curly {} braces where needed and fixed the following: ERROR: do not use C99 // comments ERROR: else should follow close brace '}' ERROR: space required after that ',' (ctx:VxV) ERROR: space required before the open brace '{' ERROR: spaces required around that '=

[PATCH 3/6] Staging: rtl8192u: r8180_93cx6.c & r8192U_wx.c fix checkpatch.pl errors and warnings

2014-05-27 Thread Chaitanya Hazarey
Cleaned up dead code, added curly {} braces where needed and fixed the following: ERROR: do not use C99 // comments ERROR: else should follow close brace '}' ERROR: space required after that ',' (ctx:VxV) ERROR: space required before the open brace '{' ERROR: spaces required around that '=

[PATCH 1/6] Staging: rtl8192u: r8180_93cx6.c & r8192U_wx.c fix checkpatch.pl errors and warnings

2014-05-27 Thread Chaitanya Hazarey
Fixed the following: ERROR: do not use C99 // comments ERROR: space required after that ',' (ctx:VxV) ERROR: space required after that ';' (ctx:VxV) ERROR: space required before the open brace '{' ERROR: spaces required around that '=' (ctx:VxV) ERROR: spaces required around that '<' (ctx:VxV) ERR

[PATCH 2/6] Staging: rtl8192u: r8180_93cx6.c & r8192U_wx.c fix checkpatch.pl errors and warnings

2014-05-27 Thread Chaitanya Hazarey
Cleaned up dead code, added curly {} braces where needed and fixed the following: ERROR: do not use C99 // comments ERROR: else should follow close brace '}' ERROR: space required after that ',' (ctx:VxV) ERROR: space required before the open brace '{' ERROR: spaces required around that '=

Re: [PATCH 1/9] staging: ion: tidy up a bit

2014-05-27 Thread John Stultz
On Tue, May 27, 2014 at 11:52 AM, Greg Kroah-Hartman wrote: > On Mon, May 26, 2014 at 07:04:53PM +0900, Heesub Shin wrote: >> For aesthetics and readability, rename goto labels, remove >> useless code lines, and clarify function return type. >> >> Signed-off-by: Heesub Shin >> --- >> drivers/sta

Re: [PATCH 03/15] staging: rtl8188eu:Remove unused macro _init_queue()

2014-05-27 Thread Greg KH
On Tue, May 27, 2014 at 09:05:43PM +0530, navin patidar wrote: > Signed-off-by: navin patidar > --- > drivers/staging/rtl8712/osdep_service.h |6 -- > 1 file changed, 6 deletions(-) This is the rtl8712 driver, not the rtl8188eu driver. And this patch causes a build error. Please ALWAYS

Re: [PATCH 1/9] staging: ion: tidy up a bit

2014-05-27 Thread Greg Kroah-Hartman
On Mon, May 26, 2014 at 07:04:53PM +0900, Heesub Shin wrote: > For aesthetics and readability, rename goto labels, remove > useless code lines, and clarify function return type. > > Signed-off-by: Heesub Shin > --- > drivers/staging/android/ion/ion_page_pool.c | 2 +- > drivers/staging/androi

Re: [PATCH 7/9] staging: ion: remove order argument from free_buffer_page()

2014-05-27 Thread Mitchel Humpherys
On Mon, May 26 2014 at 03:04:59 AM, Heesub Shin wrote: > Not that the pages returned from the pool are compound pages, we do not > need to pass the order information to free_buffer_page(). s/Not/Now/ -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, hosted by The Li

Re: [PATCH 6/9] staging: ion: remove struct page_info

2014-05-27 Thread Mitchel Humpherys
On Mon, May 26 2014 at 03:04:58 AM, Heesub Shin wrote: > ION system heap uses a temporary list holding meta data on pages > allocated to build scatter/gather table. Now that the pages are compound > pages, we do not need to introduce a new data type redundantly. > > Signed-off-by: Heesub Shin > -

Re: randconfig build error with next-20140527, in drivers/staging/rtl8192ee

2014-05-27 Thread Larry Finger
On 05/27/2014 12:27 PM, Jim Davis wrote: Building with the attached random configuration file, A problem with the build when PCI is not selected was reported yesterday. I think this build error is caused by MAC80211 not being selected. The fix for both problems was merged as commit 42e4c20f11

Re: [PATCH] Staging: rtl8192u: r8180_93cx6.c & r8192U_wx.c fix checkpatch.pl errors and warnings

2014-05-27 Thread Chaitanya Hazarey
Hey there, Thanks for looking into this, Will be sending out the modified version soon. Thanks, Chaitanya On Mon, May 26, 2014 at 11:56 PM, DaeSeok Youn wrote: > Hi, > > 2014-05-27 14:43 GMT+09:00 Chaitanya Hazarey : >> Fixed the following: >> >> ERROR: do not use C99 // comments >> ERROR: el

[PATCH 08/38] staging: comedi: usbduxsigma: remove 'ao_chanlist' from private data

2014-05-27 Thread H Hartley Sweeten
This member of the private data is just a copy of the channels from the cmd->chanlist. Remove the member and just use the cmd->chanlist directly. Remove the unneeded 'len' local variable in usbduxsigma_ao_urb_complete(). This is just the cmd->chanlist_len. Signed-off-by: H Hartley Sweeten Cc: Ia

[PATCH 20/38] staging: comedi: pcmmio: use comedi_cmd pointer

2014-05-27 Thread H Hartley Sweeten
Use a local variable to access the comedi_cmd as a pointer instead of getting to from the comedi_subdevice pointer. Remove the unnecessary local variables used for the cmd->chanlist_len. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/

[PATCH 21/38] staging: comedi: pcmmio: remove 'continuous' from private data

2014-05-27 Thread H Hartley Sweeten
This member of the private data can be determined from the cmd->stop_src. Do that instead and remove the member. Refactor pcmmio_handle_dio_intr() to remove an indent level. For aesthetics, change the switch in pcmmio_cmd() to an if/else. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Gre

[PATCH 36/38] staging: comedi: pcl818: use cfc_bytes_per_scan()

2014-05-27 Thread H Hartley Sweeten
Use the comedi_fc helper to get the number of bytes per scan. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl818.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/comedi/drivers/pcl818.c b/driver

[PATCH 33/38] staging: comedi: das16: use cfc_bytes_per_scan()

2014-05-27 Thread H Hartley Sweeten
Use the comedi_fc helper to get the number of bytes per scan. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/das16.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/comedi/drivers/das16.c b/driver

[PATCH 34/38] staging: comedi: pcl812: use cfc_bytes_per_scan()

2014-05-27 Thread H Hartley Sweeten
Use the comedi_fc helper to get the number of bytes per scan. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl812.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/staging/comedi/drivers/pcl812.c

[PATCH 26/38] staging: comedi: ni_labpc: use comedi_cmd pointer

2014-05-27 Thread H Hartley Sweeten
Use a local variable to access the comedi_cmd as a pointer instead of getting to from the comedi_async pointer. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_labpc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff

[PATCH 24/38] staging: comedi: ni_mio_common: use comedi_cmd pointer

2014-05-27 Thread H Hartley Sweeten
Use a local variable to access the comedi_cmd as a pointer instead of getting to from the comedi_async pointer. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_mio_common.c | 17 + 1 file changed, 9 insertions(+), 8 d

[PATCH 03/38] staging: comedi: usbduxfast: remove 'ai_continuous' from private data

2014-05-27 Thread H Hartley Sweeten
This member of the private data can be determined from the cmd->stop_src. Do that instead. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/usbduxfast.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/st

[PATCH 28/38] staging: comedi: cb_pcidas64: change params to external_ai_queue_in_use()

2014-05-27 Thread H Hartley Sweeten
The caller already has the comedi_subdevice and comedi_cmd pointers. Pass those variables to the helper function. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/cb_pcidas64.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletion

[PATCH 35/38] staging: comedi: pcl816: use cfc_bytes_per_scan()

2014-05-27 Thread H Hartley Sweeten
Use the comedi_fc helper to get the number of bytes per scan. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl816.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/comedi/drivers/pcl816.c b/driver

[PATCH 25/38] staging: comedi: ni_labpc_isadma: use comedi_cmd pointer

2014-05-27 Thread H Hartley Sweeten
Use a local variable to access the comedi_cmd as a pointer instead of getting to from the comedi_async pointer. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_labpc_isadma.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(

[PATCH 19/38] staging: comedi: pcmuio: tidy up local variables in pcmuio_handle_intr_subdev()

2014-05-27 Thread H Hartley Sweeten
Tidy up the local variables so that the comedi_cmd is accessed as a pointer instead of getting to it from the comedi_subdevice pointer. Remove the local variable 'len' and use the cmd->chanlist_len directly. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/st

[PATCH 27/38] staging: comedi: cb_pcidas64: use comedi_cmd pointer

2014-05-27 Thread H Hartley Sweeten
Use a local variable to access the comedi_cmd as a pointer instead of getting to from the comedi_async pointer. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/cb_pcidas64.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff

[PATCH 29/38] staging: comedi: comedi_fc: use comedi_cmd pointer

2014-05-27 Thread H Hartley Sweeten
Use a local variable to access the comedi_cmd as a pointer instead of getting to from the comedi_subdevice pointer. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/comedi_fc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)

[PATCH 38/38] staging: comedi: adl_pci9111: factor fifo handling out of pci9111_interrupt()

2014-05-27 Thread H Hartley Sweeten
Factor the fifo half-full handling out of the interrupt function to reduce the indent level of the code. Tidy up the factored out code. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/adl_pci9111.c | 128 +-- 1

[PATCH 12/38] staging: comedi: amplc_pci224: use comedi_cmd pointer

2014-05-27 Thread H Hartley Sweeten
Use the local variable to access the comedi_cmd as a pointer in pci224_ao_munge() instead of getting to it from the comedi_async pointer. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/amplc_pci224.c | 4 ++-- 1 file changed, 2 inserti

[PATCH 15/38] staging: comedi: das1800: use comedi_cmd pointer

2014-05-27 Thread H Hartley Sweeten
Use the local variable to access the comedi_cmd as a pointer instead of getting to it from the comedi_subdevice pointer. 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(-) di

[PATCH 37/38] staging: comedi: usbduxfast: remove unreachable code in usbduxfast_ai_cmd()

2014-05-27 Thread H Hartley Sweeten
The (*do_cmdtest) validates that the 'stop_arg' is >= 1 for a 'stop_src' of TRIG_COUNT and the 'scan_end_arg' is validated to be the 'chanlist_len' which will always be >= 1. Remove the unreachable error code for an 'ai_sample_count < 1'. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg

[PATCH 32/38] staging: comedi: amplc_pci230: chanlist is valid after Step 1 of (*do_cmdtest)

2014-05-27 Thread H Hartley Sweeten
THe comedi core ensures that the chanlist will be valid for any async operation other than Step 1 of the (*do_cmdtest) to get the trigger source masks. Remove the unnecessary checks. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ampl

[PATCH 10/38] staging: comedi: das800: remove 'forever' from private data

2014-05-27 Thread H Hartley Sweeten
This member of the private data can be determined from the cmd->stop_src. Do that instead. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/das800.c | 19 +-- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a

[PATCH 18/38] staging: comedi: usbduxsigma: use comedi_cmd pointer

2014-05-27 Thread H Hartley Sweeten
Use the local variable to access the comedi_cmd as a pointer instead of getting to it from the comedi_subdevice pointer. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/usbduxsigma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH 02/38] staging: comedi: usbdux: remove 'ao_continuous' from private data

2014-05-27 Thread H Hartley Sweeten
This member of the private data can be determined from the cmd->stop_src. Do that instead. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/usbdux.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/stagin

[PATCH 00/38] staging: comedi: more async command cleanup

2014-05-27 Thread H Hartley Sweeten
This series continues the cleanup of the comedi driver async command support. H Hartley Sweeten (38): staging: comedi: usbdux: remove 'ai_continuous' from private data staging: comedi: usbdux: remove 'ao_continuous' from private data staging: comedi: usbduxfast: remove 'ai_continuous' from p

[PATCH 05/38] staging: comedi: usbduxsigma: remove 'ao_continuous' from private data

2014-05-27 Thread H Hartley Sweeten
This member of the private data can be determined from the cmd->stop_src. Do that instead. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/usbduxsigma.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/s

[PATCH 14/38] staging: comedi: cb_pcidas: use comedi_cmd pointer

2014-05-27 Thread H Hartley Sweeten
Use the local variable to access the comedi_cmd as a pointer instead of getting to it from the comedi_async pointer. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/cb_pcidas.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletio

[PATCH 04/38] staging: comedi: usbduxsigma: remove 'ai_continuous' from private data

2014-05-27 Thread H Hartley Sweeten
This member of the private data can be determined from the cmd->stop_src. Do that instead. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/usbduxsigma.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/s

[PATCH 23/38] staging: comedi: pcl711: use comedi_cmd pointer

2014-05-27 Thread H Hartley Sweeten
Use a local variable to access the comedi_cmd as a pointer instead of getting to from the comedi_subdevice pointer. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl711.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

[PATCH 22/38] staging: comedi: pcl816: fix DMA 'bytes' calculation

2014-05-27 Thread H Hartley Sweeten
The calculation for the total number of bytes in the DMA transfer is incorrect. Fix it. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl816.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/come

[PATCH 31/38] staging: comedi: amplc_pci230: use cfc_bytes_per_scan()

2014-05-27 Thread H Hartley Sweeten
Use the comedi_fc helper function to get the 'bytes_per_scan'. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/amplc_pci230.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/comedi/drivers/amplc_pc

[PATCH 07/38] staging: comedi: usbdux: use 'cmd' pointer in usbduxsub_ai_isoc_irq()

2014-05-27 Thread H Hartley Sweeten
Use the 'cmd' pointer to access the chanlist instead of getting to it using the comedi_subdevice pointer. Remove the unneeded 'n' local variable, this is just the cmd->chanlist_len. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/usbdu

[PATCH 17/38] staging: comedi: ni_65xx: remove commented out local variable

2014-05-27 Thread H Hartley Sweeten
This function does not use the comedi_cmd. Remove the commented out local variable. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_65xx.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/comedi/drivers/ni_65xx.c b

[PATCH 30/38] staging: comedi: amplc_pci224: use cfc_bytes_per_scan()

2014-05-27 Thread H Hartley Sweeten
The cmd->chanlist_len will always be >= 1 in this function. Remove the unnecessary checks. Use the comedi_fc helper function to get the 'bytes_per_scan'. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/amplc_pci224.c | 11 ++-

[PATCH 16/38] staging: comedi: mite: tidy up local variables in mite_sync_output_dma()

2014-05-27 Thread H Hartley Sweeten
Tidy up the local variables so that the comedi_cmd is accessed as a pointer instead of getting to it from the comedi_async pointer. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/mite.c | 14 ++ 1 file changed, 6 insertions

[PATCH 06/38] staging: comedi: usbdux: remove 'ao_chanlist' from private data

2014-05-27 Thread H Hartley Sweeten
This member of the private data is just a copy of the channels from the cmd->chanlist. Remove the member and just use the cmd->chanlist directly. Remove the unneeded 'len' local variable in usbdux_ao_isoc_irq(). This is just the cmd->chanlist_len. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott

[PATCH 09/38] staging: comedi: das800: add a local var for the comedi_cmd pointer

2014-05-27 Thread H Hartley Sweeten
For aesthetics, use a local variable to access the comedi_cmd as a pointer in das800_ai_do_cmd() instead of getting to it from the comedi_async pointer. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/das800.c | 15 --- 1 fi

[PATCH 13/38] staging: comedi: amplc_pci230: use comedi_cmd pointer

2014-05-27 Thread H Hartley Sweeten
Use the local variable to access the comedi_cmd as a pointer in pci230_handle_ai() instead of getting to it from the comedi_async pointer. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/amplc_pci230.c | 6 +++--- 1 file changed, 3 inse

[PATCH 01/38] staging: comedi: usbdux: remove 'ai_continuous' from private data

2014-05-27 Thread H Hartley Sweeten
This member of the private data can be determined from the cmd->stop_src. Do that instead. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/usbdux.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/stagin

[PATCH 11/38] staging: comedi: amplc_dio200_common: use comedi_cmd pointer

2014-05-27 Thread H Hartley Sweeten
Use the local variable to access the comedi_cmd as a pointer in dio200_read_scan_intr() instead of getting to it from the comedi_subdevice pointer. Remove the unnecessary local variable 'len', this is just the cmd->chanlist_len. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Har

[PATCH 00/23] staging: comedi: cleanup timer arg calidation

2014-05-27 Thread H Hartley Sweeten
Use the comedi_fc helpers to validate the timer arguments. This is a repost of a series that Ian Abbott has already reviewed. I have udated his sign off on all the patches. H Hartley Sweeten (23): staging: comedi: adl_pci9111: use comedi_fc helpers to validate timer args staging: comedi: adv_

[PATCH] hv: use correct order when freeing monitor_pages

2014-05-27 Thread Radim Krčmář
We try to free two pages when only one has been allocated. Cleanup path is unlikely, so I haven't found any trace that would fit, but I hope that free_pages_prepare() does catch it. Cc: sta...@vger.kernel.org Signed-off-by: Radim Krčmář --- Cc'd stable because the worst-case looks hard to debug.

[PATCH 11/23] staging: comedi: dt2814: use comedi_fc helpers to validate timer arg

2014-05-27 Thread H Hartley Sweeten
Use the comedi_fc helper cfc_check_trigger_arg_is() to validate the trigger argument when the source is TRIG_TIMER. All the arguments are unsigned int, change the local variable to an unsigned int and rename it for aesthetic reasons. Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Cc:

[PATCH 10/23] staging: comedi: dmm32at: use comedi_fc helpers to validate timer args

2014-05-27 Thread H Hartley Sweeten
Use the comedi_fc helper cfc_check_trigger_arg_is() to validate the trigger arguments when the source is TRIG_TIMER. Use cfc_check_trigger_arg_min() to vaidate the scan_begin_arg when the scan_begin_src and convert_src are both TRIG_TIMER. All the arguments are unsigned int, change the local vari

[PATCH 20/23] staging: comedi: rtd520: use comedi_fc helpers to validate timer args

2014-05-27 Thread H Hartley Sweeten
Use the comedi_fc helper cfc_check_trigger_arg_is() to validate the trigger arguments when the source is TRIG_TIMER. Use cfc_check_trigger_arg_min() to vaidate the scan_begin_arg when the scan_begin_src and convert_src are both TRIG_TIMER. All the arguments are unsigned int, change the local vari

[PATCH 06/23] staging: comedi: comedi_test: use comedi_fc helpers to validate timer args

2014-05-27 Thread H Hartley Sweeten
Use the comedi_fc helper cfc_check_trigger_arg_is() to validate the trigger arguments when the source is TRIG_TIMER. All the arguments are unsigned int, change the local variable to an unsigned int and rename it for aesthetic reasons. Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Cc:

[PATCH 12/23] staging: comedi: dt282x: use comedi_fc helpers to validate timer args

2014-05-27 Thread H Hartley Sweeten
Use the comedi_fc helper cfc_check_trigger_arg_is() to validate the trigger arguments when the source is TRIG_TIMER. All the arguments are unsigned int, change the local variable to an unsigned int and rename it for aesthetic reasons. Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Cc:

[PATCH 23/23] staging: comedi: addi_apci_3xxx: use comedi_fc helpers to validate timer arg

2014-05-27 Thread H Hartley Sweeten
Use the comedi_fc helper cfc_check_trigger_arg_is() to validate the trigger argument when the source is TRIG_TIMER. For aesthetics, rename the local variable 'tmp' to 'arg'. Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/addi

[PATCH 05/23] staging: comedi: cb_pcidas: use comedi_fc helpers to validate timer args

2014-05-27 Thread H Hartley Sweeten
Use the comedi_fc helper cfc_check_trigger_arg_is() to validate the trigger arguments when the source is TRIG_TIMER. All the arguments are unsigned int, change the local variable to an unsigned int and rename it for aesthetic reasons. Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Cc:

[PATCH 09/23] staging: comedi: das800: use comedi_fc helpers to validate timer args

2014-05-27 Thread H Hartley Sweeten
Use the comedi_fc helper cfc_check_trigger_arg_is() to validate the trigger arguments when the source is TRIG_TIMER. All the arguments are unsigned int, change the local variable to an unsigned int and rename it for aesthetic reasons. Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Cc:

[PATCH 13/23] staging: comedi: ni_at_a2150: use comedi_fc helpers to validate timer arg

2014-05-27 Thread H Hartley Sweeten
Use the comedi_fc helper cfc_check_trigger_arg_is() to validate the trigger argument when the source is TRIG_TIMER. All the arguments are unsigned int, change the local variable to an unsigned int and rename it for aesthetic reasons. Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Cc:

[PATCH 03/23] staging: comedi: dt3000: use comedi_fc helpers to validate timer args

2014-05-27 Thread H Hartley Sweeten
Use the comedi_fc helper, cfc_check_trigger_arg_is(), to validate the cmd->scan_begin_arg for the scan_begin_src TRIG_TIMER. Pass the local variable to dt2k_ns_to_timer() instead of the cmd argument. This value is modified by that function to return the actual time (in nanoseconds) that the timer w

[PATCH 16/23] staging: comedi: pcl812: use comedi_fc helpers to validate timer arg

2014-05-27 Thread H Hartley Sweeten
Use the comedi_fc helper cfc_check_trigger_arg_is() to validate the trigger argument when the source is TRIG_TIMER. The minimum test is not needed, this was already validated in Step 3. All the arguments are unsigned int, change the local variable to an unsigned int and rename it for aesthetic re

[PATCH 21/23] staging: comedi: s626: use comedi_fc helpers to validate timer args

2014-05-27 Thread H Hartley Sweeten
Use the comedi_fc helper cfc_check_trigger_arg_is() to validate the trigger arguments when the source is TRIG_TIMER. Use cfc_check_trigger_arg_min() to vaidate the scan_begin_arg when the scan_begin_src and convert_src are both TRIG_TIMER. All the arguments are unsigned int, change the local vari

[PATCH 14/23] staging: comedi: ni_pcidio: use comedi_fc helpers to validate timer arg

2014-05-27 Thread H Hartley Sweeten
Use the comedi_fc helper cfc_check_trigger_arg_is() to validate the trigger argument when the source is TRIG_TIMER. All the arguments are unsigned int, change the local variable to an unsigned int and rename it for aesthetic reasons. Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Cc:

[PATCH 19/23] staging: comedi: quatech_daqp_cs: use comedi_fc helpers to validate timer args

2014-05-27 Thread H Hartley Sweeten
Use the comedi_fc helper cfc_check_trigger_arg_is() to validate the trigger arguments when the source is TRIG_TIMER. All the arguments are unsigned int, change the local variable to an unsigned int and rename it for aesthetic reasons. Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Cc:

[PATCH 01/23] staging: comedi: adl_pci9111: use comedi_fc helpers to validate timer args

2014-05-27 Thread H Hartley Sweeten
Use the comedi_fc helper, cfc_check_trigger_arg_is(), to validate the cmd->convert_arg for the convert_src TRIG_TIMER. Pass the local variable to i8253_cascade_ns_to_timer() instead of the cmd argument. This value is modified by that function to return the actual time (in nanoseconds) that the time

[PATCH 18/23] staging: comedi: pcl818: use comedi_fc helpers to validate timer arg

2014-05-27 Thread H Hartley Sweeten
Use the comedi_fc helper cfc_check_trigger_arg_is() to validate the trigger argument when the source is TRIG_TIMER. The minimum test is not needed, this was already validated in Step 3. All the arguments are unsigned int, change the local variable to an unsigned int and rename it for aesthetic re

[PATCH 04/23] staging: comedi: adl_pci9118: use comedi_fc helpers to validate timer args

2014-05-27 Thread H Hartley Sweeten
Use the comedi_fc helper, cfc_check_trigger_arg_is(), to validate the arguments for the TRIG_TIMER command sources. Pass the local variable to i8253_cascade_ns_to_timer() instead of the cmd argument. This value is modified by that function to return the actual time (in nanoseconds) that the timer w

  1   2   >