xen/dts: Use unsigned int for MMIO and IRQ index

There is no reason to use signed integer for an index.

Signed-off-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
This commit is contained in:
Julien Grall authored and Ian Campbell committed 2015-04-02 10:42:34 +01:00
1 parent fda2386ffc
commit c854618e56
2 files changed
+10 -8

No files matched your search

+6 -5
View File
@@ -496,7 +496,7 @@ static const struct dt_bus *dt_match_bus(const struct dt_device_node *np)
}
static const __be32 *dt_get_address(const struct dt_device_node *dev,
int index, u64 *size,
unsigned int index, u64 *size,
unsigned int *flags)
{
const __be32 *prop;
@@ -683,7 +683,7 @@ bail:
}
/* dt_device_address - Translate device tree address and return it */
int dt_device_get_address(const struct dt_device_node *dev, int index,
int dt_device_get_address(const struct dt_device_node *dev, unsigned int index,
u64 *addr, u64 *size)
{
const __be32 *addrp;
@@ -1006,7 +1006,8 @@ fail:
return -EINVAL;
}
int dt_device_get_raw_irq(const struct dt_device_node *device, int index,
int dt_device_get_raw_irq(const struct dt_device_node *device,
unsigned int index,
struct dt_raw_irq *out_irq)
{
const struct dt_device_node *p;
@@ -1014,7 +1015,7 @@ int dt_device_get_raw_irq(const struct dt_device_node *device, int index,
u32 intsize, intlen;
int res = -EINVAL;
dt_dprintk("dt_device_get_raw_irq: dev=%s, index=%d\n",
dt_dprintk("dt_device_get_raw_irq: dev=%s, index=%u\n",
device->full_name, index);
/* Get the interrupts property */
@@ -1071,7 +1072,7 @@ int dt_irq_translate(const struct dt_raw_irq *raw,
&out_irq->irq, &out_irq->type);
}
int dt_device_get_irq(const struct dt_device_node *device, int index,
int dt_device_get_irq(const struct dt_device_node *device, unsigned int index,
struct dt_irq *out_irq)
{
struct dt_raw_irq raw;
+4 -3
View File
@@ -474,7 +474,7 @@ const struct dt_device_node *dt_get_parent(const struct dt_device_node *node);
* This function resolves an address, walking the tree, for a give
* device-tree node. It returns 0 on success.
*/
int dt_device_get_address(const struct dt_device_node *dev, int index,
int dt_device_get_address(const struct dt_device_node *dev, unsigned int index,
u64 *addr, u64 *size);
/**
@@ -504,7 +504,7 @@ unsigned int dt_number_of_address(const struct dt_device_node *device);
* This function resolves an interrupt, walking the tree, for a given
* device-tree node. It's the high level pendant to dt_device_get_raw_irq().
*/
int dt_device_get_irq(const struct dt_device_node *device, int index,
int dt_device_get_irq(const struct dt_device_node *device, unsigned int index,
struct dt_irq *irq);
/**
@@ -516,7 +516,8 @@ int dt_device_get_irq(const struct dt_device_node *device, int index,
* This function resolves an interrupt for a device, no translation is
* made. dt_irq_translate can be called after.
*/
int dt_device_get_raw_irq(const struct dt_device_node *device, int index,
int dt_device_get_raw_irq(const struct dt_device_node *device,
unsigned int index,
struct dt_raw_irq *irq);
/**
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.