RE: [PATCH V4 4/7] Drivers: hv: vmbus: add APIs to register callbacks to process hvsock connection

2015-08-05 Thread Dexuan Cui
> From: devel [mailto:driverdev-devel-boun...@linuxdriverproject.org] On Behalf > Of Dexuan Cui > Sent: Thursday, July 30, 2015 18:20 > To: David Miller ; KY Srinivasan > Cc: o...@aepfle.de; gre...@linuxfoundation.org; jasow...@redhat.com; > driverdev-devel@linuxdriverproject.org; linux-ker...@vge

RE: [PATCH V4 7/7] Drivers: hv: vmbus: disable local interrupt when hvsock's callback is running

2015-08-05 Thread Dexuan Cui
> -Original Message- > From: devel [mailto:driverdev-devel-boun...@linuxdriverproject.org] On Behalf > Of Dexuan Cui > Sent: Thursday, July 30, 2015 18:18 > To: David Miller ; KY Srinivasan > Cc: o...@aepfle.de; gre...@linuxfoundation.org; jasow...@redhat.com; > driverdev-devel@linuxdriver

Re: [PATCH 3/7] staging: most: cdev.c: Insert blank line after struct declaration

2015-08-05 Thread Greg KH
On Thu, Aug 06, 2015 at 10:20:13AM +0900, Chaehyun Lim wrote: > Insert blank line after struct declaration found by checkpatch.pl. > CHECK: use a blank line after function/struct/union/enum declarations > > Signed-off-by: Chaehyun Lim > --- > drivers/staging/most/aim-cdev/cdev.c | 1 + > 1 file

Re: [PATCH 2/7] staging: most: cdev.c: move assignment out of if condition

2015-08-05 Thread Greg KH
On Thu, Aug 06, 2015 at 10:20:12AM +0900, Chaehyun Lim wrote: > Move assignment out of if condition found by checkpatch.pl. > ERROR: do not use assignment in if condition > > Signed-off-by: Chaehyun Lim > --- > drivers/staging/most/aim-cdev/cdev.c | 6 ++ > 1 file changed, 2 insertions(+), 4

[PATCHv2] Staging: vme: remove an unnecessary and wrong warning message

2015-08-05 Thread Navy Cheng
The wrong warning message in vme_user_probe() will mislead developers and users. As the error message which prompt cdev_add() error already exists, just remove the unnecessary and wrong message. Signed-off-by: Navy Cheng --- drivers/staging/vme/devices/vme_user.c | 4 +--- 1 file changed, 1 inse

[PATCH 3/7] staging: most: cdev.c: Insert blank line after struct declaration

2015-08-05 Thread Chaehyun Lim
Insert blank line after struct declaration found by checkpatch.pl. CHECK: use a blank line after function/struct/union/enum declarations Signed-off-by: Chaehyun Lim --- drivers/staging/most/aim-cdev/cdev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/most/aim-cdev/cdev.c

[PATCH 2/7] staging: most: cdev.c: move assignment out of if condition

2015-08-05 Thread Chaehyun Lim
Move assignment out of if condition found by checkpatch.pl. ERROR: do not use assignment in if condition Signed-off-by: Chaehyun Lim --- drivers/staging/most/aim-cdev/cdev.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/most/aim-cdev/cdev.c b/drivers/

[PATCH 7/7] staging: most: cdev.c: remove boolean comparison

2015-08-05 Thread Chaehyun Lim
Remove boolean comparison found by checkpatch.pl. CHECK: Using comparison to true is error prone Signed-off-by: Chaehyun Lim --- drivers/staging/most/aim-cdev/cdev.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/most/aim-cdev/cdev.c b/drivers/staging/

[PATCH 4/7] staging: most: cdev.c: remove multiple blank line

2015-08-05 Thread Chaehyun Lim
Remove multiple blank line found by checkpatch.pl. CHECK: Please don't use multiple blank lines Signed-off-by: Chaehyun Lim --- drivers/staging/most/aim-cdev/cdev.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/most/aim-cdev/cdev.c b/drivers/staging/most/aim-cdev/cdev.c ind

[PATCH 1/7] staging: most: cdev.c: remove unnecessary pr_info

2015-08-05 Thread Chaehyun Lim
Remove unnecessary pr_info found by checkpatch.pl. WARNING: Possible unnecessary 'out of memory' message Signed-off-by: Chaehyun Lim --- drivers/staging/most/aim-cdev/cdev.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/most/aim-cdev/cdev.c b/drivers/staging/most/aim-cdev/c

[PATCH 5/7] staging: most: cdev.c: move logical operator to previous line

2015-08-05 Thread Chaehyun Lim
Move logical operator to previous line found by checkpatch.pl. CHECK: Logical continuations should be on the previous line Signed-off-by: Chaehyun Lim --- drivers/staging/most/aim-cdev/cdev.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/most/aim-cde

