2016-11-21 15:19:40

by Walt Feasel

[permalink] [raw]
Subject: [PATCH v2 0/6] 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(-)

--
v2 makes changes to correct for email format patch submission

2.1.4


2016-11-21 15:19:48

by Walt Feasel

[permalink] [raw]
Subject: [PATCH v2 2/6] staging: speakup: speakup_soft.c Logical continuation

Make suggested checkpatch modification for
CHECK: Logical continuations should be on the
previous line

Signed-off-by: Walt Feasel <[email protected]>
---
v2 makes changes to correct for email format patch submission

drivers/staging/speakup/speakup_soft.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/speakup/speakup_soft.c b/drivers/staging/speakup/speakup_soft.c
index 1697b4f..de6b35a 100644
--- a/drivers/staging/speakup/speakup_soft.c
+++ b/drivers/staging/speakup/speakup_soft.c
@@ -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++;
--
2.1.4

2016-11-21 15:19:54

by Walt Feasel

[permalink] [raw]
Subject: [PATCH v2 4/6] staging: speakup: speakup_soft.c Blank line after {

Make suggested checkpatch modification for
CHECK: Blank lines aren't necessary after an
open brace '{'

Signed-off-by: Walt Feasel <[email protected]>
---
v2 makes changes to correct for email format patch submission

drivers/staging/speakup/speakup_soft.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/staging/speakup/speakup_soft.c b/drivers/staging/speakup/speakup_soft.c
index 9308b7e..dfddd26 100644
--- a/drivers/staging/speakup/speakup_soft.c
+++ b/drivers/staging/speakup/speakup_soft.c
@@ -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));
--
2.1.4

2016-11-21 15:19:58

by Walt Feasel

[permalink] [raw]
Subject: [PATCH v2 6/6] staging: speakup: speakup_soft.c Align parenthesis

Make suggested checkpatch modification for
CHECK: Alignment should match open parenthesis

Signed-off-by: Walt Feasel <[email protected]>
---
v2 makes changes to correct for email format patch submission

drivers/staging/speakup/speakup_soft.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/speakup/speakup_soft.c b/drivers/staging/speakup/speakup_soft.c
index 50973cf..ed3e428 100644
--- a/drivers/staging/speakup/speakup_soft.c
+++ b/drivers/staging/speakup/speakup_soft.c
@@ -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;
--
2.1.4

2016-11-21 15:20:18

by Walt Feasel

[permalink] [raw]
Subject: [PATCH v2 5/6] staging: speakup: speakup_soft.c comment modifications

Make modifications to comment style

Signed-off-by: Walt Feasel <[email protected]>
---
v2 makes changes to correct for email format patch submission

drivers/staging/speakup/speakup_soft.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/speakup/speakup_soft.c b/drivers/staging/speakup/speakup_soft.c
index dfddd26..50973cf 100644
--- a/drivers/staging/speakup/speakup_soft.c
+++ b/drivers/staging/speakup/speakup_soft.c
@@ -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 =
--
2.1.4

2016-11-21 15:19:52

by Walt Feasel

[permalink] [raw]
Subject: [PATCH v2 3/6] staging: speakup: speakup_soft.c Multiple blank lines

Make suggested checkpatch modification for
CHECK: Please don't use multiple blank lines

Signed-off-by: Walt Feasel <[email protected]>
---
v2 makes changes to correct for email format patch submission

drivers/staging/speakup/speakup_soft.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/staging/speakup/speakup_soft.c b/drivers/staging/speakup/speakup_soft.c
index de6b35a..9308b7e 100644
--- a/drivers/staging/speakup/speakup_soft.c
+++ b/drivers/staging/speakup/speakup_soft.c
@@ -310,7 +310,6 @@ static const struct file_operations softsynth_fops = {
.release = softsynth_close,
};

-
static int softsynth_probe(struct spk_synth *synth)
{

--
2.1.4

2016-11-21 15:19:50

by Walt Feasel

[permalink] [raw]
Subject: [PATCH v2 1/6] staging: speakup: speakup_soft.c Space around operator

Make suggested checkpatch modification for
CHECK: spaces preferred around that '|'

Signed-off-by: Walt Feasel <[email protected]>
---
v2 makes changes to correct for email format patch submission

drivers/staging/speakup/speakup_soft.c | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/drivers/staging/speakup/speakup_soft.c b/drivers/staging/speakup/speakup_soft.c
index 6b1d0f5..1697b4f 100644
--- a/drivers/staging/speakup/speakup_soft.c
+++ b/drivers/staging/speakup/speakup_soft.c
@@ -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
--
2.1.4

2016-11-23 09:09:04

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH v2 0/6] staging: speakup: speakup_soft.c checkpatch modifications

On Mon, Nov 21, 2016 at 10:19:19AM -0500, Walt Feasel wrote:
> 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

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

2016-11-23 15:56:25

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH v2 0/6] staging: speakup: speakup_soft.c checkpatch modifications

On Wed, Nov 23, 2016 at 05:52:25AM -0500, Fleetwood Farm wrote:
> On Nov 23, 2016 4:08 AM, "Greg KH" <[email protected]> wrote:
> >
> > On Mon, Nov 21, 2016 at 10:19:19AM -0500, Walt Feasel wrote:
> > > 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
> >
> > 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
>
> 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"?

> 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

2016-11-23 16:24:54

by Walt Feasel

[permalink] [raw]
Subject: Re: [PATCH v2 0/6] staging: speakup: speakup_soft.c checkpatch modifications

On Wed, Nov 23, 2016 at 04:56:32PM +0100, Greg KH wrote:
> On Wed, Nov 23, 2016 at 05:52:25AM -0500, Fleetwood Farm wrote:
> > On Nov 23, 2016 4:08 AM, "Greg KH" <[email protected]> wrote:
> > >
> > > On Mon, Nov 21, 2016 at 10:19:19AM -0500, Walt Feasel wrote:
> > > > 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
> > >
> > > 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
> >
> > 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"

> > 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.
>
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.
> best of luck,
>
> greg k-h

Walt