linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] kprobes: remove redundant config check
@ 2008-06-10 17:13 Abhishek Sagar
  2008-06-10 19:35 ` Masami Hiramatsu
  2008-06-11  3:59 ` Ananth N Mavinakayanahalli
  0 siblings, 2 replies; 4+ messages in thread
From: Abhishek Sagar @ 2008-06-10 17:13 UTC (permalink / raw)
  To: LKML; +Cc: ananth, Masami Hiramatsu, akpm

Hi,

I noticed that there's a CONFIG_KPROBES check inside kernel/kprobes.c,
which seems redundant. Can be removed?

Diff'd against v2.6.26-rc5.


Signed-off-by: Abhishek Sagar <sagar.abhishek@gmail.com>
---
remove redundant CONFIG_KPROBES check.

diff --git a/kernel/kprobes.c b/kernel/kprobes.c
index 1e0250c..2b2cae2 100644
--- a/kernel/kprobes.c
+++ b/kernel/kprobes.c
@@ -1283,13 +1283,8 @@ EXPORT_SYMBOL_GPL(register_jprobe);
 EXPORT_SYMBOL_GPL(unregister_jprobe);
 EXPORT_SYMBOL_GPL(register_jprobes);
 EXPORT_SYMBOL_GPL(unregister_jprobes);
-#ifdef CONFIG_KPROBES
 EXPORT_SYMBOL_GPL(jprobe_return);
-#endif
-
-#ifdef CONFIG_KPROBES
 EXPORT_SYMBOL_GPL(register_kretprobe);
 EXPORT_SYMBOL_GPL(unregister_kretprobe);
 EXPORT_SYMBOL_GPL(register_kretprobes);
 EXPORT_SYMBOL_GPL(unregister_kretprobes);
-#endif

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] kprobes: remove redundant config check
  2008-06-10 17:13 [PATCH] kprobes: remove redundant config check Abhishek Sagar
@ 2008-06-10 19:35 ` Masami Hiramatsu
  2008-06-11  3:59 ` Ananth N Mavinakayanahalli
  1 sibling, 0 replies; 4+ messages in thread
From: Masami Hiramatsu @ 2008-06-10 19:35 UTC (permalink / raw)
  To: Abhishek Sagar; +Cc: LKML, ananth, akpm

Abhishek Sagar wrote:
> Hi,
> 
> I noticed that there's a CONFIG_KPROBES check inside kernel/kprobes.c,
> which seems redundant. Can be removed?

Yes, it can be removed, because kernel/kprobes.c is not complied when
CONFIG_KPROBES=n.

Thank you,

> 
> Diff'd against v2.6.26-rc5.
> 
> 
> Signed-off-by: Abhishek Sagar <sagar.abhishek@gmail.com>
Acked-by: Masami Hiramatsu <mhiramat@redhat.com>

-- 
Masami Hiramatsu

Software Engineer
Hitachi Computer Products (America) Inc.
Software Solutions Division

e-mail: mhiramat@redhat.com


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] kprobes: remove redundant config check
  2008-06-10 17:13 [PATCH] kprobes: remove redundant config check Abhishek Sagar
  2008-06-10 19:35 ` Masami Hiramatsu
@ 2008-06-11  3:59 ` Ananth N Mavinakayanahalli
  2008-06-11  5:53   ` Abhishek Sagar
  1 sibling, 1 reply; 4+ messages in thread
From: Ananth N Mavinakayanahalli @ 2008-06-11  3:59 UTC (permalink / raw)
  To: Abhishek Sagar; +Cc: LKML, Masami Hiramatsu, akpm

On Tue, Jun 10, 2008 at 10:43:02PM +0530, Abhishek Sagar wrote:
> Hi,
> 
> I noticed that there's a CONFIG_KPROBES check inside kernel/kprobes.c,
> which seems redundant. Can be removed?
> 
> Diff'd against v2.6.26-rc5.
> 
> 
> Signed-off-by: Abhishek Sagar <sagar.abhishek@gmail.com>
> ---
> remove redundant CONFIG_KPROBES check.
> 
> diff --git a/kernel/kprobes.c b/kernel/kprobes.c
> index 1e0250c..2b2cae2 100644
> --- a/kernel/kprobes.c
> +++ b/kernel/kprobes.c
> @@ -1283,13 +1283,8 @@ EXPORT_SYMBOL_GPL(register_jprobe);
>  EXPORT_SYMBOL_GPL(unregister_jprobe);
>  EXPORT_SYMBOL_GPL(register_jprobes);
>  EXPORT_SYMBOL_GPL(unregister_jprobes);
> -#ifdef CONFIG_KPROBES
>  EXPORT_SYMBOL_GPL(jprobe_return);
> -#endif
> -
> -#ifdef CONFIG_KPROBES
>  EXPORT_SYMBOL_GPL(register_kretprobe);
>  EXPORT_SYMBOL_GPL(unregister_kretprobe);
>  EXPORT_SYMBOL_GPL(register_kretprobes);
>  EXPORT_SYMBOL_GPL(unregister_kretprobes);
> -#endif

Abhishek,

This was intentional (to take care of some gcc 4.2 issues). See commit
cd5bfea278987ebfe60f3ff92a01696b17c4f978 (fix compilation with gcc 4.2)
from Peter Chubb for details.

Ananth

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] kprobes: remove redundant config check
  2008-06-11  3:59 ` Ananth N Mavinakayanahalli
@ 2008-06-11  5:53   ` Abhishek Sagar
  0 siblings, 0 replies; 4+ messages in thread
From: Abhishek Sagar @ 2008-06-11  5:53 UTC (permalink / raw)
  To: ananth; +Cc: LKML, Masami Hiramatsu, akpm

On 6/11/08, Ananth N Mavinakayanahalli <ananth@in.ibm.com> wrote:
> Abhishek,
>
>  This was intentional (to take care of some gcc 4.2 issues). See commit
>  cd5bfea278987ebfe60f3ff92a01696b17c4f978 (fix compilation with gcc 4.2)
>  from Peter Chubb for details.

Yea, I checked it out and the problem the commit seems to be fixing is that
EXPORT_SYMBOL  complains for static symbols with gcc-4.2. Can't see why
there was a need to cram CONFIG_KPROBES inside kprobes.c. This
check was sneaked in defensively it seems, and is unnecessary.

--
Regards,
Abhishek Sagar

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-06-11  5:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-10 17:13 [PATCH] kprobes: remove redundant config check Abhishek Sagar
2008-06-10 19:35 ` Masami Hiramatsu
2008-06-11  3:59 ` Ananth N Mavinakayanahalli
2008-06-11  5:53   ` Abhishek Sagar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).