Commit d69b7c27 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] ppc64: Fix some PPC64 compile warnings

Fix some warnings in the ppc64 build.

Also declare a couple of AIO functions in aio.h rather than aio.c They are
needed for 32-bit emulation support.
parent 2b748116
......@@ -32,6 +32,7 @@
#include <linux/shm.h>
#include <linux/slab.h>
#include <linux/uio.h>
#include <linux/aio.h>
#include <linux/nfs_fs.h>
#include <linux/smb_fs.h>
#include <linux/smb_mount.h>
......@@ -2717,7 +2718,7 @@ long sys32_io_submit(aio_context_t ctx_id, u32 number, u32 *iocbpp)
struct iocb tmp;
u32 *user_iocb;
if (unlikely(__get_user(user_iocb, iocbpp + i))) {
if (unlikely(__get_user((u32)(long)user_iocb, iocbpp + i))) {
ret = -EFAULT;
break;
}
......@@ -2727,7 +2728,7 @@ long sys32_io_submit(aio_context_t ctx_id, u32 number, u32 *iocbpp)
break;
}
ret = io_submit_one(ctx, user_iocb, &tmp);
ret = io_submit_one(ctx, (struct iocb *)user_iocb, &tmp);
if (ret)
break;
}
......
......@@ -147,6 +147,9 @@ extern int FASTCALL(aio_complete(struct kiocb *iocb, long res, long res2));
extern void FASTCALL(__put_ioctx(struct kioctx *ctx));
struct mm_struct;
extern void FASTCALL(exit_aio(struct mm_struct *mm));
extern struct kioctx *lookup_ioctx(unsigned long ctx_id);
extern int FASTCALL(io_submit_one(struct kioctx *ctx,
struct iocb *user_iocb, struct iocb *iocb));
/* semi private, but used by the 32bit emulations: */
struct kioctx *lookup_ioctx(unsigned long ctx_id);
......
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