drivers/staging/line6/ chechpatch.pl cleanups
cover drivers/staging/line6/ chechpatch.pl cleanups
Some minor changes to get rid of some warnings and errors produced by the checkpatch.pl script
Johannes Thumshirn (8):
drivers/staging/line6/control.c: Change strict_strtoul to kstrtoul drivers/staging/line6/pod.c: Change strict_strtoul to kstrtoul drivers/staging/line6/variax.c: Change strict_strtoul to kstrtoul drivers/staging/line6/config.h: changed printk(KERN_INFO, ... to
pr_info(
drivers/staging/line6/driver.h: Changed printk(KERN_ERR, .. to pr_err
Changed printk(KERN_ERR, ...) call to pr_err() call in
MISSING_CASE macro
drivers/staging/line6/midibuf.c changed printk(KERN_DEBUG, ... to
pr_debug( drivers/staging/line6/midi.c: Added space between switch and open
parenthesis
drivers/staging/line6/pcm.c: Removed trailing whitespace
drivers/staging/line6/config.h | 2 +- drivers/staging/line6/control.c | 2 +- drivers/staging/line6/driver.h | 2 +- drivers/staging/line6/midi.c | 2 +- drivers/staging/line6/midibuf.c | 2 +- drivers/staging/line6/pcm.c | 2 +- drivers/staging/line6/pod.c | 6 +++--- drivers/staging/line6/variax.c | 8 ++++---- 8 files changed, 13 insertions(+), 13 deletions(-)
Signature · 1 line
1.7.7.6
PATCH 1/8 drivers/staging/line6/control.c: Change strict_strtoul to kstrtoul
Changed strict_strtoul() call to kstrtoul to make checkpatch.pl happy
--- drivers/staging/line6/control.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/staging/line6/control.c +1 -1
@@ -58,7 +58,7 @@ static ssize_t pod_set_param_int(struct device *dev, const char *buf,unsigned long value;int retval; - retval =strict_strtoul (buf,10 , &value); + retval =kstrtoul (buf,10 , &value);if (retval)return retval;
Signature · 1 line
1.7.7.6
PATCH 2/8 drivers/staging/line6/pod.c: Change strict_strtoul to kstrtoul
In reply to Johannes ThumshirnChanged strict_strtoul() call to kstrtoul to make checkpatch.pl happy
--- drivers/staging/line6/pod.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
drivers/staging/line6/pod.c +3 -3
@@ -438,7 +438,7 @@ static int pod_resolve(const char *buf, short block0, short block1,short block;int ret; - ret =strict_strtoul (buf,10 , &value); + ret =kstrtoul (buf,10 , &value);if (ret)return ret;
@@ -563,7 +563,7 @@ static ssize_t pod_set_channel(struct device *dev,unsigned long value;int ret; - ret =strict_strtoul (buf,10 , &value); + ret =kstrtoul (buf,10 , &value);if (ret)return ret;
@@ -895,7 +895,7 @@ static ssize_t pod_set_midi_postprocess(struct device *dev,unsigned long value;int ret; - ret =strict_strtoul (buf,10 , &value); + ret =kstrtoul (buf,10 , &value);if (ret)return ret;
Signature · 1 line
1.7.7.6
PATCH 3/8 drivers/staging/line6/variax.c: Change strict_strtoul to kstrtoul
In reply to Johannes ThumshirnChanged strict_strtoul() call to kstrtoul to make checkpatch.pl happy
--- drivers/staging/line6/variax.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
drivers/staging/line6/variax.c +4 -4
@@ -322,7 +322,7 @@ static ssize_t variax_set_volume(struct device *dev,unsigned long value;int ret; - ret =strict_strtoul (buf,10 , &value); + ret =kstrtoul (buf,10 , &value);if (ret)return ret;
@@ -356,7 +356,7 @@ static ssize_t variax_set_model(struct device *dev,unsigned long value;int ret; - ret =strict_strtoul (buf,10 , &value); + ret =kstrtoul (buf,10 , &value);if (ret)return ret;
@@ -390,7 +390,7 @@ static ssize_t variax_set_active(struct device *dev,unsigned long value;int ret; - ret =strict_strtoul (buf,10 , &value); + ret =kstrtoul (buf,10 , &value);if (ret)return ret;
@@ -421,7 +421,7 @@ static ssize_t variax_set_tone(struct device *dev,unsigned long value;int ret; - ret =strict_strtoul (buf,10 , &value); + ret =kstrtoul (buf,10 , &value);if (ret)return ret;
Signature · 1 line
1.7.7.6
PATCH 4/8 drivers/staging/line6/config.h: changed printk(KERN_INFO, ... to pr_info(
In reply to Johannes ThumshirnChanged printk(KERN_INFO, ...) call to pr_info call in CHECKPOINT macro
--- drivers/staging/line6/config.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/staging/line6/config.h +1 -1
@@ -34,7 +34,7 @@#define CREATE_RAW_FILE 0#if DO_DEBUG_MESSAGES -#define CHECKPOINT printk(KERN_INFO "line6usb: %s (%s:%d)\n", \ +#define CHECKPOINT pr_info("line6usb: %s (%s:%d)\n", \ __func__, __FILE__, __LINE__)#endif
Signature · 1 line
1.7.7.6
PATCH 5/8 drivers/staging/line6/driver.h: Changed printk(KERN_ERR, .. to pr_err Changed printk(KERN_ERR, ...) call to pr_err() call in MISSING_CASE macro
In reply to Johannes Thumshirn--- drivers/staging/line6/driver.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/staging/line6/driver.h +1 -1
@@ -60,7 +60,7 @@#endif #define MISSING_CASE \ - printk(KERN_ERR "line6usb driver bug: missing case in %s:%d\n", \ + pr_err("line6usb driver bug: missing case in %s:%d\n", \ __FILE__, __LINE__)#define CHECK_RETURN (x) \
Signature · 1 line
1.7.7.6
PATCH 6/8 drivers/staging/line6/midibuf.c changed printk(KERN_DEBUG, ... to pr_debug(
In reply to Johannes ThumshirnChanged printk(KERN_DEBUG, ...) call to pr_debug call in function void line6_midibuf_status(struct MidiBuffer *this)
--- drivers/staging/line6/midibuf.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/staging/line6/midibuf.c +1 -1
@@ -64,7 +64,7 @@ int line6_midibuf_init(struct MidiBuffer *this, int size, int split)void line6_midibuf_status (struct MidiBuffer *this) { -printk (KERN_DEBUG "midibuf size=%d split=%d pos_read=%d pos_write=%d " +pr_debug ("midibuf size=%d split=%d pos_read=%d pos_write=%d " "full=%d command_prev=%02x\n" , this->size, this->split, this->pos_read, this->pos_write, this->full, this->command_prev); }
Signature · 1 line
1.7.7.6
PATCH 7/8 drivers/staging/line6/midi.c: Added space between switch and open parenthesis
In reply to Johannes ThumshirnAdded space between switch and open parenthesis to make checkpatch.pl happy
--- drivers/staging/line6/midi.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/staging/line6/midi.c +1 -1
@@ -406,7 +406,7 @@ int line6_init_midi(struct usb_line6 *line6) line6midi->line6 = line6; -switch (line6->product) { +switch (line6->product) {case LINE6_DEVID_PODHD300 :case LINE6_DEVID_PODHD500 : line6midi->midi_mask_transmit =1 ;
Signature · 1 line
1.7.7.6
PATCH 8/8 drivers/staging/line6/pcm.c: Removed trailing whitespace
In reply to Johannes ThumshirnRemoved a line of only whitespace
--- drivers/staging/line6/pcm.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/staging/line6/pcm.c +1 -1
@@ -99,7 +99,7 @@ int line6_pcm_acquire(struct snd_line6_pcm *line6pcm, int channels)unsigned long flags_new = flags_old | channels;unsigned long flags_final = flags_old;int err =0 ; - + line6pcm->prev_fbuf =NULL ;if (test_flags (flags_old, flags_new,LINE6_BITS_CAPTURE_BUFFER )) {
Signature · 1 line
1.7.7.6
Re: [PATCH 1/8] drivers/staging/line6/control.c: Change strict_strtoul to kstrtoul
In reply to Johannes ThumshirnQuoted 2 lines · Johannes Thumshirn
Changed
strict_strtoul()call to kstrtoul to make checkpatch.pl happy
This would probably be better as kstrtou8(). You'd have to change the type of value, and the function parameters which take value as well. Also you would have to change the name of pod_set_param_int() because it says "int".
regards,
dan carpenter
Re: [PATCH 2/8] drivers/staging/line6/pod.c: Change strict_strtoul to kstrtoul
In reply to Johannes ThumshirnQuoted 2 lines · Johannes Thumshirn
Changed
strict_strtoul()call to kstrtoul to make checkpatch.pl happy
These as well should be reconsidered. Mostly they should be u8 I think. The problem is that there wasn't a strict_strtou8() so the update is no a one to one translation.
regards,
dan carpenter
Re: [PATCH 4/8] drivers/staging/line6/config.h: changed printk(KERN_INFO, ... to pr_info(
In reply to Johannes ThumshirnQuoted 2 lines · Johannes Thumshirn
Changed
printk(KERN_INFO, ...)call topr_infocall in CHECKPOINT macro
CHECKPOINT is never used. Just delete it.
regards,
dan carpenter
Re: [PATCH 5/8] drivers/staging/line6/driver.h: Changed printk(KERN_ERR, .. to pr_err Changed printk(KERN_ERR, ...) call to pr_err() call in MISSING_CASE macro
In reply to Johannes ThumshirnMISSING_CASE is a horrible macro. Just replace all the code which uses MISSING_CASE. Or better yet, delete all the uses. (I haven't looked through them).
regards,
dan carpenter
Re: [PATCH 3/8] drivers/staging/line6/variax.c: Change strict_strtoul to kstrtoul
In reply to Johannes ThumshirnQuoted 2 lines · Johannes Thumshirn
Changed
strict_strtoul()call to kstrtoul to make checkpatch.pl happy
Re-review this. Mostly use kstrtou8().
regards,
dan carpenter
Re: [PATCH 1/8] drivers/staging/line6/control.c: Change strict_strtoul to kstrtoul
In reply to Dan CarpenterQuoted 4 lines · Dan Carpenter
Quoted 2 lines · Johannes Thumshirn
Changed
strict_strtoul()call to kstrtoul to make checkpatch.pl happy
Quoted 9 lines
This would probably be better as
kstrtou8(). You'd have to change the type of value, and the function parameters which take value as well. Also you would have to change the name ofpod_set_param_int()because it says "int".regards,
dan carpenter
Ok I'll look over these patches again, but I've got another question regarding these, should I re-diff against the current linux-next or against these patches?
regards,
Johannes Thumshirn
Re: [PATCH 1/8] drivers/staging/line6/control.c: Change strict_strtoul to kstrtoul
Quoted 11 lines · Johannes Thumshirn
Quoted 10 lines · Dan Carpenter
Quoted 2 lines · Johannes Thumshirn
Changed
strict_strtoul()call to kstrtoul to make checkpatch.pl happyThis would probably be better as
kstrtou8(). You'd have to change the type of value, and the function parameters which take value as well. Also you would have to change the name ofpod_set_param_int()because it says "int".
Quoted 8 lines
Quoted 3 lines
regards,
dan carpenterOk I'll look over these patches again, but I've got another question regarding these, should I re-diff against the current linux-next or against these patches?
Current linux-next, please. Unless you recieved an email that Greg merged them, then they will be included in linux-next and both answers are equivalent.
regards,
dan carpenter