xen: dt: Replace u64 with uint64_t as the callback function parameters for dt_for_each_range()

In the callback functions invoked by dt_for_each_range() ie handle_pci_range(),
map_range_to_domain(), 'u64' should be replaced with 'uint64_t' as the data type
for the parameters. The reason being Xen coding style mentions that u32/u64
should be avoided.

Also dt_for_each_range() invokes the callback functions with 'uint64_t'
arguments. Thus, is_bar_valid() needs to change the parameter types accordingly.

Signed-off-by: Ayan Kumar Halder <ayan.kumar.halder@amd.com>
Reviewed-by: Michal Orzel <michal.orzel@amd.com>
Acked-by: Julien Grall <jgrall@amazon.com>
This commit is contained in:
Ayan Kumar Halder authored and Julien Grall committed 2023-05-26 13:13:19 +01:00
1 parent 133f6df947
commit f54dd5b53e
5 files changed
+7 -7

No files matched your search

+2 -2
View File
@@ -1637,7 +1637,7 @@ out:
}
static int __init handle_pci_range(const struct dt_device_node *dev,
u64 addr, u64 len, void *data)
uint64_t addr, uint64_t len, void *data)
{
struct rangeset *mem_holes = data;
paddr_t start, end;
@@ -2334,7 +2334,7 @@ static int __init map_dt_irq_to_domain(const struct dt_device_node *dev,
}
int __init map_range_to_domain(const struct dt_device_node *dev,
u64 addr, u64 len, void *data)
uint64_t addr, uint64_t len, void *data)
{
struct map_range_data *mr_data = data;
struct domain *d = mr_data->d;
+1 -1
View File
@@ -166,7 +166,7 @@ u32 device_tree_get_u32(const void *fdt, int node,
const char *prop_name, u32 dflt);
int map_range_to_domain(const struct dt_device_node *dev,
u64 addr, u64 len, void *data);
uint64_t addr, uint64_t len, void *data);
extern DEFINE_BOOT_PAGE_TABLE(boot_pgtable);
+1 -1
View File
@@ -381,7 +381,7 @@ int __init pci_host_bridge_mappings(struct domain *d)
* right place for alignment check.
*/
static int is_bar_valid(const struct dt_device_node *dev,
paddr_t addr, paddr_t len, void *data)
uint64_t addr, uint64_t len, void *data)
{
struct pdev_bar_check *bar_data = data;
paddr_t s = bar_data->start;
+2 -2
View File
@@ -994,7 +994,7 @@ int dt_device_get_paddr(const struct dt_device_node *dev, unsigned int index,
int dt_for_each_range(const struct dt_device_node *dev,
int (*cb)(const struct dt_device_node *,
u64 addr, u64 length,
uint64_t addr, uint64_t length,
void *),
void *data)
{
@@ -1057,7 +1057,7 @@ int dt_for_each_range(const struct dt_device_node *dev,
for ( ; rlen >= rone; rlen -= rone, ranges += rone )
{
u64 a, s;
uint64_t a, s;
int ret;
memcpy(addr, ranges + na, 4 * pna);
+1 -1
View File
@@ -681,7 +681,7 @@ int dt_for_each_irq_map(const struct dt_device_node *dev,
*/
int dt_for_each_range(const struct dt_device_node *dev,
int (*cb)(const struct dt_device_node *,
u64 addr, u64 length,
uint64_t addr, uint64_t length,
void *),
void *data);
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.