Commit 2e38662dc6bb679a3917fd7cd1119b22dbe4e723

Authored by Mario Six
Committed by Simon Glass
1 parent 29d11b8838

lib: fdtdec: Fix whitespace style violations

Fix some whitespace-related style violations in fdtdec.c.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Mario Six <mario.six@gdsys.cc>

Showing 1 changed file with 30 additions and 26 deletions Side-by-side Diff

... ... @@ -83,8 +83,9 @@
83 83 }
84 84  
85 85 fdt_addr_t fdtdec_get_addr_size_fixed(const void *blob, int node,
86   - const char *prop_name, int index, int na, int ns,
87   - fdt_size_t *sizep, bool translate)
  86 + const char *prop_name, int index, int na,
  87 + int ns, fdt_size_t *sizep,
  88 + bool translate)
88 89 {
89 90 const fdt32_t *prop, *prop_end;
90 91 const fdt32_t *prop_addr, *prop_size, *prop_after_size;
... ... @@ -138,8 +139,9 @@
138 139 }
139 140  
140 141 fdt_addr_t fdtdec_get_addr_size_auto_parent(const void *blob, int parent,
141   - int node, const char *prop_name, int index, fdt_size_t *sizep,
142   - bool translate)
  142 + int node, const char *prop_name,
  143 + int index, fdt_size_t *sizep,
  144 + bool translate)
143 145 {
144 146 int na, ns;
145 147  
... ... @@ -164,8 +166,9 @@
164 166 }
165 167  
166 168 fdt_addr_t fdtdec_get_addr_size_auto_noparent(const void *blob, int node,
167   - const char *prop_name, int index, fdt_size_t *sizep,
168   - bool translate)
  169 + const char *prop_name, int index,
  170 + fdt_size_t *sizep,
  171 + bool translate)
169 172 {
170 173 int parent;
171 174  
... ... @@ -182,7 +185,7 @@
182 185 }
183 186  
184 187 fdt_addr_t fdtdec_get_addr_size(const void *blob, int node,
185   - const char *prop_name, fdt_size_t *sizep)
  188 + const char *prop_name, fdt_size_t *sizep)
186 189 {
187 190 int ns = sizep ? (sizeof(fdt_size_t) / sizeof(fdt32_t)) : 0;
188 191  
189 192  
... ... @@ -191,15 +194,14 @@
191 194 ns, sizep, false);
192 195 }
193 196  
194   -fdt_addr_t fdtdec_get_addr(const void *blob, int node,
195   - const char *prop_name)
  197 +fdt_addr_t fdtdec_get_addr(const void *blob, int node, const char *prop_name)
196 198 {
197 199 return fdtdec_get_addr_size(blob, node, prop_name, NULL);
198 200 }
199 201  
200 202 #if defined(CONFIG_PCI) && defined(CONFIG_DM_PCI)
201 203 int fdtdec_get_pci_addr(const void *blob, int node, enum fdt_pci_space type,
202   - const char *prop_name, struct fdt_pci_addr *addr)
  204 + const char *prop_name, struct fdt_pci_addr *addr)
203 205 {
204 206 const u32 *cell;
205 207 int len;
... ... @@ -308,7 +310,7 @@
308 310 #endif
309 311  
310 312 uint64_t fdtdec_get_uint64(const void *blob, int node, const char *prop_name,
311   - uint64_t default_val)
  313 + uint64_t default_val)
312 314 {
313 315 const uint64_t *cell64;
314 316 int length;
315 317  
... ... @@ -349,14 +351,13 @@
349 351 return COMPAT_UNKNOWN;
350 352 }
351 353  
352   -int fdtdec_next_compatible(const void *blob, int node,
353   - enum fdt_compat_id id)
  354 +int fdtdec_next_compatible(const void *blob, int node, enum fdt_compat_id id)
354 355 {
355 356 return fdt_node_offset_by_compatible(blob, node, compat_names[id]);
356 357 }
357 358  
358 359 int fdtdec_next_compatible_subnode(const void *blob, int node,
359   - enum fdt_compat_id id, int *depthp)
  360 + enum fdt_compat_id id, int *depthp)
