[patch 1/2] staging: lustre: validate size in lustre_posix_acl_xattr_filter()

2014-10-22 Thread Dan Carpenter
This is mostly to silence static checker complaints. In theory the problem here is that if size is in the 1-3 range then we don't allocate enough memory for the posix_acl_xattr_header struct and it results in memory corruption. But in reality kmalloc() return values are aligned at sizeof(long)

[patch 2/2] staging: lustre: validate size in ll_setxattr()

2014-10-22 Thread Dan Carpenter
If size is smaller than the lov_user_md struct then we are reading beyond the end of the buffer. I guess this is an information leak or it could cause an Oops if the memory is not mapped. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com --- This was discovered through a code audit. I'm not

Re: [PATCH v2] mfd: rtsx: fix PM suspend for 5227 5249

2014-10-22 Thread Micky Ching
Hi Lee, I am wondering if you have accepted this patch? Best Regards. micky. On 10/11/2014 09:07 AM, Micky Ching wrote: On 10/10/2014 06:21 PM, Lee Jones wrote: On Fri, 10 Oct 2014, micky_ch...@realsil.com.cn wrote: From: Micky Ching micky_ch...@realsil.com.cn Fix rts52275249 failed send

[PATCH] staging: rtl8192e: from bus specific dma api to dma api

2014-10-22 Thread Sudip Mukherjee
we should be using DMA API rather than using bus specific DMA API. converted the occurrence of pci_map_*() to dma_map_*(), and at the same time used the dma_mapping_error(). Signed-off-by: Sudip Mukherjee su...@vectorindia.org --- drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 12

Re: [PATCH v2] mfd: rtsx: fix PM suspend for 5227 5249

2014-10-22 Thread Lee Jones
On Fri, 10 Oct 2014, micky_ch...@realsil.com.cn wrote: From: Micky Ching micky_ch...@realsil.com.cn Fix rts52275249 failed send buffer cmd after suspend, PM_CTRL3 should reset before send any buffer cmd after suspend. Otherwise, buffer cmd will failed, this will lead resume fail.

Re: [patch 2/2] staging: lustre: validate size in ll_setxattr()

2014-10-22 Thread Dan Carpenter
On Wed, Oct 22, 2014 at 02:27:08PM +0400, Andrew Perepechko wrote: Hi Dan! You probably meant putting that check after the followring if-statement, since generic extended attributes can have size 1, 2, 3, ... Ok. In that case, size == 0 seems to be the wrong value size for an lov param

Re: [PATCH v2 1/2] timekeeping: add EXPORT_SYMBOL_GPL for do_adjtimex()

2014-10-22 Thread Mike Surcouf
I get that NTP can be installed locally. This is how I regulate time on my guests. I agree the admin argument probably doesn't stand up. The problem is hyperv_clocksource (pluggable time source used by hyperv guests) is systematically fast in my environment. by around -250 PPM. I get away with

Re: [PATCH 0/9] staging: comedi: addi_apci_1564: additional clean up

2014-10-22 Thread Ian Abbott
On 21/10/14 18:15, Hartley Sweeten wrote: In addition, in apci1564_interrupt() the dev-iobase (BAR1) is used for: s-state = inl(dev-iobase + APCI1564_DI_INT_STATUS_REG) 0x; But is apci1564_reset() and apci1564_cos_insn_config() that register is accessed using devpriv-amcc_iobase

Re: [PATCH] staging: android: binder: move to the real part of the kernel

2014-10-22 Thread Joe Perches
On Tue, 2014-10-21 at 20:10 -0700, Rom Lemarchand wrote: On the topic of maintainers for binder: both Arve Hjønnevåg (a...@android.com) and Riley Andrews (riandr...@android.com) have volunteered to be co-maintainers with Greg. We would also like to make kernel-t...@android.com the maintainer

[PATCH] staging: comedi: Kconfig: fix config COMEDI_ADDI_APCI_3120 dependants

2014-10-22 Thread Ian Abbott
A merge conflict between commits fbfd9c8a1782f33d7b67294b2a42587063e61c0c (staging: comedi: addi_apci_3120: use dma_alloc_coherent()) and aff5b1f8eb71b64bb613dc64c50b6904e89f79b9 (staging: comedi: remove comedi_fc module) left the COMEDI_ADDI_APCI_3120 config option depending on VIRT_TO_BUS when

Re: [PATCH v2 1/2] timekeeping: add EXPORT_SYMBOL_GPL for do_adjtimex()

2014-10-22 Thread Thomas Gleixner
On Wed, 22 Oct 2014, Mike Surcouf wrote: I get that NTP can be installed locally. This is how I regulate time on my guests. I agree the admin argument probably doesn't stand up. The problem is hyperv_clocksource (pluggable time source used by hyperv guests) is systematically fast in my

Re: [patch 2/2] staging: lustre: validate size in ll_setxattr()

2014-10-22 Thread Drokin, Oleg
Hello! On Oct 22, 2014, at 6:32 AM, Dan Carpenter wrote: In that case, size == 0 seems to be the wrong value size for an lov param as well. I don't know about this. The code is very clear that size == 0 is acceptable inside the if statement. Oleg? I am not sure what if statement do you

Re: [patch 2/2] staging: lustre: validate size in ll_setxattr()

2014-10-22 Thread Dan Carpenter
On Wed, Oct 22, 2014 at 01:53:15PM +, Drokin, Oleg wrote: Hello! On Oct 22, 2014, at 6:32 AM, Dan Carpenter wrote: In that case, size == 0 seems to be the wrong value size for an lov param as well. I don't know about this. The code is very clear that size == 0 is acceptable inside

Re: [PATCH v2 1/2] timekeeping: add EXPORT_SYMBOL_GPL for do_adjtimex()

2014-10-22 Thread Mike Surcouf
Mike, can you share me your kernel version and which Linux distro do you use? 2.6.32-504.el6.x86_64 AKA RHEL 6.6 Happened on centos 7 and 6.5 too. #cat /var/lib/ntp/drift -248.869 About 20 secs a day (constant) Its not a new problem I had this in other distros and other kernels. I would say its

Re: [PATCH 00/22] staging: comedi: addi_apci_3120: additional clean up

2014-10-22 Thread Ian Abbott
On 20/10/14 19:34, H Hartley Sweeten wrote: More cleanup of the addi_apci_3120 driver. These apply after: [PATCH 00/34] staging: comedi: addi-data: remove common code bloat H Hartley Sweeten (22): staging: comedi: addi_apci_3120: DMA requires an interrupt staging: comedi:

Re: [PATCH v2] staging: skein: Loadable Module Support

2014-10-22 Thread Jason Cooper
Eric, Awesome! You must have been reading my TODO list :) On Tue, Oct 21, 2014 at 09:44:27AM -0500, Eric Rost wrote: Adds loadable module support for Skein256, Skein512, and Skein1024 Hash Algorithms. This description is accurate, but incomplete. You're also integrating skein into the

Re: [PATCH 01/18] staging: comedi: comedi_buf: introduce comedi_buf_read_samples()

2014-10-22 Thread Ian Abbott
On 20/10/14 19:52, H Hartley Sweeten wrote: Introduce a generic method to read samples from the async buffer. The size of each sample is detected automatically using the bytes_per_sample() helper. The unsigned long long is used to avoid any possible integer overflow when calculating the

Re: [PATCH v2] staging: skein: Loadable Module Support

2014-10-22 Thread Eric Rost
On Wed, 2014-10-22 at 11:10 -0400, Jason Cooper wrote: If you don't mind, could you split this patch in two? The first integrating into the crypto API (such that userspace could call into it), and the second enabling loadable module support? Will do! Signed-off-by: Eric Rost

[PATCH] tools: hv: introduce -n/--no-daemon option

2014-10-22 Thread Vitaly Kuznetsov
All tools/hv daemons do mandatory daemon() on startup. However, no pidfile is created, this make it difficult for an init system to track such daemons. Modern linux distros use systemd as their init system. It can handle the daemonizing by itself, however, it requires a daemon to stay in

Re: [PATCH v2] staging: skein: Loadable Module Support

2014-10-22 Thread Jason Cooper
On Wed, Oct 22, 2014 at 10:54:26AM -0500, Eric Rost wrote: On Wed, 2014-10-22 at 11:10 -0400, Jason Cooper wrote: At some point, Eric Rost wrote: ... diff --git a/drivers/staging/skein/Makefile b/drivers/staging/skein/Makefile index a14aadd..1be01fe 100644 ---

Re: [PATCH 09/18] staging: comedi: comedi_buf: make comedi_buf_read_samples() work for single samples

2014-10-22 Thread Ian Abbott
On 20/10/14 19:52, H Hartley Sweeten wrote: A number of drivers currently use comedi_buf_get() to read single samples from the the async buffer. This works but the drivers have to handle the COMEDI_CB_BLOCK and COMEDI_CB_EOS events. Converting those drivers to use comedi_buf_read_samples() moves

RE: [PATCH 01/18] staging: comedi: comedi_buf: introduce comedi_buf_read_samples()

