Re: [PATCH v2] checks: Change node-name check to match devicetree spec

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



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@xxxxxxxxxx>

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: signature.asc
Description: PGP signature


[Index of Archives]     [Device Tree]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux