linux-2.6.15-rc2 apm_emu.c audit misc_register() ret. code
Subsystems (2)
PATCH 1/1 linux-2.6.15-rc2 apm_emu.c audit misc_register() ret. code
from: Paolo Teti
fix a missing check on misc_register() return code
---
drivers/macintosh/apm_emu.c renamed from drivers/macintosh/apm_emu.c.orig +5 -1
@@ -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
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors
Re: [KJ][PATCH] linux-2.6.15-rc2 apm_emu.c audit misc_register() ret.
Quoted 11 lines · Paolo Teti
from: Paolo Teti
fix a missing check on
misc_register()return codeSigned-off-by Paolo Teti <[email protected]>---
drivers/macintosh/apm_emu.c renamed from drivers/macintosh/apm_emu.c.orig +0
-0@@ -530,7 +530,11 @@ static int __init apm_emu_init(void)if (apm_proc)
drivers/macintosh/apm_emu.c static int __init apm_emu_init(void) · line 539
Quoted 10 lines
drivers/macintosh/apm_emu.c renamed from drivers/macintosh/apm_emu.c.orig +5
-1apm_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 ([email protected])
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors
Re: [KJ][PATCH] linux-2.6.15-rc2 apm_emu.c audit misc_register() ret.
In reply to Paolo Teti2005/11/24, Christophe Lucas <[email protected]>:
Quoted 8 lines
Good retry :)
Already done here :
http://lists.osdl.org/pipermail/kernel-janitors/2005-June/004243.htmlHave a nice day,
Oops!
Yes it's true!... some _minor_ difference but the patch it's the same.
Pao
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors
Alexey Dobriyan
AppliedRe: [KJ][PATCH] linux-2.6.15-rc2 apm_emu.c audit misc_register() ret.
In reply to Paolo TetiQuoted 7 lines · Christophe Lucas
Quoted 6 lines · Paolo Teti
drivers/macintosh/apm_emu.c renamed from drivers/macintosh/apm_emu.c.orig +0
-0@@ -530,7 +530,11 @@ static int __init apm_emu_init(void)if (apm_proc) apm_proc->owner =THIS_MODULE ;
Quoted 6 lines
drivers/macintosh/apm_emu.c static int __init apm_emu_init(void) · line 537
Quoted 6 lines
drivers/macintosh/apm_emu.c renamed from drivers/macintosh/apm_emu.c.orig +5
-1-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.
Quoted 8 lines
drivers/macintosh/apm_emu.c static int __init apm_emu_init(void) · line 539
Quoted 1 line
drivers/macintosh/apm_emu.c renamed from drivers/macintosh/apm_emu.c.orig +0
-0pmu_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".
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors
Re: [KJ][PATCH] linux-2.6.15-rc2 apm_emu.c audit misc_register() ret.
In reply to Paolo TetiQuoted 4 lines
Speaking of your patch, it shouldn't use
KERN_WARNINGand 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 <[email protected]>
fix a missing check on misc_register() return code
Acked by: Benjamin Herrenschmidt <[email protected]>
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors
Re: [KJ][PATCH] linux-2.6.15-rc2 apm_emu.c audit misc_register() ret.
In reply to Paolo TetiQuoted 10 lines · Paolo Teti
Quoted 4 lines
Speaking of your patch, it shouldn't use
KERN_WARNINGand should (minor nitpick) test for "< 0", not "!= 0".Why?
Looking atmisc_registerfunction the rule is"A zero is returned on success and a negative errno code for failure."
Quoted 8 lines
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 ([email protected])
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors
Re: [KJ][PATCH] linux-2.6.15-rc2 apm_emu.c audit misc_register() ret.
In reply to Paolo TetiQuoted 7 lines
Quoted 1 line
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
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors