* [PATCH 1/1] kbuild: Optimize tests and remove shadowed local variable. @ 2018-09-18 23:00 Leonardo Brás 2018-09-19 7:10 ` Masahiro Yamada 0 siblings, 1 reply; 5+ messages in thread From: Leonardo Brás @ 2018-09-18 23:00 UTC (permalink / raw) To: Masahiro Yamada; +Cc: linux-kernel Removes an unnecessary shadowed local variable (start). Optimize test of isdigit: - If isalpha returns true, isdigit will return false, so no need to test. Signed-off-by: Leonardo Brás <leobras.c@gmail.com> --- scripts/asn1_compiler.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/asn1_compiler.c b/scripts/asn1_compiler.c index c146020fc783..a0056df4e358 100644 --- a/scripts/asn1_compiler.c +++ b/scripts/asn1_compiler.c @@ -413,7 +413,7 @@ static void tokenise(char *buffer, char *end) /* Handle string tokens */ if (isalpha(*p)) { - const char **dir, *start = p; + const char **dir; /* Can be a directive, type name or element * name. Find the end of the name. @@ -454,10 +454,10 @@ static void tokenise(char *buffer, char *end) tokens[tix++].token_type = TOKEN_TYPE_NAME; continue; - } - /* Handle numbers */ - if (isdigit(*p)) { + } else if (isdigit(*p)) { + /* Handle numbers */ + /* Find the end of the number */ q = p + 1; while (q < nl && (isdigit(*q))) -- 2.19.0 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/1] kbuild: Optimize tests and remove shadowed local variable. 2018-09-18 23:00 [PATCH 1/1] kbuild: Optimize tests and remove shadowed local variable Leonardo Brás @ 2018-09-19 7:10 ` Masahiro Yamada 2018-10-05 2:29 ` Leonardo Bras 0 siblings, 1 reply; 5+ messages in thread From: Masahiro Yamada @ 2018-09-19 7:10 UTC (permalink / raw) To: David Howells; +Cc: Linux Kernel Mailing List, Leonardo Brás FW: David Howells 2018-09-19 8:00 GMT+09:00 Leonardo Brás <leobras.c@gmail.com>: > Removes an unnecessary shadowed local variable (start). > Optimize test of isdigit: > - If isalpha returns true, isdigit will return false, so no need to test. > > Signed-off-by: Leonardo Brás <leobras.c@gmail.com> This patch was sent to me, but maybe belong to David's field. David, will you take care of this patch? https://lore.kernel.org/patchwork/patch/988171/ I think the commit subject should be changed kbuild: -> ASN.1: Anyway, this patch looks trivial, FWIW Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com> > --- > scripts/asn1_compiler.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/scripts/asn1_compiler.c b/scripts/asn1_compiler.c > index c146020fc783..a0056df4e358 100644 > --- a/scripts/asn1_compiler.c > +++ b/scripts/asn1_compiler.c > @@ -413,7 +413,7 @@ static void tokenise(char *buffer, char *end) > > /* Handle string tokens */ > if (isalpha(*p)) { > - const char **dir, *start = p; > + const char **dir; > > /* Can be a directive, type name or element > * name. Find the end of the name. > @@ -454,10 +454,10 @@ static void tokenise(char *buffer, char *end) > > tokens[tix++].token_type = TOKEN_TYPE_NAME; > continue; > - } > > - /* Handle numbers */ > - if (isdigit(*p)) { > + } else if (isdigit(*p)) { > + /* Handle numbers */ > + > /* Find the end of the number */ > q = p + 1; > while (q < nl && (isdigit(*q))) > -- > 2.19.0 > -- Best Regards Masahiro Yamada ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/1] kbuild: Optimize tests and remove shadowed local variable. 2018-09-19 7:10 ` Masahiro Yamada @ 2018-10-05 2:29 ` Leonardo Bras 2018-10-06 19:49 ` Masahiro Yamada 0 siblings, 1 reply; 5+ messages in thread From: Leonardo Bras @ 2018-10-05 2:29 UTC (permalink / raw) To: David Howells; +Cc: linux-kernel, Masahiro Yamada Hello David, My name is Leonardo and I am new to kernel development. Is this patch acceptable? Do it need some rework? The change makes sense? Is there a way to better follow the workflow for this patch? Please let me know if it needs anything. Best regards, Leonardo Bras On Wed, Sep 19, 2018 at 4:11 AM Masahiro Yamada <yamada.masahiro@socionext.com> wrote: > > FW: David Howells > > > 2018-09-19 8:00 GMT+09:00 Leonardo Brás <leobras.c@gmail.com>: > > Removes an unnecessary shadowed local variable (start). > > Optimize test of isdigit: > > - If isalpha returns true, isdigit will return false, so no need to test. > > > > Signed-off-by: Leonardo Brás <leobras.c@gmail.com> > > > This patch was sent to me, but maybe belong to David's field. > > David, will you take care of this patch? > > https://lore.kernel.org/patchwork/patch/988171/ > > I think the commit subject should be changed kbuild: -> ASN.1: > > > Anyway, this patch looks trivial, > FWIW > > Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com> > > > > > > > --- > > scripts/asn1_compiler.c | 8 ++++---- > > 1 file changed, 4 insertions(+), 4 deletions(-) > > > > diff --git a/scripts/asn1_compiler.c b/scripts/asn1_compiler.c > > index c146020fc783..a0056df4e358 100644 > > --- a/scripts/asn1_compiler.c > > +++ b/scripts/asn1_compiler.c > > @@ -413,7 +413,7 @@ static void tokenise(char *buffer, char *end) > > > > /* Handle string tokens */ > > if (isalpha(*p)) { > > - const char **dir, *start = p; > > + const char **dir; > > > > /* Can be a directive, type name or element > > * name. Find the end of the name. > > @@ -454,10 +454,10 @@ static void tokenise(char *buffer, char *end) > > > > tokens[tix++].token_type = TOKEN_TYPE_NAME; > > continue; > > - } > > > > - /* Handle numbers */ > > - if (isdigit(*p)) { > > + } else if (isdigit(*p)) { > > + /* Handle numbers */ > > + > > /* Find the end of the number */ > > q = p + 1; > > while (q < nl && (isdigit(*q))) > > -- > > 2.19.0 > > > > > > -- > Best Regards > Masahiro Yamada ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/1] kbuild: Optimize tests and remove shadowed local variable. 2018-10-05 2:29 ` Leonardo Bras @ 2018-10-06 19:49 ` Masahiro Yamada 2018-10-10 1:02 ` Leonardo Bras 0 siblings, 1 reply; 5+ messages in thread From: Masahiro Yamada @ 2018-10-06 19:49 UTC (permalink / raw) To: Leonardo Brás; +Cc: David Howells, Linux Kernel Mailing List Hi Leonardo, David, On Fri, Oct 5, 2018 at 11:32 AM Leonardo Bras <leobras.c@gmail.com> wrote: > > Hello David, > > My name is Leonardo and I am new to kernel development. > > Is this patch acceptable? Do it need some rework? The change makes sense? > Is there a way to better follow the workflow for this patch? > > Please let me know if it needs anything. I thought David would pick this up, but he is not responding. Now, applied to my kbuild tree. Thanks. > > Best regards, > > Leonardo Bras > > On Wed, Sep 19, 2018 at 4:11 AM Masahiro Yamada > <yamada.masahiro@socionext.com> wrote: > > > > FW: David Howells > > > > > > 2018-09-19 8:00 GMT+09:00 Leonardo Brás <leobras.c@gmail.com>: > > > Removes an unnecessary shadowed local variable (start). > > > Optimize test of isdigit: > > > - If isalpha returns true, isdigit will return false, so no need to test. > > > > > > Signed-off-by: Leonardo Brás <leobras.c@gmail.com> > > > > > > This patch was sent to me, but maybe belong to David's field. > > > > David, will you take care of this patch? > > > > https://lore.kernel.org/patchwork/patch/988171/ > > > > I think the commit subject should be changed kbuild: -> ASN.1: > > > > > > Anyway, this patch looks trivial, > > FWIW > > > > Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com> > > > > > > > > > > > > > --- > > > scripts/asn1_compiler.c | 8 ++++---- > > > 1 file changed, 4 insertions(+), 4 deletions(-) > > > > > > diff --git a/scripts/asn1_compiler.c b/scripts/asn1_compiler.c > > > index c146020fc783..a0056df4e358 100644 > > > --- a/scripts/asn1_compiler.c > > > +++ b/scripts/asn1_compiler.c > > > @@ -413,7 +413,7 @@ static void tokenise(char *buffer, char *end) > > > > > > /* Handle string tokens */ > > > if (isalpha(*p)) { > > > - const char **dir, *start = p; > > > + const char **dir; > > > > > > /* Can be a directive, type name or element > > > * name. Find the end of the name. > > > @@ -454,10 +454,10 @@ static void tokenise(char *buffer, char *end) > > > > > > tokens[tix++].token_type = TOKEN_TYPE_NAME; > > > continue; > > > - } > > > > > > - /* Handle numbers */ > > > - if (isdigit(*p)) { > > > + } else if (isdigit(*p)) { > > > + /* Handle numbers */ > > > + > > > /* Find the end of the number */ > > > q = p + 1; > > > while (q < nl && (isdigit(*q))) > > > -- > > > 2.19.0 > > > > > > > > > > > -- > > Best Regards > > Masahiro Yamada -- Best Regards Masahiro Yamada ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/1] kbuild: Optimize tests and remove shadowed local variable. 2018-10-06 19:49 ` Masahiro Yamada @ 2018-10-10 1:02 ` Leonardo Bras 0 siblings, 0 replies; 5+ messages in thread From: Leonardo Bras @ 2018-10-10 1:02 UTC (permalink / raw) To: Masahiro Yamada; +Cc: David Howells, linux-kernel Thank you! Please let me know if it needs any rework! Leonardo Bras On Sat, Oct 6, 2018 at 4:50 PM Masahiro Yamada <yamada.masahiro@socionext.com> wrote: > > Hi Leonardo, David, > > > > On Fri, Oct 5, 2018 at 11:32 AM Leonardo Bras <leobras.c@gmail.com> wrote: > > > > Hello David, > > > > My name is Leonardo and I am new to kernel development. > > > > Is this patch acceptable? Do it need some rework? The change makes sense? > > Is there a way to better follow the workflow for this patch? > > > > Please let me know if it needs anything. > > > I thought David would pick this up, > but he is not responding. > > Now, applied to my kbuild tree. > > > Thanks. > > > > > Best regards, > > > > Leonardo Bras > > > > On Wed, Sep 19, 2018 at 4:11 AM Masahiro Yamada > > <yamada.masahiro@socionext.com> wrote: > > > > > > FW: David Howells > > > > > > > > > 2018-09-19 8:00 GMT+09:00 Leonardo Brás <leobras.c@gmail.com>: > > > > Removes an unnecessary shadowed local variable (start). > > > > Optimize test of isdigit: > > > > - If isalpha returns true, isdigit will return false, so no need to test. > > > > > > > > Signed-off-by: Leonardo Brás <leobras.c@gmail.com> > > > > > > > > > This patch was sent to me, but maybe belong to David's field. > > > > > > David, will you take care of this patch? > > > > > > https://lore.kernel.org/patchwork/patch/988171/ > > > > > > I think the commit subject should be changed kbuild: -> ASN.1: > > > > > > > > > Anyway, this patch looks trivial, > > > FWIW > > > > > > Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com> > > > > > > > > > > > > > > > > > > > --- > > > > scripts/asn1_compiler.c | 8 ++++---- > > > > 1 file changed, 4 insertions(+), 4 deletions(-) > > > > > > > > diff --git a/scripts/asn1_compiler.c b/scripts/asn1_compiler.c > > > > index c146020fc783..a0056df4e358 100644 > > > > --- a/scripts/asn1_compiler.c > > > > +++ b/scripts/asn1_compiler.c > > > > @@ -413,7 +413,7 @@ static void tokenise(char *buffer, char *end) > > > > > > > > /* Handle string tokens */ > > > > if (isalpha(*p)) { > > > > - const char **dir, *start = p; > > > > + const char **dir; > > > > > > > > /* Can be a directive, type name or element > > > > * name. Find the end of the name. > > > > @@ -454,10 +454,10 @@ static void tokenise(char *buffer, char *end) > > > > > > > > tokens[tix++].token_type = TOKEN_TYPE_NAME; > > > > continue; > > > > - } > > > > > > > > - /* Handle numbers */ > > > > - if (isdigit(*p)) { > > > > + } else if (isdigit(*p)) { > > > > + /* Handle numbers */ > > > > + > > > > /* Find the end of the number */ > > > > q = p + 1; > > > > while (q < nl && (isdigit(*q))) > > > > -- > > > > 2.19.0 > > > > > > > > > > > > > > > > -- > > > Best Regards > > > Masahiro Yamada > > > > -- > Best Regards > Masahiro Yamada ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-10-10 1:03 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2018-09-18 23:00 [PATCH 1/1] kbuild: Optimize tests and remove shadowed local variable Leonardo Brás 2018-09-19 7:10 ` Masahiro Yamada 2018-10-05 2:29 ` Leonardo Bras 2018-10-06 19:49 ` Masahiro Yamada 2018-10-10 1:02 ` Leonardo Bras
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).