[PATCH 6/8] lib: fwts_mmap.c: add more comments
IvanHu
ivan.hu at canonical.com
Fri Jun 1 01:41:58 UTC 2012
On 05/25/2012 06:40 PM, Colin King wrote:
> From: Colin Ian King<colin.king at canonical.com>
>
> Signed-off-by: Colin Ian King<colin.king at canonical.com>
> ---
> src/lib/src/fwts_mmap.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/src/lib/src/fwts_mmap.c b/src/lib/src/fwts_mmap.c
> index fd119d4..c47960d 100644
> --- a/src/lib/src/fwts_mmap.c
> +++ b/src/lib/src/fwts_mmap.c
> @@ -26,6 +26,11 @@
>
> #define PAGE_SIZE 4096
>
> +/*
> + * fwts_mmap()
> + * Try and map physical memory from offset address 'start' and length
> + * 'size'. Return either the address or FWTS_MAP_FAILED if failed to mmap.
> + */
> void *fwts_mmap(const off_t start, const size_t size)
> {
> int fd;
> @@ -52,6 +57,10 @@ void *fwts_mmap(const off_t start, const size_t size)
> return ret;
> }
>
> +/*
> + * fwts_munmap()
> + * Unmap memory mapped wuth fwts_mmap. Needs the mmap'd address and size.
> + */
> int fwts_munmap(void *mem, const size_t size)
> {
> int page_size;
Acked-by: Ivan Hu<ivan.hu at canonical.com>
More information about the fwts-devel
mailing list