[PATCH 09/13] tools: hv: add a python script lsvmbus to list VMBus devices

2015-08-04 Thread K. Y. Srinivasan
From: Dexuan Cui By default lsvmbus lists all the devices in the VMBus. With -v or -vv, more information is printed, including the VMBus Rel_ID, class ID, device ID and which channel is bound to which virtual processor, etc. Signed-off-by: Dexuan Cui Signed-off-by: K. Y. Srinivasan --- tools/

RE: [PATCH 00/13] Drivers: hv: vmbus: Miscellaneous fixes

2015-08-04 Thread KY Srinivasan
> -Original Message- > From: K. Y. Srinivasan [mailto:k...@microsoft.com] > Sent: Wednesday, August 5, 2015 12:52 AM > To: gre...@linuxfoundation.org; linux-ker...@vger.kernel.org; > de...@linuxdriverproject.org; o...@aepfle.de; a...@canonical.com; > vkuzn...@redhat.com; jasow...@redhat.c

[PATCH 11/13] cpu-hotplug: convert cpu_hotplug_disabled to a counter

2015-08-04 Thread K. Y. Srinivasan
From: Vitaly Kuznetsov As a prerequisite to exporting cpu_hotplug_enable/cpu_hotplug_disable functions to modules we need to convert cpu_hotplug_disabled to a counter to properly support disable -> disable -> enable call sequences. E.g. after Hyper-V vmbus module (which is supposed to be the firs

[PATCH 06/13] drivers/hv: Migrate to new 'set-state' interface

2015-08-04 Thread K. Y. Srinivasan
From: Viresh Kumar Migrate hv driver to the new 'set-state' interface provided by clockevents core, the earlier 'set-mode' interface is marked obsolete now. This also enables us to implement callbacks for new states of clockevent devices, for example: ONESHOT_STOPPED. Cc: "K. Y. Srinivasan" Cc

[PATCH 03/13] Drivers: hv: vmbus: Improve the CPU affiliation for channels

2015-08-04 Thread K. Y. Srinivasan
The current code tracks the assigned CPUs within a NUMA node in the context of the primary channel. So, if we have a VM with a single NUMA node with 8 VCPUs, we may end up unevenly distributing the channel load. Fix the issue by tracking affiliations globally. Signed-off-by: K. Y. Srinivasan --

[PATCH 02/13] drivers:hv: Move MMIO range picking from hyper_fb to hv_vmbus

2015-08-04 Thread K. Y. Srinivasan
From: Jake Oshins This patch deletes the logic from hyperv_fb which picked a range of MMIO space for the frame buffer and adds new logic to hv_vmbus which picks ranges for child drivers. The new logic isn't quite the same as the old, as it considers more possible ranges. Signed-off-by: Jake Osh

[PATCH 13/13] Drivers: hv: vmbus: use cpu_hotplug_enable/disable

2015-08-04 Thread K. Y. Srinivasan
From: Vitaly Kuznetsov Commit e513229b4c38 ("Drivers: hv: vmbus: prevent cpu offlining on newer hypervisors") was altering smp_ops.cpu_disable to prevent CPU offlining. We can bo better by using cpu_hotplug_enable/disable functions instead of such hard-coding. Reported-by: Radim Kr.má Signed-o

[PATCH 12/13] cpu-hotplug: export cpu_hotplug_enable/cpu_hotplug_disable

2015-08-04 Thread K. Y. Srinivasan
From: Vitaly Kuznetsov Hyper-V module needs to disable cpu hotplug (offlining) as there is no support from hypervisor side to reassign already opened event channels to a different CPU. Currently it is been done by altering smp_ops.cpu_disable but it is hackish. Signed-off-by: Vitaly Kuznetsov R

[PATCH 08/13] Drivers: hv: vmbus: add a sysfs attr to show the binding of channel/VP

2015-08-04 Thread K. Y. Srinivasan
From: Dexuan Cui This is useful to analyze performance issue. Signed-off-by: Dexuan Cui Signed-off-by: K. Y. Srinivasan --- drivers/hv/vmbus_drv.c | 38 ++ 1 files changed, 38 insertions(+), 0 deletions(-) diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv

[PATCH 07/13] Drivers: hv: vmbus: Implement a clocksource based on the TSC page

2015-08-04 Thread K. Y. Srinivasan
The current Hyper-V clock source is based on the per-partition reference counter and this counter is being accessed via s synthetic MSR - HV_X64_MSR_TIME_REF_COUNT. Hyper-V has a more efficient way of computing the per-partition reference counter value that does not involve reading a synthetic MSR

[PATCH 01/13] drivers:hv: Modify hv_vmbus to search for all MMIO ranges available.

2015-08-04 Thread K. Y. Srinivasan
From: Jake Oshins This patch changes the logic in hv_vmbus to record all of the ranges in the VM's firmware (BIOS or UEFI) that offer regions of memory-mapped I/O space for use by paravirtual front-end drivers. The old logic just found one range above 4GB and called it good. This logic will fin

[PATCH 05/13] Drivers: hv_vmbus: Fix signal to host condition

2015-08-04 Thread K. Y. Srinivasan
From: Christopher Oo Fixes a bug where previously hv_ringbuffer_read would pass in the old number of bytes available to read instead of the expected old read index when calculating when to signal to the host that the ringbuffer is empty. Since the previous write size is already saved, also change

[PATCH 04/13] Drivers: hv: vmbus: Further improve CPU affiliation logic

2015-08-04 Thread K. Y. Srinivasan
From: Dexuan Cui Keep track of CPU affiliations of sub-channels within the scope of the primary channel. This will allow us to better distribute the load amongst available CPUs. Signed-off-by: Dexuan Cui Signed-off-by: K. Y. Srinivasan --- drivers/hv/channel_mgmt.c | 20 ++--

[PATCH 10/13] Drivers: hv: vmbus: document the VMBus sysfs files

2015-08-04 Thread K. Y. Srinivasan
From: Dexuan Cui The 4 sysfs files should be stable ABIs to the user space. Signed-off-by: Dexuan Cui Signed-off-by: K. Y. Srinivasan --- Documentation/ABI/stable/sysfs-bus-vmbus | 29 + MAINTAINERS |1 + 2 files changed, 30 inser

[PATCH 00/13] Drivers: hv: vmbus: Miscellaneous fixes

2015-08-04 Thread K. Y. Srinivasan
Miscellaneous fixes/improvements. The patches that were sent over the last couple of months have been consolidated in this submission. All review comments have been addressed. Christopher Oo (1): Drivers: hv_vmbus: Fix signal to host condition Dexuan Cui (4): Drivers: hv: vmbus: Further impro

[PATCH] staging: wilc1000: wilc_cfgoperations.c: Fixed coding styles issues.

2015-08-04 Thread Daniel Machon
Fixed coding styles issues with braces. Signed-off-by: Daniel Machon --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperation

RE: [PATCH 11/28] drivers:hv: Modify hv_vmbus to search for all MMIO ranges available.

2015-08-04 Thread KY Srinivasan
> -Original Message- > From: Greg KH [mailto:gre...@linuxfoundation.org] > Sent: Tuesday, August 4, 2015 10:29 PM > To: KY Srinivasan > Cc: linux-ker...@vger.kernel.org; de...@linuxdriverproject.org; > o...@aepfle.de; a...@canonical.com; vkuzn...@redhat.com; > jasow...@redhat.com; Jake O

Re: [PATCH 1/2] staging: media: lirc Remove the extra braces in if statement of lirc_imon

2015-08-04 Thread Sudip Mukherjee
On Wed, Aug 05, 2015 at 12:14:55AM -0500, Pradheep Shrinivasan wrote: > From: pradheep Dan had previously told you that it is wrong. Here From: line is only required if you are not able to configure the email From: header while using some corporate server. But your email From: header is ok. regar

Re: [PATCH 1/1] wilc1000: wilc_wfi_cfgoperations.c: fixed brace coding style issues

2015-08-04 Thread Sudip Mukherjee
On Wed, Aug 05, 2015 at 12:08:16AM +0200, Daniel Machon wrote: > Fixed brace coding styles issues > > Signed-off-by: Daniel Machon > --- > drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 11 +-- > 1 file changed, 5 insertions(+), 6 deletions(-) > > diff --git a/drivers/staging/wilc1

Re: [PATCH 11/28] drivers:hv: Modify hv_vmbus to search for all MMIO ranges available.

2015-08-04 Thread Greg KH
On Sat, Aug 01, 2015 at 04:08:15PM -0700, K. Y. Srinivasan wrote: > From: ja...@microsoft.com That's not his name :( I've stopped here, please fix up and resend the rest of the series. thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.

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

2015-08-04 Thread Navy Cheng
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. Signed-off-by: Navy Cheng --- drivers/staging/vme/devices/vme_user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --g

Re: [PATCHv5 2/5] Staging: most: mostcore/core.c. Fix "Using plain integer as NULL pointer" warnings

2015-08-04 Thread Sudip Mukherjee
On Tue, Aug 04, 2015 at 08:44:52PM +0200, Adrian Remonda wrote: > This patch fixes the warning generated by sparse: "Using plain integer > as NULL pointer" by replacing the offending 0 with NULL. > > Signed-off-by: Adrian Remonda > --- > drivers/staging/most/mostcore/core.c | 2 +- > 1 file chan

Re: [PATCHv5 1/5] Staging: most: mostcore/core.c. Fix "missing static keyword" warnings

2015-08-04 Thread Sudip Mukherjee
On Tue, Aug 04, 2015 at 08:44:51PM +0200, Adrian Remonda wrote: > This is a patch to the mostcore/core.c file. It makes > several local functions and structures static to prevent global > visibility. > > Signed-off-by: Adrian Remonda > --- > @@ -1255,7 +1255,7 @@ static void arm_mbo(struct mbo *

[PATCH 1/2] staging: media: lirc Remove the extra braces in if statement of lirc_imon

2015-08-04 Thread Pradheep Shrinivasan
From: pradheep This patche removes the extra braces found in drivers/staging/media/lirc/lirc_imon.c to fix the warning thrown by checkpatch.pl Signed-off-by: Pradheep Shrinivasan --- drivers/staging/media/lirc/lirc_imon.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --gi

[PATCH 1/2] Remove the extra braces in if statement of lirc_imon

2015-08-04 Thread Pradheep Shrinivasan
From: pradheep This patche removes the extra braces found in drivers/staging/media/lirc/lirc_imon.c to fix the warning thrown by checkpatch.pl Signed-off-by: Pradheep Shrinivasan --- drivers/staging/media/lirc/lirc_imon.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git

[PATCH 1/2] staging: media: lirc Remove the extra braces in if statement of lirc_imon

2015-08-04 Thread Pradheep Shrinivasan
From: pradheep This patche removes the extra braces found in drivers/staging/media/lirc/lirc_imon.c to fix the warning thrown by checkpatch.pl Signed-off-by: Pradheep Shrinivasan --- drivers/staging/media/lirc/lirc_imon.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --gi

[PATCH 2/2] staging: media: lirc This fix changes the spaces to tab in lirc_sasem.c

2015-08-04 Thread Pradheep Shrinivasan
This fix changes the space in the code to tab to fix the ERROR "ERROR: code indent should use tabs where possible" Signed-off-by: Pradheep Shrinivasan --- drivers/staging/media/lirc/lirc_sasem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/media/lirc/lirc_s

Re: [PATCH] staging: lustre: Fix coding style errors

2015-08-04 Thread Joe Perches
On Tue, 2015-08-04 at 16:10 +0800, Jandy Gou wrote: > Signed-off-by: Jandy Gou [] > diff --git a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h > b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h [] > @@ -721,7 +721,7 @@ kiblnd_nid2peerlist (lnet_nid_t nid) > unsigned int hash = >

[PATCH] Staging: android: timed_gpio.c: fix coding style errors

2015-08-04 Thread Jandy Gou
remove extra space replace tab to space after a variable Jandy Gou (1): Staging: android: timed_gpio.c: fix coding style errors drivers/staging/android/timed_gpio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 1.9.1 ___ devel mail

[PATCH] Staging: android: timed_gpio.c: fix coding style errors

2015-08-04 Thread Jandy Gou
remove extra space and replace tab to space after a variable Signed-off-by: Jandy Gou --- drivers/staging/android/timed_gpio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/android/timed_gpio.c b/drivers/staging/android/timed_gpio.c index 938a35c..ce117

[PATCH 1/1] wilc1000: wilc_wfi_cfgoperations.c: Fixed initialization of global boolean.

2015-08-04 Thread Daniel Machon
Globals are initialized to zero or NULL by GCC. No need to explicitly initialize them. Signed-off-by: Daniel Machon --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c

[PATCH 1/1] wilc1000: wilc_wfi_cfgoperations.c: fixed brace coding style issues

2015-08-04 Thread Daniel Machon
Fixed brace coding styles issues Signed-off-by: Daniel Machon --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations

Re: [HPDD-discuss] [PATCH v2 1/2] Staging: media: lirc: use USB API functions rather than constants

2015-08-04 Thread Drokin, Oleg
On Aug 4, 2015, at 5:48 PM, Shraddha Barke wrote: > The Coccinelle semantic patch that makes these changes is as follows: > > @@ struct usb_endpoint_descriptor *epd; @@ > > - (epd->bmAttributes & \(USB_ENDPOINT_XFERTYPE_MASK\|3\)) > + usb_endpoint_type(epd) > > Signed-off-by: Shraddha Barke >

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

2015-08-04 Thread Shraddha Barke
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_XFERTYPE_MASK\|3\)) + usb_endpoint_type(epd) Signed-off-by: Shraddha Barke ---

[PATCH v2 1/2] Staging: media: lirc: use USB API functions rather than constants

2015-08-04 Thread Shraddha Barke
The Coccinelle semantic patch that makes these changes is as follows: @@ struct usb_endpoint_descriptor *epd; @@ - (epd->bmAttributes & \(USB_ENDPOINT_XFERTYPE_MASK\|3\)) + usb_endpoint_type(epd) Signed-off-by: Shraddha Barke --- Changes in v2: -Fix subject line drivers/staging/media/lirc/l

Re: [PATCH 1/2] Staging: media: lirc: use USB API functions rather than

2015-08-04 Thread Greg Kroah-Hartman
On Wed, Aug 05, 2015 at 02:14:19AM +0530, Shraddha Barke wrote: > This patch introduces the use of the function usb_endpoint_type. Your subject doesn't make much sense, please fix up and resend both of these. thanks, greg k-h ___ devel mailing list de

[PATCH 2/2] Staging: ft1000: ft1000-usb: use USB API functions rather

2015-08-04 Thread Shraddha Barke
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_XFERTYPE_MASK\|3\)) + usb_endpoint_type(epd) Signed-off-by: Shraddha Barke ---

[PATCH 1/2] Staging: media: lirc: use USB API functions rather than

2015-08-04 Thread Shraddha Barke
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_XFERTYPE_MASK\|3\)) + usb_endpoint_type(epd) Signed-off-by: Shraddha Barke --

[PATCH] Staging: lustre: obdclass: Use kasprintf

2015-08-04 Thread Shraddha Barke
This patch uses kasprintf which combines kzalloc and sprintf. kasprintf also takes care of the size calculation. Semantic patch used is as follows: @@ expression a,flag; expression list args; statement S; @@ a = - \(kmalloc\|kzalloc\)(...,flag) + kasprintf (flag,args) <... when != a if (a =

[PATCH] Staging: wilc1000: Remove typedefs for struct

2015-08-04 Thread Shraddha Barke
The Linux kernel coding style guidelines suggest not using typedefs for structure and enum types. This patch gets rid of the typedefs for Ack_session_info_t. The following Coccinelle semantic patch detects the cases for struct type: @tn@ identifier i; type td; @@ -typedef struct i { ... } -td

[PATCH] staging: vt6655: Fixed C99 style comment to C89 style.

2015-08-04 Thread Lior Pugatch
Patch created to satisfy checkpatch.pl Signed-off-by: Lior Pugatch --- drivers/staging/vt6655/rxtx.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/vt6655/rxtx.h b/drivers/staging/vt6655/rxtx.h index b9bd163..54694df 100644 --- a/drivers/staging/vt6655/rxtx.h

[PATCH v3 2/2] staging: unisys: visornic: Convert to using napi

2015-08-04 Thread Benjamin Romer
From: Neil Horman Switch the visornic over to use napi. Currently there is a kernel thread that sits and waits on a wait queue to get notified of incoming virtual interrupts. It would be nice if we could handle frame reception using the standard napi processing instead. This patch creates our n

[PATCHv5 4/5] Staging: most: hdm-dim2/dim2_hal.c. Fix "Using plain integer as NULL pointer" warnings

2015-08-04 Thread Adrian Remonda
This patch fixes the warning generated by sparse: "Using plain integer as NULL pointer" by replacing the offending 0 with NULL. Signed-off-by: Adrian Remonda --- drivers/staging/most/hdm-dim2/dim2_hal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/most/hdm-

[PATCHv5 5/5] Staging: most: aim-cdev/cdev.c. Fix "missing static keyword" warnings

2015-08-04 Thread Adrian Remonda
This is a patch to the most/aim_cdev.c file. It makes several local functions and structures static to prevent global visibility. Signed-off-by: Adrian Remonda --- drivers/staging/most/aim-cdev/cdev.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/

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

2015-08-04 Thread Adrian Remonda
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 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/d

[PATCHv5 0/5] Staging: most: several warnings fix reported by sparse

2015-08-04 Thread Adrian Remonda
This patch series fix several warnings reported by the Sparse tool v2: Fixed patch format and comments as noted by Greg Kroah-Hartman and clear a few more warnings v3: Fixed patch format as noted by Greg Kroah-Hartman v4: Fixed patch format as noted by Greg Kr

[PATCHv5 1/5] Staging: most: mostcore/core.c. Fix "missing static keyword" warnings

2015-08-04 Thread Adrian Remonda
This is a patch to the mostcore/core.c file. It makes several local functions and structures static to prevent global visibility. Signed-off-by: Adrian Remonda --- drivers/staging/most/mostcore/core.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/stag

[PATCHv5 2/5] Staging: most: mostcore/core.c. Fix "Using plain integer as NULL pointer" warnings

2015-08-04 Thread Adrian Remonda
This patch fixes the warning generated by sparse: "Using plain integer as NULL pointer" by replacing the offending 0 with NULL. Signed-off-by: Adrian Remonda --- drivers/staging/most/mostcore/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/most/mostcore

Re: [PATCH v5 40/46] usb: gadget: epautoconf: rework ep_matches() function

2015-08-04 Thread Felipe Balbi
On Fri, Jul 31, 2015 at 04:00:52PM +0200, Robert Baldyga wrote: > Rework ep_matches() function to make it shorter and more readable. > > Signed-off-by: Robert Baldyga this regresses at least mass storage. How did you test it ? I'll keep all patches up to this one, please fix the problem, rebase

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

2015-08-04 Thread Greg KH
On Tue, Aug 04, 2015 at 07:19:01PM +0100, Salah Triki wrote: > This patch replaces pr_info/pr_warn/pr_err with > dev_info/dev_warn/dev_err. > > Signed-off-by: Salah Triki > --- > drivers/block/zram/zram_drv.c | 40 +++- > 1 file changed, 23 insertions(+), 17 d

[PATCH] zram: Replace pr_* with dev_*

2015-08-04 Thread Salah Triki
This patch replaces pr_info/pr_warn/pr_err with dev_info/dev_warn/dev_err. Signed-off-by: Salah Triki --- drivers/block/zram/zram_drv.c | 40 +++- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zra

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

2015-08-04 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 --- drivers/staging/comedi/drivers/me4000.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/st

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

2015-08-04 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 --- drivers/staging/comedi/drivers/me4000.c | 123 1 file changed, 61 insertions(+), 62 deletions

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

2015-08-04 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 42/46] staging: comedi: me4000: introduce me4000_ai_get_sample()

