From: Jean Tourrilhes <jt@bougret.hpl.hp.com>
To: Jeff Garzik <jgarzik@mandrakesoft.com>
Cc: Linus Torvalds <torvalds@transmeta.com>,
Linux kernel mailing list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2.5.6] New wireless driver API part 2
Date: Mon, 11 Mar 2002 14:02:44 -0800 [thread overview]
Message-ID: <20020311140244.A10810@bougret.hpl.hp.com> (raw)
In-Reply-To: <20020311115523.A10682@bougret.hpl.hp.com> <3C8D2693.9000801@mandrakesoft.com>
In-Reply-To: <3C8D2693.9000801@mandrakesoft.com>; from jgarzik@mandrakesoft.com on Mon, Mar 11, 2002 at 04:50:11PM -0500
On Mon, Mar 11, 2002 at 04:50:11PM -0500, Jeff Garzik wrote:
> Jean Tourrilhes wrote:
>
> Overall looks good. My only minor objection would be that this function
> should return an error value. Clearly the kmalloc can fail, at least.
>
> Jeff
Thanks for the quick review (as usual), very much appreciated.
Now, for the return value...
I've debated this precise point. Here is the comment that I
wrote in the code you just quoted :
/* Note : we don't return an error to the driver, because
* the driver would not know what to do about it. It can't
* return an error to the user, because the event is not
* initiated by a user request.
* The best the driver could do is to log an error message.
* We will do it ourselves instead...
*/
The failure to deliver an event to the user is not critical,
and I don't really see what the driver code would do with a return
code. In fact, event delivery to user space is not reliable (netlink
may drop it in case its queues are full - this is more likely than
kmalloc failure), and my code only check a few of those failure
conditions, so the driver has no way to know if the message reached
its intended destination.
In fact, I eliminated the return code *on purpose*, to prevent
driver writer to do stupid things (like shutting down the driver) or
adding additional log message (waste at this point).
Convincing enough ?
Have fun...
Jean
next prev parent reply other threads:[~2002-03-11 22:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-03-11 19:55 Jean Tourrilhes
2002-03-11 21:50 ` Jeff Garzik
2002-03-11 22:02 ` Jean Tourrilhes [this message]
2002-03-11 22:24 ` 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=20020311140244.A10810@bougret.hpl.hp.com \
--to=jt@bougret.hpl.hp.com \
--cc=jgarzik@mandrakesoft.com \
--cc=jt@hpl.hp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.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
all inboxes | Powered by JetHome®