devicetree-compiler.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Gibson <david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org>
To: Kumar Gala <kumar.gala-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	rob.herring-5wv7dgnIgG8@public.gmane.org
Subject: Re: [PATCH v2] checks: Change node-name check to match devicetree spec
Date: Wed, 10 Feb 2021 16:29:32 +1100	[thread overview]
Message-ID: <20210210052932.GL4450@yekko.fritz.box> (raw)
In-Reply-To: <20210209184641.63052-1-kumar.gala-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 2125 bytes --]

On Tue, Feb 09, 2021 at 12:46:41PM -0600, Kumar Gala wrote:
> The devicetree spec limits the valid character set to:
>   A-Z
>   a-z
>   0-9
>   ,._+-
> 
> while property can additionally have '?#'.  Change the check to match
> the spec.
> 
> Signed-off-by: Kumar Gala <kumar.gala-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>

Applied, thanks.

> ---
>  checks.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/checks.c b/checks.c
> index 17cb689..48e7fe9 100644
> --- a/checks.c
> +++ b/checks.c
> @@ -297,7 +297,8 @@ ERROR(duplicate_property_names, check_duplicate_property_names, NULL);
>  #define LOWERCASE	"abcdefghijklmnopqrstuvwxyz"
>  #define UPPERCASE	"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
>  #define DIGITS		"0123456789"
> -#define PROPNODECHARS	LOWERCASE UPPERCASE DIGITS ",._+*#?-"
> +#define NODECHARS	LOWERCASE UPPERCASE DIGITS ",._+-@"
> +#define PROPCHARS	LOWERCASE UPPERCASE DIGITS ",._+*#?-"
>  #define PROPNODECHARSSTRICT	LOWERCASE UPPERCASE DIGITS ",-"
>  
>  static void check_node_name_chars(struct check *c, struct dt_info *dti,
> @@ -309,7 +310,7 @@ static void check_node_name_chars(struct check *c, struct dt_info *dti,
>  		FAIL(c, dti, node, "Bad character '%c' in node name",
>  		     node->name[n]);
>  }
> -ERROR(node_name_chars, check_node_name_chars, PROPNODECHARS "@");
> +ERROR(node_name_chars, check_node_name_chars, NODECHARS);
>  
>  static void check_node_name_chars_strict(struct check *c, struct dt_info *dti,
>  					 struct node *node)
> @@ -370,7 +371,7 @@ static void check_property_name_chars(struct check *c, struct dt_info *dti,
>  				  prop->name[n]);
>  	}
>  }
> -ERROR(property_name_chars, check_property_name_chars, PROPNODECHARS);
> +ERROR(property_name_chars, check_property_name_chars, PROPCHARS);
>  
>  static void check_property_name_chars_strict(struct check *c,
>  					     struct dt_info *dti,

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

      parent reply	other threads:[~2021-02-10  5:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-09 17:24 [PATCH] checks: Change node-name check to match devicetree spec Kumar Gala
     [not found] ` <20210209172451.56967-1-kumar.gala-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2021-02-09 18:31   ` Rob Herring
2021-02-09 18:38   ` [PATCH v2] checks: Error on node-name and property name being the same Kumar Gala
2021-02-09 18:46   ` [PATCH v2] checks: Change node-name check to match devicetree spec Kumar Gala
     [not found]     ` <20210209184641.63052-1-kumar.gala-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2021-02-10  5:29       ` David Gibson [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=20210210052932.GL4450@yekko.fritz.box \
    --to=david-xt8fgy+axnrb3ne2bgzf6laj5h9x9tb+@public.gmane.org \
    --cc=devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=kumar.gala-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=rob.herring-5wv7dgnIgG8@public.gmane.org \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).