mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Amerigo Wang <xiyou.wangcong@gmail.com>
To: Parag Warudkar <parag.lkml@gmail.com>
Cc: linux-kernel@vger.kernel.org, torvalds@linux-foundation.org,
	akpm@linux-foundation.org, teawater@gmail.com, mingo@elte.hu,
	tj@kernel.org, xiyou.wangcong@gmail.com
Subject: Re: [PATCH] elfcore.h : Fix UML build breakage
Date: Wed, 8 Jul 2009 12:30:36 +0800	[thread overview]
Message-ID: <20090708043036.GA5917@cr0.nay.redhat.com> (raw)
In-Reply-To: <alpine.DEB.2.00.0907072226140.24195@parag-desktop>

On Tue, Jul 07, 2009 at 10:41:50PM -0400, Parag Warudkar wrote:
>Commit a65e7bfcd74e4c0939f235d2bf9f48ddb3a57991 breaks UML build with 
>below error - 
>
>In file included from fs/proc/kcore.c:17:
>include/linux/elfcore.h: In function ‘elf_core_copy_task_regs’:
>include/linux/elfcore.h:129: error: implicit declaration of function 
>‘task_pt_regs’
>
>Fix this by restoring the previous behavior of returning 0 for all arches 
>like UML that don't define task_pt_regs.

Good catch!

>
>Signed-off-by: Parag Warudkar <parag.lkml@gmail.com>
>
>diff --git a/include/linux/elfcore.h b/include/linux/elfcore.h
>index 03ec167..28f722e 100644
>--- a/include/linux/elfcore.h
>+++ b/include/linux/elfcore.h
>@@ -125,7 +125,7 @@ static inline int elf_core_copy_task_regs(struct task_struct *t, elf_gregset_t*
> #ifdef ELF_CORE_COPY_TASK_REGS
> 	
> 	return ELF_CORE_COPY_TASK_REGS(t, elfregs);
>-#else
>+#elif defined task_pt_regs
> 	elf_core_copy_regs(elfregs, task_pt_regs(t));
> #endif
> 	return 0;

#elif defined doesn't match #ifdef well, how about:

#if defined (ELF_CORE_COPY_TASK_REGS)
...
#elif defined (task_pt_regs)
...
#endif

?

Thank you.

  reply	other threads:[~2009-07-08  4:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-08  2:41 Parag Warudkar
2009-07-08  4:30 ` Amerigo Wang [this message]
2009-07-08 15:46   ` Parag Warudkar
2009-07-09  5:58     ` Amerigo Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090708043036.GA5917@cr0.nay.redhat.com \
    --to=xiyou.wangcong@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=parag.lkml@gmail.com \
    --cc=teawater@gmail.com \
    --cc=tj@kernel.org \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®