Re: [RFC 1/2] Bluetooth: General HCI callback implementation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux