All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] Don't give bad kprobes example aka ") < 0))" typo
  2006-11-15 15:56 [PATCH] Don't give bad kprobes example aka ") < 0))" typo Alexey Dobriyan
@ 2006-11-15 11:57 ` Christoph Hellwig
  0 siblings, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2006-11-15 11:57 UTC (permalink / raw)
  To: Alexey Dobriyan; +Cc: akpm, linux-kernel, devel

On Wed, Nov 15, 2006 at 06:56:19PM +0300, Alexey Dobriyan wrote:
> Signed-off-by: Alexey Dobriyan <adobriyan@openvz.org>
> ---
> 
>  Documentation/kprobes.txt |    5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> --- a/Documentation/kprobes.txt
> +++ b/Documentation/kprobes.txt
> @@ -442,9 +442,10 @@ static int __init kprobe_init(void)
>  	kp.fault_handler = handler_fault;
>  	kp.symbol_name = "do_fork";
>  
> -	if ((ret = register_kprobe(&kp) < 0)) {
> +	ret = register_kprobe(&kp);
> +	if (ret < 0) {
>  		printk("register_kprobe failed, returned %d\n", ret);
> -		return -1;
> +		return ret;

This looks good, thanks.


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

* [PATCH] Don't give bad kprobes example aka ") < 0))" typo
@ 2006-11-15 15:56 Alexey Dobriyan
  2006-11-15 11:57 ` Christoph Hellwig
  0 siblings, 1 reply; 2+ messages in thread
From: Alexey Dobriyan @ 2006-11-15 15:56 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel, devel

Signed-off-by: Alexey Dobriyan <adobriyan@openvz.org>
---

 Documentation/kprobes.txt |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

--- a/Documentation/kprobes.txt
+++ b/Documentation/kprobes.txt
@@ -442,9 +442,10 @@ static int __init kprobe_init(void)
 	kp.fault_handler = handler_fault;
 	kp.symbol_name = "do_fork";
 
-	if ((ret = register_kprobe(&kp) < 0)) {
+	ret = register_kprobe(&kp);
+	if (ret < 0) {
 		printk("register_kprobe failed, returned %d\n", ret);
-		return -1;
+		return ret;
 	}
 	printk("kprobe registered\n");
 	return 0;


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

end of thread, other threads:[~2006-11-15 11:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-15 15:56 [PATCH] Don't give bad kprobes example aka ") < 0))" typo Alexey Dobriyan
2006-11-15 11:57 ` Christoph Hellwig

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.