scripts/dtc: Fix errors in yamltree.c
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/1 scripts/dtc: Fix errors in yamltree.c
The following checkpatch errors are removed:
ERROR: "(foo*)" should be "(foo *)"
Signed-off-by Jie Shi <[email protected]>
--- scripts/dtc/yamltree.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
scripts/dtc/yamltree.c +6 -6
@@ -57,7 +57,7 @@ static void yaml_propval_int(yaml_emitter_t *emitter, struct marker *markers,switch (width) {case 1 : -sprintf (buf,"0x%" PRIx8, *(uint8_t *)(data + off)); +sprintf (buf,"0x%" PRIx8, *(uint8_t *)(data + off));break ;case 2 :sprintf (buf,"0x%" PRIx16,dtb_ld16 (data + off));
@@ -80,11 +80,11 @@ static void yaml_propval_int(yaml_emitter_t *emitter, struct marker *markers,if (is_phandle)yaml_scalar_event_initialize (&event,NULL , - (yaml_char_t *)"!phandle" , (yaml_char_t *)buf, + (yaml_char_t *)"!phandle" , (yaml_char_t *)buf,strlen (buf),0 ,0 ,YAML_PLAIN_SCALAR_STYLE );else yaml_scalar_event_initialize (&event,NULL , - (yaml_char_t *)YAML_INT_TAG , (yaml_char_t *)buf, + (yaml_char_t *)YAML_INT_TAG , (yaml_char_t *)buf,strlen (buf),1 ,1 ,YAML_PLAIN_SCALAR_STYLE );yaml_emitter_emit_or_die (emitter, &event); }
@@ -119,7 +119,7 @@ static void yaml_propval(yaml_emitter_t *emitter, struct property *prop)/* Emit the property name */ yaml_scalar_event_initialize (&event,NULL , - (yaml_char_t *)YAML_STR_TAG , (yaml_char_t *)prop->name, + (yaml_char_t *)YAML_STR_TAG , (yaml_char_t *)prop->name,strlen (prop->name),1 ,1 ,YAML_PLAIN_SCALAR_STYLE );yaml_emitter_emit_or_die (emitter, &event);
@@ -127,7 +127,7 @@ static void yaml_propval(yaml_emitter_t *emitter, struct property *prop)if (len ==0 ) {yaml_scalar_event_initialize (&event,NULL , (yaml_char_t *)YAML_BOOL_TAG , - (yaml_char_t *)"true" , + (yaml_char_t *)"true" ,strlen ("true" ),1 ,0 ,YAML_PLAIN_SCALAR_STYLE );yaml_emitter_emit_or_die (emitter, &event);return ;
@@ -194,7 +194,7 @@ static void yaml_tree(struct node *tree, yaml_emitter_t *emitter)/* Loop over all the children, emitting them into the map */ for_each_child (tree, child) {yaml_scalar_event_initialize (&event,NULL , - (yaml_char_t *)YAML_STR_TAG , (yaml_char_t *)child->name, + (yaml_char_t *)YAML_STR_TAG , (yaml_char_t *)child->name,strlen (child->name),1 ,0 ,YAML_PLAIN_SCALAR_STYLE );yaml_emitter_emit_or_die (emitter, &event);yaml_tree (child, emitter);
Quoted 8 lines · On Mon, Jul 17, 2023 at 7:38 PM <[email protected]> wrote:
The following checkpatch errors are removed:
ERROR: "(foo*)" should be "(foo *)"Signed-off-by Jie Shi <[email protected]>--- scripts/dtc/yamltree.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
This is a copy of upstream dtc imported as-is into the kernel. If you want to make changes, you have to do them on the upstream dtc.
The YAML support is likely going to be removed, so I wouldn't bother with style fixes.
Rob