Re: [PATCH 1/2] hyperv-fb: add pci stub

2013-10-08 Thread Gerd Hoffmann
On Mo, 2013-10-07 at 17:12 +, KY Srinivasan wrote: > > > -Original Message- > > From: Gerd Hoffmann [mailto:kra...@redhat.com] > > Sent: Sunday, October 06, 2013 11:51 PM > > To: KY Srinivasan > > Cc: Haiyang Zhang; Jean-Christophe Plagniol-Villard; Tomi Valkeinen; open > > list:Hyper-

Re: [dm-devel] Reworking dm-writeboost [was: Re: staging: Add dm-writeboost]

2013-10-08 Thread Christoph Hellwig
On Tue, Oct 08, 2013 at 10:43:07AM +1100, Dave Chinner wrote: > > Maybe, writeboost should disable deferring barriers > > if barrier_deadline_ms parameter is especially 0. > > Linux kernel's layered architecture is obviously not always perfect > > so there are similar cases in other boundaries > >

[PATCH] zsmalloc: Fix "map_vm_area" undefined reference errors.

2013-10-08 Thread Majunath Goudar
This patch adds a MMU dependency to configure the ZSMALLOC in drivers/staging/zsmalloc/Kconfig. Without this patch, build system can lead to build failure. This was observed during randconfig testing, in which ZSMALLOC was enabled w/o MMU being enabled. Following was the error: LD vmlinux dri

Re: [dm-devel] Reworking dm-writeboost [was: Re: staging: Add dm-writeboost]

2013-10-08 Thread Akira Hayakawa
Christoph, > You can detect O_DIRECT writes by second guession a special combination > of REQ_ flags only used there, as cfg tries to treat it special: > > #define WRITE_SYNC (WRITE | REQ_SYNC | REQ_NOIDLE) > #define WRITE_ODIRECT (WRITE | REQ_SYNC) > > the lack of REQ_NOI

Re: [dm-devel] Reworking dm-writeboost [was: Re: staging: Add dm-writeboost]

2013-10-08 Thread Akira Hayakawa
Dave, > i.e. there's no point justifying a behaviour with "we could do this > in future so lets ignore the impact on current users"... Sure, I am happy if we find a solution that is good for both of us or filesystem and block in other word. > e.g. what happens if a user has a mixed workload - one

RE: [PATCH 1/2] hyperv-fb: add pci stub

2013-10-08 Thread KY Srinivasan
> -Original Message- > From: Gerd Hoffmann [mailto:kra...@redhat.com] > Sent: Tuesday, October 08, 2013 1:41 AM > To: KY Srinivasan > Cc: Haiyang Zhang; Jean-Christophe Plagniol-Villard; Tomi Valkeinen; open > list:Hyper-V CORE AND...; open list:FRAMEBUFFER LAYER; open list > Subject: Re:

Re: [dm-devel] A review of dm-writeboost

2013-10-08 Thread Akira Hayakawa
Mikulas, Let me ask you about this comment of choosing the best API. For the rest, I will reply later. > BTW. You should use wait_event_interruptible_lock_irq instead of > wait_event_interruptible and wait_event_interruptible_lock_irq_timeout > instead of wait_event_interruptible_timeout. The f

Re: Reworking dm-writeboost [was: Re: staging: Add dm-writeboost]

2013-10-08 Thread Mike Snitzer
On Tue, Oct 08 2013 at 6:37am -0400, Akira Hayakawa wrote: > Christoph, > > > You can detect O_DIRECT writes by second guession a special combination > > of REQ_ flags only used there, as cfg tries to treat it special: > > > > #define WRITE_SYNC (WRITE | REQ_SYNC | REQ_NOIDLE) > >

[PATCH 13/28] staging: comedi: s626: remove a variable from set_mode_a() and _b()

2013-10-08 Thread Ian Abbott
The `set_mode_a()` and `set_mode_b()` functions use a local variable `setup` which is initialized to the value of parameter `Setup` which is not used further. Get rid of the local variable and rename the parameter to `setup`. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/s626.c |

[PATCH 05/28] staging: comedi: s626: remove unused DMAHandle

2013-10-08 Thread Ian Abbott
The `DMAHandle` member of `struct bufferDMA` in "s626.h" is unused, so remove it. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/s626.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/comedi/drivers/s626.h b/drivers/staging/comedi/drivers/s626.h index c4b8078..f

[PATCH 11/28] staging: comedi: s626: rename CamelCase in struct s626_private

2013-10-08 Thread Ian Abbott
Rename the CamelCase members of `struct s626_private`. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/s626.c | 99 ++- 1 file changed, 50 insertions(+), 49 deletions(-) diff --git a/drivers/staging/comedi/drivers/s626.c b/drivers/staging/comedi/dri

[PATCH 09/28] staging: comedi: s626: remove duplicate macros I2C_B0, I2C_B1, I2C_B2

2013-10-08 Thread Ian Abbott
The `I2C_B0(ATTR, VAL)`, `I2C_B1(ATTR, VAL)` and `I2C_B2(ATTR, VAL)` macros are defined identically in "s626.h" and "s626.c". Remove the duplicates from "s626.c". Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/s626.c | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/

[PATCH 10/28] staging: comedi: s626: replace CamelCase struct bufferDMA

2013-10-08 Thread Ian Abbott
Rename `struct bufferDMA` and its members to avoid CamelCase. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/s626.c | 46 +-- drivers/staging/comedi/drivers/s626.h | 6 ++--- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/drivers/s

[PATCH 01/28] staging: comedi: s626: tidy the header file a bit

2013-10-08 Thread Ian Abbott
Tidy up the "s626.h" header file a bit, cleaning up the whitespace and fixing overlength lines. Add multiple inclusion protection (even though it's only included once and only by "s626.c"). Remove unnecessary driver comment near the start of the file as it is more or less the same as the one in "

[PATCH 06/28] staging: comedi: s626: remove PCI ID defines

2013-10-08 Thread Ian Abbott
The Sensoray 626 is based on the Philips SAA7146 chip using the Philips vendor and device ID for the chip, but with custom subdevice and subvendor IDs. Use the Philips IDs in the PCI device table and replace the macros for the subvendor and subdevice IDs with open-coded values. Signed-off-by: Ian

[PATCH 00/28] staging: comedi: s626: tidy up

2013-10-08 Thread Ian Abbott
Tidy up the s626 comedi driver a bit. 01) staging: comedi: s626: tidy the header file a bit 02) staging: comedi: s626: tidy up comments at top of file 03) staging: comedi: s626: tidy up main source code file 04) staging: comedi: s626: convert a printk() 05) staging: comedi: s626: remove unused DMA

[PATCH 17/28] staging: comedi: s626: move encoder functions part 1

2013-10-08 Thread Ian Abbott
Move some functions to help avoid the forward declaration of `s626_enc_chan_info[]`. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/s626.c | 284 +- 1 file changed, 142 insertions(+), 142 deletions(-) diff --git a/drivers/staging/comedi/drivers/s626

[PATCH 12/28] staging: comedi: s626: rename CamelCase in struct enc_private

2013-10-08 Thread Ian Abbott
Rename the CamelCase members of `struct enc_private`. Since most of those are function pointers pointing to functions with similar names as the members, rename the functions they point to as well. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/s626.c | 425 +---

[PATCH 16/28] staging: comedi: s626: remove encpriv macro

