Commit 539cfeb0 authored by Anton Blanchard's avatar Anton Blanchard

ppc64: fix compiler warnings

parent d31f3431
......@@ -7,7 +7,6 @@
* 2 of the License, or (at your option) any later version.
*/
#define __KERNEL__
#include <asm/types.h>
#include <asm/page.h>
#include <stddef.h>
......
......@@ -107,19 +107,6 @@ static long test_tce_range( struct TceTable *,
long tcenum,
unsigned order );
static unsigned fill_scatterlist_sg(struct scatterlist *sg, int nents,
dma_addr_t dma_addr,
unsigned long numTces );
static unsigned long num_tces_sg( struct scatterlist *sg,
int nents );
static dma_addr_t create_tces_sg( struct TceTable *tbl,
struct scatterlist *sg,
int nents,
unsigned numTces,
int direction );
static void getTceTableParmsiSeries(struct iSeries_Device_Node* DevNode,
struct TceTable *tce_table_parms );
......@@ -1426,8 +1413,7 @@ int pci_map_sg(struct pci_dev *pdev, struct scatterlist *sglist, int nelems,
int i;
for (i = 0; i < nelems; i++) {
unsigned long vaddr = (page_address(sglist->page) +
sglist->offset);
void *vaddr = page_address(sglist->page) + sglist->offset;
sglist->dma_address = pci_map_single(pdev, vaddr,
sglist->length,
......
......@@ -28,6 +28,8 @@
#include <linux/unistd.h>
#include <linux/stddef.h>
#include <linux/elf.h>
#include <linux/tty.h>
#include <linux/binfmts.h>
#include <asm/ppc32.h>
#include <asm/sigcontext.h>
#include <asm/ucontext.h>
......
......@@ -43,10 +43,12 @@
#include <linux/personality.h>
#include <linux/stat.h>
#include <linux/filter.h>
#include <linux/tty.h>
#include <linux/binfmts.h>
#include <linux/elf.h>
#include <asm/types.h>
#include <asm/ipc.h>
#include <asm/uaccess.h>
#include <linux/elf.h>
#include <asm/ppc32.h>
#include <asm/ppcdebug.h>
#include <asm/unistd.h>
......
......@@ -157,7 +157,7 @@ ioremap(unsigned long addr, unsigned long size)
#else
if(mem_init_done && (addr >> 60UL)) {
if (IS_EEH_TOKEN_DISABLED(addr))
return IO_TOKEN_TO_ADDR(addr);
return (void *)IO_TOKEN_TO_ADDR(addr);
return (void*)addr; /* already mapped address or EEH token. */
}
return __ioremap(addr, size, _PAGE_NO_CACHE);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment