staging: speakup: speakup_soft.c checkpatch modifications
v2 cover staging: speakup: speakup_soft.c checkpatch modifications
Make Linux kernel style modifications for speak_soft.c to include:
Space around operator
Logical continuation
Multiple blank lines
Blank line after {
comment modifications
Align parenthesis
Walt Feasel (6):
staging: speakup: speakup_soft.c Space around operator
staging: speakup: speakup_soft.c Logical continuation
staging: speakup: speakup_soft.c Multiple blank lines
staging: speakup: speakup_soft.c Blank line after {
staging: speakup: speakup_soft.c comment modifications
staging: speakup: speakup_soft.c Align parenthesis
drivers/staging/speakup/speakup_soft.c | 46 ++++++++++++++++------------------ 1 file changed, 21 insertions(+), 25 deletions(-)
Signature · 3 lines
v2 makes changes to correct for email format patch submission 2.1.4
PATCH v2 1/6 staging: speakup: speakup_soft.c Space around operator
Make suggested checkpatch modification for
CHECK: spaces preferred around that '|'
---
v2 makes changes to correct for email format patch submission
drivers/staging/speakup/speakup_soft.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-)
drivers/staging/speakup/speakup_soft.c +14 -14
@@ -59,23 +59,23 @@ static struct var_t vars[] = {* These attributes will appear in /sys/accessibility/speakup/soft. */ static struct kobj_attribute caps_start_attribute = -__ATTR (caps_start,S_IWUSR |S_IRUGO , spk_var_show, spk_var_store); +__ATTR (caps_start,S_IWUSR |S_IRUGO , spk_var_show, spk_var_store);static struct kobj_attribute caps_stop_attribute = -__ATTR (caps_stop,S_IWUSR |S_IRUGO , spk_var_show, spk_var_store); +__ATTR (caps_stop,S_IWUSR |S_IRUGO , spk_var_show, spk_var_store);static struct kobj_attribute freq_attribute = -__ATTR (freq,S_IWUSR |S_IRUGO , spk_var_show, spk_var_store); +__ATTR (freq,S_IWUSR |S_IRUGO , spk_var_show, spk_var_store);static struct kobj_attribute pitch_attribute = -__ATTR (pitch,S_IWUSR |S_IRUGO , spk_var_show, spk_var_store); +__ATTR (pitch,S_IWUSR |S_IRUGO , spk_var_show, spk_var_store);static struct kobj_attribute punct_attribute = -__ATTR (punct,S_IWUSR |S_IRUGO , spk_var_show, spk_var_store); +__ATTR (punct,S_IWUSR |S_IRUGO , spk_var_show, spk_var_store);static struct kobj_attribute rate_attribute = -__ATTR (rate,S_IWUSR |S_IRUGO , spk_var_show, spk_var_store); +__ATTR (rate,S_IWUSR |S_IRUGO , spk_var_show, spk_var_store);static struct kobj_attribute tone_attribute = -__ATTR (tone,S_IWUSR |S_IRUGO , spk_var_show, spk_var_store); +__ATTR (tone,S_IWUSR |S_IRUGO , spk_var_show, spk_var_store);static struct kobj_attribute voice_attribute = -__ATTR (voice,S_IWUSR |S_IRUGO , spk_var_show, spk_var_store); +__ATTR (voice,S_IWUSR |S_IRUGO , spk_var_show, spk_var_store);static struct kobj_attribute vol_attribute = -__ATTR (vol,S_IWUSR |S_IRUGO , spk_var_show, spk_var_store); +__ATTR (vol,S_IWUSR |S_IRUGO , spk_var_show, spk_var_store);/* * We should uncomment the following definition, when we agree on a
@@ -85,15 +85,15 @@ static struct kobj_attribute vol_attribute =*/ static struct kobj_attribute delay_time_attribute = -__ATTR (delay_time,S_IWUSR |S_IRUGO , spk_var_show, spk_var_store); +__ATTR (delay_time,S_IWUSR |S_IRUGO , spk_var_show, spk_var_store);static struct kobj_attribute direct_attribute = -__ATTR (direct,S_IWUSR |S_IRUGO , spk_var_show, spk_var_store); +__ATTR (direct,S_IWUSR |S_IRUGO , spk_var_show, spk_var_store);static struct kobj_attribute full_time_attribute = -__ATTR (full_time,S_IWUSR |S_IRUGO , spk_var_show, spk_var_store); +__ATTR (full_time,S_IWUSR |S_IRUGO , spk_var_show, spk_var_store);static struct kobj_attribute jiffy_delta_attribute = -__ATTR (jiffy_delta,S_IWUSR |S_IRUGO , spk_var_show, spk_var_store); +__ATTR (jiffy_delta,S_IWUSR |S_IRUGO , spk_var_show, spk_var_store);static struct kobj_attribute trigger_time_attribute = -__ATTR (trigger_time,S_IWUSR |S_IRUGO , spk_var_show, spk_var_store); +__ATTR (trigger_time,S_IWUSR |S_IRUGO , spk_var_show, spk_var_store);/* * Create a group of attributes so that we can create and destroy them all
Signature · 1 line
2.1.4
PATCH v2 2/6 staging: speakup: speakup_soft.c Logical continuation
In reply to Walt FeaselMake suggested checkpatch modification for
CHECK: Logical continuations should be on the
previous line
---
v2 makes changes to correct for email format patch submission
drivers/staging/speakup/speakup_soft.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/speakup/speakup_soft.c +2 -2
@@ -162,8 +162,8 @@ static char *get_initstring(void) cp = buf; var = synth_soft.vars;while (var->var_id !=MAXVARS ) { -if (var->var_id !=CAPS_START && var->var_id !=CAPS_STOP - && var->var_id !=DIRECT ) +if (var->var_id !=CAPS_START && var->var_id !=CAPS_STOP && + var->var_id !=DIRECT ) cp = cp +sprintf (cp, var->u.n.synth_fmt, var->u.n.value); var++;
Signature · 1 line
2.1.4
PATCH v2 3/6 staging: speakup: speakup_soft.c Multiple blank lines
In reply to Walt FeaselMake suggested checkpatch modification for
CHECK: Please don't use multiple blank lines
---
v2 makes changes to correct for email format patch submission
drivers/staging/speakup/speakup_soft.c | 1 - 1 file changed, 1 deletion(-)
drivers/staging/speakup/speakup_soft.c +0 -1
@@ -310,7 +310,6 @@ static const struct file_operations softsynth_fops = { .release = softsynth_close, }; -static int softsynth_probe (struct spk_synth *synth) {
Signature · 1 line
2.1.4
PATCH v2 4/6 staging: speakup: speakup_soft.c Blank line after {
In reply to Walt FeaselMake suggested checkpatch modification for
CHECK: Blank lines aren't necessary after an
open brace '{'
---
v2 makes changes to correct for email format patch submission
drivers/staging/speakup/speakup_soft.c | 1 - 1 file changed, 1 deletion(-)
drivers/staging/speakup/speakup_soft.c +0 -1
@@ -312,7 +312,6 @@ static const struct file_operations softsynth_fops = {static int softsynth_probe (struct spk_synth *synth) { -if (misc_registered !=0 )return 0 ;memset (&synth_device,0 ,sizeof (synth_device));
Signature · 1 line
2.1.4
PATCH v2 5/6 staging: speakup: speakup_soft.c comment modifications
In reply to Walt FeaselMake modifications to comment style
---
v2 makes changes to correct for email format patch submission
drivers/staging/speakup/speakup_soft.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
drivers/staging/speakup/speakup_soft.c +4 -5
@@ -20,8 +20,8 @@*/ #include <linux/unistd.h> -#include <linux/miscdevice.h> /* for misc_register, and SYNTH_MINOR */ -#include <linux/poll.h> /* for poll_wait() */ +#include <linux/miscdevice.h> /* for misc_register, and SYNTH_MINOR */ +#include <linux/poll.h> /* for poll_wait() */ #include <linux/sched.h> /* schedule(), signal_pending(), TASK_INTERRUPTIBLE */ #include "spk_priv.h"
@@ -55,9 +55,8 @@ static struct var_t vars[] = {V_LAST_VAR }; -/* -* These attributes will appear in /sys/accessibility/speakup/soft. -*/ +/* These attributes will appear in /sys/accessibility/speakup/soft. */ +static struct kobj_attribute caps_start_attribute =__ATTR (caps_start,S_IWUSR |S_IRUGO , spk_var_show, spk_var_store); static struct kobj_attribute caps_stop_attribute =
Signature · 1 line
2.1.4
PATCH v2 6/6 staging: speakup: speakup_soft.c Align parenthesis
In reply to Walt FeaselMake suggested checkpatch modification for
CHECK: Alignment should match open parenthesis
---
v2 makes changes to correct for email format patch submission
drivers/staging/speakup/speakup_soft.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/speakup/speakup_soft.c +1 -2
@@ -276,8 +276,7 @@ static ssize_t softsynth_write(struct file *fp, const char __user *buf,return count; } -static unsigned int softsynth_poll (struct file *fp, -struct poll_table_struct *wait) +static unsigned int softsynth_poll (struct file *fp,struct poll_table_struct *wait) {unsigned long flags;int ret =0 ;
Signature · 1 line
2.1.4
Greg KH
maintainerQuoted 8 lines · Walt Feasel
Make Linux kernel style modifications for
speak_soft.cto include:Space around operator
Logical continuation
Multiple blank lines
Blank line after {
comment modifications
Align parenthesis
Ok, now that you have a bunch of cleanup patches accepted, why not work on some "real" code changes? There's no need to fix all of the coding style issues in drivers/staging/ at once, leave some for other people to learn on :)
thanks,
greg k-h
A message that is not in the archive (sent off-list or not yet received): CACfmeC=-NKgX4QKF0Btj6OTvOxSjZgcoQ4BrNLq5NEpPSZ+1Ww@mail.gmail.com
Greg KH
maintainerQuoted 19 lines · Fleetwood Farm
Quoted 18 lines · Greg KH
Quoted 8 lines · Walt Feasel
Make Linux kernel style modifications for
speak_soft.cto include:Space around operator
Logical continuation
Multiple blank lines
Blank line after {
comment modifications
Align parenthesisOk, now that you have a bunch of cleanup patches accepted, why not work on some "real" code changes? There's no need to fix all of the coding style issues in
drivers/staging/at once, leave some for other people to learn on :)thanks,
Quoted 7 lines
Quoted 1 line
greg k-h
Well, I have around 40 more patches already prepared waiting for my limit to clear (which just did) and about 12 more files left to checkpatch in speakup. I am currently waiting on the newbies administer to clear my sent emails asking advice on if some of my tougher challenges (octals and CamelCase) are done correctly.
"newbies administrator"?
Quoted 5 lines
I am also currently waiting on the u-boot mailing list administer to do the same on some of my patches.
I also am doing some online 'c' courses to increase (get) my skills set. What type of "real" code changes did you have in mind with my limited skill set?
I'd strongly suggest working on some userspace programs to get a less-limited skill set :) Then find some area of the kernel you are interested in, and help out there. Speakup really can use the help, and the community of users of their devices is very good, so any real work you can do there would always be greatly appreciated.
best of luck,
greg k-h
Quoted 22 lines · Greg KH
Quoted 21 lines · Fleetwood Farm
Quoted 19 lines · Greg KH
Quoted 8 lines · Walt Feasel
Make Linux kernel style modifications for
speak_soft.cto include:Space around operator
Logical continuation
Multiple blank lines
Blank line after {
comment modifications
Align parenthesisOk, now that you have a bunch of cleanup patches accepted, why not work on some "real" code changes? There's no need to fix all of the coding style issues in
drivers/staging/at once, leave some for other people to learn on :)thanks,
greg k-h
Quoted 8 lines
Quoted 5 lines
Well, I have around 40 more patches already prepared waiting for my limit to clear (which just did) and about 12 more files left to checkpatch in speakup. I am currently waiting on the newbies administer to clear my sent emails asking advice on if some of my tougher challenges (octals and CamelCase) are done correctly.
"newbies administrator"?
Yes have a email saying my email "is being held until the list moderator can review it for approval"
Quoted 6 lines
Quoted 5 lines
I am also currently waiting on the u-boot mailing list administer to do the same on some of my patches.
I also am doing some online 'c' courses to increase (get) my skills set. What type of "real" code changes did you have in mind with my limited skill set?
Quoted 6 lines
I'd strongly suggest working on some userspace programs to get a less-limited skill set :) Then find some area of the kernel you are interested in, and help out there. Speakup really can use the help, and the community of users of their devices is very good, so any real work you can do there would always be greatly appreciated.
That is good advice about limiting skill set. I am trying to do that with converting some of my simple bash scripts to 'c'. While it may not be very usefull it is a start and won't mess up anything important for others. I do think I am learning from these simple checkpatch patches as I try to research the items I do not know. Plus I think it instills a good style format. I have written programs in the past for my jobs but never in 'c' and this driver stuff is over my head.
I do not wish to burden/annoy anyone with these simple fixes, I thought it may help with getting them out of staging. I won't take offense if it is preferred I did not do them.
I am not very quick on subtleties so if anyone wishes for me to move on I will.
Quoted 3 lines
best of luck,
greg k-h
Walt