summaryrefslogtreecommitdiff
path: root/sim/common/hw-properties.c
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2011-03-15 03:16:17 +0000
committerMike Frysinger <vapier@gentoo.org>2011-03-15 03:16:17 +0000
commit028f6515424e832ee10a1e4cb1f96ea241e2acae (patch)
treec8ce68621a3ed2425b8dde4e2f523cbae0bf11fe /sim/common/hw-properties.c
parent7f35e991971df570411a2688b948cd72adb4cf90 (diff)
downloadbinutils-gdb-028f6515424e832ee10a1e4cb1f96ea241e2acae.tar.gz
sim: common: trim trailing whitespace
Diffstat (limited to 'sim/common/hw-properties.c')
-rw-r--r--sim/common/hw-properties.c60
1 files changed, 30 insertions, 30 deletions
diff --git a/sim/common/hw-properties.c b/sim/common/hw-properties.c
index 9da3d9f5f63..f253ec0367c 100644
--- a/sim/common/hw-properties.c
+++ b/sim/common/hw-properties.c
@@ -85,7 +85,7 @@ hw_add_property (struct hw *me,
{
struct hw_property_data *new_entry = NULL;
struct hw_property *new_value = NULL;
-
+
/* find the list end */
struct hw_property_data **insertion_point = &me->properties_of_hw;
while (*insertion_point != NULL)
@@ -94,7 +94,7 @@ hw_add_property (struct hw *me,
return;
insertion_point = &(*insertion_point)->next;
}
-
+
/* create a new value */
new_value = HW_ZALLOC (me, struct hw_property);
new_value->name = (char *) strdup (property);
@@ -109,7 +109,7 @@ hw_add_property (struct hw *me,
new_value->owner = me;
new_value->original = original;
new_value->disposition = disposition;
-
+
/* insert the value into the list */
new_entry = HW_ZALLOC (me, struct hw_property_data);
*insertion_point = new_entry;
@@ -440,7 +440,7 @@ hw_set_ihandle_property (struct hw *me,
cells = H2BE_cell (hw_instance_to_external (ihandle));
hw_set_property (me, property, ihandle_property,
&cells, sizeof (cells));
-
+
}
#endif
@@ -509,7 +509,7 @@ hw_find_integer_array_property (struct hw *me,
int sizeof_integer = sizeof (*integer);
signed_cell *cell;
HW_TRACE ((me, "hw_find_integer(property=%s)\n", property));
-
+
/* check things sane */
node = hw_find_property (me, property);
if (node == NULL)
@@ -521,11 +521,11 @@ hw_find_integer_array_property (struct hw *me,
hw_abort (me, "property \"%s\" contains an incomplete number of cells", property);
if (node->sizeof_array <= sizeof_integer * index)
return 0;
-
+
/* Find and convert the value */
cell = ((signed_cell*)node->array) + index;
*integer = BE2H_cell (*cell);
-
+
return node->sizeof_array / sizeof_integer;
}
@@ -584,7 +584,7 @@ hw_add_range_array_property (struct hw *me,
unsigned_cell *cells = hw_zalloc (me, sizeof_cells);
unsigned_cell *cell;
int i;
-
+
/* copy the property elements over */
cell = cells;
for (i = 0; i < nr_ranges; i++)
@@ -594,20 +594,20 @@ hw_add_range_array_property (struct hw *me,
cell = unit_address_to_cells (&range->child_address, cell,
hw_unit_nr_address_cells (me));
/* copy the parent address */
- cell = unit_address_to_cells (&range->parent_address, cell,
+ cell = unit_address_to_cells (&range->parent_address, cell,
hw_unit_nr_address_cells (hw_parent (me)));
/* copy the size */
- cell = unit_address_to_cells (&range->size, cell,
+ cell = unit_address_to_cells (&range->size, cell,
hw_unit_nr_size_cells (me));
}
ASSERT (cell == &cells[nr_range_property_cells (me, nr_ranges)]);
-
+
/* add it */
hw_add_property (me, property, range_array_property,
cells, sizeof_cells,
cells, sizeof_cells,
NULL, permenant_object);
-
+
hw_free (me, cells);
}
@@ -621,38 +621,38 @@ hw_find_range_array_property (struct hw *me,
unsigned sizeof_entry = (nr_range_property_cells (me, 1)
* sizeof (unsigned_cell));
const unsigned_cell *cells;
-
+
/* locate the property */
node = hw_find_property (me, property);
if (node == NULL)
hw_abort (me, "property \"%s\" not found", property);
if (node->type != range_array_property)
hw_abort (me, "property \"%s\" of wrong type (range array)", property);
-
+
/* aligned ? */
if ((node->sizeof_array % sizeof_entry) != 0)
hw_abort (me, "property \"%s\" contains an incomplete number of entries",
property);
-
+
/* within bounds? */
if (node->sizeof_array < sizeof_entry * (index + 1))
return 0;
-
+
/* find the range of interest */
cells = (unsigned_cell*)((char*)node->array + sizeof_entry * index);
-
+
/* copy the child address out - converting as we go */
cells = cells_to_unit_address (cells, &range->child_address,
hw_unit_nr_address_cells (me));
-
+
/* copy the parent address out - converting as we go */
cells = cells_to_unit_address (cells, &range->parent_address,
hw_unit_nr_address_cells (hw_parent (me)));
-
+
/* copy the size - converting as we go */
cells = cells_to_unit_address (cells, &range->size,
hw_unit_nr_size_cells (me));
-
+
return node->sizeof_array / sizeof_entry;
}
@@ -677,7 +677,7 @@ hw_add_reg_array_property (struct hw *me,
unsigned_cell *cells = hw_zalloc (me, sizeof_cells);
unsigned_cell *cell;
int i;
-
+
/* copy the property elements over */
cell = cells;
for (i = 0; i < nr_regs; i++)
@@ -691,13 +691,13 @@ hw_add_reg_array_property (struct hw *me,
hw_unit_nr_size_cells (hw_parent (me)));
}
ASSERT (cell == &cells[nr_reg_property_cells (me, nr_regs)]);
-
+
/* add it */
hw_add_property (me, property, reg_array_property,
cells, sizeof_cells,
cells, sizeof_cells,
NULL, permenant_object);
-
+
hw_free (me, cells);
}
@@ -711,34 +711,34 @@ hw_find_reg_array_property (struct hw *me,
unsigned sizeof_entry = (nr_reg_property_cells (me, 1)
* sizeof (unsigned_cell));
const unsigned_cell *cells;
-
+
/* locate the property */
node = hw_find_property (me, property);
if (node == NULL)
hw_abort (me, "property \"%s\" not found", property);
if (node->type != reg_array_property)
hw_abort (me, "property \"%s\" of wrong type (reg array)", property);
-
+
/* aligned ? */
if ((node->sizeof_array % sizeof_entry) != 0)
hw_abort (me, "property \"%s\" contains an incomplete number of entries",
property);
-
+
/* within bounds? */
if (node->sizeof_array < sizeof_entry * (index + 1))
return 0;
-
+
/* find the range of interest */
cells = (unsigned_cell*)((char*)node->array + sizeof_entry * index);
-
+
/* copy the address out - converting as we go */
cells = cells_to_unit_address (cells, &reg->address,
hw_unit_nr_address_cells (hw_parent (me)));
-
+
/* copy the size out - converting as we go */
cells = cells_to_unit_address (cells, &reg->size,
hw_unit_nr_size_cells (hw_parent (me)));
-
+
return node->sizeof_array / sizeof_entry;
}