2015-08-04 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 --- drivers/staging/comedi/drivers/me4000.c | 23

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

2015-08-04 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 34/46] staging: comedi: me4000: remove unnecessary ai control register reset

2015-08-04 Thread H Hartley Sweeten
The me4000_ai_cancel() already reset this register. Signed-off-by: H Hartley Sweeten --- 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/me4000.c index 048340b..409483a 100644

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

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

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

2015-08-04 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. Signed-off-by: H Hartley Sweeten --- drivers/staging/comedi/drivers/me4000.c | 13 +++-- 1 file changed, 7 insertions(

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

2015-08-04 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 23/46] staging: comedi: me4000: tidy up ME4000_IRQ_STATUS_REG bit defines

2015-08-04 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 --- drivers/staging/comedi/drivers/me4000.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --g

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

2015-08-04 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 21/46] staging: comedi: me4000: tidy up ME4000_AI_STATUS_REG bit defines

2015-08-04 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 --- drivers/s

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

2015-08-04 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 --- drivers/staging/comedi/drivers/me4000.c | 31 +-- 1 file changed, 9 insertions(+), 22 deletions(-) diff --g

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

2015-08-04 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 Sweeeten --- drivers/staging/comedi/drivers/me4000.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/comedi/drivers/me40

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

2015-08-04 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 --- drivers/staging/comedi/drivers/me4000.c | 51 - 1 file changed, 25 insertions(+), 26 deletions

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

