public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/2] Staging: speakup: ERROR: Fix macro parenthesis.
@ 2014-06-08 14:12 Choi Gi-yong
  2014-06-08 17:11 ` [PATCH] checkpatch: fix complex macro false positive for escaped constant char Joe Perches
  2014-06-08 17:58 ` [PATCH 2/2] Staging: speakup: ERROR: Fix macro parenthesis Dan Carpenter
  0 siblings, 2 replies; 4+ messages in thread
From: Choi Gi-yong @ 2014-06-08 14:12 UTC (permalink / raw)
  To: gregkh; +Cc: devel, linux-kernel, Choi Gi-yong

Signed-off-by: Choi Gi-yong <yong@gnoy.org>
---
 drivers/staging/speakup/speakup_acntpc.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/speakup/speakup_acntpc.c b/drivers/staging/speakup/speakup_acntpc.c
index 31f952b..f70b698 100644
--- a/drivers/staging/speakup/speakup_acntpc.c
+++ b/drivers/staging/speakup/speakup_acntpc.c
@@ -35,7 +35,7 @@
 #include "speakup_acnt.h" /* local header file for Accent values */
 
 #define DRV_VERSION "2.10"
-#define PROCSPEECH '\r'
+#define PROCSPEECH ('\r')
 
 static int synth_probe(struct spk_synth *synth);
 static void accent_release(void);
@@ -152,8 +152,10 @@ static inline bool synth_full(void)
 static const char *synth_immediate(struct spk_synth *synth, const char *buf)
 {
 	u_char ch;
+
 	while ((ch = *buf)) {
 		int timeout = SPK_XMITR_TIMEOUT;
+
 		if (ch == '\n')
 			ch = PROCSPEECH;
 		if (synth_full())
@@ -257,6 +259,7 @@ static int synth_probe(struct spk_synth *synth)
 {
 	unsigned int port_val = 0;
 	int i = 0;
+
 	pr_info("Probing for %s.\n", synth->long_name);
 	if (port_forced) {
 		speakup_info.port_tts = port_forced;
-- 
1.9.1


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

* [PATCH] checkpatch: fix complex macro false positive for escaped constant char
  2014-06-08 14:12 [PATCH 2/2] Staging: speakup: ERROR: Fix macro parenthesis Choi Gi-yong
@ 2014-06-08 17:11 ` Joe Perches
  2014-06-08 17:58 ` [PATCH 2/2] Staging: speakup: ERROR: Fix macro parenthesis Dan Carpenter
  1 sibling, 0 replies; 4+ messages in thread
From: Joe Perches @ 2014-06-08 17:11 UTC (permalink / raw)
  To: Andrew Morton; +Cc: gregkh, devel, linux-kernel, Choi Gi-yong, Andy Whitcroft

A single escaped constant char is not a complex macro.

Signed-off-by: Joe Perches <joe@perches.com>
---
On Sun, 2014-06-08 at 23:12 +0900, Choi Gi-yong wrote:
> diff --git a/drivers/staging/speakup/speakup_acntpc.c b/drivers/staging/speakup/speakup_acntpc.c
[]
> @@ -35,7 +35,7 @@
[]
> -#define PROCSPEECH '\r'
> +#define PROCSPEECH ('\r')

checkpatch false positive, doesn't need parenthesis

 scripts/checkpatch.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 010b18e..ba92493 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -3757,7 +3757,7 @@ sub process {
 			    $dstat !~ /^(?:$Ident|-?$Constant),$/ &&			# 10, // foo(),
 			    $dstat !~ /^(?:$Ident|-?$Constant);$/ &&			# foo();
 			    $dstat !~ /^[!~-]?(?:$Lval|$Constant)$/ &&		# 10 // foo() // !foo // ~foo // -foo // foo->bar // foo.bar->baz
-			    $dstat !~ /^'X'$/ &&					# character constants
+			    $dstat !~ /^'X'$/ && $dstat !~ /^'XX'$/ &&			# character constants
 			    $dstat !~ /$exceptions/ &&
 			    $dstat !~ /^\.$Ident\s*=/ &&				# .foo =
 			    $dstat !~ /^(?:\#\s*$Ident|\#\s*$Constant)\s*$/ &&		# stringification #foo



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

* Re: [PATCH 2/2] Staging: speakup: ERROR: Fix macro parenthesis.
  2014-06-08 14:12 [PATCH 2/2] Staging: speakup: ERROR: Fix macro parenthesis Choi Gi-yong
  2014-06-08 17:11 ` [PATCH] checkpatch: fix complex macro false positive for escaped constant char Joe Perches
@ 2014-06-08 17:58 ` Dan Carpenter
  2014-06-09 11:08   ` 최(Choi)기용(Gi-yong)
  1 sibling, 1 reply; 4+ messages in thread
From: Dan Carpenter @ 2014-06-08 17:58 UTC (permalink / raw)
  To: Choi Gi-yong; +Cc: gregkh, devel, linux-kernel

It looks like this patch is adding blank lines not parenthesis like the
subject says.

regards,
dan carpenter

On Sun, Jun 08, 2014 at 11:12:57PM +0900, Choi Gi-yong wrote:
> Signed-off-by: Choi Gi-yong <yong@gnoy.org>
> ---
>  drivers/staging/speakup/speakup_acntpc.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/speakup/speakup_acntpc.c b/drivers/staging/speakup/speakup_acntpc.c
> index 31f952b..f70b698 100644
> --- a/drivers/staging/speakup/speakup_acntpc.c
> +++ b/drivers/staging/speakup/speakup_acntpc.c
> @@ -35,7 +35,7 @@
>  #include "speakup_acnt.h" /* local header file for Accent values */
>  
>  #define DRV_VERSION "2.10"
> -#define PROCSPEECH '\r'
> +#define PROCSPEECH ('\r')
>  
>  static int synth_probe(struct spk_synth *synth);
>  static void accent_release(void);
> @@ -152,8 +152,10 @@ static inline bool synth_full(void)
>  static const char *synth_immediate(struct spk_synth *synth, const char *buf)
>  {
>  	u_char ch;
> +
>  	while ((ch = *buf)) {
>  		int timeout = SPK_XMITR_TIMEOUT;
> +
>  		if (ch == '\n')
>  			ch = PROCSPEECH;
>  		if (synth_full())
> @@ -257,6 +259,7 @@ static int synth_probe(struct spk_synth *synth)
>  {
>  	unsigned int port_val = 0;
>  	int i = 0;
> +
>  	pr_info("Probing for %s.\n", synth->long_name);
>  	if (port_forced) {
>  		speakup_info.port_tts = port_forced;
> -- 
> 1.9.1
> 
> _______________________________________________
> devel mailing list
> devel@linuxdriverproject.org
> http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* Re: [PATCH 2/2] Staging: speakup: ERROR: Fix macro parenthesis.
  2014-06-08 17:58 ` [PATCH 2/2] Staging: speakup: ERROR: Fix macro parenthesis Dan Carpenter
@ 2014-06-09 11:08   ` 최(Choi)기용(Gi-yong)
  0 siblings, 0 replies; 4+ messages in thread
From: 최(Choi)기용(Gi-yong) @ 2014-06-09 11:08 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: gregkh, devel, linux-kernel

I made a stupid mistake, and I'm sorry.
https://lkml.org/lkml/2014/6/8/53

2014-06-09 2:58 GMT+09:00 Dan Carpenter <dan.carpenter@oracle.com>:
> It looks like this patch is adding blank lines not parenthesis like the
> subject says.
>
> regards,
> dan carpenter
>
> On Sun, Jun 08, 2014 at 11:12:57PM +0900, Choi Gi-yong wrote:
>> Signed-off-by: Choi Gi-yong <yong@gnoy.org>
>> ---
>>  drivers/staging/speakup/speakup_acntpc.c | 5 ++++-
>>  1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/staging/speakup/speakup_acntpc.c b/drivers/staging/speakup/speakup_acntpc.c
>> index 31f952b..f70b698 100644
>> --- a/drivers/staging/speakup/speakup_acntpc.c
>> +++ b/drivers/staging/speakup/speakup_acntpc.c
>> @@ -35,7 +35,7 @@
>>  #include "speakup_acnt.h" /* local header file for Accent values */
>>
>>  #define DRV_VERSION "2.10"
>> -#define PROCSPEECH '\r'
>> +#define PROCSPEECH ('\r')
>>
>>  static int synth_probe(struct spk_synth *synth);
>>  static void accent_release(void);
>> @@ -152,8 +152,10 @@ static inline bool synth_full(void)
>>  static const char *synth_immediate(struct spk_synth *synth, const char *buf)
>>  {
>>       u_char ch;
>> +
>>       while ((ch = *buf)) {
>>               int timeout = SPK_XMITR_TIMEOUT;
>> +
>>               if (ch == '\n')
>>                       ch = PROCSPEECH;
>>               if (synth_full())
>> @@ -257,6 +259,7 @@ static int synth_probe(struct spk_synth *synth)
>>  {
>>       unsigned int port_val = 0;
>>       int i = 0;
>> +
>>       pr_info("Probing for %s.\n", synth->long_name);
>>       if (port_forced) {
>>               speakup_info.port_tts = port_forced;
>> --
>> 1.9.1
>>
>> _______________________________________________
>> devel mailing list
>> devel@linuxdriverproject.org
>> http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



-- 

최     기용
Choi Gi-yong

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

end of thread, other threads:[~2014-06-09 11:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-08 14:12 [PATCH 2/2] Staging: speakup: ERROR: Fix macro parenthesis Choi Gi-yong
2014-06-08 17:11 ` [PATCH] checkpatch: fix complex macro false positive for escaped constant char Joe Perches
2014-06-08 17:58 ` [PATCH 2/2] Staging: speakup: ERROR: Fix macro parenthesis Dan Carpenter
2014-06-09 11:08   ` 최(Choi)기용(Gi-yong)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox