linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Corrected some Coding Style Issues
@ 2017-01-26 17:24 Daksh Anand
  2017-01-26 17:24 ` Daksh Anand
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Daksh Anand @ 2017-01-26 17:24 UTC (permalink / raw)
  Cc: daksh anand, William Hubbs, Chris Brannon, Kirk Reiser,
	Samuel Thibault, Greg Kroah-Hartman, Julia Lawall,
	Alison Schofield,
	open list:STAGING - SPEAKUP CONSOLE SPEECH DRIVER,
	open list:STAGING SUBSYSTEM, open list

From: daksh anand <dakshanand@gmail.com>

Signed-off-by: daksh anand <dakshanand@gmail.com>
---
 drivers/staging/speakup/i18n.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/speakup/i18n.c b/drivers/staging/speakup/i18n.c
index 8960079..b8f5bed 100644
--- a/drivers/staging/speakup/i18n.c
+++ b/drivers/staging/speakup/i18n.c
@@ -401,15 +401,15 @@ char *spk_msg_get(enum msg_index_t index)
  * Finds the start of the next format specifier in the argument string.
  * Return value: pointer to start of format
  * specifier, or NULL if no specifier exists.
-*/
+ */
 static char *next_specifier(char *input)
 {
 	int found = 0;
 	char *next_percent = input;
 
-	while ((next_percent != NULL) && !found) {
+	while ((next_percent) && !found) {
 		next_percent = strchr(next_percent, '%');
-		if (next_percent != NULL) {
+		if (next_percent) {
 			/* skip over doubled percent signs */
 			while ((next_percent[0] == '%')
 			       && (next_percent[1] == '%'))
@@ -450,7 +450,7 @@ static char *skip_width(char *input)
  * Note that this code only accepts a handful of conversion specifiers:
  * c d s x and ld.  Not accidental; these are exactly the ones used in
  * the default group of formatted messages.
-*/
+ */
 static char *skip_conversion(char *input)
 {
 	if ((input[0] == 'l') && (input[1] == 'd'))
@@ -463,7 +463,7 @@ static char *skip_conversion(char *input)
 /*
  * Function: find_specifier_end
  * Return a pointer to the end of the format specifier.
-*/
+ */
 static char *find_specifier_end(char *input)
 {
 	input++;		/* Advance over %. */
@@ -478,7 +478,7 @@ static char *find_specifier_end(char *input)
  * Compare the format specifiers pointed to by *input1 and *input2.
  * Return 1 if they are the same, 0 otherwise.  Advance *input1 and *input2
  * so that they point to the character following the end of the specifier.
-*/
+ */
 static int compare_specifiers(char **input1, char **input2)
 {
 	int same = 0;
@@ -500,7 +500,7 @@ static int compare_specifiers(char **input1, char **input2)
  * Check that two format strings contain the same number of format specifiers,
  * and that the order of specifiers is the same in both strings.
  * Return 1 if the condition holds, 0 if it doesn't.
-*/
+ */
 static int fmt_validate(char *template, char *user)
 {
 	int valid = 1;
@@ -537,7 +537,7 @@ static int fmt_validate(char *template, char *user)
  * Failure conditions:
  * -EINVAL -  Invalid format specifiers in formatted message or illegal index.
  * -ENOMEM -  Unable to allocate memory.
-*/
+ */
 ssize_t spk_msg_set(enum msg_index_t index, char *text, size_t length)
 {
 	int rc = 0;
@@ -573,7 +573,7 @@ ssize_t spk_msg_set(enum msg_index_t index, char *text, size_t length)
 /*
  * Find a message group, given its name.  Return a pointer to the structure
  * if found, or NULL otherwise.
-*/
+ */
 struct msg_group_t *spk_find_msg_group(const char *group_name)
 {
 	struct msg_group_t *group = NULL;
-- 
2.7.4

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

* [PATCH] Corrected some Coding Style Issues
  2017-01-26 17:24 [PATCH] Corrected some Coding Style Issues Daksh Anand
@ 2017-01-26 17:24 ` Daksh Anand
  2017-01-26 17:26 ` Stephen Hemminger
  2017-01-26 17:43 ` Greg Kroah-Hartman
  2 siblings, 0 replies; 4+ messages in thread
From: Daksh Anand @ 2017-01-26 17:24 UTC (permalink / raw)
  Cc: daksh anand, William Hubbs, Chris Brannon, Kirk Reiser,
	Samuel Thibault, Greg Kroah-Hartman, Julia Lawall,
	Alison Schofield,
	open list:STAGING - SPEAKUP CONSOLE SPEECH DRIVER,
	open list:STAGING SUBSYSTEM, open list

From: daksh anand <dakshanand@gmail.com>

Signed-off-by: daksh anand <dakshanand@gmail.com>
---
 drivers/staging/speakup/i18n.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/speakup/i18n.c b/drivers/staging/speakup/i18n.c
index 8960079..b8f5bed 100644
--- a/drivers/staging/speakup/i18n.c
+++ b/drivers/staging/speakup/i18n.c
@@ -401,15 +401,15 @@ char *spk_msg_get(enum msg_index_t index)
  * Finds the start of the next format specifier in the argument string.
  * Return value: pointer to start of format
  * specifier, or NULL if no specifier exists.
-*/
+ */
 static char *next_specifier(char *input)
 {
 	int found = 0;
 	char *next_percent = input;
 
-	while ((next_percent != NULL) && !found) {
+	while ((next_percent) && !found) {
 		next_percent = strchr(next_percent, '%');
-		if (next_percent != NULL) {
+		if (next_percent) {
 			/* skip over doubled percent signs */
 			while ((next_percent[0] == '%')
 			       && (next_percent[1] == '%'))
@@ -450,7 +450,7 @@ static char *skip_width(char *input)
  * Note that this code only accepts a handful of conversion specifiers:
  * c d s x and ld.  Not accidental; these are exactly the ones used in
  * the default group of formatted messages.
-*/
+ */
 static char *skip_conversion(char *input)
 {
 	if ((input[0] == 'l') && (input[1] == 'd'))
@@ -463,7 +463,7 @@ static char *skip_conversion(char *input)
 /*
  * Function: find_specifier_end
  * Return a pointer to the end of the format specifier.
-*/
+ */
 static char *find_specifier_end(char *input)
 {
 	input++;		/* Advance over %. */
@@ -478,7 +478,7 @@ static char *find_specifier_end(char *input)
  * Compare the format specifiers pointed to by *input1 and *input2.
  * Return 1 if they are the same, 0 otherwise.  Advance *input1 and *input2
  * so that they point to the character following the end of the specifier.
-*/
+ */
 static int compare_specifiers(char **input1, char **input2)
 {
 	int same = 0;
@@ -500,7 +500,7 @@ static int compare_specifiers(char **input1, char **input2)
  * Check that two format strings contain the same number of format specifiers,
  * and that the order of specifiers is the same in both strings.
  * Return 1 if the condition holds, 0 if it doesn't.
-*/
+ */
 static int fmt_validate(char *template, char *user)
 {
 	int valid = 1;
@@ -537,7 +537,7 @@ static int fmt_validate(char *template, char *user)
  * Failure conditions:
  * -EINVAL -  Invalid format specifiers in formatted message or illegal index.
  * -ENOMEM -  Unable to allocate memory.
-*/
+ */
 ssize_t spk_msg_set(enum msg_index_t index, char *text, size_t length)
 {
 	int rc = 0;
@@ -573,7 +573,7 @@ ssize_t spk_msg_set(enum msg_index_t index, char *text, size_t length)
 /*
  * Find a message group, given its name.  Return a pointer to the structure
  * if found, or NULL otherwise.
-*/
+ */
 struct msg_group_t *spk_find_msg_group(const char *group_name)
 {
 	struct msg_group_t *group = NULL;
-- 
2.7.4

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

* Re: [PATCH] Corrected some Coding Style Issues
  2017-01-26 17:24 [PATCH] Corrected some Coding Style Issues Daksh Anand
  2017-01-26 17:24 ` Daksh Anand
@ 2017-01-26 17:26 ` Stephen Hemminger
  2017-01-26 17:43 ` Greg Kroah-Hartman
  2 siblings, 0 replies; 4+ messages in thread
From: Stephen Hemminger @ 2017-01-26 17:26 UTC (permalink / raw)
  To: Daksh Anand
  Cc: open list:STAGING SUBSYSTEM, Kirk Reiser, Greg Kroah-Hartman,
	open list:STAGING - SPEAKUP CONSOLE SPEECH DRIVER, open list,
	Julia Lawall, Alison Schofield, Samuel Thibault, Chris Brannon

On Thu, 26 Jan 2017 22:54:30 +0530
Daksh Anand <dakshanand@gmail.com> wrote:

> -	while ((next_percent != NULL) && !found) {
> +	while ((next_percent) && !found) {

Remove unnecessary parenthesis here.

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

* Re: [PATCH] Corrected some Coding Style Issues
  2017-01-26 17:24 [PATCH] Corrected some Coding Style Issues Daksh Anand
  2017-01-26 17:24 ` Daksh Anand
  2017-01-26 17:26 ` Stephen Hemminger
@ 2017-01-26 17:43 ` Greg Kroah-Hartman
  2 siblings, 0 replies; 4+ messages in thread
From: Greg Kroah-Hartman @ 2017-01-26 17:43 UTC (permalink / raw)
  To: Daksh Anand
  Cc: open list:STAGING SUBSYSTEM, Kirk Reiser,
	open list:STAGING - SPEAKUP CONSOLE SPEECH DRIVER, open list,
	Julia Lawall, Alison Schofield, Samuel Thibault, Chris Brannon

On Thu, Jan 26, 2017 at 10:54:30PM +0530, Daksh Anand wrote:
> From: daksh anand <dakshanand@gmail.com>
> 
> Signed-off-by: daksh anand <dakshanand@gmail.com>
> ---
>  drivers/staging/speakup/i18n.c | 18 +++++++++---------
>  1 file changed, 9 insertions(+), 9 deletions(-)

Hi,

This is the friendly patch-bot of Greg Kroah-Hartman.  You have sent him
a patch that has triggered this response.  He used to manually respond
to these common problems, but in order to save his sanity (he kept
writing the same thing over and over, yet to different people), I was
created.  Hopefully you will not take offence and will fix the problem
in your patch and resubmit it so that it can be accepted into the Linux
kernel tree.

You are receiving this message because of the following common error(s)
as indicated below:

- Your patch did many different things all at once, making it difficult
  to review.  All Linux kernel patches need to only do one thing at a
  time.  If you need to do multiple things (such as clean up all coding
  style issues in a file/driver), do it in a sequence of patches, each
  one doing only one thing.  This will make it easier to review the
  patches to ensure that they are correct, and to help alleviate any
  merge issues that larger patches can cause.

- You sent multiple patches, yet no indication of which ones should be
  applied in which order.  Greg could just guess, but if you are
  receiving this email, he guessed wrong and the patches didn't apply.
  Please read the section entitled "The canonical patch format" in the
  kernel file, Documentation/SubmittingPatches for a description of how
  to do this so that Greg has a chance to apply these correctly.

- You did not specify a description of why the patch is needed, or
  possibly, any description at all, in the email body.  Please read the
  section entitled "The canonical patch format" in the kernel file,
  Documentation/SubmittingPatches for what is needed in order to
  properly describe the change.

- You did not write a descriptive Subject: for the patch, allowing Greg,
  and everyone else, to know what this patch is all about.  Please read
  the section entitled "The canonical patch format" in the kernel file,
  Documentation/SubmittingPatches for what a proper Subject: line should
  look like.

If you wish to discuss this problem further, or you have questions about
how to resolve this issue, please feel free to respond to this email and
Greg will reply once he has dug out from the pending patches received
from other developers.

thanks,

greg k-h's patch email bot

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

end of thread, other threads:[~2017-01-26 17:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-26 17:24 [PATCH] Corrected some Coding Style Issues Daksh Anand
2017-01-26 17:24 ` Daksh Anand
2017-01-26 17:26 ` Stephen Hemminger
2017-01-26 17:43 ` Greg Kroah-Hartman

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