2015-08-04 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 39/46] staging: comedi: me4000: fix me4000_detach()

2015-08-04 Thread H Hartley Sweeten
There is no real reason to reset the board when detaching. But the PLX interrupts should be disabled. Currently the PLX interrupt is left enabled when the driver is detached. Signed-off-by: H Hartley Sweeten --- drivers/staging/comedi/drivers/me4000.c | 8 ++-- 1 file changed, 6 insertions(+

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

2015-08-04 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. Simplify me4000_ai_insn_read() a bit. The 'aref' is valid

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

2015-08-04 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 36/46] staging: comedi: me4000: clear the ME4000_AI_CTRL_REG in me4000_reset()

2015-08-04 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 --- drivers/staging/comedi/drivers/me4000.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/stag

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

2015-08-04 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 45/46] staging: comedi: me4000: update MODULE_DESCRIPTION

2015-08-04 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 11/46] staging: comedi: me4000: refactor 'ai_sh_nchan' boardinfo

2015-08-04 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 12/46] staging: comedi: me4000: rename local variables used for 'dev->private'

2015-08-04 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 --- drivers/staging/comedi/drivers/me4000.c | 44 -

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

2015-08-04 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. The comedi core ensures that that aref is only possible if the subdevice has the SDF_DIFF subdevice_flag set. If so, the maximum channel is half the subdevice 'n_chan'. Use that instead an

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

2015-08-04 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 04/46] staging: comedi: me4000: remove 'chan' check in me4000_ai_insn_read()

2015-08-04 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 --- drivers/staging/comedi/drivers/me4000.c | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/staging/comed

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

2015-08-04 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 --- drivers/staging/comedi/drivers/me4000.c | 23 -

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

2015-08-04 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 --- drivers/staging/comedi/drivers/me4000.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/staging/comedi/drivers/me4000.c b/drivers/stag

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

2015-08-04 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 20/46] staging: comedi: me4000: use comedi_range_is_bipolar() in ai (*insn_read)

2015-08-04 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 --- drivers/staging/comedi/drivers/me4000.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dr

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

2015-08-04 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 31/46] staging: comedi: me4000: absorb ai_write_timer()

2015-08-04 Thread H Hartley Sweeten
This function is only called by me4000_ai_do_cmd(). Absorb it. Signed-off-by: H Hartley Sweeten --- drivers/staging/comedi/drivers/me4000.c | 35 + 1 file changed, 14 insertions(+), 21 deletions(-) diff --git a/drivers/staging/comedi/drivers/me4000.c b/drivers/s

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

2015-08-04 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 --- drivers/staging/comedi/drivers/me4000.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/comedi/

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

2015-08-04 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 --- drivers/staging/comedi/drivers/me4000.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dr

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

2015-08-04 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. Signed-off-by: H Hartley Sweeten --- drivers/staging/comedi/drivers/me4000.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/come

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

2015-08-04 Thread H Hartley Sweeten
Use the BIT() macro to define the bits of this register. Signed-off-by: H Hartley Sweeten --- 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/staging/comedi/drivers/me4000.c index 1

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

2015-08-04 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 --- drivers/staging/comedi/drivers/me4000.c | 27 --- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/drivers/sta

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

2015-08-04 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 --- d

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

2015-08-04 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 --- drivers/staging/comedi/drivers

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

2015-08-04 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 --- drivers/staging/comedi/drivers/me4000.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-

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

2015-08-04 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 --- drivers/staging/comedi/drivers/me4000.c | 38 +++-- 1 file changed, 8 insertions(+), 30 deletions(-) diff --git a/drivers/stag

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

2015-08-04 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 --- drivers/staging/comedi/drivers

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

2015-08-04 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 --- drivers/staging/comedi/drivers/me4000.c | 25 - 1 file changed, 12 insertions(+), 13 deletions(-) dif

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

2015-08-04 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. H Hartley Sweeten (46): staging: comedi: me4000: remove 'dio_nchan' boardinfo staging: comedi: me4000: all board types have analog inputs staging: c

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

2015-08-04 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 --- drivers/staging/comedi/drivers/me4000.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/comedi/drivers/me4000.c b/dr

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

2015-08-04 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 --- drivers/staging/comedi/drivers/me4000.c | 39 +---

[PATCH v4 2/3] Staging: lustre: mgc: Replace comma with a semicolon

2015-08-04 Thread Shraddha Barke
Replace comma between expression statements by a semicolon. The semantic patch used is as follows: @@ expression e1,e2; @@ e1 - , + ; e2; Signed-off-by: Shraddha Barke --- Changes in v4: -Added Signed-off-by line drivers/staging/lustre/lustre/mgc/mgc_request.c | 2 +- 1 file changed, 1 inser

[PATCH v4 3/3] Staging: netlogic: Replace comma with a semicolon

2015-08-04 Thread Shraddha Barke
Replace comma between expression statements by a semicolon. The semantic patch used is as follows: @@ expression e1,e2; @@ e1 - , + ; e2; Signed-off-by: Shraddha Barke --- Changes in v4: -Added Signed-off-by line drivers/staging/netlogic/platform_net.c | 2 +- 1 file changed, 1 insertion(+),

  1   2   >