Skip to content

Commit

Permalink
Fix parameter type for memory address in uio_map_virt_to_phys()
Browse files Browse the repository at this point in the history
Parameter for memory address should be 'unsigned'. This change
can also suppress a warning of comparison between signed 'phys'
and unsigned 'map->address' by compiler.
  • Loading branch information
Katsuya Matsubara authored and kfish committed Mar 19, 2010
1 parent ac60776 commit 84b1be6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libuiomux/uiomux.c
Expand Up @@ -597,10 +597,10 @@ uio_map_virt_to_phys(struct uio_map *map, void *virt_address)
}

static void *
uio_map_phys_to_virt(struct uio_map *map, long phys_address)
uio_map_phys_to_virt(struct uio_map *map, unsigned long phys_address)
{
if ((phys_address >= map->address)
&& ((unsigned long) (phys_address - map->address) < map->size))
&& ((phys_address - map->address) < map->size))
return map->iomem + (phys_address - map->address);

return NULL;
Expand Down

0 comments on commit 84b1be6

Please sign in to comment.