]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ipc: convert prepare_copy() from macro to function
authorStanislav Kinsbursky <skinsbursky@parallels.com>
Thu, 15 Nov 2012 02:38:44 +0000 (13:38 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 15 Nov 2012 06:32:17 +0000 (17:32 +1100)
This code works if CONFIG_CHECKPOINT_RESTORE is disabled.

Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: James Morris <jmorris@namei.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
ipc/msg.c

index 7a20536c3a50698c4c88f5ae15e86003df6f75c3..d1bd7789c296d6f8e02be1380829f3e43b972921 100644 (file)
--- a/ipc/msg.c
+++ b/ipc/msg.c
@@ -803,8 +803,15 @@ static inline void free_copy(struct msg_msg *copy)
                free_msg(copy);
 }
 #else
-#define prepare_copy(buf, sz, msgflg, msgtyp, copy_nr) ERR_PTR(-ENOSYS)
 #define fill_copy(copy_nr, msg_nr, msg, copy)          NULL
+
+static inline struct msg_msg *prepare_copy(void __user *buf, size_t bufsz,
+                                          int msgflg, long *msgtyp,
+                                          unsigned long *copy_number)
+{
+       return ERR_PTR(-ENOSYS);
+}
+
 static inline void free_copy(struct msg_msg *copy)
 {
 }
@@ -819,7 +826,7 @@ long do_msgrcv(int msqid, void __user *buf, size_t bufsz, long msgtyp,
        int mode;
        struct ipc_namespace *ns;
        struct msg_msg *copy = NULL;
-       unsigned long __maybe_unused copy_number;
+       unsigned long __maybe_unused copy_number = 0;
 
        if (msqid < 0 || (long) bufsz < 0)
                return -EINVAL;