2014-10-22 Thread Hartley Sweeten
On Wednesday, October 22, 2014 8:18 AM, Ian Abbott wrote: On 20/10/14 19:52, H Hartley Sweeten wrote: Introduce a generic method to read samples from the async buffer. The size of each sample is detected automatically using the bytes_per_sample() helper. The unsigned long long is used to

[PATCH net] hyperv: Fix the total_data_buflen in send path

2014-10-22 Thread Haiyang Zhang
total_data_buflen is used by netvsc_send() to decide if a packet can be put into send buffer. It should also include the size of RNDIS message before the Ethernet frame. Otherwise, a messge with total size bigger than send_section_size may be copied into the send buffer, and cause data

[PATCH v2] staging: rtl8712: Remove redundant cast

2014-10-22 Thread Rasmus Villemoes
struct firmware::data has type const u8*, as does *ppmappedfw, so the cast to u8* is unnecessary and slightly confusing. Signed-off-by: Rasmus Villemoes li...@rasmusvillemoes.dk --- drivers/staging/rtl8712/hal_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH v2 00/18] staging: comedi: clean up reading data from the async buffer

2014-10-22 Thread H Hartley Sweeten
Currently there are 3 exported methods to read sample data from the async buffer. 1) cfc_read_array_from_buffer() - a wrapper around comedi_read_array_from_buffer() 2) comedi_read_array_from_buffer() - reads multiple samples 3) comedi_buf_get() - reads a single sample In addition there

[PATCH v2 17/18] staging: comedi: comedi_buf: comedi_buf_memcpy_to() remove 'offset' param

2014-10-22 Thread H Hartley Sweeten
This parameter is always passed as '0'. Remove the unnecessary parameter. This allows removing the unnecessary check of the write_ptr overflow. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org ---

[PATCH v2 13/18] staging: comedi: usbduxsigma: use comedi_buf_read_samples()

2014-10-22 Thread H Hartley Sweeten
Use comedi_buf_read_samples() to read the analog output samples from the async buffer. That function will set the COMEDI_CB_BLOCK event when samples are read from the async buffer. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg

[PATCH v2 18/18] staging: comedi: comedi_buf: comedi_buf_memcpy_from() remove 'offset' param

2014-10-22 Thread H Hartley Sweeten
This parameter is always passed as '0'. Remove the unnecessary parameter. This allows removing the unnecessary check of the read_ptr overflow. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org ---

[PATCH v2 02/18] staging: comedi: amplc_pci224: use comedi_buf_read_samples()

2014-10-22 Thread H Hartley Sweeten
Use the new generic method to read the analog output samples from the async buffer. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org --- drivers/staging/comedi/drivers/amplc_pci224.c | 7 +++ 1

[PATCH v2 03/18] staging: comedi: cb_pcidas: introduce cb_pcidas_ao_load_fifo()

2014-10-22 Thread H Hartley Sweeten
Introduce a helper function to load the analog output FIFO. This fixes a bug in cb_pcidas_ao_inttrig(). That function was writing 'num_bytes' data values to the FIFO instead of 'num_points'. This results in twice the number of data values getting written to the FIFO. Use

[PATCH v2 12/18] staging: comedi: usbdux: use comedi_buf_read_samples()

2014-10-22 Thread H Hartley Sweeten
Use comedi_buf_read_samples() to read the analog output samples from the async buffer. That function will set the COMEDI_CB_BLOCK event when samples are read from the async buffer. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg

[PATCH v2 04/18] staging: comedi: cb_pcidas: introduce cb_pcidas64_ao_fill_buffer()

2014-10-22 Thread H Hartley Sweeten
Introduce a helper function to read the analog output samples from the async buffer. This fixes a bug in load_ao_dma_buffer(). That function was decrementing the 'ao_count' by the number of bytes, not the number of samples, that were read from the async buffer. Use comedi_buf_read_samples() to

[PATCH v2 11/18] staging: comedi: amplc_pci230: use comedi_buf_read_samples()

2014-10-22 Thread H Hartley Sweeten
Use comedi_buf_read_samples() to read the analog output samples from the async buffer. That function will set the COMEDI_CB_BLOCK event when samples are read from the async buffer. In addition, the core will also handle the end-of-scan detection and set the COMEDI_CB_EOS event. Signed-off-by: H

[PATCH v2 08/18] staging: comedi: comedi_buf: absorb comedi_read_array_from_buffer()

2014-10-22 Thread H Hartley Sweeten
This function is only called by comedi_buf_read_samples(). Absorb it. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org --- drivers/staging/comedi/comedi_buf.c | 26 +- 1 file

[PATCH v2 14/18] staging: comedi: comedi_buf: remove comedi_buf_get()

2014-10-22 Thread H Hartley Sweeten
This function is no longer used. Remove it. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org --- drivers/staging/comedi/comedi_buf.c | 14 -- drivers/staging/comedi/comedidev.h | 1 - 2

