uml: bad macro expansion, parameter is member
authorRoel Kluin <roel.kluin@gmail.com>
Tue, 16 Jun 2009 22:33:32 +0000 (15:33 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 17 Jun 2009 02:47:47 +0000 (19:47 -0700)
`ELF_CORE_COPY_REGS(x, y)' will make expansions like:
`(y)[0] = (x)->x.gp[0]' but correct is `(y)[0] = (x)->regs.gp[0]'

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Cc: WANG Cong <amwang@redhat.com>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/um/sys-x86_64/asm/elf.h

index 6e8a9195e95266ff55276e7de633782e970a646b..04b9e87c8dadd38f5f0ebc60ae72b190e63c7920 100644 (file)
@@ -66,28 +66,28 @@ typedef struct user_i387_struct elf_fpregset_t;
        PT_REGS_R15(regs) = 0; \
 } while (0)
 
-#define ELF_CORE_COPY_REGS(pr_reg, regs)               \
-       (pr_reg)[0] = (regs)->regs.gp[0];                       \
-       (pr_reg)[1] = (regs)->regs.gp[1];                       \
-       (pr_reg)[2] = (regs)->regs.gp[2];                       \
-       (pr_reg)[3] = (regs)->regs.gp[3];                       \
-       (pr_reg)[4] = (regs)->regs.gp[4];                       \
-       (pr_reg)[5] = (regs)->regs.gp[5];                       \
-       (pr_reg)[6] = (regs)->regs.gp[6];                       \
-       (pr_reg)[7] = (regs)->regs.gp[7];                       \
-       (pr_reg)[8] = (regs)->regs.gp[8];                       \
-       (pr_reg)[9] = (regs)->regs.gp[9];                       \
-       (pr_reg)[10] = (regs)->regs.gp[10];                     \
-       (pr_reg)[11] = (regs)->regs.gp[11];                     \
-       (pr_reg)[12] = (regs)->regs.gp[12];                     \
-       (pr_reg)[13] = (regs)->regs.gp[13];                     \
-       (pr_reg)[14] = (regs)->regs.gp[14];                     \
-       (pr_reg)[15] = (regs)->regs.gp[15];                     \
-       (pr_reg)[16] = (regs)->regs.gp[16];                     \
-       (pr_reg)[17] = (regs)->regs.gp[17];                     \
-       (pr_reg)[18] = (regs)->regs.gp[18];                     \
-       (pr_reg)[19] = (regs)->regs.gp[19];                     \
-       (pr_reg)[20] = (regs)->regs.gp[20];                     \
+#define ELF_CORE_COPY_REGS(pr_reg, _regs)              \
+       (pr_reg)[0] = (_regs)->regs.gp[0];                      \
+       (pr_reg)[1] = (_regs)->regs.gp[1];                      \
+       (pr_reg)[2] = (_regs)->regs.gp[2];                      \
+       (pr_reg)[3] = (_regs)->regs.gp[3];                      \
+       (pr_reg)[4] = (_regs)->regs.gp[4];                      \
+       (pr_reg)[5] = (_regs)->regs.gp[5];                      \
+       (pr_reg)[6] = (_regs)->regs.gp[6];                      \
+       (pr_reg)[7] = (_regs)->regs.gp[7];                      \
+       (pr_reg)[8] = (_regs)->regs.gp[8];                      \
+       (pr_reg)[9] = (_regs)->regs.gp[9];                      \
+       (pr_reg)[10] = (_regs)->regs.gp[10];                    \
+       (pr_reg)[11] = (_regs)->regs.gp[11];                    \
+       (pr_reg)[12] = (_regs)->regs.gp[12];                    \
+       (pr_reg)[13] = (_regs)->regs.gp[13];                    \
+       (pr_reg)[14] = (_regs)->regs.gp[14];                    \
+       (pr_reg)[15] = (_regs)->regs.gp[15];                    \
+       (pr_reg)[16] = (_regs)->regs.gp[16];                    \
+       (pr_reg)[17] = (_regs)->regs.gp[17];                    \
+       (pr_reg)[18] = (_regs)->regs.gp[18];                    \
+       (pr_reg)[19] = (_regs)->regs.gp[19];                    \
+       (pr_reg)[20] = (_regs)->regs.gp[20];                    \
        (pr_reg)[21] = current->thread.arch.fs;                 \
        (pr_reg)[22] = 0;                                       \
        (pr_reg)[23] = 0;                                       \