All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Cleanup in staging speakup driver
@ 2018-02-21 18:55 Santha Meena Ramamoorthy
  2018-02-21 18:55 ` [PATCH 1/3] staging: speakup: add spaces around arithmetic operators Santha Meena Ramamoorthy
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Santha Meena Ramamoorthy @ 2018-02-21 18:55 UTC (permalink / raw)
  To: gregkh; +Cc: w.d.hubbs, chris, outreachy-kernel, Santha Meena Ramamoorthy

Do coding style cleanup to improve readability and maintainability.

Santha Meena Ramamoorthy (3):
  staging: speakup: add spaces around arithmetic operators
  staging: speakup: match alignment with open paranthesis
  staging: speakup: remove space after a cast

 drivers/staging/speakup/speakup_dtlk.c | 25 +++++++++++++------------
 1 file changed, 13 insertions(+), 12 deletions(-)

-- 
2.7.4



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

* [PATCH 1/3] staging: speakup: add spaces around arithmetic operators
  2018-02-21 18:55 [PATCH 0/3] Cleanup in staging speakup driver Santha Meena Ramamoorthy
@ 2018-02-21 18:55 ` Santha Meena Ramamoorthy
  2018-02-21 20:08   ` [Outreachy kernel] " Julia Lawall
  2018-02-21 18:55 ` [PATCH 2/3] staging: speakup: match alignment with open paranthesis Santha Meena Ramamoorthy
  2018-02-21 18:55 ` [PATCH 3/3] staging: speakup: remove space after a cast Santha Meena Ramamoorthy
  2 siblings, 1 reply; 6+ messages in thread
From: Santha Meena Ramamoorthy @ 2018-02-21 18:55 UTC (permalink / raw)
  To: gregkh; +Cc: w.d.hubbs, chris, outreachy-kernel, Santha Meena Ramamoorthy

add space around arithmetic operators ('+', '-' and '*') to conform to
Linux kernel coding style. Problem found using checkpatch.

Signed-off-by: Santha Meena Ramamoorthy <santhameena13@gmail.com>
---
 drivers/staging/speakup/speakup_dtlk.c | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/speakup/speakup_dtlk.c b/drivers/staging/speakup/speakup_dtlk.c
index f8cb83c..df31f8b 100644
--- a/drivers/staging/speakup/speakup_dtlk.c
+++ b/drivers/staging/speakup/speakup_dtlk.c
@@ -287,7 +287,7 @@ static struct synth_settings *synth_interrogate(struct spk_synth *synth)
 	}
 	t = buf;
 	/* serial number is little endian */
-	status.serial_number = t[0] + t[1]*256;
+	status.serial_number = t[0] + t[1] * 256;
 	t += 2;
 	for (i = 0; *t != '\r'; t++) {
 		status.rom_version[i] = *t;
@@ -326,13 +326,13 @@ static int synth_probe(struct spk_synth *synth)
 				speakup_info.port_tts);
 		if ((port_forced & 0xf) != 0xf)
 			pr_info("warning: port base should probably end with f\n");
-		if (synth_request_region(speakup_info.port_tts-1,
+		if (synth_request_region(speakup_info.port_tts - 1,
 					SYNTH_IO_EXTENT)) {
 			pr_warn("sorry, port already reserved\n");
 			return -EBUSY;
 		}
-		port_val = inw(speakup_info.port_tts-1);
-		synth_lpc = speakup_info.port_tts-1;
+		port_val = inw(speakup_info.port_tts - 1);
+		synth_lpc = speakup_info.port_tts - 1;
 	} else {
 		for (i = 0; synth_portlist[i]; i++) {
 			if (synth_request_region(synth_portlist[i],
@@ -341,7 +341,7 @@ static int synth_probe(struct spk_synth *synth)
 			port_val = inw(synth_portlist[i]) & 0xfbff;
 			if (port_val == 0x107f) {
 				synth_lpc = synth_portlist[i];
-				speakup_info.port_tts = synth_lpc+1;
+				speakup_info.port_tts = synth_lpc + 1;
 				break;
 			}
 			synth_release_region(synth_portlist[i],
@@ -359,7 +359,7 @@ static int synth_probe(struct spk_synth *synth)
 		cpu_relax(); /* wait until it's ready */
 	sp = synth_interrogate(synth);
 	pr_info("%s: %03x-%03x, ROM ver %s, s/n %u, driver: %s\n",
-		synth->long_name, synth_lpc, synth_lpc+SYNTH_IO_EXTENT - 1,
+		synth->long_name, synth_lpc, synth_lpc + SYNTH_IO_EXTENT - 1,
 		sp->rom_version, sp->serial_number, synth->version);
 	synth->alive = 1;
 	return 0;
@@ -369,7 +369,8 @@ static void dtlk_release(void)
 {
 	spk_stop_serial_interrupt();
 	if (speakup_info.port_tts)
-		synth_release_region(speakup_info.port_tts-1, SYNTH_IO_EXTENT);
+		synth_release_region(speakup_info.port_tts - 1,
+				     SYNTH_IO_EXTENT);
 	speakup_info.port_tts = 0;
 }
 
-- 
2.7.4



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

* [PATCH 2/3] staging: speakup: match alignment with open paranthesis
  2018-02-21 18:55 [PATCH 0/3] Cleanup in staging speakup driver Santha Meena Ramamoorthy
  2018-02-21 18:55 ` [PATCH 1/3] staging: speakup: add spaces around arithmetic operators Santha Meena Ramamoorthy
@ 2018-02-21 18:55 ` Santha Meena Ramamoorthy
  2018-02-21 18:55 ` [PATCH 3/3] staging: speakup: remove space after a cast Santha Meena Ramamoorthy
  2 siblings, 0 replies; 6+ messages in thread
From: Santha Meena Ramamoorthy @ 2018-02-21 18:55 UTC (permalink / raw)
  To: gregkh; +Cc: w.d.hubbs, chris, outreachy-kernel, Santha Meena Ramamoorthy

Match alignment with open paranthesis to conform to Linux kernel coding
style. Problem found using checkpatch.

Signed-off-by: Santha Meena Ramamoorthy <santhameena13@gmail.com>
---
 drivers/staging/speakup/speakup_dtlk.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/speakup/speakup_dtlk.c b/drivers/staging/speakup/speakup_dtlk.c
index df31f8b..f109b51 100644
--- a/drivers/staging/speakup/speakup_dtlk.c
+++ b/drivers/staging/speakup/speakup_dtlk.c
@@ -323,11 +323,11 @@ static int synth_probe(struct spk_synth *synth)
 	if (port_forced) {
 		speakup_info.port_tts = port_forced;
 		pr_info("probe forced to %x by kernel command line\n",
-				speakup_info.port_tts);
+			speakup_info.port_tts);
 		if ((port_forced & 0xf) != 0xf)
 			pr_info("warning: port base should probably end with f\n");
 		if (synth_request_region(speakup_info.port_tts - 1,
-					SYNTH_IO_EXTENT)) {
+					 SYNTH_IO_EXTENT)) {
 			pr_warn("sorry, port already reserved\n");
 			return -EBUSY;
 		}
@@ -336,7 +336,7 @@ static int synth_probe(struct spk_synth *synth)
 	} else {
 		for (i = 0; synth_portlist[i]; i++) {
 			if (synth_request_region(synth_portlist[i],
-						SYNTH_IO_EXTENT))
+						 SYNTH_IO_EXTENT))
 				continue;
 			port_val = inw(synth_portlist[i]) & 0xfbff;
 			if (port_val == 0x107f) {
@@ -345,7 +345,7 @@ static int synth_probe(struct spk_synth *synth)
 				break;
 			}
 			synth_release_region(synth_portlist[i],
-					SYNTH_IO_EXTENT);
+					     SYNTH_IO_EXTENT);
 		}
 	}
 	port_val &= 0xfbff;
-- 
2.7.4



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

* [PATCH 3/3] staging: speakup: remove space after a cast
  2018-02-21 18:55 [PATCH 0/3] Cleanup in staging speakup driver Santha Meena Ramamoorthy
  2018-02-21 18:55 ` [PATCH 1/3] staging: speakup: add spaces around arithmetic operators Santha Meena Ramamoorthy
  2018-02-21 18:55 ` [PATCH 2/3] staging: speakup: match alignment with open paranthesis Santha Meena Ramamoorthy
@ 2018-02-21 18:55 ` Santha Meena Ramamoorthy
  2 siblings, 0 replies; 6+ messages in thread
From: Santha Meena Ramamoorthy @ 2018-02-21 18:55 UTC (permalink / raw)
  To: gregkh; +Cc: w.d.hubbs, chris, outreachy-kernel, Santha Meena Ramamoorthy

Remove blank space after a cast to conform to Linux kernel coding style.
Problem found using checkpatch.

Signed-off-by: Santha Meena Ramamoorthy <santhameena13@gmail.com>
---
 drivers/staging/speakup/speakup_dtlk.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/speakup/speakup_dtlk.c b/drivers/staging/speakup/speakup_dtlk.c
index f109b51..dbebed0 100644
--- a/drivers/staging/speakup/speakup_dtlk.c
+++ b/drivers/staging/speakup/speakup_dtlk.c
@@ -266,7 +266,7 @@ static char synth_read_tts(void)
 	outb_p(ch, speakup_info.port_tts);
 	while (synth_readable())
 		cpu_relax();
-	return (char) ch;
+	return (char)ch;
 }
 
 /* interrogate the DoubleTalk PC and return its settings */
-- 
2.7.4



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

* Re: [Outreachy kernel] [PATCH 1/3] staging: speakup: add spaces around arithmetic operators
  2018-02-21 18:55 ` [PATCH 1/3] staging: speakup: add spaces around arithmetic operators Santha Meena Ramamoorthy
@ 2018-02-21 20:08   ` Julia Lawall
  2018-02-21 21:00     ` Santha Meena Ramamoorthy
  0 siblings, 1 reply; 6+ messages in thread
From: Julia Lawall @ 2018-02-21 20:08 UTC (permalink / raw)
  To: Santha Meena Ramamoorthy; +Cc: gregkh, w.d.hubbs, chris, outreachy-kernel



On Wed, 21 Feb 2018, Santha Meena Ramamoorthy wrote:

> add space around arithmetic operators ('+', '-' and '*') to conform to
> Linux kernel coding style. Problem found using checkpatch.

Could you update this one to start the log message with a capital letter?

You will need to send the whole series again, and note where things
changes and where they did not.  See the tutorial.

thanks,
julia

>
> Signed-off-by: Santha Meena Ramamoorthy <santhameena13@gmail.com>
> ---
>  drivers/staging/speakup/speakup_dtlk.c | 15 ++++++++-------
>  1 file changed, 8 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/staging/speakup/speakup_dtlk.c b/drivers/staging/speakup/speakup_dtlk.c
> index f8cb83c..df31f8b 100644
> --- a/drivers/staging/speakup/speakup_dtlk.c
> +++ b/drivers/staging/speakup/speakup_dtlk.c
> @@ -287,7 +287,7 @@ static struct synth_settings *synth_interrogate(struct spk_synth *synth)
>  	}
>  	t = buf;
>  	/* serial number is little endian */
> -	status.serial_number = t[0] + t[1]*256;
> +	status.serial_number = t[0] + t[1] * 256;
>  	t += 2;
>  	for (i = 0; *t != '\r'; t++) {
>  		status.rom_version[i] = *t;
> @@ -326,13 +326,13 @@ static int synth_probe(struct spk_synth *synth)
>  				speakup_info.port_tts);
>  		if ((port_forced & 0xf) != 0xf)
>  			pr_info("warning: port base should probably end with f\n");
> -		if (synth_request_region(speakup_info.port_tts-1,
> +		if (synth_request_region(speakup_info.port_tts - 1,
>  					SYNTH_IO_EXTENT)) {
>  			pr_warn("sorry, port already reserved\n");
>  			return -EBUSY;
>  		}
> -		port_val = inw(speakup_info.port_tts-1);
> -		synth_lpc = speakup_info.port_tts-1;
> +		port_val = inw(speakup_info.port_tts - 1);
> +		synth_lpc = speakup_info.port_tts - 1;
>  	} else {
>  		for (i = 0; synth_portlist[i]; i++) {
>  			if (synth_request_region(synth_portlist[i],
> @@ -341,7 +341,7 @@ static int synth_probe(struct spk_synth *synth)
>  			port_val = inw(synth_portlist[i]) & 0xfbff;
>  			if (port_val == 0x107f) {
>  				synth_lpc = synth_portlist[i];
> -				speakup_info.port_tts = synth_lpc+1;
> +				speakup_info.port_tts = synth_lpc + 1;
>  				break;
>  			}
>  			synth_release_region(synth_portlist[i],
> @@ -359,7 +359,7 @@ static int synth_probe(struct spk_synth *synth)
>  		cpu_relax(); /* wait until it's ready */
>  	sp = synth_interrogate(synth);
>  	pr_info("%s: %03x-%03x, ROM ver %s, s/n %u, driver: %s\n",
> -		synth->long_name, synth_lpc, synth_lpc+SYNTH_IO_EXTENT - 1,
> +		synth->long_name, synth_lpc, synth_lpc + SYNTH_IO_EXTENT - 1,
>  		sp->rom_version, sp->serial_number, synth->version);
>  	synth->alive = 1;
>  	return 0;
> @@ -369,7 +369,8 @@ static void dtlk_release(void)
>  {
>  	spk_stop_serial_interrupt();
>  	if (speakup_info.port_tts)
> -		synth_release_region(speakup_info.port_tts-1, SYNTH_IO_EXTENT);
> +		synth_release_region(speakup_info.port_tts - 1,
> +				     SYNTH_IO_EXTENT);
>  	speakup_info.port_tts = 0;
>  }
>
> --
> 2.7.4
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/1519239357-9527-2-git-send-email-santhameena13%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>


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

* Re: [Outreachy kernel] [PATCH 1/3] staging: speakup: add spaces around arithmetic operators
  2018-02-21 20:08   ` [Outreachy kernel] " Julia Lawall
@ 2018-02-21 21:00     ` Santha Meena Ramamoorthy
  0 siblings, 0 replies; 6+ messages in thread
From: Santha Meena Ramamoorthy @ 2018-02-21 21:00 UTC (permalink / raw)
  To: Julia Lawall, outreachy-kernel

On Wed, Feb 21, 2018 at 09:08:21PM +0100, Julia Lawall wrote:
> 
> 
> On Wed, 21 Feb 2018, Santha Meena Ramamoorthy wrote:
> 
> > add space around arithmetic operators ('+', '-' and '*') to conform to
> > Linux kernel coding style. Problem found using checkpatch.
> 
> Could you update this one to start the log message with a capital letter?
> 
> You will need to send the whole series again, and note where things
> changes and where they did not.  See the tutorial.
> 
> thanks,
> julia

Sorry for the silly mistake. I have changed it and submitted v2. Thanks
:) 
> >
> > Signed-off-by: Santha Meena Ramamoorthy <santhameena13@gmail.com>
> > ---
> >  drivers/staging/speakup/speakup_dtlk.c | 15 ++++++++-------
> >  1 file changed, 8 insertions(+), 7 deletions(-)
> >
> > diff --git a/drivers/staging/speakup/speakup_dtlk.c b/drivers/staging/speakup/speakup_dtlk.c
> > index f8cb83c..df31f8b 100644
> > --- a/drivers/staging/speakup/speakup_dtlk.c
> > +++ b/drivers/staging/speakup/speakup_dtlk.c
> > @@ -287,7 +287,7 @@ static struct synth_settings *synth_interrogate(struct spk_synth *synth)
> >  	}
> >  	t = buf;
> >  	/* serial number is little endian */
> > -	status.serial_number = t[0] + t[1]*256;
> > +	status.serial_number = t[0] + t[1] * 256;
> >  	t += 2;
> >  	for (i = 0; *t != '\r'; t++) {
> >  		status.rom_version[i] = *t;
> > @@ -326,13 +326,13 @@ static int synth_probe(struct spk_synth *synth)
> >  				speakup_info.port_tts);
> >  		if ((port_forced & 0xf) != 0xf)
> >  			pr_info("warning: port base should probably end with f\n");
> > -		if (synth_request_region(speakup_info.port_tts-1,
> > +		if (synth_request_region(speakup_info.port_tts - 1,
> >  					SYNTH_IO_EXTENT)) {
> >  			pr_warn("sorry, port already reserved\n");
> >  			return -EBUSY;
> >  		}
> > -		port_val = inw(speakup_info.port_tts-1);
> > -		synth_lpc = speakup_info.port_tts-1;
> > +		port_val = inw(speakup_info.port_tts - 1);
> > +		synth_lpc = speakup_info.port_tts - 1;
> >  	} else {
> >  		for (i = 0; synth_portlist[i]; i++) {
> >  			if (synth_request_region(synth_portlist[i],
> > @@ -341,7 +341,7 @@ static int synth_probe(struct spk_synth *synth)
> >  			port_val = inw(synth_portlist[i]) & 0xfbff;
> >  			if (port_val == 0x107f) {
> >  				synth_lpc = synth_portlist[i];
> > -				speakup_info.port_tts = synth_lpc+1;
> > +				speakup_info.port_tts = synth_lpc + 1;
> >  				break;
> >  			}
> >  			synth_release_region(synth_portlist[i],
> > @@ -359,7 +359,7 @@ static int synth_probe(struct spk_synth *synth)
> >  		cpu_relax(); /* wait until it's ready */
> >  	sp = synth_interrogate(synth);
> >  	pr_info("%s: %03x-%03x, ROM ver %s, s/n %u, driver: %s\n",
> > -		synth->long_name, synth_lpc, synth_lpc+SYNTH_IO_EXTENT - 1,
> > +		synth->long_name, synth_lpc, synth_lpc + SYNTH_IO_EXTENT - 1,
> >  		sp->rom_version, sp->serial_number, synth->version);
> >  	synth->alive = 1;
> >  	return 0;
> > @@ -369,7 +369,8 @@ static void dtlk_release(void)
> >  {
> >  	spk_stop_serial_interrupt();
> >  	if (speakup_info.port_tts)
> > -		synth_release_region(speakup_info.port_tts-1, SYNTH_IO_EXTENT);
> > +		synth_release_region(speakup_info.port_tts - 1,
> > +				     SYNTH_IO_EXTENT);
> >  	speakup_info.port_tts = 0;
> >  }
> >
> > --
> > 2.7.4
> >
> > --
> > You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> > To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> > To post to this group, send email to outreachy-kernel@googlegroups.com.
> > To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/1519239357-9527-2-git-send-email-santhameena13%40gmail.com.
> > For more options, visit https://groups.google.com/d/optout.
> >


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

end of thread, other threads:[~2018-02-21 21:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-21 18:55 [PATCH 0/3] Cleanup in staging speakup driver Santha Meena Ramamoorthy
2018-02-21 18:55 ` [PATCH 1/3] staging: speakup: add spaces around arithmetic operators Santha Meena Ramamoorthy
2018-02-21 20:08   ` [Outreachy kernel] " Julia Lawall
2018-02-21 21:00     ` Santha Meena Ramamoorthy
2018-02-21 18:55 ` [PATCH 2/3] staging: speakup: match alignment with open paranthesis Santha Meena Ramamoorthy
2018-02-21 18:55 ` [PATCH 3/3] staging: speakup: remove space after a cast Santha Meena Ramamoorthy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.