[PATCH v2 15/18] staging: comedi: comedi_buf: dont't export comedi_buf_memcpy_from()

2014-10-22 Thread H Hartley Sweeten
This function is only used internally. Remove the export. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org --- drivers/staging/comedi/comedi_buf.c | 6 +++--- drivers/staging/comedi/comedidev.h | 3

[PATCH v2 07/18] staging: comedi: comedi_buf: remove export of comedi_read_array_from_buffer()

2014-10-22 Thread H Hartley Sweeten
This function is only used internally. Remove the export. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org --- drivers/staging/comedi/comedi_buf.c | 17 +++--

[PATCH v2 16/18] staging: comedi: comedi_buf: don't export comedi_buf_memcpy_to()

2014-10-22 Thread H Hartley Sweeten
This function is only used internally. Remove the export. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org --- drivers/staging/comedi/comedi_buf.c | 6 +++--- drivers/staging/comedi/comedidev.h | 3

[PATCH v2 09/18] staging: comedi: comedi_buf: make comedi_buf_read_samples() always return full samples

2014-10-22 Thread H Hartley Sweeten
A number of drivers currently use comedi_buf_get() to read single samples from the the async buffer. This works but the drivers have to handle the COMEDI_CB_BLOCK and COMEDI_CB_EOS events. Converting those drivers to use comedi_buf_read_samples() moves the handling of those events into the core.

[PATCH v2 10/18] staging: comedi: ni_mio_common: use comedi_buf_read_samples()

2014-10-22 Thread H Hartley Sweeten
Use comedi_buf_read_samples() to get the single samples from the async buffer. The number of samples in the buffer was validated by the callers so the error checking can be removed. In addition, the core will set the COMEDI_CB_BLOCK event so it can also be removed. Signed-off-by: H Hartley

[PATCH v2 05/18] staging: comedi: dt282x: introduce dt282x_ao_setup_dma()

2014-10-22 Thread H Hartley Sweeten
Introduce a helper function to read the analog output samples from the async buffer and prep the DMA. Use comedi_buf_read_samples() to read the analog output samples from the async buffer. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg

[PATCH 04/10] staging: unisys: fix all logical continuation virthba

2014-10-22 Thread Erik Arfvidson
This patch fixes all logical continuations issues in virthba.c Signed-off-by: Erik Arfvidson erik.arfvid...@unisys.com Signed-off-by: Benjamin Romer benjamin.ro...@unisys.com --- drivers/staging/unisys/virthba/virthba.c | 42 1 file changed, 21 insertions(+), 21

[PATCH 05/10] staging: unisys: added spinlock comments visorchannel_funcs

2014-10-22 Thread Erik Arfvidson
This patch adds comment documentation to visorchannel_tag struct Signed-off-by: Erik Arfvidson erik.arfvid...@unisys.com Signed-off-by: Benjamin Romer benjamin.ro...@unisys.com --- drivers/staging/unisys/visorchannel/visorchannel_funcs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

[PATCH 01/10] staging: unisys: fix blank lines virthba

2014-10-22 Thread Erik Arfvidson
This patch removes unnecessary blanks lines and adds necessary blank lines in virthba. Signed-off-by: Erik Arfvidson erik.arfvid...@unisys.com Signed-off-by: Benjamin Romer benjamin.ro...@unisys.com --- drivers/staging/unisys/virthba/virthba.c | 9 +++-- 1 file changed, 3 insertions(+), 6

[PATCH 09/10] staging: unisys: remove unnecessary blank line in visorchannel_funcs

2014-10-22 Thread Erik Arfvidson
this patch removes unnecessary blank line in visorchannel_funcs Signed-off-by: Erik Arfvidson erik.arfvid...@unisys.com Signed-off-by: Benjamin Romer benjamin.ro...@unisys.com --- drivers/staging/unisys/visorchannel/visorchannel_funcs.c | 1 - 1 file changed, 1 deletion(-) diff --git

[PATCH 10/10] staging: unisys: fixed braces check in visorchannel_funcs

2014-10-22 Thread Erik Arfvidson
this patch adds braces to an else statement to remove check in checkpatch.pl for visorchannel_funcs.c Signed-off-by: Erik Arfvidson erik.arfvid...@unisys.com Signed-off-by: Benjamin Romer benjamin.ro...@unisys.com --- drivers/staging/unisys/visorchannel/visorchannel_funcs.c | 3 ++- 1 file

[PATCH 07/10] staging: unisys: fixed logical continuation visorchannel_funcs

