linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/5] staging: speakup: synth.c checkpatch modifications
@ 2016-11-19 17:35 Walt Feasel
  2016-11-19 17:35 ` [PATCH v2 1/5] staging: speakup: synth.c Spaces around operators Walt Feasel
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Walt Feasel @ 2016-11-19 17:35 UTC (permalink / raw)
  To: w.d.hubbs
  Cc: chris, kirk, samuel.thibault, gregkh, speakup, devel,
	linux-kernel, Walt Feasel

Make Linux kernel coding style modifications for XGI_main_26.c to include:

Spaces around operators
Blank lines before }
Logical continuation
Comment modifications
Align on parenthesis

Walt Feasel (5):
  staging: speakup: synth.c Spaces around operators
  staging: speakup: synth.c Blank line before }
  staging: speakup: synth.c Logical continuation
  staging: speakup: synth.c Comment modifications
  staging: speakup: synth.c Align parenthesis

 drivers/staging/speakup/synth.c | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

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

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

* [PATCH v2 1/5] staging: speakup: synth.c Spaces around operators
  2016-11-19 17:35 [PATCH v2 0/5] staging: speakup: synth.c checkpatch modifications Walt Feasel
@ 2016-11-19 17:35 ` Walt Feasel
  2016-11-19 18:06   ` kbuild test robot
                     ` (3 more replies)
  2016-11-19 17:35 ` [PATCH v2 2/5] staging: speakup: synth.c Blank line before } Walt Feasel
                   ` (3 subsequent siblings)
  4 siblings, 4 replies; 10+ messages in thread
From: Walt Feasel @ 2016-11-19 17:35 UTC (permalink / raw)
  To: w.d.hubbs
  Cc: chris, kirk, samuel.thibault, gregkh, speakup, devel,
	linux-kernel, Walt Feasel

Make suggested checkpatch modification for
CHECK: spaces preferred around that '+,|,-,/'

Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
---
v2 makes changes to correct for email format patch submission

 drivers/staging/speakup/synth.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/speakup/synth.c b/drivers/staging/speakup/synth.c
index 54b2f39..9c73a33 100644
--- a/drivers/staging/speakup/synth.c
+++ b/drivers/staging/speakup/synth.c
@@ -1,4 +1,4 @@
-#include <linux/types.h>
+w#include <linux/types.h>
 #include <linux/ctype.h>	/* for isdigit() and friends */
 #include <linux/fs.h>
 #include <linux/mm.h>		/* for verify_area */
@@ -303,11 +303,11 @@ void spk_get_index_count(int *linecount, int *sentcount)
 		sentence_count = ind % 10;
 
 		if ((ind / 10) <= synth->indexing.currindex)
-			index_count = synth->indexing.currindex-(ind/10);
+			index_count = synth->indexing.currindex - (ind / 10);
 		else
 			index_count = synth->indexing.currindex
-				-synth->indexing.lowindex
-				+ synth->indexing.highindex-(ind/10)+1;
+				- synth->indexing.lowindex
+				+ synth->indexing.highindex - (ind / 10) + 1;
 
 	}
 	*sentcount = sentence_count;
@@ -476,10 +476,10 @@ void synth_remove(struct spk_synth *in_synth)
 			break;
 	}
 	for ( ; synths[i] != NULL; i++) /* compress table */
-		synths[i] = synths[i+1];
+		synths[i] = synths[i + 1];
 	module_status = 0;
 	mutex_unlock(&spk_mutex);
 }
 EXPORT_SYMBOL_GPL(synth_remove);
 
-short spk_punc_masks[] = { 0, SOME, MOST, PUNC, PUNC|B_SYM };
+short spk_punc_masks[] = { 0, SOME, MOST, PUNC, PUNC | B_SYM };
-- 
2.1.4

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

* [PATCH v2 2/5] staging: speakup: synth.c Blank line before }
  2016-11-19 17:35 [PATCH v2 0/5] staging: speakup: synth.c checkpatch modifications Walt Feasel
  2016-11-19 17:35 ` [PATCH v2 1/5] staging: speakup: synth.c Spaces around operators Walt Feasel
@ 2016-11-19 17:35 ` Walt Feasel
  2016-11-19 17:35 ` [PATCH v2 3/5] staging: speakup: synth.c Logical continuation Walt Feasel
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 10+ messages in thread
From: Walt Feasel @ 2016-11-19 17:35 UTC (permalink / raw)
  To: w.d.hubbs
  Cc: chris, kirk, samuel.thibault, gregkh, speakup, devel,
	linux-kernel, Walt Feasel

Make suggested checkpatch modification for
CHECK: Blank lines aren't necessary before a close brace '}'

Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
---
v2 makes changes to correct for email format patch submission

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

diff --git a/drivers/staging/speakup/synth.c b/drivers/staging/speakup/synth.c
index 9c73a33..9191a6d 100644
--- a/drivers/staging/speakup/synth.c
+++ b/drivers/staging/speakup/synth.c
@@ -308,7 +308,6 @@ void spk_get_index_count(int *linecount, int *sentcount)
 			index_count = synth->indexing.currindex
 				- synth->indexing.lowindex
 				+ synth->indexing.highindex - (ind / 10) + 1;
-
 	}
 	*sentcount = sentence_count;
 	*linecount = index_count;
-- 
2.1.4

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

* [PATCH v2 3/5] staging: speakup: synth.c Logical continuation
  2016-11-19 17:35 [PATCH v2 0/5] staging: speakup: synth.c checkpatch modifications Walt Feasel
  2016-11-19 17:35 ` [PATCH v2 1/5] staging: speakup: synth.c Spaces around operators Walt Feasel
  2016-11-19 17:35 ` [PATCH v2 2/5] staging: speakup: synth.c Blank line before } Walt Feasel
@ 2016-11-19 17:35 ` Walt Feasel
  2016-11-19 17:35 ` [PATCH v2 4/5] staging: speakup: synth.c Comment modifications Walt Feasel
  2016-11-19 17:35 ` [PATCH v2 5/5] staging: speakup: synth.c Align parenthesis Walt Feasel
  4 siblings, 0 replies; 10+ messages in thread
From: Walt Feasel @ 2016-11-19 17:35 UTC (permalink / raw)
  To: w.d.hubbs
  Cc: chris, kirk, samuel.thibault, gregkh, speakup, devel,
	linux-kernel, Walt Feasel

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

Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
---
v2 makes changes to correct for email format patch submission

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

diff --git a/drivers/staging/speakup/synth.c b/drivers/staging/speakup/synth.c
index 9191a6d..99d5cba 100644
--- a/drivers/staging/speakup/synth.c
+++ b/drivers/staging/speakup/synth.c
@@ -405,8 +405,8 @@ static int do_synth_init(struct spk_synth *in_synth)
 		speakup_register_var(var);
 	if (!spk_quiet_boot)
 		synth_printf("%s found\n", synth->long_name);
-	if (synth->attributes.name
-	&& sysfs_create_group(speakup_kobj, &synth->attributes) < 0)
+	if (synth->attributes.name && sysfs_create_group(speakup_kobj,
+							 &synth->attributes) < 0)
 		return -ENOMEM;
 	synth_flags = synth->flags;
 	wake_up_interruptible_all(&speakup_event);
-- 
2.1.4

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

* [PATCH v2 4/5] staging: speakup: synth.c Comment modifications
  2016-11-19 17:35 [PATCH v2 0/5] staging: speakup: synth.c checkpatch modifications Walt Feasel
                   ` (2 preceding siblings ...)
  2016-11-19 17:35 ` [PATCH v2 3/5] staging: speakup: synth.c Logical continuation Walt Feasel
@ 2016-11-19 17:35 ` Walt Feasel
  2016-11-19 17:35 ` [PATCH v2 5/5] staging: speakup: synth.c Align parenthesis Walt Feasel
  4 siblings, 0 replies; 10+ messages in thread
From: Walt Feasel @ 2016-11-19 17:35 UTC (permalink / raw)
  To: w.d.hubbs
  Cc: chris, kirk, samuel.thibault, gregkh, speakup, devel,
	linux-kernel, Walt Feasel

Make modifications to comment style

Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
---
v2 makes changes to correct for email format patch submission

 drivers/staging/speakup/synth.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/speakup/synth.c b/drivers/staging/speakup/synth.c
index 99d5cba..779b918 100644
--- a/drivers/staging/speakup/synth.c
+++ b/drivers/staging/speakup/synth.c
@@ -8,7 +8,7 @@ w#include <linux/types.h>
 #include <linux/delay.h>	/* for loops_per_sec */
 #include <linux/kmod.h>
 #include <linux/jiffies.h>
-#include <linux/uaccess.h> /* for copy_from_user */
+#include <linux/uaccess.h>	/* for copy_from_user */
 #include <linux/sched.h>
 #include <linux/timer.h>
 #include <linux/kthread.h>
@@ -73,7 +73,8 @@ int spk_serial_synth_probe(struct spk_synth *synth)
 }
 EXPORT_SYMBOL_GPL(spk_serial_synth_probe);
 
-/* Main loop of the progression thread: keep eating from the buffer
+/*
+ * Main loop of the progression thread: keep eating from the buffer
  * and push to the serial port, waiting as needed
  *
  * For devices that have a "full" notification mechanism, the driver can
-- 
2.1.4

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

* [PATCH v2 5/5] staging: speakup: synth.c Align parenthesis
  2016-11-19 17:35 [PATCH v2 0/5] staging: speakup: synth.c checkpatch modifications Walt Feasel
                   ` (3 preceding siblings ...)
  2016-11-19 17:35 ` [PATCH v2 4/5] staging: speakup: synth.c Comment modifications Walt Feasel
@ 2016-11-19 17:35 ` Walt Feasel
  4 siblings, 0 replies; 10+ messages in thread
From: Walt Feasel @ 2016-11-19 17:35 UTC (permalink / raw)
  To: w.d.hubbs
  Cc: chris, kirk, samuel.thibault, gregkh, speakup, devel,
	linux-kernel, Walt Feasel

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

Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
---
v2 makes changes to correct for email format patch submission

 drivers/staging/speakup/synth.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/speakup/synth.c b/drivers/staging/speakup/synth.c
index 779b918..2821a2b2 100644
--- a/drivers/staging/speakup/synth.c
+++ b/drivers/staging/speakup/synth.c
@@ -67,7 +67,7 @@ int spk_serial_synth_probe(struct spk_synth *synth)
 		return -ENODEV;
 	}
 	pr_info("%s: ttyS%i, Driver Version %s\n",
-			synth->long_name, synth->ser, synth->version);
+		synth->long_name, synth->ser, synth->version);
 	synth->alive = 1;
 	return 0;
 }
-- 
2.1.4

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

* Re: [PATCH v2 1/5] staging: speakup: synth.c Spaces around operators
  2016-11-19 17:35 ` [PATCH v2 1/5] staging: speakup: synth.c Spaces around operators Walt Feasel
@ 2016-11-19 18:06   ` kbuild test robot
  2016-11-19 18:48   ` kbuild test robot
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 10+ messages in thread
From: kbuild test robot @ 2016-11-19 18:06 UTC (permalink / raw)
  To: Walt Feasel
  Cc: kbuild-all, w.d.hubbs, devel, kirk, Walt Feasel, gregkh, speakup,
	linux-kernel, samuel.thibault, chris

[-- Attachment #1: Type: text/plain, Size: 2829 bytes --]

Hi Walt,

[auto build test ERROR on staging/staging-testing]
[also build test ERROR on v4.9-rc5 next-20161117]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Walt-Feasel/staging-speakup-synth-c-checkpatch-modifications/20161120-013925
config: i386-randconfig-x006-201647 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All error/warnings (new ones prefixed by >>):

>> drivers/staging/speakup/synth.c:1:2: error: stray '#' in program
    w#include <linux/types.h>
     ^
>> drivers/staging/speakup/synth.c:1:1: error: unknown type name 'w'
    w#include <linux/types.h>
    ^
>> drivers/staging/speakup/synth.c:1:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    w#include <linux/types.h>
              ^
   In file included from drivers/staging/speakup/synth.c:2:0:
   include/linux/ctype.h: In function '__tolower':
>> include/linux/ctype.h:20:22: error: '_ctype' undeclared (first use in this function)
    #define __ismask(x) (_ctype[(int)(unsigned char)(x)])
                         ^
>> include/linux/ctype.h:35:22: note: in expansion of macro '__ismask'
    #define isupper(c) ((__ismask(c)&(_U)) != 0)
                         ^~~~~~~~
>> include/linux/ctype.h:43:6: note: in expansion of macro 'isupper'
     if (isupper(c))
         ^~~~~~~
   include/linux/ctype.h:20:22: note: each undeclared identifier is reported only once for each function it appears in
    #define __ismask(x) (_ctype[(int)(unsigned char)(x)])
                         ^
>> include/linux/ctype.h:35:22: note: in expansion of macro '__ismask'
    #define isupper(c) ((__ismask(c)&(_U)) != 0)
                         ^~~~~~~~
>> include/linux/ctype.h:43:6: note: in expansion of macro 'isupper'
     if (isupper(c))
         ^~~~~~~
   include/linux/ctype.h: In function '__toupper':
>> include/linux/ctype.h:20:22: error: '_ctype' undeclared (first use in this function)
    #define __ismask(x) (_ctype[(int)(unsigned char)(x)])
                         ^
   include/linux/ctype.h:30:22: note: in expansion of macro '__ismask'
    #define islower(c) ((__ismask(c)&(_L)) != 0)
                         ^~~~~~~~
>> include/linux/ctype.h:50:6: note: in expansion of macro 'islower'
     if (islower(c))
         ^~~~~~~

vim +1 drivers/staging/speakup/synth.c

   > 1	w#include <linux/types.h>
     2	#include <linux/ctype.h>	/* for isdigit() and friends */
     3	#include <linux/fs.h>
     4	#include <linux/mm.h>		/* for verify_area */

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 31755 bytes --]

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

* Re: [PATCH v2 1/5] staging: speakup: synth.c Spaces around operators
  2016-11-19 17:35 ` [PATCH v2 1/5] staging: speakup: synth.c Spaces around operators Walt Feasel
  2016-11-19 18:06   ` kbuild test robot
@ 2016-11-19 18:48   ` kbuild test robot
  2016-11-19 19:34   ` [PATCH v3 " Walt Feasel
  2016-11-25 13:10   ` [PATCH v2 " Dan Carpenter
  3 siblings, 0 replies; 10+ messages in thread
From: kbuild test robot @ 2016-11-19 18:48 UTC (permalink / raw)
  To: Walt Feasel
  Cc: kbuild-all, w.d.hubbs, devel, kirk, Walt Feasel, gregkh, speakup,
	linux-kernel, samuel.thibault, chris

[-- Attachment #1: Type: text/plain, Size: 1748 bytes --]

Hi Walt,

[auto build test ERROR on staging/staging-testing]
[also build test ERROR on v4.9-rc5 next-20161117]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Walt-Feasel/staging-speakup-synth-c-checkpatch-modifications/20161120-013925
config: openrisc-allmodconfig (attached as .config)
compiler: or32-linux-gcc (GCC) 4.5.1-or32-1.0rc1
reproduce:
        wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=openrisc 

All errors (new ones prefixed by >>):

   drivers/staging/speakup/synth.c:1:1: error: stray '#' in program
>> drivers/staging/speakup/synth.c:1:3: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'include'
   In file included from drivers/staging/speakup/synth.c:2:0:
   include/linux/ctype.h: In function '__tolower':
   include/linux/ctype.h:43:6: error: '_ctype' undeclared (first use in this function)
   include/linux/ctype.h:43:6: note: each undeclared identifier is reported only once for each function it appears in
   include/linux/ctype.h: In function '__toupper':
   include/linux/ctype.h:50:6: error: '_ctype' undeclared (first use in this function)

vim +1 drivers/staging/speakup/synth.c

   > 1	w#include <linux/types.h>
     2	#include <linux/ctype.h>	/* for isdigit() and friends */
     3	#include <linux/fs.h>
     4	#include <linux/mm.h>		/* for verify_area */

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 39339 bytes --]

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

* [PATCH v3 1/5] staging: speakup: synth.c Spaces around operators
  2016-11-19 17:35 ` [PATCH v2 1/5] staging: speakup: synth.c Spaces around operators Walt Feasel
  2016-11-19 18:06   ` kbuild test robot
  2016-11-19 18:48   ` kbuild test robot
@ 2016-11-19 19:34   ` Walt Feasel
  2016-11-25 13:10   ` [PATCH v2 " Dan Carpenter
  3 siblings, 0 replies; 10+ messages in thread
From: Walt Feasel @ 2016-11-19 19:34 UTC (permalink / raw)
  To: w.d.hubbs
  Cc: chris, kirk, samuel.thibault, gregkh, speakup, devel, linux-kernel

Make suggested checkpatch modification for
CHECK: spaces preferred around that '|,+,-,/'

Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
---
v3 fixes erroneous w added in v2
 drivers/staging/speakup/synth.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/speakup/synth.c b/drivers/staging/speakup/synth.c
index 54b2f39..17aa440 100644
--- a/drivers/staging/speakup/synth.c
+++ b/drivers/staging/speakup/synth.c
@@ -303,11 +303,11 @@ void spk_get_index_count(int *linecount, int *sentcount)
 		sentence_count = ind % 10;
 
 		if ((ind / 10) <= synth->indexing.currindex)
-			index_count = synth->indexing.currindex-(ind/10);
+			index_count = synth->indexing.currindex - (ind / 10);
 		else
 			index_count = synth->indexing.currindex
-				-synth->indexing.lowindex
-				+ synth->indexing.highindex-(ind/10)+1;
+				- synth->indexing.lowindex
+				+ synth->indexing.highindex - (ind / 10) + 1;
 
 	}
 	*sentcount = sentence_count;
@@ -476,10 +476,10 @@ void synth_remove(struct spk_synth *in_synth)
 			break;
 	}
 	for ( ; synths[i] != NULL; i++) /* compress table */
-		synths[i] = synths[i+1];
+		synths[i] = synths[i + 1];
 	module_status = 0;
 	mutex_unlock(&spk_mutex);
 }
 EXPORT_SYMBOL_GPL(synth_remove);
 
-short spk_punc_masks[] = { 0, SOME, MOST, PUNC, PUNC|B_SYM };
+short spk_punc_masks[] = { 0, SOME, MOST, PUNC, PUNC | B_SYM };
-- 
2.1.4

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

* Re: [PATCH v2 1/5] staging: speakup: synth.c Spaces around operators
  2016-11-19 17:35 ` [PATCH v2 1/5] staging: speakup: synth.c Spaces around operators Walt Feasel
                     ` (2 preceding siblings ...)
  2016-11-19 19:34   ` [PATCH v3 " Walt Feasel
@ 2016-11-25 13:10   ` Dan Carpenter
  3 siblings, 0 replies; 10+ messages in thread
From: Dan Carpenter @ 2016-11-25 13:10 UTC (permalink / raw)
  To: Walt Feasel
  Cc: w.d.hubbs, devel, kirk, gregkh, speakup, linux-kernel,
	samuel.thibault, chris

On Sat, Nov 19, 2016 at 12:35:43PM -0500, Walt Feasel wrote:
> Make suggested checkpatch modification for
> CHECK: spaces preferred around that '+,|,-,/'
> 
> Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
> ---
> v2 makes changes to correct for email format patch submission
> 
>  drivers/staging/speakup/synth.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/staging/speakup/synth.c b/drivers/staging/speakup/synth.c
> index 54b2f39..9c73a33 100644
> --- a/drivers/staging/speakup/synth.c
> +++ b/drivers/staging/speakup/synth.c
> @@ -1,4 +1,4 @@
> -#include <linux/types.h>
> +w#include <linux/types.h>


This is a mistake.

regards,
dan carpenter

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

end of thread, other threads:[~2016-11-25 13:13 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-19 17:35 [PATCH v2 0/5] staging: speakup: synth.c checkpatch modifications Walt Feasel
2016-11-19 17:35 ` [PATCH v2 1/5] staging: speakup: synth.c Spaces around operators Walt Feasel
2016-11-19 18:06   ` kbuild test robot
2016-11-19 18:48   ` kbuild test robot
2016-11-19 19:34   ` [PATCH v3 " Walt Feasel
2016-11-25 13:10   ` [PATCH v2 " Dan Carpenter
2016-11-19 17:35 ` [PATCH v2 2/5] staging: speakup: synth.c Blank line before } Walt Feasel
2016-11-19 17:35 ` [PATCH v2 3/5] staging: speakup: synth.c Logical continuation Walt Feasel
2016-11-19 17:35 ` [PATCH v2 4/5] staging: speakup: synth.c Comment modifications Walt Feasel
2016-11-19 17:35 ` [PATCH v2 5/5] staging: speakup: synth.c Align parenthesis Walt Feasel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).