linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Masahiro Yamada <yamada.masahiro@socionext.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: "Yann E. MORIN" <yann.morin.1998@free.fr>,
	"Luis R. Rodriguez" <mcgrof@kernel.org>,
	Linux Kbuild mailing list <linux-kbuild@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	kernel-janitors@vger.kernel.org, Michal Marek <mmarek@suse.com>
Subject: Re: [patch] kconfig: Add some missing curly braces
Date: Sun, 17 Jul 2016 00:27:37 +0900	[thread overview]
Message-ID: <CAK7LNAS7EP+rJ2i8jxwRSA=LtXo-tCMkVez6QGg0DjkH7pwJ4w@mail.gmail.com> (raw)
In-Reply-To: <20160713223433.GA20475@mwanda>

2016-07-14 7:34 GMT+09:00 Dan Carpenter <dan.carpenter@oracle.com>:
> There are missing curly braces here so we print some stuff to stderr
> which we hadn't intended.
>
> Fixes: 1c199f2878f6 ('kbuild: document recursive dependency limitation / resolution')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/scripts/kconfig/symbol.c b/scripts/kconfig/symbol.c
> index 2432298..ff0feab 100644
> --- a/scripts/kconfig/symbol.c
> +++ b/scripts/kconfig/symbol.c
> @@ -1127,11 +1127,12 @@ static void sym_check_print_recursive(struct symbol *last_sym)
>                                         break;
>                         }
>                 }
> -               if (stack->sym == last_sym)
> +               if (stack->sym == last_sym) {
>                         fprintf(stderr, "%s:%d:error: recursive dependency detected!\n",
>                                 prop->file->name, prop->lineno);
>                         fprintf(stderr, "For a resolution refer to Documentation/kbuild/kconfig-language.txt\n");
>                         fprintf(stderr, "subsection \"Kconfig recursive dependency limitations\"\n");
> +               }
>                 if (stack->expr) {
>                         fprintf(stderr, "%s:%d:\tsymbol %s %s value contains %s\n",
>                                 prop->file->name, prop->lineno,



Good catch!


BTW, another solution is to concatenate three messages into one.

if (stack->sym == last_sym)
         fprintf(stderr,
                 "%s:%d:error: recursive dependency detected!\n"
                 "For a resolution refer to
Documentation/kbuild/kconfig-language.txt\n"
                 "subsection \"Kconfig recursive dependency limitations\"\n",
                 prop->file->name, prop->lineno);


Personally, I prefer this.
It may be a matter of taste, though.

-- 
Best Regards
Masahiro Yamada

      parent reply	other threads:[~2016-07-16 15:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-13 22:34 [patch] kconfig: Add some missing curly braces Dan Carpenter
2016-07-14  2:10 ` Luis R. Rodriguez
2016-07-16 15:27 ` Masahiro Yamada [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAK7LNAS7EP+rJ2i8jxwRSA=LtXo-tCMkVez6QGg0DjkH7pwJ4w@mail.gmail.com' \
    --to=yamada.masahiro@socionext.com \
    --cc=dan.carpenter@oracle.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mcgrof@kernel.org \
    --cc=mmarek@suse.com \
    --cc=yann.morin.1998@free.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).