diff mbox

[2/3] kconfig: handle P_SYMBOL in print_symbol()

Message ID 20180622192739.5327-3-dirk@gouders.net (mailing list archive)
State New, archived
Headers show

Commit Message

Dirk Gouders June 22, 2018, 7:27 p.m. UTC
Each symbol has a property of type P_SYMBOL since commit
59e89e3ddf8523be (kconfig: save location of config symbols).
Handle those properties in print_symbol().

Further, place a pointer to print_symbol() in the comment above the
list of known property type.

Signed-off-by: Dirk Gouders <dirk@gouders.net>
Cc: Sam Ravnborg <sam@ravnborg.org>
---
 scripts/kconfig/expr.h  | 3 +++
 scripts/kconfig/zconf.y | 4 ++++
 2 files changed, 7 insertions(+)

Comments

Masahiro Yamada June 27, 2018, 4:30 p.m. UTC | #1
2018-06-23 4:27 GMT+09:00 Dirk Gouders <dirk@gouders.net>:
> Each symbol has a property of type P_SYMBOL since commit
> 59e89e3ddf8523be (kconfig: save location of config symbols).
> Handle those properties in print_symbol().
>
> Further, place a pointer to print_symbol() in the comment above the
> list of known property type.
>
> Signed-off-by: Dirk Gouders <dirk@gouders.net>
> Cc: Sam Ravnborg <sam@ravnborg.org>


Applied to linux-kbuild/fixes. Thanks!

> ---
>  scripts/kconfig/expr.h  | 3 +++
>  scripts/kconfig/zconf.y | 4 ++++
>  2 files changed, 7 insertions(+)
>
> diff --git a/scripts/kconfig/expr.h b/scripts/kconfig/expr.h
> index 94a383b21df6..f63b41b0dd49 100644
> --- a/scripts/kconfig/expr.h
> +++ b/scripts/kconfig/expr.h
> @@ -171,6 +171,9 @@ struct symbol {
>   * config BAZ
>   *         int "BAZ Value"
>   *         range 1..255
> + *
> + * Please, also check zconf.y:print_symbol() when modifying the
> + * list of property types!
>   */
>  enum prop_type {
>         P_UNKNOWN,
> diff --git a/scripts/kconfig/zconf.y b/scripts/kconfig/zconf.y
> index 6f9b0aa32a82..525b82c5fb58 100644
> --- a/scripts/kconfig/zconf.y
> +++ b/scripts/kconfig/zconf.y
> @@ -717,6 +717,10 @@ static void print_symbol(FILE *out, struct menu *menu)
>                         print_quoted_string(out, prop->text);
>                         fputc('\n', out);
>                         break;
> +               case P_SYMBOL:
> +                       fputs( "  symbol ", out);
> +                       fprintf(out, "%s\n", prop->sym->name);
> +                       break;
>                 default:
>                         fprintf(out, "  unknown prop %d!\n", prop->type);
>                         break;
> --
> 2.13.6
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/scripts/kconfig/expr.h b/scripts/kconfig/expr.h
index 94a383b21df6..f63b41b0dd49 100644
--- a/scripts/kconfig/expr.h
+++ b/scripts/kconfig/expr.h
@@ -171,6 +171,9 @@  struct symbol {
  * config BAZ
  *         int "BAZ Value"
  *         range 1..255
+ *
+ * Please, also check zconf.y:print_symbol() when modifying the
+ * list of property types!
  */
 enum prop_type {
 	P_UNKNOWN,
diff --git a/scripts/kconfig/zconf.y b/scripts/kconfig/zconf.y
index 6f9b0aa32a82..525b82c5fb58 100644
--- a/scripts/kconfig/zconf.y
+++ b/scripts/kconfig/zconf.y
@@ -717,6 +717,10 @@  static void print_symbol(FILE *out, struct menu *menu)
 			print_quoted_string(out, prop->text);
 			fputc('\n', out);
 			break;
+		case P_SYMBOL:
+			fputs( "  symbol ", out);
+			fprintf(out, "%s\n", prop->sym->name);
+			break;
 		default:
 			fprintf(out, "  unknown prop %d!\n", prop->type);
 			break;