From: Andrei Emeltchenko <Andrei.Emeltchenko.news@gmail.com>
To: Szymon Janc <szymon.janc@tieto.com>
Cc: "linux-bluetooth@vger.kernel.org" <linux-bluetooth@vger.kernel.org>
Subject: Re: [RFC 1/2] Bluetooth: General HCI callback implementation
Date: Wed, 7 Mar 2012 17:50:24 +0200 [thread overview]
Message-ID: <20120307155021.GG3647@aemeltch-MOBL1> (raw)
In-Reply-To: <201203061602.17443.szymon.janc@tieto.com>
Hi Janc,
On Tue, Mar 06, 2012 at 04:02:17PM +0100, Szymon Janc wrote:
> hci_add_cb could return error on failure and that could be used in hci_cmd_cb().
>
> > +void hci_add_cb(struct hci_dev *hdev, __u16 opcode,
> > + void (*cb)(struct hci_dev *hdev, struct cb_cmd *cmd),
> > + void *opt, void (*destructor)(struct cb_cmd *cmd))
> > +{
> > + struct cb_cmd *cmd;
> > +
> > + cmd = kmalloc(sizeof(*cmd), GFP_ATOMIC);
>
> Why atomic? Maybe allow to pass custom gfp mask?
I think I will use gfp mask since I use it also with spinlocks held.
Best regards
Andrei Emeltchenko
next prev parent reply other threads:[~2012-03-07 15:50 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-06 13:16 [RFC 1/2] Bluetooth: General HCI callback implementation Andrei Emeltchenko
2012-03-06 13:16 ` [RFC 2/2] Bluetooth: Process HCI callbacks in a workqueue Andrei Emeltchenko
2012-03-06 15:02 ` Ulisses Furquim
2012-03-07 9:22 ` Andrei Emeltchenko
2012-03-06 15:04 ` Szymon Janc
2012-03-07 9:23 ` Andrei Emeltchenko
2012-03-06 14:57 ` [RFC 1/2] Bluetooth: General HCI callback implementation Ulisses Furquim
2012-03-06 14:59 ` Ulisses Furquim
2012-03-07 9:13 ` Andrei Emeltchenko
2012-03-06 15:02 ` Szymon Janc
2012-03-07 9:19 ` Andrei Emeltchenko
2012-03-07 15:50 ` Andrei Emeltchenko [this message]
2012-03-08 5:53 ` Gustavo Padovan
2012-03-08 7:58 ` Andrei Emeltchenko
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=20120307155021.GG3647@aemeltch-MOBL1 \
--to=andrei.emeltchenko.news@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=szymon.janc@tieto.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