mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/9] Replaced the calls to strict_strtoul() in the line6 driver
@ 2012-06-27 19:25 Johannes Thumshirn
  2012-06-27 19:25 ` [PATCH 1/9] staging: line6: changed interface of line6_transmit_parameter() Johannes Thumshirn
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Johannes Thumshirn @ 2012-06-27 19:25 UTC (permalink / raw)
  To: gregkh, grabner, stefanha, dan.carpenter
  Cc: devel, linux-kernel, Johannes Thumshirn

Replaced the strict_strtoul() calls in the line6 driver and adopted the
interfaces of some functions functions affected by the changes.

Johannes Thumshirn (9):
  staging: line6: changed interface of line6_transmit_parameter()
  staging: line6: Changed some strict_strtouls to kstrtou8
  staging: line6: changed interface of line6_pod_transmit_parameter()
  staging: line6: adjusted interface of line6_send_program()
  staging: line6: changed interface of pod_send_channel()
  staging: line6: control.c eliminate strict_strtoul() in
    pod_set_param_int()
  staging: line6: Exchanged strict_strtoul with kstrtou8() in
    pod.c:pod_resolve()
  staging: line6: Changed strict_strtoul() to kstrtou8() in
    pod_set_channel()
  staging: line6: Changed strict_strtoul() to kstrtou8() in
    pod_set_midi_postprocess()

 drivers/staging/line6/control.c |    4 ++--
 drivers/staging/line6/driver.c  |    4 ++--
 drivers/staging/line6/driver.h  |    4 ++--
 drivers/staging/line6/pod.c     |   16 ++++++++--------
 drivers/staging/line6/pod.h     |    2 +-
 drivers/staging/line6/variax.c  |    8 ++++----
 6 files changed, 19 insertions(+), 19 deletions(-)

-- 
1.7.7.6


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 1/9] staging: line6: changed interface of line6_transmit_parameter()
  2012-06-27 19:25 [PATCH 0/9] Replaced the calls to strict_strtoul() in the line6 driver Johannes Thumshirn
@ 2012-06-27 19:25 ` Johannes Thumshirn
  2012-06-27 19:25 ` [PATCH 2/9] staging: line6: Changed some strict_strtouls to kstrtou8 Johannes Thumshirn
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Johannes Thumshirn @ 2012-06-27 19:25 UTC (permalink / raw)
  To: gregkh, grabner, stefanha, dan.carpenter
  Cc: devel, linux-kernel, Johannes Thumshirn

Interface of line6_transmit_parameter() adjusted to clarify internal workings

Signed-off-by: Johannes Thumshirn <morbidrsa@googlemail.com>
---
 drivers/staging/line6/driver.c |    2 +-
 drivers/staging/line6/driver.h |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/line6/driver.c b/drivers/staging/line6/driver.c
index 4513f78..d861230 100644
--- a/drivers/staging/line6/driver.c
+++ b/drivers/staging/line6/driver.c
@@ -526,7 +526,7 @@ int line6_send_program(struct usb_line6 *line6, int value)
 /*
 	Transmit Line6 control parameter.
 */
-int line6_transmit_parameter(struct usb_line6 *line6, int param, int value)
+int line6_transmit_parameter(struct usb_line6 *line6, int param, u8 value)
 {
 	int retval;
 	unsigned char *buffer;
diff --git a/drivers/staging/line6/driver.h b/drivers/staging/line6/driver.h
index 117bf99..140ccfe 100644
--- a/drivers/staging/line6/driver.h
+++ b/drivers/staging/line6/driver.h
@@ -224,7 +224,7 @@ extern void line6_start_timer(struct timer_list *timer, unsigned int msecs,
 			      void (*function) (unsigned long),
 			      unsigned long data);
 extern int line6_transmit_parameter(struct usb_line6 *line6, int param,
-				    int value);
+				    u8 value);
 extern int line6_version_request_async(struct usb_line6 *line6);
 extern int line6_write_data(struct usb_line6 *line6, int address, void *data,
 			    size_t datalen);
-- 
1.7.7.6


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 2/9] staging: line6: Changed some strict_strtouls to kstrtou8
  2012-06-27 19:25 [PATCH 0/9] Replaced the calls to strict_strtoul() in the line6 driver Johannes Thumshirn
  2012-06-27 19:25 ` [PATCH 1/9] staging: line6: changed interface of line6_transmit_parameter() Johannes Thumshirn
@ 2012-06-27 19:25 ` Johannes Thumshirn
  2012-06-27 19:25 ` [PATCH 3/9] staging: line6: changed interface of line6_pod_transmit_parameter() Johannes Thumshirn
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Johannes Thumshirn @ 2012-06-27 19:25 UTC (permalink / raw)
  To: gregkh, grabner, stefanha, dan.carpenter
  Cc: devel, linux-kernel, Johannes Thumshirn

Adjusted strict_strtoul calls to kstrtou8 in order to take the changes of
line6_transmit_parameter() into account.

Signed-off-by: Johannes Thumshirn <morbidrsa@googlemail.com>
---
 drivers/staging/line6/variax.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/line6/variax.c b/drivers/staging/line6/variax.c
index efa496d..f97416b 100644
--- a/drivers/staging/line6/variax.c
+++ b/drivers/staging/line6/variax.c
@@ -319,10 +319,10 @@ static ssize_t variax_set_volume(struct device *dev,
 {
 	struct usb_line6_variax *variax =
 	    usb_get_intfdata(to_usb_interface(dev));
-	unsigned long value;
+	u8 value;
 	int ret;
 
-	ret = strict_strtoul(buf, 10, &value);
+	ret = kstrtou8(buf, 10, &value);
 	if (ret)
 		return ret;
 
@@ -418,10 +418,10 @@ static ssize_t variax_set_tone(struct device *dev,
 {
 	struct usb_line6_variax *variax =
 	    usb_get_intfdata(to_usb_interface(dev));
-	unsigned long value;
+	u8 value;
 	int ret;
 
-	ret = strict_strtoul(buf, 10, &value);
+	ret = kstrtou8(buf, 10, &value);
 	if (ret)
 		return ret;
 
-- 
1.7.7.6


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 3/9] staging: line6: changed interface of line6_pod_transmit_parameter()
  2012-06-27 19:25 [PATCH 0/9] Replaced the calls to strict_strtoul() in the line6 driver Johannes Thumshirn
  2012-06-27 19:25 ` [PATCH 1/9] staging: line6: changed interface of line6_transmit_parameter() Johannes Thumshirn
  2012-06-27 19:25 ` [PATCH 2/9] staging: line6: Changed some strict_strtouls to kstrtou8 Johannes Thumshirn
@ 2012-06-27 19:25 ` Johannes Thumshirn
  2012-06-27 19:25 ` [PATCH 4/9] staging: line6: adjusted interface of line6_send_program() Johannes Thumshirn
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Johannes Thumshirn @ 2012-06-27 19:25 UTC (permalink / raw)
  To: gregkh, grabner, stefanha, dan.carpenter
  Cc: devel, linux-kernel, Johannes Thumshirn

Adjusted interface of line6_pod_transmit_parameter() to take changes of
line6_transmit_parameter() into account

Signed-off-by: Johannes Thumshirn <morbidrsa@googlemail.com>
---
 drivers/staging/line6/pod.c |    2 +-
 drivers/staging/line6/pod.h |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/line6/pod.c b/drivers/staging/line6/pod.c
index 4dadc57..8667aaf 100644
--- a/drivers/staging/line6/pod.c
+++ b/drivers/staging/line6/pod.c
@@ -419,7 +419,7 @@ static void pod_send_channel(struct usb_line6_pod *pod, int value)
 	Transmit PODxt Pro control parameter.
 */
 void line6_pod_transmit_parameter(struct usb_line6_pod *pod, int param,
-				  int value)
+				  u8 value)
 {
 	if (line6_transmit_parameter(&pod->line6, param, value) == 0)
 		pod_store_parameter(pod, param, value);
diff --git a/drivers/staging/line6/pod.h b/drivers/staging/line6/pod.h
index 18b9d08..47e0d1a 100644
--- a/drivers/staging/line6/pod.h
+++ b/drivers/staging/line6/pod.h
@@ -200,6 +200,6 @@ extern void line6_pod_midi_postprocess(struct usb_line6_pod *pod,
 				       unsigned char *data, int length);
 extern void line6_pod_process_message(struct usb_line6_pod *pod);
 extern void line6_pod_transmit_parameter(struct usb_line6_pod *pod, int param,
-					 int value);
+					 u8 value);
 
 #endif
-- 
1.7.7.6


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 4/9] staging: line6: adjusted interface of line6_send_program()
  2012-06-27 19:25 [PATCH 0/9] Replaced the calls to strict_strtoul() in the line6 driver Johannes Thumshirn
                   ` (2 preceding siblings ...)
  2012-06-27 19:25 ` [PATCH 3/9] staging: line6: changed interface of line6_pod_transmit_parameter() Johannes Thumshirn
@ 2012-06-27 19:25 ` Johannes Thumshirn
  2012-06-27 19:25 ` [PATCH 5/9] staging: line6: changed interface of pod_send_channel() Johannes Thumshirn
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Johannes Thumshirn @ 2012-06-27 19:25 UTC (permalink / raw)
  To: gregkh, grabner, stefanha, dan.carpenter
  Cc: devel, linux-kernel, Johannes Thumshirn

Adjusted interface of line6_send_program() to clarify internal working

Signed-off-by: Johannes Thumshirn <morbidrsa@googlemail.com>
---
 drivers/staging/line6/driver.c |    2 +-
 drivers/staging/line6/driver.h |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/line6/driver.c b/drivers/staging/line6/driver.c
index d861230..b8358ca 100644
--- a/drivers/staging/line6/driver.c
+++ b/drivers/staging/line6/driver.c
@@ -490,7 +490,7 @@ static void line6_data_received(struct urb *urb)
 /*
 	Send channel number (i.e., switch to a different sound).
 */
-int line6_send_program(struct usb_line6 *line6, int value)
+int line6_send_program(struct usb_line6 *line6, u8 value)
 {
 	int retval;
 	unsigned char *buffer;
diff --git a/drivers/staging/line6/driver.h b/drivers/staging/line6/driver.h
index 140ccfe..a3029eb 100644
--- a/drivers/staging/line6/driver.h
+++ b/drivers/staging/line6/driver.h
@@ -209,7 +209,7 @@ extern int line6_read_data(struct usb_line6 *line6, int address, void *data,
 			   size_t datalen);
 extern int line6_read_serial_number(struct usb_line6 *line6,
 				    int *serial_number);
-extern int line6_send_program(struct usb_line6 *line6, int value);
+extern int line6_send_program(struct usb_line6 *line6, u8 value);
 extern int line6_send_raw_message(struct usb_line6 *line6, const char *buffer,
 				  int size);
 extern int line6_send_raw_message_async(struct usb_line6 *line6,
-- 
1.7.7.6


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 5/9] staging: line6: changed interface of pod_send_channel()
  2012-06-27 19:25 [PATCH 0/9] Replaced the calls to strict_strtoul() in the line6 driver Johannes Thumshirn
                   ` (3 preceding siblings ...)
  2012-06-27 19:25 ` [PATCH 4/9] staging: line6: adjusted interface of line6_send_program() Johannes Thumshirn
@ 2012-06-27 19:25 ` Johannes Thumshirn
  2012-06-27 19:26 ` [PATCH 6/9] staging: line6: control.c eliminate strict_strtoul() in pod_set_param_int() Johannes Thumshirn
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Johannes Thumshirn @ 2012-06-27 19:25 UTC (permalink / raw)
  To: gregkh, grabner, stefanha, dan.carpenter
  Cc: devel, linux-kernel, Johannes Thumshirn

Adjusted interface of pod_send_channel() in order to take changes of
line6_send_program() into account.

Signed-off-by: Johannes Thumshirn <morbidrsa@googlemail.com>
---
 drivers/staging/line6/pod.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/staging/line6/pod.c b/drivers/staging/line6/pod.c
index 8667aaf..459f325 100644
--- a/drivers/staging/line6/pod.c
+++ b/drivers/staging/line6/pod.c
@@ -405,7 +405,7 @@ void line6_pod_midi_postprocess(struct usb_line6_pod *pod, unsigned char *data,
 /*
 	Send channel number (i.e., switch to a different sound).
 */
-static void pod_send_channel(struct usb_line6_pod *pod, int value)
+static void pod_send_channel(struct usb_line6_pod *pod, u8 value)
 {
 	line6_invalidate_current(&pod->dumpreq);
 
-- 
1.7.7.6


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 6/9] staging: line6: control.c eliminate strict_strtoul() in pod_set_param_int()
  2012-06-27 19:25 [PATCH 0/9] Replaced the calls to strict_strtoul() in the line6 driver Johannes Thumshirn
                   ` (4 preceding siblings ...)
  2012-06-27 19:25 ` [PATCH 5/9] staging: line6: changed interface of pod_send_channel() Johannes Thumshirn
@ 2012-06-27 19:26 ` Johannes Thumshirn
  2012-06-27 19:26 ` [PATCH 7/9] staging: line6: Exchanged strict_strtoul with kstrtou8() in pod.c:pod_resolve() Johannes Thumshirn
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Johannes Thumshirn @ 2012-06-27 19:26 UTC (permalink / raw)
  To: gregkh, grabner, stefanha, dan.carpenter
  Cc: devel, linux-kernel, Johannes Thumshirn

Exchange strict_strtoul() with kstrtou8() and make "value" a u8 instead of a
unsigned long. This is also needed for the changed
line6_pod_transmit_parameter().

Signed-off-by: Johannes Thumshirn <morbidrsa@googlemail.com>
---
 drivers/staging/line6/control.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/line6/control.c b/drivers/staging/line6/control.c
index 67e23b6..f8326f5 100644
--- a/drivers/staging/line6/control.c
+++ b/drivers/staging/line6/control.c
@@ -55,10 +55,10 @@ static ssize_t pod_set_param_int(struct device *dev, const char *buf,
 {
 	struct usb_interface *interface = to_usb_interface(dev);
 	struct usb_line6_pod *pod = usb_get_intfdata(interface);
-	unsigned long value;
+	u8 value;
 	int retval;
 
-	retval = strict_strtoul(buf, 10, &value);
+	retval = kstrtou8(buf, 10, &value);
 	if (retval)
 		return retval;
 
-- 
1.7.7.6


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 7/9] staging: line6: Exchanged strict_strtoul with kstrtou8() in pod.c:pod_resolve()
  2012-06-27 19:25 [PATCH 0/9] Replaced the calls to strict_strtoul() in the line6 driver Johannes Thumshirn
                   ` (5 preceding siblings ...)
  2012-06-27 19:26 ` [PATCH 6/9] staging: line6: control.c eliminate strict_strtoul() in pod_set_param_int() Johannes Thumshirn
@ 2012-06-27 19:26 ` Johannes Thumshirn
  2012-06-27 19:26 ` [PATCH 8/9] staging: line6: Changed strict_strtoul() to kstrtou8() in pod_set_channel() Johannes Thumshirn
  2012-06-27 19:26 ` [PATCH 9/9] staging: line6: Changed strict_strtoul() to kstrtou8() in pod_set_midi_postprocess() Johannes Thumshirn
  8 siblings, 0 replies; 10+ messages in thread
From: Johannes Thumshirn @ 2012-06-27 19:26 UTC (permalink / raw)
  To: gregkh, grabner, stefanha, dan.carpenter
  Cc: devel, linux-kernel, Johannes Thumshirn

Exchanged call to strict_strtoul() with kstrtou8() in pod_resolve().

Signed-off-by: Johannes Thumshirn <morbidrsa@googlemail.com>
---
 drivers/staging/line6/pod.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/line6/pod.c b/drivers/staging/line6/pod.c
index 459f325..4c81914 100644
--- a/drivers/staging/line6/pod.c
+++ b/drivers/staging/line6/pod.c
@@ -434,11 +434,11 @@ void line6_pod_transmit_parameter(struct usb_line6_pod *pod, int param,
 static int pod_resolve(const char *buf, short block0, short block1,
 		       unsigned char *location)
 {
-	unsigned long value;
+	u8 value;
 	short block;
 	int ret;
 
-	ret = strict_strtoul(buf, 10, &value);
+	ret = kstrtou8(buf, 10, &value);
 	if (ret)
 		return ret;
 
-- 
1.7.7.6


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 8/9] staging: line6: Changed strict_strtoul() to kstrtou8() in pod_set_channel()
  2012-06-27 19:25 [PATCH 0/9] Replaced the calls to strict_strtoul() in the line6 driver Johannes Thumshirn
                   ` (6 preceding siblings ...)
  2012-06-27 19:26 ` [PATCH 7/9] staging: line6: Exchanged strict_strtoul with kstrtou8() in pod.c:pod_resolve() Johannes Thumshirn
@ 2012-06-27 19:26 ` Johannes Thumshirn
  2012-06-27 19:26 ` [PATCH 9/9] staging: line6: Changed strict_strtoul() to kstrtou8() in pod_set_midi_postprocess() Johannes Thumshirn
  8 siblings, 0 replies; 10+ messages in thread
From: Johannes Thumshirn @ 2012-06-27 19:26 UTC (permalink / raw)
  To: gregkh, grabner, stefanha, dan.carpenter
  Cc: devel, linux-kernel, Johannes Thumshirn

Changed strict_strtoul() to kstrtou() in pod_set_channel() to take changes in
pod_send_channel() into account.

Signed-off-by: Johannes Thumshirn <morbidrsa@googlemail.com>
---
 drivers/staging/line6/pod.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/line6/pod.c b/drivers/staging/line6/pod.c
index 4c81914..2a85ec3 100644
--- a/drivers/staging/line6/pod.c
+++ b/drivers/staging/line6/pod.c
@@ -560,10 +560,10 @@ static ssize_t pod_set_channel(struct device *dev,
 {
 	struct usb_interface *interface = to_usb_interface(dev);
 	struct usb_line6_pod *pod = usb_get_intfdata(interface);
-	unsigned long value;
+	u8 value;
 	int ret;
 
-	ret = strict_strtoul(buf, 10, &value);
+	ret = kstrtou8(buf, 10, &value);
 	if (ret)
 		return ret;
 
-- 
1.7.7.6


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 9/9] staging: line6: Changed strict_strtoul() to kstrtou8() in pod_set_midi_postprocess()
  2012-06-27 19:25 [PATCH 0/9] Replaced the calls to strict_strtoul() in the line6 driver Johannes Thumshirn
                   ` (7 preceding siblings ...)
  2012-06-27 19:26 ` [PATCH 8/9] staging: line6: Changed strict_strtoul() to kstrtou8() in pod_set_channel() Johannes Thumshirn
@ 2012-06-27 19:26 ` Johannes Thumshirn
  8 siblings, 0 replies; 10+ messages in thread
From: Johannes Thumshirn @ 2012-06-27 19:26 UTC (permalink / raw)
  To: gregkh, grabner, stefanha, dan.carpenter
  Cc: devel, linux-kernel, Johannes Thumshirn

Changed a call to strict_strtoul() into kstrtou8() in
pod_set_midi_postprocess().

Signed-off-by: Johannes Thumshirn <morbidrsa@googlemail.com>
---
 drivers/staging/line6/pod.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/line6/pod.c b/drivers/staging/line6/pod.c
index 2a85ec3..9edd053 100644
--- a/drivers/staging/line6/pod.c
+++ b/drivers/staging/line6/pod.c
@@ -892,10 +892,10 @@ static ssize_t pod_set_midi_postprocess(struct device *dev,
 {
 	struct usb_interface *interface = to_usb_interface(dev);
 	struct usb_line6_pod *pod = usb_get_intfdata(interface);
-	unsigned long value;
+	u8 value;
 	int ret;
 
-	ret = strict_strtoul(buf, 10, &value);
+	ret = kstrtou8(buf, 10, &value);
 	if (ret)
 		return ret;
 
-- 
1.7.7.6


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2012-06-27 19:29 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-27 19:25 [PATCH 0/9] Replaced the calls to strict_strtoul() in the line6 driver Johannes Thumshirn
2012-06-27 19:25 ` [PATCH 1/9] staging: line6: changed interface of line6_transmit_parameter() Johannes Thumshirn
2012-06-27 19:25 ` [PATCH 2/9] staging: line6: Changed some strict_strtouls to kstrtou8 Johannes Thumshirn
2012-06-27 19:25 ` [PATCH 3/9] staging: line6: changed interface of line6_pod_transmit_parameter() Johannes Thumshirn
2012-06-27 19:25 ` [PATCH 4/9] staging: line6: adjusted interface of line6_send_program() Johannes Thumshirn
2012-06-27 19:25 ` [PATCH 5/9] staging: line6: changed interface of pod_send_channel() Johannes Thumshirn
2012-06-27 19:26 ` [PATCH 6/9] staging: line6: control.c eliminate strict_strtoul() in pod_set_param_int() Johannes Thumshirn
2012-06-27 19:26 ` [PATCH 7/9] staging: line6: Exchanged strict_strtoul with kstrtou8() in pod.c:pod_resolve() Johannes Thumshirn
2012-06-27 19:26 ` [PATCH 8/9] staging: line6: Changed strict_strtoul() to kstrtou8() in pod_set_channel() Johannes Thumshirn
2012-06-27 19:26 ` [PATCH 9/9] staging: line6: Changed strict_strtoul() to kstrtou8() in pod_set_midi_postprocess() Johannes Thumshirn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®