2014-10-22 Thread Erik Arfvidson
this patch fixes a logical continuation check in visorchannel Signed-off-by: Erik Arfvidson erik.arfvid...@unisys.com Signed-off-by: Benjamin Romer benjamin.ro...@unisys.com --- drivers/staging/unisys/visorchannel/visorchannel_funcs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

[PATCH 08/10] staging: unisys: fixed aligment in visorchannel_funcs

2014-10-22 Thread Erik Arfvidson
this patch fixes aligment for visorchanne_funcs Signed-off-by: Erik Arfvidson erik.arfvid...@unisys.com Signed-off-by: Benjamin Romer benjamin.ro...@unisys.com --- drivers/staging/unisys/visorchannel/visorchannel_funcs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH net] hyperv: Fix the total_data_buflen in send path

2014-10-22 Thread David Miller
From: Haiyang Zhang haiya...@microsoft.com Date: Wed, 22 Oct 2014 13:47:18 -0700 total_data_buflen is used by netvsc_send() to decide if a packet can be put into send buffer. It should also include the size of RNDIS message before the Ethernet frame. Otherwise, a messge with total size bigger

[PATCH 06/10] staging: unisys: remove all unnecessary space after cast visorchannel_funcs

2014-10-22 Thread Erik Arfvidson
This patch removes all unnecessary spaces after cast for visorchannel_funcs Signed-off-by: Erik Arfvidson erik.arfvid...@unisys.com Signed-off-by: Benjamin Romer benjamin.ro...@unisys.com --- .../unisys/visorchannel/visorchannel_funcs.c | 61 +++--- 1 file changed, 31

[PATCH 07/55] staging: comedi: ni_labpc_common: use comedi_buf_write_samples()

2014-10-22 Thread H Hartley Sweeten
Use comedi_buf_write_samples() instead of cfc_write_to_buffer() to add the single sample to the async buffer. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org ---

[PATCH 15/55] staging: comedi: adl_pci9111: use comedi_buf_write_samples()

2014-10-22 Thread H Hartley Sweeten
Use comedi_buf_write_samples() to add the samples to the async buffer. The number of bytes to add is determined automatically based on the number of samples and the bytes_per_sample(). Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg

[PATCH 04/55] staging: comedi: das800: use comedi_buf_write_samples()

2014-10-22 Thread H Hartley Sweeten
Use comedi_buf_write_samples() instead of cfc_write_to_buffer() to add the single sample to the async buffer. The core will add the COMEDI_CB_BLOCK event when data is written to the async buffer. Remove the unnecessary event from the driver. Signed-off-by: H Hartley Sweeten

[PATCH 01/55] staging: comedi: comedi_buf: introduce comedi_buf_write_samples()

2014-10-22 Thread H Hartley Sweeten
Introduce a generic method to write samples to the async buffer. The number of samples is first checked against the number of samples that would fill the async buffer. The size of each sample is determined using the bytes_per_sample() helper. If all the samples will fit in the async buffer they

[PATCH 02/55] staging: comedi: comedi_fc.h: remove cfc_write_long_to_buffer()

2014-10-22 Thread H Hartley Sweeten
The inline function is not used. Remove it. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org --- drivers/staging/comedi/drivers/comedi_fc.h | 6 -- 1 file changed, 6 deletions(-) diff --git

[PATCH 19/55] staging: comedi: dt282x: use comedi_buf_write_samples()

2014-10-22 Thread H Hartley Sweeten
Use comedi_buf_write_samples() to add the samples to the async buffer. That function will determining the number of bytes to add based on the bytes_per_sample(). Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman

[PATCH 10/55] staging: comedi: cb_pcidas: use comedi_buf_write_samples()

2014-10-22 Thread H Hartley Sweeten
Use comedi_buf_write_samples() to add the samples to the async buffer. That function will handle single and multi samples writes by determining the number of bytes to add based on the number of samples and the bytes_per_sample(). Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc:

[PATCH 14/55] staging: comedi: comedi_fc.h: remove cfc_write_to_buffer()

2014-10-22 Thread H Hartley Sweeten
The inline function is no longer used. Remove it. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org --- drivers/staging/comedi/drivers/comedi_fc.h | 6 -- 1 file changed, 6 deletions(-) diff --git

[PATCH 16/55] staging: comedi: hwdrv_apci3120: use comedi_buf_write_samples()

2014-10-22 Thread H Hartley Sweeten
Use comedi_buf_write_samples() to add the samples to the async buffer. That function will handle the '* sizeof(foo)' calculation to determine the number of bytes to add. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman

[PATCH 03/55] staging: comedi: comedi_test: use comedi_buf_write_samples()

2014-10-22 Thread H Hartley Sweeten
Use comedi_buf_write_samples() instead of cfc_write_to_buffer() to add the single sample to the async buffer. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org ---

[PATCH 08/55] staging: comedi: ni_labpc_isadma: use comedi_buf_write_samples()

2014-10-22 Thread H Hartley Sweeten
Use comedi_buf_write_samples() instead of cfc_write_to_buffer() to add all the samples to the async buffer in one operation. The core will add the COMEDI_CB_BLOCK event when data is written to the async buffer. Remove the unnecessary event in the driver. Signed-off-by: H Hartley Sweeten

[PATCH 13/55] staging: comedi: ni_mio_common: use comedi_buf_write_samples()

2014-10-22 Thread H Hartley Sweeten
Use comedi_buf_write_samples() to add the samples to the async buffer. That function will handle single and multi sample writes by determining the number of bytes to add based on the bytes_per_sample(). Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk

[PATCH 09/55] staging: comedi: das1800: use comedi_buf_write_samples()

2014-10-22 Thread H Hartley Sweeten
Use comedi_buf_write_samples() to add the samples to the async buffer. That function will handle single and multi samples writes by determining the number of bytes to add based on the number of samples and the bytes_per_sample(). Also, remove the unnecessary COMEDI_CB_BLOCK event.

[PATCH 22/55] staging: comedi: usbduxfast: use comedi_buf_write_samples()

2014-10-22 Thread H Hartley Sweeten
Use comedi_buf_write_samples() to add the samples to the async buffer. That function will determining the number of bytes to add based on the bytes_per_sample(). Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman

[PATCH 11/55] staging: comedi: adl_pci9118: use comedi_buf_write_samples()

2014-10-22 Thread H Hartley Sweeten
Use comedi_buf_write_samples() to add the samples to the async buffer. The number of bytes to add is determined automatically based on the number of samples and the bytes_per_sample(). Change the return type of move_block_from_dma() to void and remove the unnecessary check of the return value of

[PATCH 32/55] staging: comedi: dt3000: use comedi_buf_write_samples()

2014-10-22 Thread H Hartley Sweeten
For aesthetics, use comedi_buf_write_samples() to add the sample to the async buffer. The core will set the COMEDi_CB_BLOCK event when data is written to the async buffer. Remove the unnecessary event from the driver. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott

[PATCH 17/55] staging: comedi: das16m1: use comedi_buf_write_samples()

2014-10-22 Thread H Hartley Sweeten
Use comedi_buf_write_samples() to add the samples to the async buffer. The number of bytes to add is determined automatically based on the number of samples and the bytes_per_sample(). Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg

[PATCH 30/55] staging: comedi: comedi_parport: use comedi_buf_write_samples()

2014-10-22 Thread H Hartley Sweeten
Use comedi_buf_write_samples() to add the sample to the async buffer. The async events COMEDI_CB_BLOCK and COMEDI_CB_EOS will be detected and set by the core. Remove the unnecessary events in the driver. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott

[PATCH 40/55] staging: comedi: pcl816: use comedi_buf_write_samples()

2014-10-22 Thread H Hartley Sweeten
For aesthetics, use comedi_buf_write_samples() to add the sample to the async buffer. The core will add the COMEDI_CB_BLOCK event when data is written to the async buffer. Remove the unnecessary event in the driver. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott

[PATCH 20/55] staging: comedi: gsc_hpdi: use comedi_buf_write_samples()

2014-10-22 Thread H Hartley Sweeten
Use comedi_buf_write_samples() to add the samples to the async buffer. That function will handle the '* sizeof(foo)' calculation to determine the number of bytes to add. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman

[PATCH 34/55] staging: comedi: ni_6527: use comedi_buf_write_samples()

2014-10-22 Thread H Hartley Sweeten
Use comedi_buf_write_samples() to add the sample to the async buffer. The async events COMEDI_CB_EOS will automatically be set by the core with the end-of-scan is detected. Remove the unnecessary event in the driver. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott

[PATCH 18/55] staging: comedi: das16: use comedi_buf_write_samples()

2014-10-22 Thread H Hartley Sweeten
Use comedi_buf_write_samples() to add the samples to the async buffer. That function will determining the number of bytes to add based on the bytes_per_sample(). Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman

[PATCH 21/55] staging: comedi: usbduxsigma: use comedi_buf_write_samples()

2014-10-22 Thread H Hartley Sweeten
Use comedi_buf_write_samples() to add the sample to the async buffer. That function will determining the number of bytes to add based on the bytes_per_sample(). Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman

[PATCH 49/55] staging: comedi: ni_pcidio: use comedi_buf_write_samples()

