mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: David Howells <dhowells@redhat.com>
Cc: torvalds@osdl.org, akpm@linux-foundation.org, fweisbec@gmail.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] FRV: Fix no-hardware-breakpoint case
Date: Tue, 15 Dec 2009 08:24:39 +0100	[thread overview]
Message-ID: <20091215072439.GA14651@elte.hu> (raw)
In-Reply-To: <20091214140326.11689.80251.stgit@warthog.procyon.org.uk>


* David Howells <dhowells@redhat.com> wrote:

> If there is no hardware breakpoint support, modify_user_hw_breakpoint() tries
> to return a NULL pointer through as an 'int' return value:
> 
> In file included from kernel/exit.c:53:
> include/linux/hw_breakpoint.h: In function 'modify_user_hw_breakpoint':
> include/linux/hw_breakpoint.h:96: warning: return makes integer from pointer without a cast
> 
> Return 0 instead.
> 
> Signed-off-by: David Howells <dhowells@redhat.com>
> ---
> 
>  include/linux/hw_breakpoint.h |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> 
> diff --git a/include/linux/hw_breakpoint.h b/include/linux/hw_breakpoint.h
> index 69f07a9..e268388 100644
> --- a/include/linux/hw_breakpoint.h
> +++ b/include/linux/hw_breakpoint.h
> @@ -93,7 +93,7 @@ register_user_hw_breakpoint(struct perf_event_attr *attr,
>  			    struct task_struct *tsk)	{ return NULL; }
>  static inline int
>  modify_user_hw_breakpoint(struct perf_event *bp,
> -			  struct perf_event_attr *attr)	{ return NULL; }
> +			  struct perf_event_attr *attr)	{ return 0; }

Note, this patch is wrong as it only papers over the warning without 
understanding the underlying bug: the right fix is to return an error code.

The latest perf update has the right fix - AFAICS Linus did the conflict 
resolution correctly so upstream should be fine.

	Ingo

      parent reply	other threads:[~2009-12-15  7:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-14 14:03 David Howells
2009-12-14 14:06 ` Frederic Weisbecker
2009-12-15  7:24 ` Ingo Molnar [this message]

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=20091215072439.GA14651@elte.hu \
    --to=mingo@elte.hu \
    --cc=akpm@linux-foundation.org \
    --cc=dhowells@redhat.com \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.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®