[PATCH 6/7] staging: most: cdev.c: use ! operator instead of NULL comparison

2015-08-05 Thread Chaehyun Lim
Use ! operator instead of NULL comparison found by checkpatch.pl. Signed-off-by: Chaehyun Lim --- drivers/staging/most/aim-cdev/cdev.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/staging/most/aim-cdev/cdev.c b/drivers/staging/most/aim-cdev/cdev.c in

[PATCH] Fix coding style in staging ozhcd.h

2015-08-05 Thread Trung Thanh Le
Signed-off-by: Trung Thanh Le --- drivers/staging/ozwpan/ozhcd.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/ozwpan/ozhcd.h b/drivers/staging/ozwpan/ozhcd.h index 55e97b1..ea93c4b 100644 --- a/drivers/staging/ozwpan/ozhcd.h +++ b/drivers/staging/ozwpan/oz

Re: [PATCH] zram: Replace pr_* with dev_*

2015-08-05 Thread Salah Triki
On Thu, Aug 06, 2015 at 09:26:02AM +0900, Sergey Senozhatsky wrote: > On (08/06/15 01:24), Dan Carpenter wrote: > > On Tue, Aug 04, 2015 at 07:19:01PM +0100, Salah Triki wrote: > > > @@ -508,14 +509,15 @@ static struct zram_meta *zram_meta_alloc(int > > > device_id, u64 disksize) > > > num_pages

Re: [PATCH] zram: Replace pr_* with dev_*

2015-08-05 Thread Sergey Senozhatsky
On (08/06/15 01:24), Dan Carpenter wrote: > On Tue, Aug 04, 2015 at 07:19:01PM +0100, Salah Triki wrote: > > @@ -508,14 +509,15 @@ static struct zram_meta *zram_meta_alloc(int > > device_id, u64 disksize) > > num_pages = disksize >> PAGE_SHIFT; > > meta->table = vzalloc(num_pages * sizeof(

[PATCH v4 REPOST 8/8] staging: rtl8712: change SupportedRates to rates

2015-08-05 Thread Joshua Clayton
Change the value to a name that conforms to Linux coding style. "rates" is equally expressive in this context, and I have left alone a comment and function name that describe the rates as supported rates. Signed-off-by: Joshua Clayton --- drivers/staging/rtl8712/ieee80211.c | 25 +

[PATCH v4 REPOST 6/8] staging: rtl8712: rename function

2015-08-05 Thread Joshua Clayton
Rename r8712_get_ndis_wlan_bssid_ex_sz() to r8712_get_wlan_bssid_ex_sz(), which corresponds to the struct whose size it measures. Signed-off-by: Joshua Clayton --- drivers/staging/rtl8712/rtl871x_cmd.c | 8 drivers/staging/rtl8712/rtl871x_mlme.c | 16 drivers/

[PATCH v4 REPOST 3/8] staging: rtl8712: fix comment

2015-08-05 Thread Joshua Clayton
The old comment refers to a typedef name which is being removed, and to a style of calculation which is no longer being used. It falsely states that IELength is variable length, instead of IEs. Change comment to simply state that the IEs field is a buffer of variable size and that IELength refers

[PATCH v4 REPOST 1/8] staging: rtl8712: fix buggy size calculation

2015-08-05 Thread Joshua Clayton
r8712_get_ndis_wlan_bssid_ex_sz has a "6 * sizeof(unsigned long)" where the underlying struct has a 6 * unsigned char. Simplify the calculation by just subtracting the variable part from the size of the struct. This also gets rid of a use of typedef NDIS_802_11_RATES_EX Signed-off-by: Joshua Clay

[PATCH v4 REPOST 7/8] staging: rtl8712: remove typedefs

2015-08-05 Thread Joshua Clayton
Coding style fix. Get rid of typedefs NDIS_802_11_RATES and NDIS_802_11_RATES_EX Undo any casting that was done as a result of the typedef. Signed-off-by: Joshua Clayton --- drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 12 ++-- drivers/staging/rtl8712/wlan_bssdef.h | 7 +-

[PATCH v4 REPOST 4/8] staging: rtl8712: removed unused wrapper structs

2015-08-05 Thread Joshua Clayton
Remove wrapper structs that just wrap struct ndis_wlan_bssid_ex, and are unused. Signed-off-by: Joshua Clayton --- drivers/staging/rtl8712/rtl871x_cmd.h | 18 -- 1 file changed, 18 deletions(-) diff --git a/drivers/staging/rtl8712/rtl871x_cmd.h b/drivers/staging/rtl8712/rtl871x

[PATCH v4 REPOST 2/8] staging: rtl8712: simplify size calculation

2015-08-05 Thread Joshua Clayton
replace item-by-item size calculation of a struct with the size of the struct. This gets rid of a use of typedef NDIS_802_11_RATES_EX Signed-off-by: Joshua Clayton --- drivers/staging/rtl8712/rtl871x_cmd.c | 11 +-- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/drivers/

[PATCH v4 REPOST 5/8] staging: rtl8712: remove duplicate struct

2015-08-05 Thread Joshua Clayton
struct ndis_wlan_bssid_ex is a doppelganger of struct wlan_bssid_ex, and is used about a third as often. Switch all instances to wlan_bssid_ex, and remove ndis_wlan_bssid_ex This also gets rid of a use of typedef NDIS_802_11_RATES_EX Signed-off-by: Joshua Clayton --- drivers/staging/rtl8712/rt

[PATCH v4 REPOST 0/8] clean up wlan_bssdef.h

2015-08-05 Thread Joshua Clayton
I posted v4 of this patch set a week ago and there have been no comments. I hope this is a good sign that the patches are good. However, I have noticed that I managed to use the same message id for the coverletter of v4 as for v3, which might have caused people to hold off reviewing, perhaps thin

Re: [PATCH] zram: Replace pr_* with dev_*

2015-08-05 Thread Salah Triki
Hi Sanjeev, thanx for comments. best regards, salah triki On Wed, Aug 05, 2015 at 10:10:58AM +0530, sanjeev sharma wrote: > Hello Salah, > > It would be good,if you provide some information why you are doing so like > " messages that are associated with a particular device" should be tagged >

Re: [PATCH] staging: sm750fb: fix sparse warning for lock

2015-08-05 Thread Dan Carpenter
On Wed, Aug 05, 2015 at 09:26:44PM +0800, Peng Fan wrote: > Use __acquire() and __release() in the right place to silence the sparse > lock checking warning. > > drivers/staging/sm750fb/sm750.c:177:13: warning: context imbalance in > 'lynxfb_ops_fillrect' - different lock contexts for basic block

Re: [PATCH] zram: Replace pr_* with dev_*

2015-08-05 Thread Dan Carpenter
On Tue, Aug 04, 2015 at 07:19:01PM +0100, Salah Triki wrote: > @@ -508,14 +509,15 @@ static struct zram_meta *zram_meta_alloc(int device_id, > u64 disksize) > num_pages = disksize >> PAGE_SHIFT; > meta->table = vzalloc(num_pages * sizeof(*meta->table)); > if (!meta->table) { > -

Re: [PATCH] Fix coding style issues.

2015-08-05 Thread Greg KH
On Wed, Aug 05, 2015 at 11:19:53PM +0300, Lior Pugatch wrote: > This patch fixes checkpatch.pl warnings, > related to comments. > > Signed-off-by: Lior Pugatch > --- > drivers/staging/panel/panel.c | 38 +- > 1 file changed, 25 insertions(+), 13 deletions(-) >

BEST OFFER 2015

2015-08-05 Thread Marcos Larmon
Attn: Applicant, I am a loan lender offering out loans with interest rate of 3% my offer is guaranteed and also very fast and easy. Do you want to be financially equipped? DO you want a loan to start up your own business? Have you been looking for a legitimate loan lender? Do you want to pay

Re: [PATCH] staging: panel: Fix coding style issue.

2015-08-05 Thread Willy Tarreau
On Wed, Aug 05, 2015 at 10:43:23PM +0300, Lior Pugatch wrote: > This patch fixes checkpatch.pl warning, > all warnings are releted to comments code style. Acked-by: Willy Tarreau Thanks! Willy ___ devel mailing list de...@linuxdriverproject.org http:/

[PATCH] Fix coding style issues.

2015-08-05 Thread Lior Pugatch
This patch fixes checkpatch.pl warnings, related to comments. Signed-off-by: Lior Pugatch --- drivers/staging/panel/panel.c | 38 +- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/drivers/staging/panel/panel.c b/drivers/staging/panel/panel.c i

[PATCH] staging: octeon: fix coding style warnings for block comments

2015-08-05 Thread Okash Khawaja
The Linux kernel coding style suggests starting every line in a block comment with an asterisk and finishing the block comment with */ on a separate line. This patch fixes those warnings, clearing all warnings and errors in this file, as reported by the checkpatch script. Signed-off-by: Okash Kha

Re: [PATCH 0/3] VME bus error handling overhaul

2015-08-05 Thread Greg Kroah-Hartman
On Mon, Jul 06, 2015 at 01:31:47PM +0100, Martyn Welch wrote: > Hi Dmitry, > > These are looking good to me. Can I get an "Acked-by:" or something so that I know it's ok to apply these? thanks, greg k-h- ___ devel mailing list de...@linuxdriverproject

Re: [PATCHv5 3/5] Staging: most: hdm-usb/hdm_usb.c. Fix "missing static keyword" warnings

2015-08-05 Thread Christian Gromm
On Tue, 4 Aug 2015 20:44:53 +0200 Adrian Remonda wrote: > This is a patch to the most/hdm-usb/hdm_usb.c file. It > makes several local functions and structures static to prevent global > visibility. > > Signed-off-by: Adrian Remonda > --- > drivers/staging/most/hdm-usb/hdm_usb.c | 16 -

[PATCH] staging: panel: Fix coding style issue.

2015-08-05 Thread Lior Pugatch
This patch fixes checkpatch.pl warning, all warnings are releted to comments code style. --- drivers/staging/panel/panel.c | 38 +- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/drivers/staging/panel/panel.c b/drivers/staging/panel/panel.c ind

Re: [PATCH] staging: sm750fb: fix sparse warning for lock

2015-08-05 Thread Greg KH
On Wed, Aug 05, 2015 at 09:26:44PM +0800, Peng Fan wrote: > Use __acquire() and __release() in the right place to silence the sparse > lock checking warning. > > drivers/staging/sm750fb/sm750.c:177:13: warning: context imbalance in > 'lynxfb_ops_fillrect' - different lock contexts for basic block

Re: [PATCH] Staging: vme: fix a wrong waring in vme_user_probe()

2015-08-05 Thread Greg Kroah-Hartman
On Wed, Aug 05, 2015 at 01:24:52PM +0800, Navy Cheng wrote: > The waring message will mislead developers and users. This will cause a > potential damage. Fix the waring message to give developers and users the > correct guidance. "waring"? > > Signed-off-by: Navy Cheng > --- > drivers/stagin

Re: [PATCH v2 2/2] Staging: ft1000: ft1000-usb: use USB API functions rather than constants

2015-08-05 Thread Greg Kroah-Hartman
On Wed, Aug 05, 2015 at 03:18:04AM +0530, Shraddha Barke wrote: > This patch introduces the use of the function usb_endpoint_type. > > The Coccinelle semantic patch that makes these changes is as follows: > > @@ struct usb_endpoint_descriptor *epd; @@ > > - (epd->bmAttributes & \(USB_ENDPOINT_XF

Re: [PATCH V3] staging: android: lowmemorykiller: imporve lmk to avoid deadlock issue

2015-08-05 Thread gre...@linuxfoundation.org
On Mon, Aug 03, 2015 at 08:26:40AM +, Wang, Biao wrote: > Consider the following case: > Task A trigger lmk with a lock held, while task B try to get this lock, but > unfortunately B is the very culprit task lmk select to kill. Then B will > never be killed, and A will forever select B to kil

[PATCH v2 46/46] staging: comedi: me4000: update MODULE_DESCRIPTION

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

[PATCH v2 43/46] staging: comedi: me4000: usleep_range is preferred over udelay

2015-08-05 Thread H Hartley Sweeten
Fix checkpatch issue: "CHECK: usleep_range is preferred over udelay; see Documentation/timers/timers-howto.txt". `udelay()` is only used in the firmware upload process. Replace them with `usleep_range()` with a reasonable upper limit. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kr

[PATCH v2 44/46] staging: comedi: me4000: cleanup multi-line comments

2015-08-05 Thread H Hartley Sweeten
Format the multi-line comments in the kernel CodingStyle. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/me4000.c | 74 - 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/drivers/staging/c

[PATCH v2 45/46] staging: comedi: me4000: updata driver status in comedi comment

2015-08-05 Thread H Hartley Sweeten
Firmware loading was fixed by: Commit: ac584af5 "staging: comedi: me4000: fix firmware downloading" Change the driver status to "untested" and remove the comments about the driver being broken, Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/

[PATCH v2 39/46] staging: comedi: me4000: fix me4000_detach()

2015-08-05 Thread H Hartley Sweeten
There is no real reason to reset the board when detaching. The comedi core will ensure that any commands are canceled before the detach. But the PLX interrupts should be disabled. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/me4000.

[PATCH v2 42/46] staging: comedi: me4000: introduce me4000_ai_get_sample()

2015-08-05 Thread H Hartley Sweeten
The hardware returns two's complement values for the analog input samples. These need to be converted to the unsigned binary format that the comedi core expects. Introduce a helper function to handle this. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/stagi

[PATCH v2 41/46] staging: comedi: me4000: comedi_handle_events() will stop conversions

2015-08-05 Thread H Hartley Sweeten
The irq handler does not need to manually stop conversions and disable interrupts when "end-of-acquisition", "error", or "overflow" events are detected. The comedi_handle_events() will call the subdevice (*cancel) when these are detected and stop the acquisition. Signed-off-by: H Hartley Sweeten

[PATCH v2 38/46] staging: comedi: me4000: only enable PLX interrupt if we have and irq

2015-08-05 Thread H Hartley Sweeten
Currently me4000_reset() always enables the PLX interrupt. Move the enable of the interrupt into me4000_auto_attach() and only do the enable if we actually have and irq. Make sure the PLX interrupt is disabled in me4000_reset() before we try to request the irq. Signed-off-by: H Hartley Sweeten C

[PATCH v2 40/46] staging: comedi: me4000: tidy up analog output subdevice init

2015-08-05 Thread H Hartley Sweeten
For aesthetics, add some white space to the analog output subdevice initialization. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/me4000.c | 20 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/drive

[PATCH v2 35/46] staging: comedi: me4000: remove unnecessary me4000_ai_cancel()

2015-08-05 Thread H Hartley Sweeten
The comedi core ensures that the subdevice is not busy before it allows starting a new command. The subdevice (*cancel) is called when the subdevice is set to not busy. In this driver the me4000_ai_cancel() is the ai (*cancel) so the extra call in the ai (*do_cmd) is not necessary. Remove it. Sign

[PATCH v2 37/46] staging: comedi: me4000: introduce me4000_ai_reset()

2015-08-05 Thread H Hartley Sweeten
Introduce a helper function to stop any ai conversions and reset the ai control register. This consolidates the common code in me4000_reset() and me4000_ai_cancel(). Use the new helper in the ai (*insn_read) to ensure that the ai control register is set to a known state after reading the samples.

[PATCH v2 36/46] staging: comedi: me4000: clear the ME4000_AI_CTRL_REG in me4000_reset()

2015-08-05 Thread H Hartley Sweeten
Reset the analog input control register after ensuring that any active conversions have been stopped. This mimics what the ai subdevice (*cancel) does. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/me4000.c | 3 +++ 1 file changed, 3

[PATCH v2 33/46] staging: comedi: me4000: fix me4000_ai_cancel()

2015-08-05 Thread H Hartley Sweeten
The STOP and IMMEDIATE_STOP bits in the ME4000_AI_CTRL_REG should be set, not cleared, to stop any running conversions. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/me4000.c | 8 1 file changed, 4 insertions(+), 4 deletions(

[PATCH v2 34/46] staging: comedi: me4000: remove unnecessary ai control register reset

2015-08-05 Thread H Hartley Sweeten
The me4000_ai_cancel() already reset this register. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/me4000.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/comedi/drivers/me4000.c b/drivers/staging/comedi/drivers

[PATCH v2 32/46] staging: comedi: me4000: return void from me4000_ai_write_chanlist()

2015-08-05 Thread H Hartley Sweeten
This function always returns 0 and the return value is never checked. Just return void. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/me4000.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/staging

[PATCH v2 30/46] staging: comedi: me4000: absorb ai_prepare()

2015-08-05 Thread H Hartley Sweeten
This function never fails and it's only called by me4000_ai_do_cmd(). Absorb it and remove the unnecessary failure check. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/me4000.c | 31 +-- 1 file changed, 9

[PATCH v2 28/46] staging: comedi: me4000: move ai command timing values into private data

2015-08-05 Thread H Hartley Sweeten
The ai (*do_cmd_test) calls me4000_ai_round_cmd_args() to calculate the timing values needed to the command. The the command test passes, the core will then call the ai (*do_cmd) which then has to call me4000_ai_round_cmd_args() again in order to get the same values to pass to ai_prepare() in order

[PATCH v2 27/46] staging: comedi: me4000: return void from ai_round_cmd_args()

2015-08-05 Thread H Hartley Sweeten
This function always succeeds. Change the return type to void and remove the unnecessary error check in me4000_ai_do_cmd(). Move the function call in me4000_ai_do_cmd_test() from before Step 1 to Step 3 where the arguments are validated. There is no reason to get the values if the previous steps f

[PATCH v2 29/46] staging: comedi: me4000: simplify ai_prepare()

2015-08-05 Thread H Hartley Sweeten
The ai (*do_cmd_test) validates the trigger sources in Step 2b to ensure that they are compatible. Save the 'ai_ctrl_mode' that will be used in the private data so that ai_prepare(), which is called by the ai (*do_cmd), does not have to recheck the sources in order to figure it out. Also, tidy up

[PATCH v2 31/46] staging: comedi: me4000: absorb ai_write_timer()

2015-08-05 Thread H Hartley Sweeten
This function is only called by me4000_ai_do_cmd(). Absorb it. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/me4000.c | 35 + 1 file changed, 14 insertions(+), 21 deletions(-) diff --git a/drivers/stag

[PATCH v2 26/46] staging: comedi: me4000: tidy up ME4000_DIO_CTRL_REG bit defines

2015-08-05 Thread H Hartley Sweeten
Use the BIT() marco to define the bits of this register. For aesthetics, rename all the defines to remove the '_BIT' from the name. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/me4000.c | 51 - 1 file

[PATCH v2 24/46] staging: comedi: me4000: tidy up ME4000_AO_STATUS_REG bit defines

2015-08-05 Thread H Hartley Sweeten
Use the BIT() marco to define the bits of this register. For aesthetics, rename all the defines to remove the '_BIT' from the name. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/me4000.c | 8 1 file changed, 4 insertions(+),

[PATCH v2 25/46] staging: comedi: me4000: tidy up ME4000_AO_CTRL_REG bit defines

2015-08-05 Thread H Hartley Sweeten
Use the BIT() marco to define the bits of this register. For aesthetics, rename all the defines to remove the '_BIT' from the name. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/me4000.c | 25 - 1 file changed

[PATCH v2 22/46] staging: comedi: me4000: tidy up ME4000_AI_CTRL_REG bit defines

2015-08-05 Thread H Hartley Sweeten
Use the BIT() marco to define the bits of this register. For aesthetics, rename all the defines to remove the '_BIT' from the name. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/me4000.c | 123 1 file

[PATCH v2 23/46] staging: comedi: me4000: tidy up ME4000_IRQ_STATUS_REG bit defines

2015-08-05 Thread H Hartley Sweeten
Use the BIT() marco to define the bits of this register. For aesthetics, rename all the defines to remove the '_BIT' from the name. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/me4000.c | 20 ++-- 1 file changed, 10

[PATCH v2 21/46] staging: comedi: me4000: tidy up ME4000_AI_STATUS_REG bit defines

2015-08-05 Thread H Hartley Sweeten
Use the BIT() marco to define the bits of this register. For aesthetics, rename all the defines to remove the '_BIT' from the name. Also, use ME4000_AI_STATUS_REG instead of ME4000_AI_CTRL_REG when reading the register (they happen to be the same). Signed-off-by: H Hartley Sweeten Cc: Ian Abbott

[PATCH v2 18/46] staging: comedi: me4000: fix me4000_ai_insn_read()

2015-08-05 Thread H Hartley Sweeten
The coemdi (*insn_read) functions are supposed to read insn->n values from the hardware. Make this function work like the core expects. Use the comedi_offset_munge() helper to munge the two's complement values to offset binary. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hart

[PATCH v2 20/46] staging: comedi: me4000: use comedi_range_is_bipolar() in ai (*insn_read)

2015-08-05 Thread H Hartley Sweeten
Use the helper function to check the range type instead of relying on the value. For aesthetics, rename the local variable used for the range. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/me4000.c | 9 - 1 file changed, 4 ins

[PATCH v2 19/46] staging: comedi: me4000: use correct types for extracted chanspec values

2015-08-05 Thread H Hartley Sweeten
The chanspec channel, range, and aref are unsigned int values. Use the correct types when extracting them. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/me4000.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --gi

[PATCH v2 17/46] staging: comedi: me4000: use comedi_timeout() to wait for ai (*insn_read)

2015-08-05 Thread H Hartley Sweeten
Use the comedi_timeout() helper to busy-wait for the analog input end-of- conversion instead of the udelay(). Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/me4000.c | 27 --- 1 file changed, 16 insertions(+), 1

[PATCH v2 16/46] staging: comedi: me4000: tidy up ME4000_AI_CHANNEL_LIST_REG bit defines

2015-08-05 Thread H Hartley Sweeten
Use the BIT() macro to define the bits of this register. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/me4000.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/comedi/drivers/me4000.c b/drivers

[PATCH v2 15/46] staging: comedi: me4000: fix ai_write_chanlist()

2015-08-05 Thread H Hartley Sweeten
Rename this function so it has namespace associated with the driver. The last entry of the chanlist needs the ME4000_AI_LIST_LAST_ENTRY bit set to end the list. Fix the function and tidy if up a bit. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/co

[PATCH v2 14/46] staging: comedi: me4000: simplify analog input range programming

2015-08-05 Thread H Hartley Sweeten
The comedi_lrange table for the analog inputs is inverted compared to the values that need to be written to the ME4000_AI_CHANNEL_LIST_REG to select the range. Create a macro, ME4000_AI_LIST_RANGE(), to handle the inversion. Remove the old defines and simplify the code a bit. Signed-off-by: H Har

[PATCH v2 13/46] staging: comedi: me4000: remove unnecessary ME4000_AI_LIST_INPUT_SINGLE_ENDED

2015-08-05 Thread H Hartley Sweeten
This define evaluates to 0 and is OR'ed with the 'entry' value that is written to the ME4000_AI_CHANNEL_LIST_REG when the channel aref is a single-ended type (AREF_GROUND or AREF_COMMON). OR'ing a zero value is pretty silly, just remove it. Remove the switch() in me4000_ai_insn_read() to simplify

[PATCH v2 12/46] staging: comedi: me4000: rename local variables used for 'dev->private'

2015-08-05 Thread H Hartley Sweeten
In comedi drivers the local variable used for the dev->private pointer is normally named 'devpriv'. For aesthetics, rename the variables in this driver. Also, rename the struct to follow the norm. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi

[PATCH v2 10/46] staging: comedi: me4000: refactor 'ao_fifo' boardinfo

2015-08-05 Thread H Hartley Sweeten
This member of the boardinfo is always '4' for the boards that have an analog output FIFO. Covert it to a bit-field, 'has_ao_fifo', to save a bit of space. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/me4000.c | 10 +- 1 file

[PATCH v2 09/46] staging: comedi: me4000: refactor 'ao_nchan' boardinfo

2015-08-05 Thread H Hartley Sweeten
For the boards that have analog output capability, there are always 4 analog output channels. Convert the 'ao_nchan' member of the boardinfo into a bit-field, 'has_ao', to save a bit of space and set the analog output subdevice 'n_chan' to 4 when supported. Signed-off-by: H Hartley Sweeten Cc: Ia

[PATCH v2 11/46] staging: comedi: me4000: refactor 'ai_sh_nchan' boardinfo

2015-08-05 Thread H Hartley Sweeten
Some of the boards supported by this driver can do analog input sample & hold on 8 of the channels. The 'ai_sh_nchan' member of the boardinfo is used to indicate which boards support this feature. To save a bit of space, convert this member to a bit-field, 'can_do_sh_ai'. Note, this feature is not

[PATCH v2 08/46] staging: comedi: me4000: refactor 'ai_diff_nchan' boardinfo

2015-08-05 Thread H Hartley Sweeten
This member of the boardinfo is only used as a flag indicating that the board supports differential analog inputs. Convert the member to a bit- field to save a bit of space. For aesthetics, rename the member to 'can_do_diff_ai'. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hart

[PATCH v2 07/46] staging: comedi: me4000: make boardinfo flags bit-fields

2015-08-05 Thread H Hartley Sweeten
Change the boardinfo 'has_counter' and 'ai_trig_analog' flags into bit-fields to save a bit of space. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/me4000.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drive

[PATCH v2 06/46] staging: comedi: me4000: remove 'board' from me4000_ai_check_chanlist()

2015-08-05 Thread H Hartley Sweeten
The maximum differential channel is half the subdevice 'n_chan'. Use that instead and remove the need for the 'board' variable. Also, the comedi core does no validate the aref flags. Add a check to ensure that the subdevice actually supports the AREF_DIFF mode. Signed-off-by: H Hartley Sweeten C

[PATCH v2 05/46] staging: comedi: me4000: remove 'board' from me4000_ai_insn_read()

2015-08-05 Thread H Hartley Sweeten
The 'board' pointer is only used in this function to verify that the 'chan' is valid for an aref of AREF_DIFF. For differential inputs, the maximum channel is half the subdevice 'n_chan'. Use that instead and remove the 'board' variable. Also, the comedi core does not validate the aref flags. Add

[PATCH v2 04/46] staging: comedi: me4000: remove 'chan' check in me4000_ai_insn_read()

2015-08-05 Thread H Hartley Sweeten
The comedi core validates that the 'chan' is valid for the subdevice before calling the (*insn_read) operation. Remove the unnecessary check. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/me4000.c | 5 - 1 file changed, 5 deletion

[PATCH v2 03/46] staging: comedi: me4000: only set SDF_DIFF when supported

2015-08-05 Thread H Hartley Sweeten
Some of the boards supported by this driver do not have differential analog inputs. Only set the SDF_DIFF subdev_flag when the board supports it. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/me4000.c | 4 +++- 1 file changed, 3 inser

[PATCH v2 00/46] staging: comedi: me4000: cleanup driver

2015-08-05 Thread H Hartley Sweeten
Here's the big cleanup series for the Comedi me4000 driver. This fixes all the checkpatch issues and removes a bunch of cruft from the driver. v2: Address some issues pointed out by Ian Abbott, the comedi core does not validate the 'aref' so the driver needs to handle it. H Hartley Sweeten (

[PATCH v2 02/46] staging: comedi: me4000: all board types have analog inputs

2015-08-05 Thread H Hartley Sweeten
All the boards supported by this driver have analog inputs. They just differ in the number of channels (32 or 16). Always initialize the analog input subdevice in me4000_auto_attach(). Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/me

[PATCH v2 01/46] staging: comedi: me4000: remove 'dio_nchan' boardinfo

2015-08-05 Thread H Hartley Sweeten
All the boards supported by this driver have 32 digital I/O channels. Remove the unnecessary boardinfo. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/me4000.c | 38 +++-- 1 file changed, 8 insertions(+), 30

RE: [PATCH] staging: comedi: improve comedi_check_chanlist() documentation

2015-08-05 Thread Hartley Sweeten
On Wednesday, August 05, 2015 10:13 AM, Ian Abbott wrote: > > Signed-off-by: Ian Abbott > --- > drivers/staging/comedi/range.c | 13 - > 1 file changed, 12 insertions(+), 1 deletion(-) > > diff --git a/drivers/staging/comedi/range.c b/drivers/staging/comedi/range.c > index 6a393b2..ce

[PATCH] staging: comedi: improve comedi_check_chanlist() documentation

2015-08-05 Thread Ian Abbott
Signed-off-by: Ian Abbott --- drivers/staging/comedi/range.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/drivers/staging/comedi/range.c b/drivers/staging/comedi/range.c index 6a393b2..ce3a58a 100644 --- a/drivers/staging/comedi/range.c +++ b/drivers/staging/c

[PATCH v3 3/3] drivers: staging: wilc1000: remove space after '('

2015-08-05 Thread Chandra S Gorentla
The character ' ' is removed after the character '('. This fixes the checkpatch.pl error - "space prohibited after that open parenthesis '('". Signed-off-by: Chandra S Gorentla --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --gi

[PATCH v3 2/3] drivers: staging: wilc1000: move { to previous line

2015-08-05 Thread Chandra S Gorentla
Moved the opening brace of code blocks to the previous lines. This fixes the checkpatch.pl error - "that open brace { should be on the previous line". Signed-off-by: Chandra S Gorentla --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deleti

[PATCH v3 0/3] drivers: staging: wilc1000: Fix a few style errors

2015-08-05 Thread Chandra S Gorentla
v3 - Resending as v2 patch was series missing signedoff line. Corrected now. v2 - Resending as v1 patch series did not apply cleanly. These patches fixes a few style errors reported by checkpatch.pl. PATCH 3/3 should be applied after PATCH 2/3. ___ dev

[PATCH v3 1/3] drivers: staging: wilc1000: use 'void' for no arguments functions

2015-08-05 Thread Chandra S Gorentla
Added 'void' keyword in the paranthesis of function definitions, when there are no arguments to the functions. This fixes the checkpatch.pl error - "Bad function definition 'function()' should probably be function(void)". Signed-off-by: Chandra S Gorentla --- drivers/staging/wilc1000/linux_mon.

Re: [PATCH v2 1/3] drivers: staging: wilc1000: use 'void' for no arguments functions

2015-08-05 Thread Greg KH
On Wed, Aug 05, 2015 at 09:43:00PM +0530, Chandra S Gorentla wrote: > Added 'void' keyword in the paranthesis of function definitions, when > there are no arguments to the functions. This fixes the checkpatch.pl > error - "Bad function definition 'function()' should probably be > function(void)".

Re: [PATCH] staging: comedi: do not return -ENOSYS.

2015-08-05 Thread Ian Abbott
On 04/08/15 18:18, Ted Chen wrote: fixed coding style issue by replacing ENOSYS with EIO because it means 'invalid syscall nr' and nothing else. Signed-off-by: Ted Chen --- drivers/staging/comedi/drivers.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging

[PATCH v2 2/3] drivers: staging: wilc1000: move { to previous line

2015-08-05 Thread Chandra S Gorentla
Moved the opening brace of code blocks to the previous lines. This fixes the checkpatch.pl error - "that open brace { should be on the previous line". --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/stagin

[PATCH v2 3/3] drivers: staging: wilc1000: remove space after '('

2015-08-05 Thread Chandra S Gorentla
The character ' ' is removed after the character '('. This fixes the checkpatch.pl error - "space prohibited after that open parenthesis '('". --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wilc1000/wilc_w

[PATCH v2 1/3] drivers: staging: wilc1000: use 'void' for no arguments functions

2015-08-05 Thread Chandra S Gorentla
Added 'void' keyword in the paranthesis of function definitions, when there are no arguments to the functions. This fixes the checkpatch.pl error - "Bad function definition 'function()' should probably be function(void)". --- drivers/staging/wilc1000/linux_mon.c | 2 +- drivers/staging/wilc1000

[PATCH v2 0/3] drivers: staging: wilc1000: Fix a few style errors

2015-08-05 Thread Chandra S Gorentla
v2 - Resending as v1 patch series did not apply cleanly. These patches fixes a few style errors reported by checkpatch.pl. PATCH 3/3 should be applied after PATCH 2/3. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproje

[PATCH] staging: comedi: do not return -ENOSYS.

2015-08-05 Thread Ted Chen
fixed coding style issue by replacing ENOSYS with EIO because it means 'invalid syscall nr' and nothing else. Signed-off-by: Ted Chen --- drivers/staging/comedi/drivers.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/comedi/drivers.c b/drivers/staging/com

RE: [PATCH 05/46] staging: comedi: me4000: remove 'board' from me4000_ai_insn_read()

2015-08-05 Thread Hartley Sweeten
On Wednesday, August 05, 2015 4:38 AM, Ian Abbott wrote: > On 04/08/15 18:57, H Hartley Sweeten wrote: >> The 'board' pointer is only used in this function to verify that the >> 'chan' is valid for an aref of AREF_DIFF. The comedi core ensures that >> that aref is only possible if the subdevice has

  1   2   >