2014-10-22 Thread H Hartley Sweeten
Use comedi_buf_write_samples() to add the sample to the async buffer. The 32-bit sample size is automatically determined due to the subddev_flag SDF_LSAMPL. The async event COMEDI_CB_BLOCK will be automatically set by the core. Remove the unnecessary event in the driver. This driver also has

[PATCH 29/55] staging: comedi: amplc_pci230: use comedi_buf_write_samples()

2014-10-22 Thread H Hartley Sweeten
Use comedi_buf_write_samples() to add the sample to the async buffer. The async events will set properly by the core. A dev_warn() message will also be output by the core if the buffer overflows. Remove the unnecessary events and dev_err() message in the driver. The core will also add the

[PATCH 25/55] staging: comedi: addi_apci_1564: use comedi_buf_write_samples()

2014-10-22 Thread H Hartley Sweeten
Use comedi_buf_write_samples() to add the sample to the async buffer. The async events COMEDI_CB_BLOCK and COMEDI_CB_EOS will be detected and set by the core. Remove the unnecessary events in the driver. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott

[PATCH 38/55] staging: comedi: pcl726: use comedi_buf_write_samples()

2014-10-22 Thread H Hartley Sweeten
Use comedi_buf_write_samples() to add the sample to the async buffer. The async events will set properly by the core. Remove the unnecessary events in the driver. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman

[PATCH 24/55] staging: comedi: addi_apci_1032: use comedi_buf_write_samples()

2014-10-22 Thread H Hartley Sweeten
Use comedi_buf_write_samples() to add the sample to the async buffer. The async events COMEDI_CB_BLOCK and COMEDI_CB_EOS will be detected and set by the core. Remove the unnecessary events in the driver. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott

[PATCH 26/55] staging: comedi: addi_apci_3xxx: use comedi_buf_write_samples()

2014-10-22 Thread H Hartley Sweeten
For aesthetics, use comedi_buf_write_samples() to add the sample to the async buffer. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org --- drivers/staging/comedi/drivers/addi_apci_3xxx.c | 2 +- 1

[PATCH 12/55] staging: comedi: cb_pcidas64: use comedi_buf_write_samples()

2014-10-22 Thread H Hartley Sweeten
Use comedi_buf_write_samples() to add the samples to the async buffer. That function will handle single and multi samples writes by determining the number of bytes to add based on the bytes_per_sample(). Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott

[PATCH 36/55] staging: comedi: ni_atmio16d: use comedi_buf_write_samples()

2014-10-22 Thread H Hartley Sweeten
For aesthetics, use comedi_buf_write_samples() to add the sample to the async buffer. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org --- drivers/staging/comedi/drivers/ni_atmio16d.c | 6 -- 1

[PATCH 05/55] staging: comedi: ni_at_a2150: use comedi_buf_write_samples()

2014-10-22 Thread H Hartley Sweeten
Use comedi_buf_write_samples() instead of cfc_write_to_buffer() to add the single sample to the async buffer. The core will add the COMEDI_CB_BLOCK event when data is written to the async buffer. Remove the unnecessary event in the driver. Signed-off-by: H Hartley Sweeten

[PATCH 52/55] staging: comedi: comedi_buf: remove comedi_buf_put()

2014-10-22 Thread H Hartley Sweeten
All comedi drivers now use comedi_buf_write_samples() to add the samples to the async buffer. Remove this unused function. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org ---

[PATCH 50/55] staging: comedi: pcmmio: use comedi_buf_write_samples()

2014-10-22 Thread H Hartley Sweeten
The dev-read_subdev used in this driver for async commands returns 32-bit samples and should have the SDF_LSAMPL subdev_flag set. It also returns the full scan with each sample so it should have the SDF_PACKED subdev_flag set. Add the missing subdev_flags and use comedi_buf_write_samples() to

[PATCH 48/55] staging: comedi: amplc_dio200_common: use comedi_buf_write_samples()

2014-10-22 Thread H Hartley Sweeten
The dev-read_subdev used in this driver for async commands returns the full scan with each sample so it should have the SDF_PACKED subdev_flag set. Add the missing subdev_flags and use comedi_buf_write_samples() to add the sample to the async buffer. The async events will set properly by the

[PATCH 45/55] staging: comedi: hwdrv_apci3120: use comedi_buf_write_samples()

2014-10-22 Thread H Hartley Sweeten
Use comedi_buf_write_samples() to add the samples to the async buffer. The COMEDI_CB_EOS and COMEDI_CB_OVERFLOW events will be automatically handled by the core. Remove the unecessary handling in the driver. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott

[PATCH 42/55] staging: comedi: quatech_daqp_cs: use comedi_buf_write_samples()

