From: Andrew Morton <akpm@linux-foundation.org>
To: David Miller <davem@davemloft.net>
Cc: tony@bakeyournoodle.com, linux-kernel@vger.kernel.org,
benh@kernel.crashing.org
Subject: Re: [PATCH] Silence 'ignoring return value' warnings in drivers/video/aty/radeon_base.c
Date: Tue, 6 May 2008 14:56:08 -0700 [thread overview]
Message-ID: <20080506145608.565b61bf.akpm@linux-foundation.org> (raw)
In-Reply-To: <20080506.144301.233784820.davem@davemloft.net>
On Tue, 06 May 2008 14:43:01 -0700 (PDT)
David Miller <davem@davemloft.net> wrote:
> From: Andrew Morton <akpm@linux-foundation.org>
> Date: Tue, 6 May 2008 14:39:36 -0700
>
> > On Thu, 24 Apr 2008 14:34:01 +1000
> > tony@bakeyournoodle.com (Tony Breeds) wrote:
> >
> > > Current kernel builds warn about:
> > > drivers/video/aty/radeon_base.c: In function 'radeonfb_pci_register':
> > > drivers/video/aty/radeon_base.c:2334: warning: ignoring return value of 'sysfs_create_bin_file', declared with attribute warn_unused_result
> > > drivers/video/aty/radeon_base.c:2336: warning: ignoring return value of 'sysfs_create_bin_file', declared with attribute warn_unused_result
> > >
> > > Do minimal checking of these functions and issue a warning if either
> > > fails. They don't seem to be critical..
> >
> > well OK, but I object to the patch title!
> >
> > The point isn't to silence warnings. It is to fix the problem which that
> > warning is drawing our attention to.
> >
> > So I rewrote the title to "drivers/video/aty/radeon_base.c: notify user if
> > sysfs_create_bin_file() failed".
> >
> > And your fix looks appropriate - if sysfs_create_bin_file() fails we will now get
> > reports of this and we can find out what kernel bug caused this to happen.
>
> The last time someone "fixed" this warning in the radeon driver,
> people lost their consoles.
>
> Just giving a heads up...
heh, thanks.
This one just emits a warning:
@@ -2340,9 +2341,12 @@ static int __devinit radeonfb_pci_regist
/* Register some sysfs stuff (should be done better) */
if (rinfo->mon1_EDID)
- sysfs_create_bin_file(&rinfo->pdev->dev.kobj, &edid1_attr);
+ err |= sysfs_create_bin_file(&rinfo->pdev->dev.kobj, &edid1_attr);
if (rinfo->mon2_EDID)
- sysfs_create_bin_file(&rinfo->pdev->dev.kobj, &edid2_attr);
+ err |= sysfs_create_bin_file(&rinfo->pdev->dev.kobj, &edid2_attr);
+ if (err)
+ pr_warning("%s() Creating sysfs files failed, continuing\n",
+ __func__);
/* save current mode regs before we switch into the new one
* so we can restore this upon __exit
_
So from what you say, it sounds like we will be seeing that warning. I
wonder why.
next prev parent reply other threads:[~2008-05-06 21:57 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-24 4:34 [PATCH] Silence 'ignoring return value' warnings in drivers/video/aty/radeon_base.c Tony Breeds
2008-05-06 21:39 ` Andrew Morton
2008-05-06 21:43 ` David Miller
2008-05-06 21:56 ` Andrew Morton [this message]
2008-05-07 4:00 ` Arjan van de Ven
2008-05-07 4:12 ` Andrew Morton
2008-05-07 4:15 ` Arjan van de Ven
2008-05-07 4:20 ` Arjan van de Ven
2008-05-07 4:37 ` Benjamin Herrenschmidt
2008-05-07 4:23 ` Andrew Morton
2008-05-07 4:26 ` Andrew Morton
2008-05-07 4:41 ` Arjan van de Ven
2008-05-07 4:37 ` Arjan van de Ven
2008-05-07 5:40 ` Paul Mackerras
2008-05-07 5:49 ` Benjamin Herrenschmidt
2008-05-07 0:54 ` Benjamin Herrenschmidt
2008-05-07 1:20 ` Andrew Morton
2008-05-07 4:33 ` Benjamin Herrenschmidt
2008-05-07 8:23 ` Cornelia Huck
2008-05-07 21:43 ` Benjamin Herrenschmidt
2008-05-08 7:34 ` Cornelia Huck
2008-05-08 7:49 ` Benjamin Herrenschmidt
2008-05-08 8:36 ` Cornelia Huck
2008-05-08 22:03 ` Greg KH
2008-05-08 23:06 ` Benjamin Herrenschmidt
2008-05-08 23:50 ` Paul Mackerras
2008-05-09 0:02 ` Harvey Harrison
2008-05-09 5:32 ` Cornelia Huck
2008-05-09 5:33 ` Cornelia Huck
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=20080506145608.565b61bf.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=benh@kernel.crashing.org \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=tony@bakeyournoodle.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox