* [PATCH 2/2 v3] staging: speakup: Clean up if conditions
@ 2017-02-27 16:03 Sreya Mittal
0 siblings, 0 replies; 5+ messages in thread
From: Sreya Mittal @ 2017-02-27 16:03 UTC (permalink / raw)
To: outreachy-kernel
Cc: Sreya Mittal, William Hubbs, Chris Brannon, Kirk Reiser,
Samuel Thibault, Greg Kroah-Hartman
Found by checkpatch.pl
Logical conditions are on the next line, useless parentheses present
Clean up the if tests by
* Put logical conditions on the previous line
* Remove useless parentheses
* Line up the tests
Signed-off-by: Sreya Mittal <sreyamittal5@gmail.com>
---
Changes in v3:
*Correct placement of patch changes
Changes in v2:
* More elaborate log message
* Fit MSG_FUNCNAMES_END) on the previous line
* Fit ch == SPEAKUP_HELP && on the previous line
drivers/staging/speakup/keyhelp.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/speakup/keyhelp.c b/drivers/staging/speakup/keyhelp.c
index c373762..4d00bc2 100644
--- a/drivers/staging/speakup/keyhelp.c
+++ b/drivers/staging/speakup/keyhelp.c
@@ -163,17 +163,15 @@ int spk_handle_help(struct vc_data *vc, u_char type, u_char ch, u_short key)
}
cur_item = letter_offsets[ch - 'a'];
} else if (type == KT_CUR) {
- if (ch == 0
- && MSG_FUNCNAMES_START + cur_item + 1 <=
- MSG_FUNCNAMES_END)
+ if (ch == 0 &&
+ MSG_FUNCNAMES_START + cur_item + 1 <= MSG_FUNCNAMES_END)
cur_item++;
else if (ch == 3 && cur_item > 0)
cur_item--;
else
return -1;
- } else if (type == KT_SPKUP
- && ch == SPEAKUP_HELP
- && !spk_special_handler) {
+ } else if (type == KT_SPKUP && ch == SPEAKUP_HELP &&
+ !spk_special_handler) {
spk_special_handler = spk_handle_help;
synth_printf("%s\n", spk_msg_get(MSG_HELP_INFO));
build_key_data(); /* rebuild each time in case new mapping */
--
2.9.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2 v3] staging: speakup: Clean up if conditions
2017-02-27 16:09 Sreya Mittal
@ 2017-02-28 5:48 ` Greg Kroah-Hartman
0 siblings, 0 replies; 5+ messages in thread
From: Greg Kroah-Hartman @ 2017-02-28 5:48 UTC (permalink / raw)
To: Sreya Mittal
Cc: outreachy-kernel, William Hubbs, Chris Brannon, Kirk Reiser,
Samuel Thibault
On Mon, Feb 27, 2017 at 09:39:40PM +0530, Sreya Mittal wrote:
> Found by checkpatch.pl
> Logical conditions are on the next line, useless parentheses present
> Clean up the if tests by
>
> * Put logical conditions on the previous line
> * Remove useless parentheses
> * Line up the tests
>
> Signed-off-by: Sreya Mittal <sreyamittal5@gmail.com>
>
> ---
>
> Changes in v3:
> *Correct placement of patch changes
Why do I have 3 copies of this same email sent out? Which one am I
supposed to use?
I'm still confused, please resend both of these patches, as a "v4", so I
know what to pick up.
Remember, it should be _very_ obvious to the maintainer as to what
patches to review/accept, you don't want to make me have to think, as I
don't do that very well :)
thanks,
greg k-h
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 2/2 v3] staging: speakup: Clean up if conditions
@ 2017-02-27 16:09 Sreya Mittal
2017-02-28 5:48 ` Greg Kroah-Hartman
0 siblings, 1 reply; 5+ messages in thread
From: Sreya Mittal @ 2017-02-27 16:09 UTC (permalink / raw)
To: outreachy-kernel
Cc: Sreya Mittal, William Hubbs, Chris Brannon, Kirk Reiser,
Samuel Thibault, Greg Kroah-Hartman
Found by checkpatch.pl
Logical conditions are on the next line, useless parentheses present
Clean up the if tests by
* Put logical conditions on the previous line
* Remove useless parentheses
* Line up the tests
Signed-off-by: Sreya Mittal <sreyamittal5@gmail.com>
---
Changes in v3:
*Correct placement of patch changes
Changes in v2:
* More elaborate log message
* Fit MSG_FUNCNAMES_END) on the previous line
* Fit ch == SPEAKUP_HELP && on the previous line
drivers/staging/speakup/keyhelp.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/speakup/keyhelp.c b/drivers/staging/speakup/keyhelp.c
index c373762..4d00bc2 100644
--- a/drivers/staging/speakup/keyhelp.c
+++ b/drivers/staging/speakup/keyhelp.c
@@ -163,17 +163,15 @@ int spk_handle_help(struct vc_data *vc, u_char type, u_char ch, u_short key)
}
cur_item = letter_offsets[ch - 'a'];
} else if (type == KT_CUR) {
- if (ch == 0
- && MSG_FUNCNAMES_START + cur_item + 1 <=
- MSG_FUNCNAMES_END)
+ if (ch == 0 &&
+ MSG_FUNCNAMES_START + cur_item + 1 <= MSG_FUNCNAMES_END)
cur_item++;
else if (ch == 3 && cur_item > 0)
cur_item--;
else
return -1;
- } else if (type == KT_SPKUP
- && ch == SPEAKUP_HELP
- && !spk_special_handler) {
+ } else if (type == KT_SPKUP && ch == SPEAKUP_HELP &&
+ !spk_special_handler) {
spk_special_handler = spk_handle_help;
synth_printf("%s\n", spk_msg_get(MSG_HELP_INFO));
build_key_data(); /* rebuild each time in case new mapping */
--
2.9.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2 v3] staging: speakup: Clean up if conditions
@ 2017-02-27 15:43 Sreya Mittal
0 siblings, 0 replies; 5+ messages in thread
From: Sreya Mittal @ 2017-02-27 15:43 UTC (permalink / raw)
To: outreachy-kernel
Cc: Sreya Mittal, William Hubbs, Chris Brannon, Kirk Reiser,
Samuel Thibault, Greg Kroah-Hartman
Found by checkpatch.pl
Logical conditions are on the next line, useless parentheses present
Clean up the if tests by
* Put logical conditions on the previous line
* Remove useless parentheses
* Line up the tests
Signed-off-by: Sreya Mittal <sreyamittal5@gmail.com>
---
Changes in v3:
*Correct placement of patch changes
Changes in v2:
* More elaborate log message
* Fit MSG_FUNCNAMES_END) on the previous line
* Fit ch == SPEAKUP_HELP && on the previous line
drivers/staging/speakup/keyhelp.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/speakup/keyhelp.c b/drivers/staging/speakup/keyhelp.c
index c373762..4d00bc2 100644
--- a/drivers/staging/speakup/keyhelp.c
+++ b/drivers/staging/speakup/keyhelp.c
@@ -163,17 +163,15 @@ int spk_handle_help(struct vc_data *vc, u_char type, u_char ch, u_short key)
}
cur_item = letter_offsets[ch - 'a'];
} else if (type == KT_CUR) {
- if (ch == 0
- && MSG_FUNCNAMES_START + cur_item + 1 <=
- MSG_FUNCNAMES_END)
+ if (ch == 0 &&
+ MSG_FUNCNAMES_START + cur_item + 1 <= MSG_FUNCNAMES_END)
cur_item++;
else if (ch == 3 && cur_item > 0)
cur_item--;
else
return -1;
- } else if (type == KT_SPKUP
- && ch == SPEAKUP_HELP
- && !spk_special_handler) {
+ } else if (type == KT_SPKUP && ch == SPEAKUP_HELP &&
+ !spk_special_handler) {
spk_special_handler = spk_handle_help;
synth_printf("%s\n", spk_msg_get(MSG_HELP_INFO));
build_key_data(); /* rebuild each time in case new mapping */
--
2.9.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2 v3] staging: speakup: Clean up if conditions
@ 2017-02-24 21:33 Sreya Mittal
0 siblings, 0 replies; 5+ messages in thread
From: Sreya Mittal @ 2017-02-24 21:33 UTC (permalink / raw)
To: outreachy-kernel
Cc: William Hubbs, Chris Brannon, Kirk Reiser, Samuel Thibault,
Greg Kroah-Hartman
Found by checkpatch.pl
Logical conditions are on the next line, useless parentheses present
Clean up the if tests by
* Put logical conditions on the previous line
* Remove useless parentheses
* Line up the tests
Signed-off-by: Sreya Mittal <sreyamittal5@gmail.com>
---
Changes in v2:
* More elaborate log message
* Fit MSG_FUNCNAMES_END) on the previous line
* Fit ch == SPEAKUP_HELP && on the previous line
drivers/staging/speakup/keyhelp.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/speakup/keyhelp.c b/drivers/staging/speakup/keyhelp.c
index f5156bb..ab56a1c 100644
--- a/drivers/staging/speakup/keyhelp.c
+++ b/drivers/staging/speakup/keyhelp.c
@@ -163,17 +163,15 @@ int spk_handle_help(struct vc_data *vc, u_char type, u_char ch, u_short key)
}
cur_item = letter_offsets[ch - 'a'];
} else if (type == KT_CUR) {
- if (ch == 0
- && (MSG_FUNCNAMES_START + cur_item + 1) <=
- MSG_FUNCNAMES_END)
+ if (ch == 0 &&
+ MSG_FUNCNAMES_START + cur_item + 1 <= MSG_FUNCNAMES_END)
cur_item++;
else if (ch == 3 && cur_item > 0)
cur_item--;
else
return -1;
- } else if (type == KT_SPKUP
- && ch == SPEAKUP_HELP
- && !spk_special_handler) {
+ } else if (type == KT_SPKUP && ch == SPEAKUP_HELP &&
+ !spk_special_handler) {
spk_special_handler = spk_handle_help;
synth_printf("%s\n", spk_msg_get(MSG_HELP_INFO));
build_key_data(); /* rebuild each time in case new mapping */
--
2.9.3
Thanks for the guidance.
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-02-28 5:48 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-27 16:03 [PATCH 2/2 v3] staging: speakup: Clean up if conditions Sreya Mittal
-- strict thread matches above, loose matches on Subject: below --
2017-02-27 16:09 Sreya Mittal
2017-02-28 5:48 ` Greg Kroah-Hartman
2017-02-27 15:43 Sreya Mittal
2017-02-24 21:33 Sreya Mittal
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.