All of lore.kernel.org
 help / color / mirror / Atom feed
* [KJ] [PATCH] linux-2.6.15-rc2 apm_emu.c audit misc_register() ret.
@ 2005-11-22 18:07 Paolo Teti
  0 siblings, 0 replies; 8+ messages in thread
From: Paolo Teti @ 2005-11-22 18:07 UTC (permalink / raw)
  To: kernel-janitors

from: Paolo Teti

fix a missing check on misc_register() return code

Signed-off-by: Paolo Teti <tetipaol@libero.it>

---
--- linux-2.6.15-rc2/drivers/macintosh/apm_emu.c.orig	Tue Nov 22 17:37:06 2005
+++ linux-2.6.15-rc2/drivers/macintosh/apm_emu.c	Tue Nov 22 18:03:31 2005
@@ -530,7 +530,11 @@ static int __init apm_emu_init(void)
 	if (apm_proc)
 		apm_proc->owner = THIS_MODULE;
 
-	misc_register(&apm_device);
+	if (misc_register(&apm_device) != 0) {
+		remove_proc_entry("apm", NULL);
+		printk(KERN_ERR "apm_emu: Failed to register APM Emulation.\n");
+		return -ENODEV;
+	}
 
 	pmu_register_sleep_notifier(&apm_sleep_notifier);
 



_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

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

* [KJ][PATCH] linux-2.6.15-rc2 apm_emu.c audit misc_register() ret. code
@ 2005-11-23  8:09 Paolo Teti
  2005-11-24  7:32 ` [KJ][PATCH] linux-2.6.15-rc2 apm_emu.c audit misc_register() ret Christophe Lucas
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: Paolo Teti @ 2005-11-23  8:09 UTC (permalink / raw)
  To: kernel-janitors

from: Paolo Teti

fix a missing check on misc_register() return code

Signed-off-by: Paolo Teti <paolo.teti@gmail.com>

---
--- linux-2.6.15-rc2/drivers/macintosh/apm_emu.c.orig	Tue Nov 22 17:37:06 2005
+++ linux-2.6.15-rc2/drivers/macintosh/apm_emu.c	Tue Nov 22 18:03:31 2005
@@ -530,7 +530,11 @@ static int __init apm_emu_init(void)
 	if (apm_proc)
 		apm_proc->owner = THIS_MODULE;

-	misc_register(&apm_device);
+	if (misc_register(&apm_device) != 0) {
+		remove_proc_entry("apm", NULL);
+		printk(KERN_ERR "apm_emu: Failed to register APM Emulation.\n");
+		return -ENODEV;
+	}

 	pmu_register_sleep_notifier(&apm_sleep_notifier);

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

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

* Re: [KJ][PATCH] linux-2.6.15-rc2 apm_emu.c audit misc_register() ret.
  2005-11-23  8:09 [KJ][PATCH] linux-2.6.15-rc2 apm_emu.c audit misc_register() ret. code Paolo Teti
@ 2005-11-24  7:32 ` Christophe Lucas
  2005-11-24  8:02 ` Paolo Teti
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: Christophe Lucas @ 2005-11-24  7:32 UTC (permalink / raw)
  To: kernel-janitors

[-- Attachment #1: Type: text/plain, Size: 889 bytes --]

Paolo Teti (paolo.teti@gmail.com) wrote:
> from: Paolo Teti
> 
> fix a missing check on misc_register() return code
> 
> Signed-off-by: Paolo Teti <paolo.teti@gmail.com>
> 
> ---
> --- linux-2.6.15-rc2/drivers/macintosh/apm_emu.c.orig	Tue Nov 22 17:37:06 2005
> +++ linux-2.6.15-rc2/drivers/macintosh/apm_emu.c	Tue Nov 22 18:03:31 2005
> @@ -530,7 +530,11 @@ static int __init apm_emu_init(void)
>  	if (apm_proc)
>  		apm_proc->owner = THIS_MODULE;
> 
> -	misc_register(&apm_device);
> +	if (misc_register(&apm_device) != 0) {
> +		remove_proc_entry("apm", NULL);
> +		printk(KERN_ERR "apm_emu: Failed to register APM Emulation.\n");
> +		return -ENODEV;
> +	}
> 
>  	pmu_register_sleep_notifier(&apm_sleep_notifier);
 

Good retry :)

Already done here :

	http://lists.osdl.org/pipermail/kernel-janitors/2005-June/004243.html

Have a nice day,

				- Christophe (clucas@rotomalug.org)


[-- Attachment #2: Type: text/plain, Size: 168 bytes --]

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

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

* Re: [KJ][PATCH] linux-2.6.15-rc2 apm_emu.c audit misc_register() ret.
  2005-11-23  8:09 [KJ][PATCH] linux-2.6.15-rc2 apm_emu.c audit misc_register() ret. code Paolo Teti
  2005-11-24  7:32 ` [KJ][PATCH] linux-2.6.15-rc2 apm_emu.c audit misc_register() ret Christophe Lucas
@ 2005-11-24  8:02 ` Paolo Teti
  2005-11-26 20:39 ` Alexey Dobriyan
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: Paolo Teti @ 2005-11-24  8:02 UTC (permalink / raw)
  To: kernel-janitors

2005/11/24, Christophe Lucas <clucas@rotomalug.org>:
> Good retry :)
>
> Already done here :
>
>         http://lists.osdl.org/pipermail/kernel-janitors/2005-June/004243.html
>
> Have a nice day,
>

Oops!
Yes it's true!... some _minor_ difference but the patch it's the same.

Pao

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

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

* Re: [KJ][PATCH] linux-2.6.15-rc2 apm_emu.c audit misc_register() ret.
  2005-11-23  8:09 [KJ][PATCH] linux-2.6.15-rc2 apm_emu.c audit misc_register() ret. code Paolo Teti
  2005-11-24  7:32 ` [KJ][PATCH] linux-2.6.15-rc2 apm_emu.c audit misc_register() ret Christophe Lucas
  2005-11-24  8:02 ` Paolo Teti
@ 2005-11-26 20:39 ` Alexey Dobriyan
  2005-11-28 10:34 ` Paolo Teti
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: Alexey Dobriyan @ 2005-11-26 20:39 UTC (permalink / raw)
  To: kernel-janitors

[-- Attachment #1: Type: text/plain, Size: 922 bytes --]

On Thu, Nov 24, 2005 at 08:32:01AM +0100, Christophe Lucas wrote:
> Paolo Teti (paolo.teti@gmail.com) wrote:
> > --- linux-2.6.15-rc2/drivers/macintosh/apm_emu.c.orig
> > +++ linux-2.6.15-rc2/drivers/macintosh/apm_emu.c
> > @@ -530,7 +530,11 @@ static int __init apm_emu_init(void)
> >  	if (apm_proc)
> >  		apm_proc->owner = THIS_MODULE;
> >
> > -	misc_register(&apm_device);
> > +	if (misc_register(&apm_device) != 0) {
> > +		remove_proc_entry("apm", NULL);
> > +		printk(KERN_ERR "apm_emu: Failed to register APM Emulation.\n");
> > +		return -ENODEV;
> > +	}

applied, thanks.

> >  	pmu_register_sleep_notifier(&apm_sleep_notifier);
>
>
> Good retry :)
>
> Already done here :
>
> 	http://lists.osdl.org/pipermail/kernel-janitors/2005-June/004243.html

[You sort your patch collection. Nothing happens.]

Speaking of your patch, it shouldn't use KERN_WARNING and should (minor
nitpick) test for "< 0", not "!= 0".


[-- Attachment #2: Type: text/plain, Size: 168 bytes --]

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

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

* Re: [KJ][PATCH] linux-2.6.15-rc2 apm_emu.c audit misc_register() ret.
  2005-11-23  8:09 [KJ][PATCH] linux-2.6.15-rc2 apm_emu.c audit misc_register() ret. code Paolo Teti
                   ` (2 preceding siblings ...)
  2005-11-26 20:39 ` Alexey Dobriyan
@ 2005-11-28 10:34 ` Paolo Teti
  2005-11-28 11:25 ` Christophe Lucas
  2005-11-28 12:53 ` Paolo Teti
  5 siblings, 0 replies; 8+ messages in thread
From: Paolo Teti @ 2005-11-28 10:34 UTC (permalink / raw)
  To: kernel-janitors

> Speaking of your patch, it shouldn't use KERN_WARNING and should (minor
> nitpick) test for "< 0", not "!= 0".
>
>

Why?
Looking at misc_register function the rule is

"A zero is returned on success and a negative errno code for failure."

So test for !=0 is also correct!!

Sorry probably because I have used Ccr instead of Cc I have also sent this patch
to Benjamin Herrenschmidt ( the ppc APM manteiner) and now this patch
is on the -mm
tree as show below!

Sorry!!

----
The patch titled

    apm_emu.c: fix a missing check on misc_register() return code

has been added to the -mm tree.  Its filename is

    apm_emuc-fix-a-missing-check-on-misc_register-return-code.patch


From: Paolo Teti <paolo.teti@gmail.com>

fix a missing check on misc_register() return code

Signed-off-by: Paolo Teti <tetipaol@libero.it>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>


Acked by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

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

* Re: [KJ][PATCH] linux-2.6.15-rc2 apm_emu.c audit misc_register() ret.
  2005-11-23  8:09 [KJ][PATCH] linux-2.6.15-rc2 apm_emu.c audit misc_register() ret. code Paolo Teti
                   ` (3 preceding siblings ...)
  2005-11-28 10:34 ` Paolo Teti
@ 2005-11-28 11:25 ` Christophe Lucas
  2005-11-28 12:53 ` Paolo Teti
  5 siblings, 0 replies; 8+ messages in thread
From: Christophe Lucas @ 2005-11-28 11:25 UTC (permalink / raw)
  To: kernel-janitors

[-- Attachment #1: Type: text/plain, Size: 779 bytes --]

Paolo Teti (paolo.teti@gmail.com) wrote:
> > Speaking of your patch, it shouldn't use KERN_WARNING and should (minor
> > nitpick) test for "< 0", not "!= 0".
> >
> >
> 
> Why?
> Looking at misc_register function the rule is
> 
> "A zero is returned on success and a negative errno code for failure."
> 
> So test for !=0 is also correct!!
> 
> Sorry probably because I have used Ccr instead of Cc I have also sent this patch
> to Benjamin Herrenschmidt ( the ppc APM manteiner) and now this patch
> is on the -mm
> tree as show below!
> 
> Sorry!!
 
You don't have to be sorry. It is about my patch Alexey say that.

I understand your reply Alexey. I would have prefered to know that in
July 2005 not in November 2005.

Have a nice day,

				- Christophe (clucas@rotomalug.org)


[-- Attachment #2: Type: text/plain, Size: 168 bytes --]

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

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

* Re: [KJ][PATCH] linux-2.6.15-rc2 apm_emu.c audit misc_register() ret.
  2005-11-23  8:09 [KJ][PATCH] linux-2.6.15-rc2 apm_emu.c audit misc_register() ret. code Paolo Teti
                   ` (4 preceding siblings ...)
  2005-11-28 11:25 ` Christophe Lucas
@ 2005-11-28 12:53 ` Paolo Teti
  5 siblings, 0 replies; 8+ messages in thread
From: Paolo Teti @ 2005-11-28 12:53 UTC (permalink / raw)
  To: kernel-janitors

> > Sorry!!
>
> You don't have to be sorry. It is about my patch Alexey say that.
>
> I understand your reply Alexey. I would have prefered to know that in
> July 2005 not in November 2005.
>

Ok. Christophe

but I have asked "sorry" because I have sent also to Benjamin the patch
(probably I have used Ccr instead of Cc) and know the patch is in the -mm tree
checked by Benjamin

Hi, Pao

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

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

end of thread, other threads:[~2005-11-28 12:53 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-23  8:09 [KJ][PATCH] linux-2.6.15-rc2 apm_emu.c audit misc_register() ret. code Paolo Teti
2005-11-24  7:32 ` [KJ][PATCH] linux-2.6.15-rc2 apm_emu.c audit misc_register() ret Christophe Lucas
2005-11-24  8:02 ` Paolo Teti
2005-11-26 20:39 ` Alexey Dobriyan
2005-11-28 10:34 ` Paolo Teti
2005-11-28 11:25 ` Christophe Lucas
2005-11-28 12:53 ` Paolo Teti
  -- strict thread matches above, loose matches on Subject: below --
2005-11-22 18:07 [KJ] [PATCH] " Paolo Teti

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.