* [PATCH] [POWERPC] Fix return value check logic
@ 2008-05-22 19:49 Emil Medve
2008-05-23 1:13 ` Michael Ellerman
0 siblings, 1 reply; 6+ messages in thread
From: Emil Medve @ 2008-05-22 19:49 UTC (permalink / raw)
To: paulus, linuxppc-dev, linuxppc-embedded; +Cc: Emil Medve
debugfs_create_file() return a non-NULL (non-zero) value in case of success
This fixes this non-critical boot-time debuging error message:
[ 1.316386] calling irq_debugfs_init+0x0/0x50
[ 1.316399] initcall irq_debugfs_init+0x0/0x50 returned -12 after 0 msecs
[ 1.316411] initcall irq_debugfs_init+0x0/0x50 returned with error code -12
Signed-off-by: Emil Medve <Emilian.Medve@Freescale.com>
---
$ scripts/checkpatch.pl 0001--POWERPC-Fix-return-value-check-logic.patch
total: 0 errors, 0 warnings, 8 lines checked
0001--POWERPC-Fix-return-value-check-logic.patch has no obvious style problems and is ready for submission.
arch/powerpc/kernel/irq.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
index 2f73f70..bcc249d 100644
--- a/arch/powerpc/kernel/irq.c
+++ b/arch/powerpc/kernel/irq.c
@@ -1073,7 +1073,7 @@ static const struct file_operations virq_debug_fops = {
static int __init irq_debugfs_init(void)
{
if (debugfs_create_file("virq_mapping", S_IRUGO, powerpc_debugfs_root,
- NULL, &virq_debug_fops))
+ NULL, &virq_debug_fops) == NULL)
return -ENOMEM;
return 0;
--
1.5.5.GIT
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] [POWERPC] Fix return value check logic
2008-05-22 19:49 [PATCH] [POWERPC] Fix return value check logic Emil Medve
@ 2008-05-23 1:13 ` Michael Ellerman
2008-05-23 14:19 ` Medve Emilian
0 siblings, 1 reply; 6+ messages in thread
From: Michael Ellerman @ 2008-05-23 1:13 UTC (permalink / raw)
To: Emil Medve; +Cc: linuxppc-dev, paulus, linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 1772 bytes --]
On Thu, 2008-05-22 at 14:49 -0500, Emil Medve wrote:
> debugfs_create_file() return a non-NULL (non-zero) value in case of success
>
> This fixes this non-critical boot-time debuging error message:
>
> [ 1.316386] calling irq_debugfs_init+0x0/0x50
> [ 1.316399] initcall irq_debugfs_init+0x0/0x50 returned -12 after 0 msecs
> [ 1.316411] initcall irq_debugfs_init+0x0/0x50 returned with error code -12
>
> Signed-off-by: Emil Medve <Emilian.Medve@Freescale.com>
> ---
>
> $ scripts/checkpatch.pl 0001--POWERPC-Fix-return-value-check-logic.patch
> total: 0 errors, 0 warnings, 8 lines checked
>
> 0001--POWERPC-Fix-return-value-check-logic.patch has no obvious style problems and is ready for submission.
>
> arch/powerpc/kernel/irq.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
> index 2f73f70..bcc249d 100644
> --- a/arch/powerpc/kernel/irq.c
> +++ b/arch/powerpc/kernel/irq.c
> @@ -1073,7 +1073,7 @@ static const struct file_operations virq_debug_fops = {
> static int __init irq_debugfs_init(void)
> {
> if (debugfs_create_file("virq_mapping", S_IRUGO, powerpc_debugfs_root,
> - NULL, &virq_debug_fops))
> + NULL, &virq_debug_fops) == NULL)
> return -ENOMEM;
That won't work if CONFIG_DEBUG_FS is not defined, because in that case
debugfs_create_file() returns -ENODEV. I guess the whole virq debug code
should be wrapped in #ifdef CONFIG_DEBUG_FS.
cheers
--
Michael Ellerman
OzLabs, IBM Australia Development Lab
wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)
We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH] [POWERPC] Fix return value check logic
2008-05-23 1:13 ` Michael Ellerman
@ 2008-05-23 14:19 ` Medve Emilian
2008-05-23 14:39 ` Medve Emilian
0 siblings, 1 reply; 6+ messages in thread
From: Medve Emilian @ 2008-05-23 14:19 UTC (permalink / raw)
To: michael; +Cc: linuxppc-dev, paulus, linuxppc-embedded
Hello Michael,
> That won't work if CONFIG_DEBUG_FS is not defined, because in=20
> that case
> debugfs_create_file() returns -ENODEV.
Will respin.
Thanks,
Emil.
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH] [POWERPC] Fix return value check logic
2008-05-23 14:19 ` Medve Emilian
@ 2008-05-23 14:39 ` Medve Emilian
2008-05-23 14:52 ` Michael Ellerman
0 siblings, 1 reply; 6+ messages in thread
From: Medve Emilian @ 2008-05-23 14:39 UTC (permalink / raw)
To: michael; +Cc: linuxppc-dev, paulus, linuxppc-embedded
Hello Michael,
> > That won't work if CONFIG_DEBUG_FS is not defined, because in=20
> > that case
> > debugfs_create_file() returns -ENODEV.
>=20
> Will respin.
At a second glance in arch/powerpc/Kconfig.debug, VIRQ_DEBUG depends on
DEBUG_FS so I think that the patch should work as is.
Cheers,
Emil.
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH] [POWERPC] Fix return value check logic
2008-05-23 14:39 ` Medve Emilian
@ 2008-05-23 14:52 ` Michael Ellerman
2008-06-15 16:48 ` Medve Emilian
0 siblings, 1 reply; 6+ messages in thread
From: Michael Ellerman @ 2008-05-23 14:52 UTC (permalink / raw)
To: Medve Emilian; +Cc: linuxppc-dev, paulus, linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 744 bytes --]
On Fri, 2008-05-23 at 07:39 -0700, Medve Emilian wrote:
> Hello Michael,
>
>
> > > That won't work if CONFIG_DEBUG_FS is not defined, because in
> > > that case
> > > debugfs_create_file() returns -ENODEV.
> >
> > Will respin.
>
> At a second glance in arch/powerpc/Kconfig.debug, VIRQ_DEBUG depends on
> DEBUG_FS so I think that the patch should work as is.
You're right, thanks for checking. In that case:
Acked-by: Michael Ellerman <michael@ellerman.id.au>
cheers
--
Michael Ellerman
OzLabs, IBM Australia Development Lab
wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)
We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH] [POWERPC] Fix return value check logic
2008-05-23 14:52 ` Michael Ellerman
@ 2008-06-15 16:48 ` Medve Emilian
0 siblings, 0 replies; 6+ messages in thread
From: Medve Emilian @ 2008-06-15 16:48 UTC (permalink / raw)
To: paulus; +Cc: linuxppc-dev, linuxppc-embedded
Hello Paul,
> You're right, thanks for checking. In that case:
>=20
> Acked-by: Michael Ellerman <michael@ellerman.id.au>
I wonder what did you decide about this patch?
Cheer,
Emil.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-06-15 16:48 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-22 19:49 [PATCH] [POWERPC] Fix return value check logic Emil Medve
2008-05-23 1:13 ` Michael Ellerman
2008-05-23 14:19 ` Medve Emilian
2008-05-23 14:39 ` Medve Emilian
2008-05-23 14:52 ` Michael Ellerman
2008-06-15 16:48 ` Medve Emilian
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).