From: Paul Mackerras <paulus@samba.org>
To: Andrew Morton <akpm@osdl.org>
Cc: greg@kroah.com, linux-kernel@vger.kernel.org
Subject: Re: Why is device_create_file __must_check?
Date: Tue, 10 Oct 2006 17:03:58 +1000 [thread overview]
Message-ID: <17707.17886.823268.538399@cargo.ozlabs.ibm.com> (raw)
In-Reply-To: <20061009222641.96c4acb5.akpm@osdl.org>
Andrew Morton writes:
> > So we have to add printks in all sorts of places where the
> > device_create_file has never failed before. If you're that concerned,
>
> aren't you concerned too?
Not about the ones that have shown no sign of failing, no...
Most of the sites I have looked at have been cases where the kernel
genuinely doesn't care whether the device_create_file call succeeded
or failed. Adding an if and printk in all these places seems like
pointless bloat when it could be done in one place - namely
device_create_file. In one or two cases the return value from
device_create_file can be returned as its caller's return value, but
these were the minority. In no cases that I have looked at was there
any other suitable action to take.
> > why not add a WARN_ON(error) in device_create_file() ?
>
> That might be suitable, yup.
Greg claims that people ignore WARN_ON messages. If that's true, I
fail to see how adding printks will help.
Paul.
next prev parent reply other threads:[~2006-10-10 7:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-10 4:32 Paul Mackerras
2006-10-10 4:49 ` Andrew Morton
2006-10-10 5:04 ` Greg KH
2006-10-10 5:14 ` Paul Mackerras
2006-10-10 5:26 ` Andrew Morton
2006-10-10 7:03 ` Paul Mackerras [this message]
2006-10-10 5:27 ` Greg KH
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=17707.17886.823268.538399@cargo.ozlabs.ibm.com \
--to=paulus@samba.org \
--cc=akpm@osdl.org \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.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 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®