Skip to content

Commit

Permalink
parisc: Change kunmap macro to static inline function
Browse files Browse the repository at this point in the history
Change kunmap macro to static inline function to fix build error
compiling drivers/base/dma-buf.c.

Without the change, the following error can occur:

   CC      drivers/base/dma-buf.o
drivers/base/dma-buf.c: In function 'dma_buf_kunmap':
drivers/base/dma-buf.c:427:46:
error: macro "kunmap" passed 3 arguments, but takes just 1

I believe parisc is the only arch to implement kunmap using a macro.

Signed-off-by: John David Anglin <dave.anglin@bell.net>
Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
Cc: Helge Deller <deller@gmx.de>
Signed-off-by: Helge Deller <deller@gmx.de>
  • Loading branch information
John David Anglin authored and Helge Deller committed Apr 25, 2013
1 parent ca0ad83 commit 87be2f8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion arch/parisc/include/asm/cacheflush.h
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,10 @@ static inline void *kmap(struct page *page)
return page_address(page);
}

#define kunmap(page) kunmap_parisc(page_address(page))
static inline void kunmap(struct page *page)
{
kunmap_parisc(page_address(page));
}

static inline void *kmap_atomic(struct page *page)
{
Expand Down

0 comments on commit 87be2f8

Please sign in to comment.