From: Michael Ellerman <michael@ellerman.id.au>
To: Emil Medve <Emilian.Medve@Freescale.com>
Cc: linuxppc-dev@ozlabs.org, paulus@samba.org, linuxppc-embedded@ozlabs.org
Subject: Re: [PATCH] [POWERPC] Fix return value check logic
Date: Fri, 23 May 2008 11:13:10 +1000 [thread overview]
Message-ID: <1211505190.7671.6.camel@localhost> (raw)
In-Reply-To: <1211485762-29637-1-git-send-email-Emilian.Medve@Freescale.com>
[-- 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 --]
next prev parent reply other threads:[~2008-05-23 1:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-22 19:49 [PATCH] [POWERPC] Fix return value check logic Emil Medve
2008-05-23 1:13 ` Michael Ellerman [this message]
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
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=1211505190.7671.6.camel@localhost \
--to=michael@ellerman.id.au \
--cc=Emilian.Medve@Freescale.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=linuxppc-embedded@ozlabs.org \
--cc=paulus@samba.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 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.