[PATCH v2] staging: emxx_udc: Remove nbu2ss_drv_set_dp_info()

2015-01-30 Thread Chris Rorvick
much easier to understand and the resulting function is still viewable within a single screen. Signed-off-by: Chris Rorvick --- As made obvious by the previous version of this patch: compile tested only. Regards, Chris drivers/staging/emxx_udc/emxx_udc.c | 52

Re: [PATCH] staging: emxx_udc: Remove nbu2ss_drv_set_dp_info()

2015-01-30 Thread Chris Rorvick
On Fri, Jan 30, 2015 at 5:30 PM, Chris Rorvick wrote: > + > + ep->ep.maxpacket = (i == 0 ? EP0_PACKETSIZE : EP0_PACKETSIZE); > + Damn. I looked this over twice before sending this and still only noticed this stupid typo after sending it. Will send a v2 shortly. S

[PATCH] staging: emxx_udc: Remove nbu2ss_drv_set_dp_info()

2015-01-30 Thread Chris Rorvick
much easier to understand and the resulting function is still viewable within a single screen. Signed-off-by: Chris Rorvick --- drivers/staging/emxx_udc/emxx_udc.c | 52 ++--- 1 file changed, 14 insertions(+), 38 deletions(-) diff --git a/drivers/staging/emxx_udc

Re: [PATCH] staging: emxx_udc: emxx_udc: Removed variables that is never used

2015-01-30 Thread Chris Rorvick
On Fri, Jan 30, 2015 at 11:35 AM, Rickard Strandqvist wrote: > 2015-01-30 15:20 GMT+01:00 Dan Carpenter : >> Yes. Please send that as a patch which can be applied. >> >> regards, >> dan carpenter >> > > > Hi > > Okay, I'll do it this weekend. > Or do you do it Chris? I'll send out a patch removi

Re: [PATCH] staging: emxx_udc: emxx_udc: Removed variables that is never used

2015-01-29 Thread Chris Rorvick
On Thu, Jan 29, 2015 at 5:46 PM, Chris Rorvick wrote: > That whole chunk of code looks odd. Why the base 16 conversion when > we already know it's a decimal digit? Seems like this would work > without the hassle of the string conversion: Hmm, or probably even better to do this

Re: [PATCH] staging: emxx_udc: emxx_udc: Removed variables that is never used

2015-01-29 Thread Chris Rorvick
On Thu, Jan 29, 2015 at 3:52 PM, Rickard Strandqvist wrote: > The last one was more interesting, se below. > But I can not really see how any error should be handled here? > Proposal to change to: > > if (kstrtol(tempbuf, 16, &num) == 0 && num == 0) That whole chunk of code looks odd. Why the

Re: [PATCH] staging: emxx_udc: emxx_udc: Removed variables that is never used

2015-01-28 Thread Chris Rorvick
On Wed, Jan 28, 2015 at 4:42 PM, Rickard Strandqvist wrote: > Variable ar assigned a value that is never used. > I have also removed all the code that thereby serves no purpose. Each of these changes adds a warning ... > diff --git a/drivers/staging/emxx_udc/emxx_udc.c > b/drivers/staging/emxx_

[PATCH v4 1/2] staging: lustre: Use mult if units not specified

2015-01-11 Thread Chris Rorvick
hat it only applies when units are specified. Signed-off-by: Chris Rorvick Reviewed-by: Andreas Dilger --- drivers/staging/lustre/lustre/obdclass/lprocfs_status.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c b

[PATCH v4 0/2] lprocfs_write_frac_u64_helper cleanup

2015-01-11 Thread Chris Rorvick
mult'. Compile tested only. Chris Rorvick (2): staging: lustre: Use mult if units not specified staging: lustre: Track sign separately drivers/staging/lustre/lustre/obdclass/lprocfs_status.c | 9 + 1 file changed, 5 insertions(+), 4 del

[PATCH v4 2/2] staging: lustre: Track sign separately

2015-01-11 Thread Chris Rorvick
suffix is specified, but having the effect of taking the absolute value of the user-provided data. Signed-off-by: Chris Rorvick Reviewed-by: Andreas Dilger --- drivers/staging/lustre/lustre/obdclass/lprocfs_status.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/st

Re: [PATCH 00/25] line6usb cleanup

2015-01-11 Thread Chris Rorvick
> At Fri, 9 Jan 2015 23:35:46 -0600, > Chris Rorvick wrote: >> >> I have a TonePort UX2 that I've used for testing, meaning that some of >> this is really only compile-tested. > > If anyone is responsible for testing with real hardware, I'll happily >

[PATCH 18/25] staging: line6: Move control endpoints to properties

2015-01-09 Thread Chris Rorvick
The device type can now be used to determine the addresses of the control endpoints for the interface. Drop the conditional logic and make these values properties. Signed-off-by: Chris Rorvick --- drivers/staging/line6/driver.c | 73 +- drivers/staging

[PATCH 25/25] staging: line6: Make *_disconnect() functions static

2015-01-09 Thread Chris Rorvick
Remove declarations from the header and move the definitions up in the source so they need not be forward declared. Signed-off-by: Chris Rorvick --- drivers/staging/line6/pod.c | 58 ++-- drivers/staging/line6/pod.h | 1 - drivers/staging/line6/podhd.c

[PATCH 23/25] staging: line6: Call *_process_message() via pointer

2015-01-09 Thread Chris Rorvick
Which *_process_message() function (if any) to call when data is received is known at initialization. Add a function pointer to the `usb_line6' struct and use to call into the appropriate logic instead of evaluating the conditional logic for each message. Signed-off-by: Chris Ro

[PATCH 20/25] staging: line6: Move audio endpoints to properties

2015-01-09 Thread Chris Rorvick
The device type can now be used to determine the addresses of the audio endpoints for the interface. Drop the conditional logic and make these values properties. Signed-off-by: Chris Rorvick --- drivers/staging/line6/capture.c | 9 drivers/staging/line6/driver.c | 38

[PATCH 24/25] staging: line6: Call *_disconnect() via pointer

2015-01-09 Thread Chris Rorvick
Which *_disconnect() to call on disconnect is known at initialization. Add a function pointer to the `usb_line6' struct and use to call into the appropriate logic instead of evaluating the conditional logic. Signed-off-by: Chris Rorvick --- drivers/staging/line6/driver.c

[PATCH 21/25] staging: line6: Pass *_init() `usb_line6' pointers

2015-01-09 Thread Chris Rorvick
Casting the `struct usb_line6' pointer at the call point makes the code difficult to read. This is substantially cleaned up by moving the cast into the callees. Signed-off-by: Chris Rorvick --- drivers/staging/line6/driver.c | 21 ++--- drivers/staging/line6/pod.c

[PATCH 19/25] staging: line6: Remove stale Pocket POD PCM endpoints

2015-01-09 Thread Chris Rorvick
Commit 1027f476f507 (staging: line6: sync with upstream) removed PCM from the Pocket POD capabilities but left the endpoint configuration. Signed-off-by: Chris Rorvick --- drivers/staging/line6/pcm.c | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/staging/line6/pcm.c b/drivers

[PATCH 16/25] staging: line6: Filter on UX2 interfaces

2015-01-09 Thread Chris Rorvick
The driver only supports interface 0 of the TonePort UX2 and POD Studio UX2 devices. Use the device table to filter on this. Signed-off-by: Chris Rorvick --- drivers/staging/line6/driver.c | 20 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/drivers/staging

[PATCH 17/25] staging: line6: Move altsetting to properties

2015-01-09 Thread Chris Rorvick
The device type can now be used to determine the altsetting for the interface. Drop the conditional logic and make this value a property. Signed-off-by: Chris Rorvick --- drivers/staging/line6/driver.c | 74 +- drivers/staging/line6/driver.h | 2 ++ 2

[PATCH 14/25] staging: line6: Split out POD HD500 interfaces

2015-01-09 Thread Chris Rorvick
The driver uses a different altsetting depending on the interface. Add device type entries for each of these. Signed-off-by: Chris Rorvick --- drivers/staging/line6/driver.c | 41 - drivers/staging/line6/driver.h | 3 ++- drivers/staging/line6/pcm.c

[PATCH 11/25] staging: line6: Use explicit indexes when defining properties

2015-01-09 Thread Chris Rorvick
Specify the index of the properties entry explicitly to define this structure more robustly. Also, drop the `L6PROP' macro in favor of initializing each member explicitly on its own line since horizontal space is limited and more attributes will be added later. Signed-off-by: Chris Ro

[PATCH 15/25] staging: line6: Filter on Pocket POD interface

2015-01-09 Thread Chris Rorvick
The driver only supports interface 1 of the Pocket POD. Use the device table to filter on this. Signed-off-by: Chris Rorvick --- drivers/staging/line6/driver.c | 12 ++-- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/drivers/staging/line6/driver.c b/drivers/staging

[PATCH 05/25] staging: line6: Define a device type enum

2015-01-09 Thread Chris Rorvick
Define an enum containing the supported devices and associate each entry in the device table to the respective value. Signed-off-by: Chris Rorvick --- drivers/staging/line6/driver.c | 54 -- drivers/staging/line6/driver.h | 21 2 files

[PATCH 13/25] staging: line6: Split out PODxt Live interfaces

2015-01-09 Thread Chris Rorvick
The PODxt Live device has both a POD and a Variax interface. Add device type entries for each of these. Signed-off-by: Chris Rorvick --- drivers/staging/line6/driver.c | 112 - drivers/staging/line6/driver.h | 8 +-- drivers/staging/line6/pcm.c

[PATCH 22/25] staging: line6: Pass *_process_message() `usb_line6' pointers

2015-01-09 Thread Chris Rorvick
Casting the `struct usb_line6' pointer at the call point makes the code difficult to read. This is substantially cleaned up by moving the cast into the callees. Signed-off-by: Chris Rorvick --- drivers/staging/line6/driver.c | 13 - drivers/staging/line6/pod.c| 3 ++- dr

[PATCH 10/25] staging: line6: Rename capability macros

2015-01-09 Thread Chris Rorvick
Including "BIT" in the macro name is pointless. Replace with "CAP" to provide some context for what its value represents. Signed-off-by: Chris Rorvick --- drivers/staging/line6/driver.c | 8 drivers/staging/line6/midi.c | 2 +- drivers/staging/line6/pcm.c

[PATCH 06/25] staging: line6: Index properties array with device type

2015-01-09 Thread Chris Rorvick
c and use the device type (via the .driver_info member) instead. Signed-off-by: Chris Rorvick --- drivers/staging/line6/driver.c | 17 ++--- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/drivers/staging/line6/driver.c b/drivers/staging/line6/driver.c index 2797e41..c0

[PATCH 08/25] staging: line6: Remove idVendor and idProduct macros

2015-01-09 Thread Chris Rorvick
These are now only used to build the device table. Each entry in this table is already clearly documented as to what device it maps to so the macros become unnecessary indirection. Signed-off-by: Chris Rorvick --- drivers/staging/line6/driver.c | 56

[PATCH 07/25] staging: line6: Key off of device type

2015-01-09 Thread Chris Rorvick
hat map to specific interfaces on the device so that this conditional logic can be flattened out. Signed-off-by: Chris Rorvick --- drivers/staging/line6/driver.c | 203 --- drivers/staging/line6/driver.h | 4 +- drivers/staging/line6/pcm.c | 38 ---

[PATCH 04/25] staging: line6: Cleanup device table

2015-01-09 Thread Chris Rorvick
Wrap USB_DEVICE to avoid repeating the Line 6 vendor ID. Signed-off-by: Chris Rorvick --- drivers/staging/line6/driver.c | 40 +--- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/drivers/staging/line6/driver.c b/drivers/staging/line6/driver.c

[PATCH 12/25] staging: line6: List out capabilities individually

2015-01-09 Thread Chris Rorvick
igned-off-by: Chris Rorvick --- drivers/staging/line6/driver.c | 54 +++-- drivers/staging/line6/usbdefs.h | 4 --- 2 files changed, 36 insertions(+), 22 deletions(-) diff --git a/drivers/staging/line6/driver.c b/drivers/staging/line6/driver.c index c988b78..6f

[PATCH 09/25] staging: line6: Remove useless comments

2015-01-09 Thread Chris Rorvick
Signed-off-by: Chris Rorvick --- drivers/staging/line6/driver.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/line6/driver.c b/drivers/staging/line6/driver.c index 6dc8a0d..acde205 100644 --- a/drivers/staging/line6/driver.c +++ b/drivers/staging/line6/driver.c @@ -61,7

[PATCH 00/25] line6usb cleanup

2015-01-09 Thread Chris Rorvick
idate configuration settings into the properties entries and use function pointers setup at initialization to remove much of the conditional logic. I have a TonePort UX2 that I've used for testing, meaning that some of this is really only compile-tested. Regards, Chris Chris Rorvick (25): stag

[PATCH 03/25] staging: line6: Remove unsupported X3 devices

2015-01-09 Thread Chris Rorvick
Support for these devices appears to have never been completed. Remove them from the device table along with a minimal amount of supporting code. Signed-off-by: Chris Rorvick --- drivers/staging/line6/driver.c | 26 -- drivers/staging/line6/pcm.c | 2 -- drivers

[PATCH 02/25] staging: line6: Remove line6_pod_transmit_paramter()

2015-01-09 Thread Chris Rorvick
This function was no longer used as of commit 2807904441d4 (staging: line6: drop MIDI parameter sysfs attrs). Signed-off-by: Chris Rorvick --- drivers/staging/line6/pod.c | 9 - drivers/staging/line6/pod.h | 2 -- 2 files changed, 11 deletions(-) diff --git a/drivers/staging/line6

[PATCH 01/25] staging: line6: Remove `device_bit' from properties

2015-01-09 Thread Chris Rorvick
The `device_bit' member was no longer used as of commit 2807904441d4 (staging: line6: drop MIDI parameter sysfs attrs). Signed-off-by: Chris Rorvick --- drivers/staging/line6/driver.c | 44 +++--- drivers/staging/line6/driver.h | 5 drivers/staging/line6/

[PATCH v3 2/2] drivers: staging: lustre: Track sign separately

2014-12-21 Thread Chris Rorvick
suffix is specified, but having the effect of taking the absolute value of the user-provided data. Signed-off-by: Chris Rorvick Reviewed-by: Andreas Dilger --- drivers/staging/lustre/lustre/obdclass/lprocfs_status.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/st

[PATCH v3 1/2] drivers: staging: lustre: Use mult if units not specified

2014-12-21 Thread Chris Rorvick
hat it only applies when units are specified. Signed-off-by: Chris Rorvick Reviewed-by: Andreas Dilger --- drivers/staging/lustre/lustre/obdclass/lprocfs_status.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c b

[PATCH v3 0/2] lprocfs_write_frac_u64_helper cleanup

2014-12-21 Thread Chris Rorvick
Added Andreas as reviewer (thanks!) v2: Added a second patch to address Dan Carpenter's concern with the complexity of passing the sign through `mult'. Compile tested only. Chris Rorvick (2): drivers: staging: lustre: Use mult if units not specified drivers: staging: lustre:

[PATCH v2 2/2] drivers: staging: lustre: Track sign separately

2014-12-16 Thread Chris Rorvick
suffix is specified, but having the effect of taking the absolute value of the user-provided data. Signed-off-by: Chris Rorvick --- drivers/staging/lustre/lustre/obdclass/lprocfs_status.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/staging/lustre/lustre/obdcla

[PATCH v2 1/2] drivers: staging: lustre: Use mult if units not specified

2014-12-16 Thread Chris Rorvick
hat it only applies when units are specified. Signed-off-by: Chris Rorvick --- drivers/staging/lustre/lustre/obdclass/lprocfs_status.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c b/drivers/staging/lustre/lustre/o

[PATCH v2 0/2] lprocfs_write_frac_u64_helper cleanup

2014-12-16 Thread Chris Rorvick
Added a second patch to address Dan Carpenter's concern with the complexity of passing the sign through `mult'. Compile tested only. Chris Rorvick (2): drivers: staging: lustre: Use mult if units not specified drivers: staging: lustre: Track sign separately drivers/staging/lus

Re: [PATCH] drivers: staging: lustre: Use mult if units not specified

2014-12-16 Thread Chris Rorvick
On Tue, Dec 16, 2014 at 5:35 AM, Dan Carpenter wrote: > On Tue, Dec 16, 2014 at 11:14:35AM +, Dilger, Andreas wrote: > > > > Sorry, that isn't right. Chris' patch is actually doing the right thing > > to check for units > 1. > > It's not right because it discards the negative. I don't think

[PATCH] drivers: staging: lustre: Use mult if units not specified

2014-12-15 Thread Chris Rorvick
hat it only applies when units are specified. Signed-off-by: Chris Rorvick --- drivers/staging/lustre/lustre/obdclass/lprocfs_status.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c b/drivers/staging/lustre/lustre/o

Re: [PATCH] staging: lustre: lustre: obdclass: lprocfs_status.c: Fix for possible null pointer dereference

2014-12-15 Thread Chris Rorvick
On Sun, Dec 14, 2014 at 4:52 PM, Rickard Strandqvist wrote: > units = 1; ... > /* Specified units override the multiplier */ > if (units) That doesn't make much sense. The conditional logic will always be executed. Maybe this is what's intended? /* Specified uni