2014-10-22 Thread H Hartley Sweeten
For aesthetics, use comedi_buf_write_samples() to add the sample to the async buffer. The core will add the COMEDI_CB_BLOCK event when data is written to the async buffer. Remove the unnecessary event in the driver. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott

[PATCH 44/55] staging: comedi: usbdux: use comedi_buf_write_samples()

2014-10-22 Thread H Hartley Sweeten
Use comedi_buf_write_samples() to add the sample to the async buffer. The async events COMEDI_CB_BLOCK and COMEDI_CB_EOS will be detected and set by the core. Remove the unnecessary events in the driver. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott

[PATCH 00/55] staging: comedi: clean up writing data to the async buffer

2014-10-22 Thread H Hartley Sweeten
Currently there are 5 exported methods to add sample data to the async buffer. 1) cfc_write_long_to_buffer() - a wrapper around comedi_write_array_to_buffer() to add a single unsigned int size sample 2) cfc_write_to_buffer() - a wrapper aropund comedi_write_array_to_buffer() to add

[PATCH 53/55] staging: comedi: comedi_buf: don't export comedi_write_array_to_buffer()

2014-10-22 Thread H Hartley Sweeten
All the comedi drivers have been converted to use comedi_buf_write_samples(). This function is now only used internally by comedi_buf. Remvoe the export. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman

[PATCH 28/55] staging: comedi: amplc_pc236_common: use comedi_buf_write_samples()

2014-10-22 Thread H Hartley Sweeten
Use comedi_buf_write_samples() to add the sample to the async buffer. The async events COMEDI_CB_BLOCK and COMEDI_CB_EOS will be detected and set by the core. Remove the unnecessary events in the driver. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott

[PATCH 41/55] staging: comedi: pcl818: use comedi_buf_write_samples()

2014-10-22 Thread H Hartley Sweeten
For aesthetics, use comedi_buf_write_samples() to add the sample to the async buffer. The core will add the COMEDI_CB_BLOCK event when data is written to the async buffer. Remove the unnecessary event in the driver. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott

[PATCH 23/55] staging: comedi: comedi_fc.h: remove cfc_write_array_to_buffer()

2014-10-22 Thread H Hartley Sweeten
The inline function is no longer used. Remove it. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org --- drivers/staging/comedi/drivers/comedi_fc.h | 7 --- 1 file changed, 7 deletions(-) diff

[PATCH 46/55] staging: comedi: drivers: handle SDF_PACKED in comedi_inc_scan_progress()

2014-10-22 Thread H Hartley Sweeten
Subdevices that set the SDF_PACKED flag return all the scan data in a single sample. The cmd-chanlist_len is used to pass the DIO channel information to the command and does not indicate the length (cmd-scan_end_arg) of the scan. Currently this flag is not handled in the comedi core files. Modify

[PATCH 54/55] staging: comedi: comedi_buf: absorb comedi_write_array_to_buffer()

2014-10-22 Thread H Hartley Sweeten
This function is only called by comedi_buf_write_samples(). Absorb it. The buffer overflow was already checked so the overflow check of comedi_buf_write_alloc() can be removed. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman

[PATCH 35/55] staging: comedi: ni_65xx: use comedi_buf_write_samples()

2014-10-22 Thread H Hartley Sweeten
Use comedi_buf_write_samples() to add the sample to the async buffer. The async events COMEDI_CB_EOS will automatically be set by the core with the end-of-scan is detected. Remove the unnecessary event in the driver. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott

[PATCH 06/55] staging: comedi: s626: use comedi_buf_write_samples()

2014-10-22 Thread H Hartley Sweeten
Use comedi_buf_write_samples() instead of cfc_write_to_buffer() to add the single sample to the async buffer. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org --- drivers/staging/comedi/drivers/s626.c

[PATCH 39/55] staging: comedi: pcl812: use comedi_buf_write_samples()

2014-10-22 Thread H Hartley Sweeten
For aesthetics, use comedi_buf_write_samples() to add the sample to the async buffer. The core will add the COMEDI_CB_BLOCK event when data is written to the async buffer. Remove the nnecessary event in the driver. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott

[PATCH 43/55] staging: comedi: rtd520: use comedi_buf_write_samples()

2014-10-22 Thread H Hartley Sweeten
For aesthetics, use comedi_buf_write_samples() to add the sample to the async buffer. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org --- drivers/staging/comedi/drivers/rtd520.c | 2 +- 1 file

[PATCH 55/55] staging: comedi: comedi_buf: absorb __comedi_buf_write_alloc()

2014-10-22 Thread H Hartley Sweeten
This function is only called by comedi_buf_write_alloc(). Absorb it and remove the unused 'strict' parameter. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org --- drivers/staging/comedi/comedi_buf.c |

  1   2   >