360 361 {
361 362 do {
362 363 node = fdt_next_node(blob, node, depthp);
... ... @@ -370,8 +371,8 @@
370 371 return -FDT_ERR_NOTFOUND;
371 372 }
372 373  
373   -int fdtdec_next_alias(const void *blob, const char *name,
374   - enum fdt_compat_id id, int *upto)
  374 +int fdtdec_next_alias(const void *blob, const char *name, enum fdt_compat_id id,
  375 + int *upto)
375 376 {
376 377 #define MAX_STR_LEN 20
377 378 char str[MAX_STR_LEN + 20];
... ... @@ -393,7 +394,8 @@
393 394 }
394 395  
395 396 int fdtdec_find_aliases_for_id(const void *blob, const char *name,
396   - enum fdt_compat_id id, int *node_list, int maxcount)
  397 + enum fdt_compat_id id, int *node_list,
  398 + int maxcount)
397 399 {
398 400 memset(node_list, '\0', sizeof(*node_list) * maxcount);
399 401  
... ... @@ -402,7 +404,8 @@
402 404  
403 405 /* TODO: Can we tighten this code up a little? */
404 406 int fdtdec_add_aliases_for_id(const void *blob, const char *name,
405   - enum fdt_compat_id id, int *node_list, int maxcount)
  407 + enum fdt_compat_id id, int *node_list,
  408 + int maxcount)
406 409 {
407 410 int name_len = strlen(name);
408 411 int nodes[maxcount];
... ... @@ -429,7 +432,7 @@
429 432 }
430 433 if (node >= 0)
431 434 debug("%s: warning: maxcount exceeded with alias '%s'\n",
432   - __func__, name);
  435 + __func__, name);
433 436  
434 437 /* Now find all the aliases */
435 438 for (offset = fdt_first_property_offset(blob, alias_node);
... ... @@ -452,7 +455,7 @@
452 455 number = simple_strtoul(path + name_len, NULL, 10);
453 456 if (number < 0 || number >= maxcount) {
454 457 debug("%s: warning: alias '%s' is out of range\n",
455   - __func__, path);
  458 + __func__, path);
456 459 continue;
457 460 }
458 461  
... ... @@ -498,7 +501,7 @@
498 501 if (!node_list[i]) {
499 502 for (; j < maxcount; j++)
500 503 if (nodes[j] &&
501   - fdtdec_get_is_enabled(blob, nodes[j]))
  504 + fdtdec_get_is_enabled(blob, nodes[j]))
502 505 break;
503 506  
504 507 /* Have we run out of nodes to add? */
... ... @@ -641,7 +644,8 @@
641 644 * @return pointer to cell, which is only valid if err == 0
642 645 */
643 646 static const void *get_prop_check_min_len(const void *blob, int node,
644   - const char *prop_name, int min_len, int *err)
  647 + const char *prop_name, int min_len,
  648 + int *err)
645 649 {
646 650 const void *cell;
647 651 int len;
... ... @@ -658,7 +662,7 @@
658 662 }
659 663  
660 664 int fdtdec_get_int_array(const void *blob, int node, const char *prop_name,
661   - u32 *array, int count)
  665 + u32 *array, int count)
662 666 {
663 667 const u32 *cell;
664 668 int i, err = 0;
... ... @@ -850,7 +854,7 @@
850 854 }
851 855  
852 856 int fdtdec_get_byte_array(const void *blob, int node, const char *prop_name,
853   - u8 *array, int count)
  857 + u8 *array, int count)
854 858 {
855 859 const u8 *cell;
856 860 int err;
... ... @@ -862,7 +866,7 @@
862 866 }
863 867  
864 868 const u8 *fdtdec_locate_byte_array(const void *blob, int node,
865   - const char *prop_name, int count)
  869 + const char *prop_name, int count)
866 870 {
867 871 const u8 *cell;
868 872 int err;
... ... @@ -874,7 +878,7 @@
874 878 }
875 879  
876 880 int fdtdec_get_config_int(const void *blob, const char *prop_name,
877   - int default_val)
  881 + int default_val)
878 882 {
879 883 int config_node;
880 884