linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] staging: speakup: checkpatch cleanups
@ 2017-03-13 20:40 Arushi Singhal
  2017-03-13 20:40 ` [PATCH v2 1/2] staging: speakup: Added blank line after function/struct/union/enum declarations Arushi Singhal
  2017-03-13 20:40 ` [PATCH v2 2/2] staging: speakup: fix "Alignment match open parenthesis" Arushi Singhal
  0 siblings, 2 replies; 6+ messages in thread
From: Arushi Singhal @ 2017-03-13 20:40 UTC (permalink / raw)
  To: w.d.hubbs
  Cc: chris, outreachy-kernel, kirk, samuel.thibault, gregkh, speakup,
	devel, linux-kernel, Arushi Singhal

Improve readability by fixing multiple checkpatch.pl
issues in speakup driver. 

Arushi Singhal (2):
  staging: speakup: Added blank line after function/struct/union/enum
    declarations
  staging: speakup: fix "Alignment match open parenthesis"

 drivers/staging/speakup/kobjects.c     | 2 +-
 drivers/staging/speakup/main.c         | 1 +
 drivers/staging/speakup/serialio.c     | 1 +
 drivers/staging/speakup/speakup_dtlk.c | 1 +
 4 files changed, 4 insertions(+), 1 deletion(-)

-- 
2.11.0

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

* [PATCH v2 1/2] staging: speakup: Added blank line after function/struct/union/enum declarations
  2017-03-13 20:40 [PATCH v2 0/2] staging: speakup: checkpatch cleanups Arushi Singhal
@ 2017-03-13 20:40 ` Arushi Singhal
  2017-03-13 21:27   ` [Outreachy kernel] " Julia Lawall
  2017-03-13 21:31   ` Daniele Nicolodi
  2017-03-13 20:40 ` [PATCH v2 2/2] staging: speakup: fix "Alignment match open parenthesis" Arushi Singhal
  1 sibling, 2 replies; 6+ messages in thread
From: Arushi Singhal @ 2017-03-13 20:40 UTC (permalink / raw)
  To: w.d.hubbs
  Cc: chris, outreachy-kernel, kirk, samuel.thibault, gregkh, speakup,
	devel, linux-kernel, Arushi Singhal

This patch fixes the warnings reported by checkpatch.pl
for please use a blank line after function/struct/union/enum
declarations.

Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
---
 changes in v2
 - change the subject to make it more relevant.

 drivers/staging/speakup/main.c         | 1 +
 drivers/staging/speakup/serialio.c     | 1 +
 drivers/staging/speakup/speakup_dtlk.c | 1 +
 3 files changed, 3 insertions(+)

diff --git a/drivers/staging/speakup/main.c b/drivers/staging/speakup/main.c
index 6786cfab7460..4b750ec8cd59 100644
--- a/drivers/staging/speakup/main.c
+++ b/drivers/staging/speakup/main.c
@@ -108,6 +108,7 @@ enum {
 	CT_Window,
 	CT_Max
 };
+
 #define read_all_mode CT_Max
 
 static struct tty_struct *tty;
diff --git a/drivers/staging/speakup/serialio.c b/drivers/staging/speakup/serialio.c
index aade52ee15a0..d51e382cb835 100644
--- a/drivers/staging/speakup/serialio.c
+++ b/drivers/staging/speakup/serialio.c
@@ -21,6 +21,7 @@ static void start_serial_interrupt(int irq);
 static const struct old_serial_port rs_table[] = {
 	SERIAL_PORT_DFNS
 };
+
 static const struct old_serial_port *serstate;
 static int timeouts;
 
diff --git a/drivers/staging/speakup/speakup_dtlk.c b/drivers/staging/speakup/speakup_dtlk.c
index eede2d82183a..c0b2208aa8a7 100644
--- a/drivers/staging/speakup/speakup_dtlk.c
+++ b/drivers/staging/speakup/speakup_dtlk.c
@@ -43,6 +43,7 @@ static int port_forced;
 static unsigned int synth_portlist[] = {
 		 0x25e, 0x29e, 0x2de, 0x31e, 0x35e, 0x39e, 0
 };
+
 static u_char synth_status;
 
 static struct var_t vars[] = {
-- 
2.11.0

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

* [PATCH v2 2/2] staging: speakup: fix "Alignment match open parenthesis"
  2017-03-13 20:40 [PATCH v2 0/2] staging: speakup: checkpatch cleanups Arushi Singhal
  2017-03-13 20:40 ` [PATCH v2 1/2] staging: speakup: Added blank line after function/struct/union/enum declarations Arushi Singhal
@ 2017-03-13 20:40 ` Arushi Singhal
  2017-03-13 21:24   ` [Outreachy kernel] " Julia Lawall
  1 sibling, 1 reply; 6+ messages in thread
From: Arushi Singhal @ 2017-03-13 20:40 UTC (permalink / raw)
  To: w.d.hubbs
  Cc: chris, outreachy-kernel, kirk, samuel.thibault, gregkh, speakup,
	devel, linux-kernel, Arushi Singhal

Fix checkpatch issues: "CHECK: Alignment should match open parenthesis".

Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
---
 drivers/staging/speakup/kobjects.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/speakup/kobjects.c b/drivers/staging/speakup/kobjects.c
index 8a586323b728..ca85476e3ff7 100644
--- a/drivers/staging/speakup/kobjects.c
+++ b/drivers/staging/speakup/kobjects.c
@@ -93,7 +93,7 @@ static void report_char_chartab_status(int reset, int received, int used,
 	} else if (received) {
 		len = snprintf(buf, sizeof(buf),
 			       " updated %d of %d %s\n",
-				used, received, object_type[do_characters]);
+			       used, received, object_type[do_characters]);
 		if (rejected)
 			snprintf(buf + (len - 1), sizeof(buf) - (len - 1),
 				 " with %d reject%s\n",
-- 
2.11.0

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

* Re: [Outreachy kernel] [PATCH v2 2/2] staging: speakup: fix "Alignment match open parenthesis"
  2017-03-13 20:40 ` [PATCH v2 2/2] staging: speakup: fix "Alignment match open parenthesis" Arushi Singhal
@ 2017-03-13 21:24   ` Julia Lawall
  0 siblings, 0 replies; 6+ messages in thread
From: Julia Lawall @ 2017-03-13 21:24 UTC (permalink / raw)
  To: Arushi Singhal
  Cc: w.d.hubbs, chris, outreachy-kernel, kirk, samuel.thibault,
	gregkh, speakup, devel, linux-kernel



On Tue, 14 Mar 2017, Arushi Singhal wrote:

> Fix checkpatch issues: "CHECK: Alignment should match open parenthesis".

You don't have to send another revision just for this issue, but the
commit message would be better as "Align arguments with open parenthesis".
Something that explains what you did, rather than what warning message you
fixed.  In this case, the thing you did is pretty obvious from the warning
message, but that might not always be the case.  So it is better to get
used to writing commit messages that explain what you did and why, rather
than what error message you fixed.  If you force yourself to write a
commit message without using the word fix, you will probably come up with
a good solution.

julia

>
> Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
> ---
>  drivers/staging/speakup/kobjects.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/speakup/kobjects.c b/drivers/staging/speakup/kobjects.c
> index 8a586323b728..ca85476e3ff7 100644
> --- a/drivers/staging/speakup/kobjects.c
> +++ b/drivers/staging/speakup/kobjects.c
> @@ -93,7 +93,7 @@ static void report_char_chartab_status(int reset, int received, int used,
>  	} else if (received) {
>  		len = snprintf(buf, sizeof(buf),
>  			       " updated %d of %d %s\n",
> -				used, received, object_type[do_characters]);
> +			       used, received, object_type[do_characters]);
>  		if (rejected)
>  			snprintf(buf + (len - 1), sizeof(buf) - (len - 1),
>  				 " with %d reject%s\n",
> --
> 2.11.0
>
> --
> 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/20170313204018.24601-3-arushisinghal19971997%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 v2 1/2] staging: speakup: Added blank line after function/struct/union/enum declarations
  2017-03-13 20:40 ` [PATCH v2 1/2] staging: speakup: Added blank line after function/struct/union/enum declarations Arushi Singhal
@ 2017-03-13 21:27   ` Julia Lawall
  2017-03-13 21:31   ` Daniele Nicolodi
  1 sibling, 0 replies; 6+ messages in thread
From: Julia Lawall @ 2017-03-13 21:27 UTC (permalink / raw)
  To: Arushi Singhal
  Cc: w.d.hubbs, chris, outreachy-kernel, kirk, samuel.thibault,
	gregkh, speakup, devel, linux-kernel

Remember to use the imperative.  "Add blank line...".  You could just drop
function/struct/union/enum.  Just declarations is fine.

On Tue, 14 Mar 2017, Arushi Singhal wrote:

> This patch fixes the warnings reported by checkpatch.pl
> for please use a blank line after function/struct/union/enum
> declarations.

Again, it does not say what you have done, and only focuses on the message
you have fixed.

julia

> Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
> ---
>  changes in v2
>  - change the subject to make it more relevant.
>
>  drivers/staging/speakup/main.c         | 1 +
>  drivers/staging/speakup/serialio.c     | 1 +
>  drivers/staging/speakup/speakup_dtlk.c | 1 +
>  3 files changed, 3 insertions(+)
>
> diff --git a/drivers/staging/speakup/main.c b/drivers/staging/speakup/main.c
> index 6786cfab7460..4b750ec8cd59 100644
> --- a/drivers/staging/speakup/main.c
> +++ b/drivers/staging/speakup/main.c
> @@ -108,6 +108,7 @@ enum {
>  	CT_Window,
>  	CT_Max
>  };
> +
>  #define read_all_mode CT_Max
>
>  static struct tty_struct *tty;
> diff --git a/drivers/staging/speakup/serialio.c b/drivers/staging/speakup/serialio.c
> index aade52ee15a0..d51e382cb835 100644
> --- a/drivers/staging/speakup/serialio.c
> +++ b/drivers/staging/speakup/serialio.c
> @@ -21,6 +21,7 @@ static void start_serial_interrupt(int irq);
>  static const struct old_serial_port rs_table[] = {
>  	SERIAL_PORT_DFNS
>  };
> +
>  static const struct old_serial_port *serstate;
>  static int timeouts;
>
> diff --git a/drivers/staging/speakup/speakup_dtlk.c b/drivers/staging/speakup/speakup_dtlk.c
> index eede2d82183a..c0b2208aa8a7 100644
> --- a/drivers/staging/speakup/speakup_dtlk.c
> +++ b/drivers/staging/speakup/speakup_dtlk.c
> @@ -43,6 +43,7 @@ static int port_forced;
>  static unsigned int synth_portlist[] = {
>  		 0x25e, 0x29e, 0x2de, 0x31e, 0x35e, 0x39e, 0
>  };
> +
>  static u_char synth_status;
>
>  static struct var_t vars[] = {
> --
> 2.11.0
>
> --
> 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/20170313204018.24601-2-arushisinghal19971997%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>

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

* Re: [PATCH v2 1/2] staging: speakup: Added blank line after function/struct/union/enum declarations
  2017-03-13 20:40 ` [PATCH v2 1/2] staging: speakup: Added blank line after function/struct/union/enum declarations Arushi Singhal
  2017-03-13 21:27   ` [Outreachy kernel] " Julia Lawall
@ 2017-03-13 21:31   ` Daniele Nicolodi
  1 sibling, 0 replies; 6+ messages in thread
From: Daniele Nicolodi @ 2017-03-13 21:31 UTC (permalink / raw)
  To: Arushi Singhal, w.d.hubbs
  Cc: chris, outreachy-kernel, kirk, samuel.thibault, gregkh, speakup,
	devel, linux-kernel

Hello,

On 3/13/17 2:40 PM, Arushi Singhal wrote:
> This patch fixes the warnings reported by checkpatch.pl
> for please use a blank line after function/struct/union/enum
> declarations.

I haven't seen this pointed out by others before: starting a commit
message with "This patch..." is redundant (it is a commit message, thus
what it describes is surely a patch) and most times leads to bad style
commit messages.

In this case the commit message can simply be:

Add a blank line after enum and struct declarations.

or

Ensure that enum and struct declarations are followed by a blank line.

Cheers,
Daniele


> 
> Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
> ---
>  changes in v2
>  - change the subject to make it more relevant.
> 
>  drivers/staging/speakup/main.c         | 1 +
>  drivers/staging/speakup/serialio.c     | 1 +
>  drivers/staging/speakup/speakup_dtlk.c | 1 +
>  3 files changed, 3 insertions(+)
> 
> diff --git a/drivers/staging/speakup/main.c b/drivers/staging/speakup/main.c
> index 6786cfab7460..4b750ec8cd59 100644
> --- a/drivers/staging/speakup/main.c
> +++ b/drivers/staging/speakup/main.c
> @@ -108,6 +108,7 @@ enum {
>  	CT_Window,
>  	CT_Max
>  };
> +
>  #define read_all_mode CT_Max
>  
>  static struct tty_struct *tty;
> diff --git a/drivers/staging/speakup/serialio.c b/drivers/staging/speakup/serialio.c
> index aade52ee15a0..d51e382cb835 100644
> --- a/drivers/staging/speakup/serialio.c
> +++ b/drivers/staging/speakup/serialio.c
> @@ -21,6 +21,7 @@ static void start_serial_interrupt(int irq);
>  static const struct old_serial_port rs_table[] = {
>  	SERIAL_PORT_DFNS
>  };
> +
>  static const struct old_serial_port *serstate;
>  static int timeouts;
>  
> diff --git a/drivers/staging/speakup/speakup_dtlk.c b/drivers/staging/speakup/speakup_dtlk.c
> index eede2d82183a..c0b2208aa8a7 100644
> --- a/drivers/staging/speakup/speakup_dtlk.c
> +++ b/drivers/staging/speakup/speakup_dtlk.c
> @@ -43,6 +43,7 @@ static int port_forced;
>  static unsigned int synth_portlist[] = {
>  		 0x25e, 0x29e, 0x2de, 0x31e, 0x35e, 0x39e, 0
>  };
> +
>  static u_char synth_status;
>  
>  static struct var_t vars[] = {
> 

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

end of thread, other threads:[~2017-03-13 21:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-13 20:40 [PATCH v2 0/2] staging: speakup: checkpatch cleanups Arushi Singhal
2017-03-13 20:40 ` [PATCH v2 1/2] staging: speakup: Added blank line after function/struct/union/enum declarations Arushi Singhal
2017-03-13 21:27   ` [Outreachy kernel] " Julia Lawall
2017-03-13 21:31   ` Daniele Nicolodi
2017-03-13 20:40 ` [PATCH v2 2/2] staging: speakup: fix "Alignment match open parenthesis" Arushi Singhal
2017-03-13 21:24   ` [Outreachy kernel] " Julia Lawall

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).