2013-10-08 Thread Ian Abbott
The `encpriv` macro relies on a local variable `dev` (of type `struct comedi_device *`) being set correctly. By a convoluted path involving the `private` data pointer of subdevice 5 (the encoder (counter) subdevice), the macro always yields a pointer to the first element of the static array `enc_p

[PATCH 18/28] staging: comedi: s626: move encoder functions part 2

2013-10-08 Thread Ian Abbott
Move some more functions to help avoid the forward declaration of `s626_enc_chan_info[]`. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/s626.c | 478 +- 1 file changed, 239 insertions(+), 239 deletions(-) diff --git a/drivers/staging/comedi/drivers

[PATCH 24/28] staging: comedi: s626: move struct buffer_dma

2013-10-08 Thread Ian Abbott
Move the declaration of `struct buffer_dma` from "s626.h" to "s626.c" as it seems more at home there. After this move, "s626.h" just contains macros related to hardware registers. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/s626.c | 5 + drivers/staging/comedi/drivers/s626.

[PATCH 22/28] staging: comedi: s626: add mmiowb() calls

2013-10-08 Thread Ian Abbott
`s626_mc_enable()` is often called to enable some function in a control register after setting up some other registers. Precede the write to the control register with a call to `mmiowb()` to preserve mmio write ordering. `s626_mc_disable()` is called to disable some function in a control register

[PATCH 20/28] staging: comedi: s626: move s626_enc_chan_info[]

2013-10-08 Thread Ian Abbott
Move `s626_enc_chan_info[]` and remove its forward declaration. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/s626.c | 190 +- 1 file changed, 94 insertions(+), 96 deletions(-) diff --git a/drivers/staging/comedi/drivers/s626.c b/drivers/staging/c

[PATCH 27/28] staging: comedi: s626: prefix macros in s626.c

2013-10-08 Thread Ian Abbott
Prefix the macros defined in "s626.c" with `S626_`. Macro `VECT0` is unused, so remove it. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/s626.c | 75 +-- 1 file changed, 37 insertions(+), 38 deletions(-) diff --git a/drivers/staging/comedi/drivers

[PATCH 26/28] staging: comedi: s626: prefix function and variable names

2013-10-08 Thread Ian Abbott
Add the prefix `s626_` to all the static variables and functions that don't already have it. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/s626.c | 551 +- 1 file changed, 281 insertions(+), 270 deletions(-) diff --git a/drivers/staging/comedi/driv

[PATCH 21/28] staging: comedi: s626: remove TRUE and FALSE macros

2013-10-08 Thread Ian Abbott
"s626.h" defines the macros `TRUE` and `FALSE` if they are not already defined, yielding the expected numeric values. Remove the macros and replace their usage with the values `true` and `false`, respectively. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/s626.c | 18 +---

[PATCH 25/28] staging: comedi: s626: rename struct buffer_dma

2013-10-08 Thread Ian Abbott
Re-tag `struct buffer_dma` to `struct s626_buffer_dma` to avoid potential namespace clashes. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/s626.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/comedi/drivers/s626.c b/drivers/staging/co

[PATCH 23/28] staging: comedi: s626: make trimchan[] and trimadrs[] const

2013-10-08 Thread Ian Abbott
Declare the static variables `trimchan[]` and `trimadrs[]` as constant data. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/s626.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/comedi/drivers/s626.c b/drivers/staging/comedi/drivers/s626.c

[PATCH 15/28] staging: comedi: s626: rename CamelCase variables

2013-10-08 Thread Ian Abbott
Rename the remaining CamelCase parameters and variables. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/s626.c | 258 +- 1 file changed, 129 insertions(+), 129 deletions(-) diff --git a/drivers/staging/comedi/drivers/s626.c b/drivers/staging/comedi

[PATCH 19/28] staging: comedi: s626: move encoder functions part 3

2013-10-08 Thread Ian Abbott
Move the final lot of encoder functions to help avoid the forward declaration of `s626_enc_chan_info[]`. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/s626.c | 334 +- 1 file changed, 167 insertions(+), 167 deletions(-) diff --git a/drivers/staging

[PATCH 14/28] staging: comedi: s626: rename CamelCase functions

2013-10-08 Thread Ian Abbott
Rename the remaining non-lower-case functions. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/s626.c | 293 +- 1 file changed, 147 insertions(+), 146 deletions(-) diff --git a/drivers/staging/comedi/drivers/s626.c b/drivers/staging/comedi/drivers/s

[PATCH 04/28] staging: comedi: s626: convert a printk()

2013-10-08 Thread Ian Abbott
Convert a printk() to a dev_err(). Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/s626.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/comedi/drivers/s626.c b/drivers/staging/comedi/drivers/s626.c index 99d1bed..e59769d 100644 --- a/driver

[PATCH 07/28] staging: comedi: s626: rename ai_continous

2013-10-08 Thread Ian Abbott
Rename the `ai_continous` member of `struct s626_private` to `ai_continuous`. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/s626.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/comedi/drivers/s626.c b/drivers/staging/comedi/drivers/s6

[PATCH 02/28] staging: comedi: s626: tidy up comments at top of file

2013-10-08 Thread Ian Abbott
Make the comments at the top of the file conform to the CodingStyle. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/s626.c | 114 +- 1 file changed, 57 insertions(+), 57 deletions(-) diff --git a/drivers/staging/comedi/drivers/s626.c b/drivers/stag

[PATCH 08/28] staging: comedi: s626: remove I2CR and I2CW macros

2013-10-08 Thread Ian Abbott
The `I2CR` and `I2CW` macros expand to the I2C read and write addresses, respectively. They are only used in one place each and include the name of a local variable `devpriv` in their expansion. Get rid of the macros and expand them in place. Signed-off-by: Ian Abbott --- drivers/staging/comed

[PATCH 1/2] staging: gdm7240: alloc_mux_rx() does not need GFP_ATOMIC

2013-10-08 Thread Alexey Khoroshilov
As far as alloc_mux_rx() is called from probe() only there is no need in GFP_ATOMIC here. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov --- drivers/staging/gdm724x/gdm_mux.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --gi

[PATCH 2/2] staging: gdm7240: fix memory leak on failure path

2013-10-08 Thread Alexey Khoroshilov
init_usb() may fail after some of mux_rxes already allocated. So we need to release them on the failure path. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov --- drivers/staging/gdm724x/gdm_mux.c | 4 ++-- 1 file changed, 2 insertions(+), 2 delet

Re: Reworking dm-writeboost [was: Re: staging: Add dm-writeboost]

2013-10-08 Thread Akira Hayakawa
Mike, I am happy to see that guys from filesystem to the block subsystem have been discussing how to handle barriers in each layer almost independently. >> Merging the barriers and replacing it with a single FLUSH >> by accepting a lot of writes >> is the reason for deferring barriers in writeboo

Re: [dm-devel] A review of dm-writeboost

2013-10-08 Thread Akira Hayakawa
Mikulas, > Waking up every 100ms in flush_proc is not good because it wastes CPU time > and energy if the driver is idle. Yes, 100ms is too short. I will change it to 1sec then. We can wait for 1 sec in termination. > The problem is that if you fill up the whole cache device in less time > than