From: WANG Cong <xiyou.wangcong@gmail.com>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: LKML <linux-kernel@vger.kernel.org>, gregkh@suse.de, akpm@osdl.org
Subject: Re: __must_check (stir the pot :-))
Date: Tue, 15 May 2007 16:50:16 +0800 [thread overview]
Message-ID: <20070515085016.GB3838@localhost.localdomain> (raw)
In-Reply-To: <20070515173146.505952d1.sfr@canb.auug.org.au>
On Tue, May 15, 2007 at 05:31:46PM +1000, Stephen Rothwell wrote:
>So I am looking at "fixing" some of the warning produced by __must_check
>but then I see (things like):
>
>drivers/base/core.c: In function 'device_add':
>drivers/base/core.c:714: warning: ignoring return value of 'sysfs_create_link', declared with attribute warn_unused_result
>drivers/base/core.c:719: warning: ignoring return value of 'sysfs_create_link', declared with attribute warn_unused_result
>drivers/base/core.c:722: warning: ignoring return value of 'sysfs_create_link', declared with attribute warn_unused_result
>drivers/base/core.c:728: warning: ignoring return value of 'sysfs_create_link', declared with attribute warn_unused_result
>drivers/base/core.c: In function 'device_rename':
>drivers/base/core.c:1187: warning: ignoring return value of 'sysfs_create_link', declared with attribute warn_unused_result
>drivers/base/core.c:1197: warning: ignoring return value of 'sysfs_create_link', declared with attribute warn_unused_result
>
>and things like this in drivers/base/sys.c:
>
>int sysdev_create_file(struct sys_device * s, struct sysdev_attribute * a)
>{
> return sysfs_create_file(&s->kobj, &a->attr);
>}
>
>where sysfs_create_file() is marked __must_check and sysdev_create_file()
>isn't.
>
>So the questions come to mind: Do we really care if our core
>infrastructure doesn't? Can we care if the core infrastructure doesn't
>propogate the error returns?
>
>Flame away, I am prepared to ignore all opinions :-)
Hi!
I had noticed these warnings yet and had tried to fix them. But these ones are not relatively easy to fix, since they are nested in some complex contexts.
Can we leave this job to Greg? (Add some CCs below.)
CC: gregkh@suse.de
CC: akpm@osdl.org
Regards!
WANG Cong
next prev parent reply other threads:[~2007-05-15 8:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-15 7:31 Stephen Rothwell
2007-05-15 8:50 ` WANG Cong [this message]
2007-05-15 9:15 ` Cornelia Huck
2007-05-15 9:17 ` Jeff Garzik
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=20070515085016.GB3838@localhost.localdomain \
--to=xiyou.wangcong@gmail.com \
--cc=akpm@osdl.org \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=sfr@canb.auug.org.au \
/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
all inboxes | Powered by JetHome®